From d6f4322859846f87bdd452c0af97c7b7d5c63983 Mon Sep 17 00:00:00 2001 From: Jesse Rosalia Date: Thu, 5 Dec 2024 12:12:05 -0800 Subject: [PATCH] added generated files with STJ support (again) --- .../Entities/AccountLinks/AccountLink.cs | 17 + .../AccountSessions/AccountSession.cs | 22 ++ .../AccountSessionComponents.cs | 36 ++ ...countSessionComponentsAccountManagement.cs | 9 + ...sionComponentsAccountManagementFeatures.cs | 9 + ...countSessionComponentsAccountOnboarding.cs | 9 + ...sionComponentsAccountOnboardingFeatures.cs | 9 + .../AccountSessionComponentsBalances.cs | 9 + ...ccountSessionComponentsBalancesFeatures.cs | 18 + .../AccountSessionComponentsDocuments.cs | 9 + ...ountSessionComponentsNotificationBanner.cs | 9 + ...ionComponentsNotificationBannerFeatures.cs | 9 + .../AccountSessionComponentsPaymentDetails.cs | 9 + ...SessionComponentsPaymentDetailsFeatures.cs | 15 + .../AccountSessionComponentsPayments.cs | 9 + ...ccountSessionComponentsPaymentsFeatures.cs | 15 + .../AccountSessionComponentsPayouts.cs | 9 + ...AccountSessionComponentsPayoutsFeatures.cs | 18 + .../AccountSessionComponentsPayoutsList.cs | 9 + ...ccountSessionComponentsTaxRegistrations.cs | 9 + .../AccountSessionComponentsTaxSettings.cs | 9 + src/Stripe.net/Entities/Accounts/Account.cs | 77 ++++ .../Accounts/AccountBusinessProfile.cs | 36 ++ .../AccountBusinessProfileAnnualRevenue.cs | 12 + ...tBusinessProfileMonthlyEstimatedRevenue.cs | 9 + .../Entities/Accounts/AccountCapabilities.cs | 162 ++++++++ .../Entities/Accounts/AccountCompany.cs | 57 +++ .../AccountCompanyOwnershipDeclaration.cs | 13 + .../Accounts/AccountCompanyVerification.cs | 6 + .../AccountCompanyVerificationDocument.cs | 32 ++ .../Entities/Accounts/AccountController.cs | 21 + .../Accounts/AccountControllerFees.cs | 6 + .../Accounts/AccountControllerLosses.cs | 6 + .../AccountControllerStripeDashboard.cs | 6 + .../Accounts/AccountFutureRequirements.cs | 28 ++ .../AccountFutureRequirementsAlternative.cs | 9 + .../AccountFutureRequirementsError.cs | 12 + .../Entities/Accounts/AccountGroups.cs | 6 + .../Entities/Accounts/AccountRequirements.cs | 28 ++ .../AccountRequirementsAlternative.cs | 9 + .../Accounts/AccountRequirementsError.cs | 12 + .../Entities/Accounts/AccountSettings.cs | 33 ++ .../AccountSettingsBacsDebitPayments.cs | 9 + .../Accounts/AccountSettingsBranding.cs | 32 ++ .../Accounts/AccountSettingsCardIssuing.cs | 6 + ...AccountSettingsCardIssuingTosAcceptance.cs | 13 + .../Accounts/AccountSettingsCardPayments.cs | 15 + .../Accounts/AccountSettingsDashboard.cs | 9 + .../Accounts/AccountSettingsInvoices.cs | 15 + .../Accounts/AccountSettingsPayments.cs | 18 + .../Accounts/AccountSettingsPayouts.cs | 12 + .../AccountSettingsPayoutsSchedule.cs | 15 + .../AccountSettingsSepaDebitPayments.cs | 6 + .../Accounts/AccountSettingsTreasury.cs | 6 + .../AccountSettingsTreasuryTosAcceptance.cs | 13 + .../Entities/Accounts/AccountTosAcceptance.cs | 16 + .../ApplePayDomains/ApplePayDomain.cs | 23 ++ .../ApplicationFeeRefund.cs | 45 +++ .../ApplicationFees/ApplicationFee.cs | 87 +++++ .../ApplicationFeeFeeSource.cs | 12 + .../Entities/Applications/Application.cs | 16 + .../Entities/Apps/Secrets/Secret.cs | 32 ++ .../Entities/Apps/Secrets/SecretScope.cs | 9 + .../BalanceTransactions/BalanceTransaction.cs | 60 +++ .../BalanceTransactionFeeDetail.cs | 18 + src/Stripe.net/Entities/Balances/Balance.cs | 24 ++ .../Balances/BalanceInstantAvailable.cs | 15 + .../BalanceInstantAvailableNetAvailable.cs | 12 + ...InstantAvailableNetAvailableSourceTypes.cs | 12 + .../BalanceInstantAvailableSourceTypes.cs | 12 + .../Entities/Balances/BalanceIssuing.cs | 6 + .../Entities/BankAccounts/BankAccount.cs | 81 ++++ .../BankAccountFutureRequirements.cs | 15 + .../BankAccountFutureRequirementsError.cs | 12 + .../BankAccounts/BankAccountRequirements.cs | 15 + .../BankAccountRequirementsError.cs | 12 + .../Billing/AlertTriggereds/AlertTriggered.cs | 22 ++ .../Entities/Billing/Alerts/Alert.cs | 24 ++ .../Billing/Alerts/AlertUsageThreshold.cs | 25 ++ .../Alerts/AlertUsageThresholdFilter.cs | 19 + .../CreditBalanceSummary.cs | 25 ++ .../CreditBalanceSummaryBalance.cs | 9 + ...itBalanceSummaryBalanceAvailableBalance.cs | 9 + ...eSummaryBalanceAvailableBalanceMonetary.cs | 9 + ...reditBalanceSummaryBalanceLedgerBalance.cs | 9 + ...anceSummaryBalanceLedgerBalanceMonetary.cs | 9 + .../CreditBalanceTransaction.cs | 52 +++ .../CreditBalanceTransactionCredit.cs | 9 + .../CreditBalanceTransactionCreditAmount.cs | 9 + ...tBalanceTransactionCreditAmountMonetary.cs | 9 + .../CreditBalanceTransactionDebit.cs | 12 + .../CreditBalanceTransactionDebitAmount.cs | 9 + ...itBalanceTransactionDebitAmountMonetary.cs | 9 + ...itBalanceTransactionDebitCreditsApplied.cs | 19 + .../Billing/CreditGrants/CreditGrant.cs | 70 ++++ .../Billing/CreditGrants/CreditGrantAmount.cs | 9 + .../CreditGrants/CreditGrantAmountMonetary.cs | 9 + .../CreditGrantApplicabilityConfig.cs | 6 + .../CreditGrantApplicabilityConfigScope.cs | 6 + .../MeterEventAdjustment.cs | 21 + .../MeterEventAdjustmentCancel.cs | 6 + .../MeterEventSummaries/MeterEventSummary.cs | 26 ++ .../Billing/MeterEvents/MeterEvent.cs | 26 ++ .../Entities/Billing/Meters/Meter.cs | 44 +++ .../Billing/Meters/MeterCustomerMapping.cs | 9 + .../Billing/Meters/MeterDefaultAggregation.cs | 6 + .../Billing/Meters/MeterStatusTransitions.cs | 7 + .../Billing/Meters/MeterValueSettings.cs | 6 + .../Configurations/Configuration.cs | 54 +++ .../ConfigurationBusinessProfile.cs | 12 + .../Configurations/ConfigurationFeatures.cs | 18 + .../ConfigurationFeaturesCustomerUpdate.cs | 9 + .../ConfigurationFeaturesInvoiceHistory.cs | 6 + ...onfigurationFeaturesPaymentMethodUpdate.cs | 6 + ...ConfigurationFeaturesSubscriptionCancel.cs | 15 + ...resSubscriptionCancelCancellationReason.cs | 9 + ...ConfigurationFeaturesSubscriptionUpdate.cs | 18 + ...rationFeaturesSubscriptionUpdateProduct.cs | 9 + ...esSubscriptionUpdateScheduleAtPeriodEnd.cs | 6 + ...ptionUpdateScheduleAtPeriodEndCondition.cs | 6 + .../Configurations/ConfigurationLoginPage.cs | 9 + .../BillingPortal/Sessions/Session.cs | 47 +++ .../BillingPortal/Sessions/SessionFlow.cs | 18 + .../Sessions/SessionFlowAfterCompletion.cs | 12 + ...onFlowAfterCompletionHostedConfirmation.cs | 6 + .../SessionFlowAfterCompletionRedirect.cs | 6 + .../Sessions/SessionFlowSubscriptionCancel.cs | 9 + .../SessionFlowSubscriptionCancelRetention.cs | 9 + ...wSubscriptionCancelRetentionCouponOffer.cs | 6 + .../Sessions/SessionFlowSubscriptionUpdate.cs | 6 + .../SessionFlowSubscriptionUpdateConfirm.cs | 12 + ...onFlowSubscriptionUpdateConfirmDiscount.cs | 9 + ...essionFlowSubscriptionUpdateConfirmItem.cs | 12 + .../Entities/Capabilities/Capability.cs | 38 ++ .../CapabilityFutureRequirements.cs | 28 ++ ...CapabilityFutureRequirementsAlternative.cs | 9 + .../CapabilityFutureRequirementsError.cs | 12 + .../Capabilities/CapabilityRequirements.cs | 28 ++ .../CapabilityRequirementsAlternative.cs | 9 + src/Stripe.net/Entities/Cards/Card.cs | 120 ++++++ src/Stripe.net/Entities/Cards/CardNetworks.cs | 6 + .../Entities/CashBalances/CashBalance.cs | 18 + .../CashBalances/CashBalanceSettings.cs | 9 + src/Stripe.net/Entities/Charges/Charge.cs | 228 +++++++++++ .../Entities/Charges/ChargeBillingDetails.cs | 15 + .../Entities/Charges/ChargeFraudDetails.cs | 9 + .../Entities/Charges/ChargeLevel3.cs | 21 + .../Entities/Charges/ChargeOutcome.cs | 34 ++ .../Charges/ChargePaymentMethodDetails.cs | 153 ++++++++ ...gePaymentMethodDetailsAchCreditTransfer.cs | 15 + .../ChargePaymentMethodDetailsAchDebit.cs | 21 + .../ChargePaymentMethodDetailsAcssDebit.cs | 21 + .../ChargePaymentMethodDetailsAffirm.cs | 6 + ...rgePaymentMethodDetailsAfterpayClearpay.cs | 9 + .../ChargePaymentMethodDetailsAlipay.cs | 12 + .../ChargePaymentMethodDetailsAuBecsDebit.cs | 15 + .../ChargePaymentMethodDetailsBacsDebit.cs | 15 + .../ChargePaymentMethodDetailsBancontact.cs | 44 +++ .../Charges/ChargePaymentMethodDetailsBlik.cs | 6 + .../ChargePaymentMethodDetailsBoleto.cs | 6 + .../Charges/ChargePaymentMethodDetailsCard.cs | 79 ++++ .../ChargePaymentMethodDetailsCardChecks.cs | 12 + ...tMethodDetailsCardExtendedAuthorization.cs | 6 + ...thodDetailsCardIncrementalAuthorization.cs | 6 + ...rgePaymentMethodDetailsCardInstallments.cs | 6 + ...rgePaymentMethodDetailsCardMulticapture.cs | 6 + ...rgePaymentMethodDetailsCardNetworkToken.cs | 6 + ...argePaymentMethodDetailsCardOvercapture.cs | 9 + .../ChargePaymentMethodDetailsCardPresent.cs | 79 ++++ ...ePaymentMethodDetailsCardPresentOffline.cs | 10 + ...ePaymentMethodDetailsCardPresentReceipt.cs | 30 ++ ...gePaymentMethodDetailsCardPresentWallet.cs | 6 + ...rgePaymentMethodDetailsCardThreeDSecure.cs | 27 ++ .../ChargePaymentMethodDetailsCardWallet.cs | 30 ++ ...aymentMethodDetailsCardWalletMasterpass.cs | 15 + ...mentMethodDetailsCardWalletVisaCheckout.cs | 15 + .../ChargePaymentMethodDetailsCashapp.cs | 9 + .../Charges/ChargePaymentMethodDetailsEps.cs | 9 + .../Charges/ChargePaymentMethodDetailsFpx.cs | 12 + .../ChargePaymentMethodDetailsGiropay.cs | 15 + .../ChargePaymentMethodDetailsGrabpay.cs | 6 + .../ChargePaymentMethodDetailsIdeal.cs | 38 ++ ...hargePaymentMethodDetailsInteracPresent.cs | 57 +++ ...ymentMethodDetailsInteracPresentReceipt.cs | 30 ++ .../ChargePaymentMethodDetailsKakaoPay.cs | 6 + .../ChargePaymentMethodDetailsKlarna.cs | 12 + ...ePaymentMethodDetailsKlarnaPayerDetails.cs | 6 + ...tMethodDetailsKlarnaPayerDetailsAddress.cs | 6 + .../ChargePaymentMethodDetailsKonbini.cs | 6 + .../ChargePaymentMethodDetailsKonbiniStore.cs | 6 + .../ChargePaymentMethodDetailsKrCard.cs | 12 + .../Charges/ChargePaymentMethodDetailsLink.cs | 6 + .../ChargePaymentMethodDetailsMobilepay.cs | 6 + ...ChargePaymentMethodDetailsMobilepayCard.cs | 18 + .../ChargePaymentMethodDetailsMultibanco.cs | 9 + .../ChargePaymentMethodDetailsNaverPay.cs | 6 + .../Charges/ChargePaymentMethodDetailsOxxo.cs | 6 + .../Charges/ChargePaymentMethodDetailsP24.cs | 12 + .../ChargePaymentMethodDetailsPayco.cs | 6 + .../ChargePaymentMethodDetailsPaynow.cs | 6 + .../ChargePaymentMethodDetailsPaypal.cs | 18 + ...mentMethodDetailsPaypalSellerProtection.cs | 9 + .../Charges/ChargePaymentMethodDetailsPix.cs | 6 + .../ChargePaymentMethodDetailsPromptpay.cs | 6 + .../ChargePaymentMethodDetailsSamsungPay.cs | 6 + .../ChargePaymentMethodDetailsSepaDebit.cs | 21 + .../ChargePaymentMethodDetailsSofort.cs | 47 +++ .../ChargePaymentMethodDetailsSwish.cs | 12 + ...ChargePaymentMethodDetailsUsBankAccount.cs | 37 ++ .../ChargePaymentMethodDetailsWechatPay.cs | 9 + .../Entities/Charges/ChargeRadarOptions.cs | 6 + .../Entities/Charges/ChargeTransferData.cs | 19 + .../Entities/Checkout/Sessions/Session.cs | 218 +++++++++++ .../Sessions/SessionAdaptivePricing.cs | 6 + .../Sessions/SessionAfterExpiration.cs | 6 + .../SessionAfterExpirationRecovery.cs | 16 + .../Checkout/Sessions/SessionAutomaticTax.cs | 12 + .../Sessions/SessionAutomaticTaxLiability.cs | 19 + .../Checkout/Sessions/SessionConsent.cs | 9 + .../Sessions/SessionConsentCollection.cs | 12 + ...ntCollectionPaymentMethodReuseAgreement.cs | 6 + .../Sessions/SessionCurrencyConversion.cs | 15 + .../Checkout/Sessions/SessionCustomField.cs | 24 ++ .../Sessions/SessionCustomFieldDropdown.cs | 12 + .../SessionCustomFieldDropdownOption.cs | 9 + .../Sessions/SessionCustomFieldLabel.cs | 9 + .../Sessions/SessionCustomFieldNumeric.cs | 15 + .../Sessions/SessionCustomFieldText.cs | 15 + .../Checkout/Sessions/SessionCustomText.cs | 15 + .../Sessions/SessionCustomTextAfterSubmit.cs | 6 + .../SessionCustomTextShippingAddress.cs | 6 + .../Sessions/SessionCustomTextSubmit.cs | 6 + ...ssionCustomTextTermsOfServiceAcceptance.cs | 6 + .../Sessions/SessionCustomerDetails.cs | 21 + .../Sessions/SessionCustomerDetailsTaxId.cs | 9 + .../Sessions/SessionInvoiceCreation.cs | 9 + .../SessionInvoiceCreationInvoiceData.cs | 33 ++ ...onInvoiceCreationInvoiceDataCustomField.cs | 9 + ...SessionInvoiceCreationInvoiceDataIssuer.cs | 19 + ...oiceCreationInvoiceDataRenderingOptions.cs | 6 + ...essionPaymentMethodConfigurationDetails.cs | 9 + .../Sessions/SessionPaymentMethodOptions.cs | 114 ++++++ .../SessionPaymentMethodOptionsAcssDebit.cs | 15 + ...entMethodOptionsAcssDebitMandateOptions.cs | 18 + .../SessionPaymentMethodOptionsAffirm.cs | 6 + ...ionPaymentMethodOptionsAfterpayClearpay.cs | 6 + .../SessionPaymentMethodOptionsAlipay.cs | 6 + .../SessionPaymentMethodOptionsAmazonPay.cs | 6 + .../SessionPaymentMethodOptionsAuBecsDebit.cs | 6 + .../SessionPaymentMethodOptionsBacsDebit.cs | 9 + .../SessionPaymentMethodOptionsBancontact.cs | 6 + .../SessionPaymentMethodOptionsBoleto.cs | 9 + .../SessionPaymentMethodOptionsCard.cs | 30 ++ ...ionPaymentMethodOptionsCardInstallments.cs | 6 + .../SessionPaymentMethodOptionsCashapp.cs | 6 + ...sionPaymentMethodOptionsCustomerBalance.cs | 12 + ...ethodOptionsCustomerBalanceBankTransfer.cs | 12 + ...stomerBalanceBankTransferEuBankTransfer.cs | 6 + .../SessionPaymentMethodOptionsEps.cs | 6 + .../SessionPaymentMethodOptionsFpx.cs | 6 + .../SessionPaymentMethodOptionsGiropay.cs | 6 + .../SessionPaymentMethodOptionsGrabpay.cs | 6 + .../SessionPaymentMethodOptionsIdeal.cs | 6 + .../SessionPaymentMethodOptionsKakaoPay.cs | 9 + .../SessionPaymentMethodOptionsKlarna.cs | 6 + .../SessionPaymentMethodOptionsKonbini.cs | 9 + .../SessionPaymentMethodOptionsKrCard.cs | 9 + .../SessionPaymentMethodOptionsLink.cs | 6 + .../SessionPaymentMethodOptionsMobilepay.cs | 6 + .../SessionPaymentMethodOptionsMultibanco.cs | 6 + .../SessionPaymentMethodOptionsNaverPay.cs | 6 + .../SessionPaymentMethodOptionsOxxo.cs | 9 + .../SessionPaymentMethodOptionsP24.cs | 6 + .../SessionPaymentMethodOptionsPayco.cs | 6 + .../SessionPaymentMethodOptionsPaynow.cs | 6 + .../SessionPaymentMethodOptionsPaypal.cs | 15 + .../SessionPaymentMethodOptionsPix.cs | 6 + .../SessionPaymentMethodOptionsRevolutPay.cs | 6 + .../SessionPaymentMethodOptionsSamsungPay.cs | 6 + .../SessionPaymentMethodOptionsSepaDebit.cs | 9 + .../SessionPaymentMethodOptionsSofort.cs | 6 + .../SessionPaymentMethodOptionsSwish.cs | 6 + ...essionPaymentMethodOptionsUsBankAccount.cs | 12 + ...ptionsUsBankAccountFinancialConnections.cs | 15 + ...sBankAccountFinancialConnectionsFilters.cs | 6 + .../Sessions/SessionPhoneNumberCollection.cs | 6 + .../SessionSavedPaymentMethodOptions.cs | 12 + .../SessionShippingAddressCollection.cs | 6 + .../Checkout/Sessions/SessionShippingCost.cs | 28 ++ .../Sessions/SessionShippingCostTax.cs | 15 + .../Sessions/SessionShippingDetails.cs | 18 + .../Sessions/SessionShippingOption.cs | 19 + .../Sessions/SessionTaxIdCollection.cs | 9 + .../Checkout/Sessions/SessionTotalDetails.cs | 15 + .../Sessions/SessionTotalDetailsBreakdown.cs | 9 + .../SessionTotalDetailsBreakdownDiscount.cs | 9 + .../SessionTotalDetailsBreakdownTax.cs | 15 + .../Entities/Climate/Orders/Order.cs | 85 +++++ .../Climate/Orders/OrderBeneficiary.cs | 6 + .../Climate/Orders/OrderDeliveryDetail.cs | 19 + .../Orders/OrderDeliveryDetailLocation.cs | 18 + .../Entities/Climate/Products/Product.cs | 31 ++ .../ProductCurrentPricesPerMetricTon.cs | 12 + .../Entities/Climate/Suppliers/Supplier.cs | 24 ++ .../Climate/Suppliers/SupplierLocation.cs | 18 + .../ConfirmationTokens/ConfirmationToken.cs | 47 +++ .../ConfirmationTokenMandateData.cs | 6 + ...ationTokenMandateDataCustomerAcceptance.cs | 9 + ...okenMandateDataCustomerAcceptanceOnline.cs | 9 + .../ConfirmationTokenPaymentMethodOptions.cs | 6 + ...nfirmationTokenPaymentMethodOptionsCard.cs | 6 + .../ConfirmationTokenPaymentMethodPreview.cs | 160 ++++++++ ...ationTokenPaymentMethodPreviewAcssDebit.cs | 18 + ...ionTokenPaymentMethodPreviewAuBecsDebit.cs | 12 + ...ationTokenPaymentMethodPreviewBacsDebit.cs | 12 + ...TokenPaymentMethodPreviewBillingDetails.cs | 15 + ...irmationTokenPaymentMethodPreviewBoleto.cs | 6 + ...nfirmationTokenPaymentMethodPreviewCard.cs | 51 +++ ...tionTokenPaymentMethodPreviewCardChecks.cs | 12 + ...enPaymentMethodPreviewCardGeneratedFrom.cs | 22 ++ ...ewCardGeneratedFromPaymentMethodDetails.cs | 9 + ...atedFromPaymentMethodDetailsCardPresent.cs | 79 ++++ ...mPaymentMethodDetailsCardPresentOffline.cs | 10 + ...mPaymentMethodDetailsCardPresentReceipt.cs | 30 ++ ...omPaymentMethodDetailsCardPresentWallet.cs | 6 + ...onTokenPaymentMethodPreviewCardNetworks.cs | 9 + ...ionTokenPaymentMethodPreviewCardPresent.cs | 54 +++ ...PaymentMethodPreviewCardPresentNetworks.cs | 9 + ...nPaymentMethodPreviewCardPresentOffline.cs | 10 + ...enPaymentMethodPreviewCardPresentWallet.cs | 6 + ...ymentMethodPreviewCardThreeDSecureUsage.cs | 6 + ...tionTokenPaymentMethodPreviewCardWallet.cs | 30 ++ ...aymentMethodPreviewCardWalletMasterpass.cs | 15 + ...mentMethodPreviewCardWalletVisaCheckout.cs | 15 + ...rmationTokenPaymentMethodPreviewCashapp.cs | 9 + ...onfirmationTokenPaymentMethodPreviewEps.cs | 6 + ...onfirmationTokenPaymentMethodPreviewFpx.cs | 9 + ...firmationTokenPaymentMethodPreviewIdeal.cs | 9 + ...TokenPaymentMethodPreviewInteracPresent.cs | 45 +++ ...mentMethodPreviewInteracPresentNetworks.cs | 9 + ...irmationTokenPaymentMethodPreviewKlarna.cs | 6 + ...ationTokenPaymentMethodPreviewKlarnaDob.cs | 12 + ...irmationTokenPaymentMethodPreviewKrCard.cs | 9 + ...nfirmationTokenPaymentMethodPreviewLink.cs | 9 + ...mationTokenPaymentMethodPreviewNaverPay.cs | 6 + ...onfirmationTokenPaymentMethodPreviewP24.cs | 6 + ...irmationTokenPaymentMethodPreviewPaypal.cs | 9 + ...ationTokenPaymentMethodPreviewSepaDebit.cs | 21 + ...mentMethodPreviewSepaDebitGeneratedFrom.cs | 26 ++ ...irmationTokenPaymentMethodPreviewSofort.cs | 6 + ...nTokenPaymentMethodPreviewUsBankAccount.cs | 30 ++ ...ymentMethodPreviewUsBankAccountNetworks.cs | 9 + ...MethodPreviewUsBankAccountStatusDetails.cs | 6 + ...reviewUsBankAccountStatusDetailsBlocked.cs | 9 + .../ConfirmationTokenShipping.cs | 12 + .../ConnectCollectionTransfer.cs | 31 ++ .../Entities/CountrySpecs/CountrySpec.cs | 27 ++ src/Stripe.net/Entities/Coupons/Coupon.cs | 60 +++ .../Entities/Coupons/CouponAppliesTo.cs | 6 + .../Entities/Coupons/CouponCurrencyOptions.cs | 6 + .../CreditNoteLineItems/CreditNoteLineItem.cs | 54 +++ .../CreditNoteLineItemDiscountAmount.cs | 19 + .../CreditNoteLineItemPretaxCreditAmount.cs | 32 ++ .../Entities/CreditNotes/CreditNote.cs | 130 +++++++ .../CreditNotes/CreditNoteDiscountAmount.cs | 19 + .../CreditNotePretaxCreditAmount.cs | 32 ++ .../CreditNotes/CreditNoteShippingCost.cs | 28 ++ .../CreditNotes/CreditNoteShippingCostTax.cs | 15 + .../CreditNotes/CreditNoteTaxAmount.cs | 28 ++ .../CustomerBalanceTransaction.cs | 67 ++++ .../CustomerCashBalanceTransaction.cs | 59 +++ ...hBalanceTransactionAdjustedForOverdraft.cs | 26 ++ ...rCashBalanceTransactionAppliedToPayment.cs | 16 + .../CustomerCashBalanceTransactionFunded.cs | 6 + ...ashBalanceTransactionFundedBankTransfer.cs | 21 + ...sactionFundedBankTransferEuBankTransfer.cs | 12 + ...sactionFundedBankTransferGbBankTransfer.cs | 12 + ...sactionFundedBankTransferJpBankTransfer.cs | 12 + ...sactionFundedBankTransferUsBankTransfer.cs | 9 + ...shBalanceTransactionRefundedFromPayment.cs | 16 + ...hBalanceTransactionTransferredToBalance.cs | 16 + ...hBalanceTransactionUnappliedFromPayment.cs | 16 + .../CustomerSessions/CustomerSession.cs | 36 ++ .../CustomerSessionComponents.cs | 12 + .../CustomerSessionComponentsBuyButton.cs | 6 + ...CustomerSessionComponentsPaymentElement.cs | 9 + ...SessionComponentsPaymentElementFeatures.cs | 21 + .../CustomerSessionComponentsPricingTable.cs | 6 + src/Stripe.net/Entities/Customers/Customer.cs | 109 ++++++ .../Customers/CustomerInvoiceSettings.cs | 25 ++ .../CustomerInvoiceSettingsCustomField.cs | 9 + ...CustomerInvoiceSettingsRenderingOptions.cs | 9 + .../Entities/Customers/CustomerTax.cs | 12 + .../Entities/Customers/CustomerTaxLocation.cs | 12 + src/Stripe.net/Entities/Discounts/Discount.cs | 62 +++ src/Stripe.net/Entities/Disputes/Dispute.cs | 75 ++++ .../Entities/Disputes/DisputeEvidence.cs | 153 ++++++++ .../Disputes/DisputeEvidenceDetails.cs | 19 + ...sputeEvidenceDetailsEnhancedEligibility.cs | 6 + ...ancedEligibilityVisaCompellingEvidence3.cs | 9 + .../DisputeEvidenceEnhancedEvidence.cs | 6 + ...EnhancedEvidenceVisaCompellingEvidence3.cs | 9 + ...aCompellingEvidence3DisputedTransaction.cs | 27 ++ ...ence3DisputedTransactionShippingAddress.cs | 21 + ...lingEvidence3PriorUndisputedTransaction.cs | 27 ++ ...iorUndisputedTransactionShippingAddress.cs | 21 + .../Disputes/DisputePaymentMethodDetails.cs | 18 + .../DisputePaymentMethodDetailsAmazonPay.cs | 6 + .../DisputePaymentMethodDetailsCard.cs | 12 + .../DisputePaymentMethodDetailsKlarna.cs | 6 + .../DisputePaymentMethodDetailsPaypal.cs | 9 + .../ActiveEntitlementSummary.cs | 15 + .../ActiveEntitlements/ActiveEntitlement.cs | 28 ++ .../Entities/Entitlements/Features/Feature.cs | 24 ++ .../Entities/EphemeralKeys/EphemeralKey.cs | 30 ++ src/Stripe.net/Entities/Events/Event.cs | 37 ++ .../Entities/Events/EventRequest.cs | 9 + src/Stripe.net/Entities/FileLinks/FileLink.cs | 42 ++ src/Stripe.net/Entities/Files/File.cs | 38 ++ .../AccountOwners/AccountOwner.cs | 28 ++ .../AccountOwnerships/AccountOwnership.cs | 16 + .../FinancialConnections/Accounts/Account.cs | 71 ++++ .../Accounts/AccountAccountHolder.cs | 29 ++ .../Accounts/AccountBalance.cs | 19 + .../Accounts/AccountBalanceCash.cs | 6 + .../Accounts/AccountBalanceCredit.cs | 6 + .../Accounts/AccountBalanceRefresh.cs | 14 + .../Accounts/AccountOwnershipRefresh.cs | 14 + .../Accounts/AccountTransactionRefresh.cs | 17 + .../FinancialConnections/Sessions/Session.cs | 33 ++ .../Sessions/SessionAccountHolder.cs | 29 ++ .../Sessions/SessionFilters.cs | 9 + .../Transactions/Transaction.cs | 41 ++ .../TransactionStatusTransitions.cs | 11 + .../Entities/Forwarding/Requests/Request.cs | 37 ++ .../Requests/RequestRequestContext.cs | 9 + .../Requests/RequestRequestDetails.cs | 12 + .../Requests/RequestRequestDetailsHeader.cs | 9 + .../Requests/RequestResponseDetails.cs | 12 + .../Requests/RequestResponseDetailsHeader.cs | 9 + .../FundingInstructions.cs | 18 + .../FundingInstructionsBankTransfer.cs | 12 + ...nstructionsBankTransferFinancialAddress.cs | 27 ++ ...ructionsBankTransferFinancialAddressAba.cs | 24 ++ ...uctionsBankTransferFinancialAddressIban.cs | 15 + ...onsBankTransferFinancialAddressSortCode.cs | 12 + ...uctionsBankTransferFinancialAddressSpei.cs | 12 + ...ctionsBankTransferFinancialAddressSwift.cs | 24 ++ ...tionsBankTransferFinancialAddressZengin.cs | 24 ++ .../VerificationReports/VerificationReport.cs | 46 +++ .../VerificationReportDocument.cs | 39 ++ .../VerificationReportDocumentDob.cs | 12 + .../VerificationReportDocumentError.cs | 9 + ...erificationReportDocumentExpirationDate.cs | 12 + .../VerificationReportDocumentIssuedDate.cs | 12 + .../VerificationReportEmail.cs | 12 + .../VerificationReportEmailError.cs | 9 + .../VerificationReportIdNumber.cs | 24 ++ .../VerificationReportIdNumberDob.cs | 12 + .../VerificationReportIdNumberError.cs | 9 + .../VerificationReportOptions.cs | 9 + .../VerificationReportOptionsDocument.cs | 15 + .../VerificationReportPhone.cs | 12 + .../VerificationReportPhoneError.cs | 9 + .../VerificationReportSelfie.cs | 15 + .../VerificationReportSelfieError.cs | 9 + .../VerificationSession.cs | 68 ++++ .../VerificationSessionLastError.cs | 9 + .../VerificationSessionOptions.cs | 15 + .../VerificationSessionOptionsDocument.cs | 15 + .../VerificationSessionOptionsEmail.cs | 6 + .../VerificationSessionOptionsPhone.cs | 6 + .../VerificationSessionProvidedDetails.cs | 9 + .../VerificationSessionRedaction.cs | 6 + .../VerificationSessionVerifiedOutputs.cs | 27 ++ .../VerificationSessionVerifiedOutputsDob.cs | 12 + .../Entities/InvoiceItems/InvoiceItem.cs | 114 ++++++ .../InvoiceItems/InvoiceItemPeriod.cs | 11 + .../InvoiceLineItems/InvoiceLineItem.cs | 111 ++++++ .../InvoiceLineItemDiscountAmount.cs | 19 + .../InvoiceLineItems/InvoiceLineItemPeriod.cs | 11 + .../InvoiceLineItemPretaxCreditAmount.cs | 32 ++ .../InvoiceLineItemProrationDetails.cs | 6 + ...ceLineItemProrationDetailsCreditedItems.cs | 9 + .../InvoiceLineItemTaxAmount.cs | 28 ++ .../InvoiceRenderingTemplate.cs | 28 ++ src/Stripe.net/Entities/Invoices/Invoice.cs | 360 ++++++++++++++++++ .../Entities/Invoices/InvoiceAutomaticTax.cs | 12 + .../Invoices/InvoiceAutomaticTaxLiability.cs | 19 + .../Entities/Invoices/InvoiceCustomField.cs | 9 + .../Entities/Invoices/InvoiceCustomerTaxId.cs | 9 + .../Entities/Invoices/InvoiceFromInvoice.cs | 19 + .../Entities/Invoices/InvoiceIssuer.cs | 19 + .../Invoices/InvoicePaymentSettings.cs | 12 + ...oicePaymentSettingsPaymentMethodOptions.cs | 24 ++ ...ntSettingsPaymentMethodOptionsAcssDebit.cs | 9 + ...entMethodOptionsAcssDebitMandateOptions.cs | 6 + ...tSettingsPaymentMethodOptionsBancontact.cs | 6 + ...PaymentSettingsPaymentMethodOptionsCard.cs | 9 + ...ngsPaymentMethodOptionsCardInstallments.cs | 6 + ...ingsPaymentMethodOptionsCustomerBalance.cs | 9 + ...ethodOptionsCustomerBalanceBankTransfer.cs | 9 + ...stomerBalanceBankTransferEuBankTransfer.cs | 6 + ...ttingsPaymentMethodOptionsUsBankAccount.cs | 9 + ...ptionsUsBankAccountFinancialConnections.cs | 12 + ...sBankAccountFinancialConnectionsFilters.cs | 6 + .../Entities/Invoices/InvoiceRendering.cs | 15 + .../Entities/Invoices/InvoiceRenderingPdf.cs | 6 + .../Entities/Invoices/InvoiceShippingCost.cs | 28 ++ .../Invoices/InvoiceShippingCostTax.cs | 15 + .../Invoices/InvoiceShippingDetails.cs | 18 + .../Invoices/InvoiceStatusTransitions.cs | 19 + .../Invoices/InvoiceSubscriptionDetails.cs | 6 + .../Invoices/InvoiceThresholdReason.cs | 9 + .../InvoiceThresholdReasonItemReason.cs | 9 + .../InvoiceTotalPretaxCreditAmount.cs | 32 ++ .../Entities/Invoices/InvoiceTransferData.cs | 19 + .../Issuing/Authorizations/Authorization.cs | 108 ++++++ .../AuthorizationAmountDetails.cs | 9 + .../Authorizations/AuthorizationFleet.cs | 15 + .../AuthorizationFleetCardholderPromptData.cs | 21 + .../AuthorizationFleetReportedBreakdown.cs | 12 + ...AuthorizationFleetReportedBreakdownFuel.cs | 6 + ...horizationFleetReportedBreakdownNonFuel.cs | 6 + .../AuthorizationFleetReportedBreakdownTax.cs | 9 + .../AuthorizationFraudChallenge.cs | 12 + .../Authorizations/AuthorizationFuel.cs | 18 + .../AuthorizationMerchantData.cs | 33 ++ .../AuthorizationNetworkData.cs | 12 + .../AuthorizationPendingRequest.cs | 24 ++ ...uthorizationPendingRequestAmountDetails.cs | 9 + .../AuthorizationRequestHistory.cs | 41 ++ ...uthorizationRequestHistoryAmountDetails.cs | 9 + .../Authorizations/AuthorizationTreasury.cs | 12 + .../AuthorizationVerificationData.cs | 24 ++ ...VerificationDataAuthenticationExemption.cs | 9 + ...thorizationVerificationDataThreeDSecure.cs | 6 + .../Issuing/Cardholders/Cardholder.cs | 52 +++ .../Issuing/Cardholders/CardholderBilling.cs | 6 + .../Issuing/Cardholders/CardholderCompany.cs | 6 + .../Cardholders/CardholderIndividual.cs | 18 + .../CardholderIndividualCardIssuing.cs | 6 + ...ndividualCardIssuingUserTermsAcceptance.cs | 13 + .../Cardholders/CardholderIndividualDob.cs | 12 + .../CardholderIndividualVerification.cs | 6 + ...ardholderIndividualVerificationDocument.cs | 26 ++ .../Cardholders/CardholderRequirements.cs | 9 + .../Cardholders/CardholderSpendingControls.cs | 21 + ...CardholderSpendingControlsSpendingLimit.cs | 12 + src/Stripe.net/Entities/Issuing/Cards/Card.cs | 100 +++++ .../Entities/Issuing/Cards/CardShipping.cs | 43 +++ .../Cards/CardShippingAddressValidation.cs | 12 + .../Issuing/Cards/CardShippingCustoms.cs | 6 + .../Issuing/Cards/CardSpendingControls.cs | 21 + .../CardSpendingControlsSpendingLimit.cs | 12 + .../Entities/Issuing/Cards/CardWallets.cs | 12 + .../Issuing/Cards/CardWalletsApplePay.cs | 9 + .../Issuing/Cards/CardWalletsGooglePay.cs | 9 + .../Entities/Issuing/Disputes/Dispute.cs | 53 +++ .../Issuing/Disputes/DisputeEvidence.cs | 30 ++ .../Disputes/DisputeEvidenceCanceled.cs | 46 +++ .../Disputes/DisputeEvidenceDuplicate.cs | 52 +++ .../Disputes/DisputeEvidenceFraudulent.cs | 19 + ...isputeEvidenceMerchandiseNotAsDescribed.cs | 33 ++ .../DisputeEvidenceNoValidAuthorization.cs | 19 + .../Disputes/DisputeEvidenceNotReceived.cs | 29 ++ .../Issuing/Disputes/DisputeEvidenceOther.cs | 25 ++ .../DisputeEvidenceServiceNotAsDescribed.cs | 30 ++ .../Issuing/Disputes/DisputeTreasury.cs | 9 + .../PersonalizationDesign.cs | 60 +++ .../PersonalizationDesignCarrierText.cs | 15 + .../PersonalizationDesignPreferences.cs | 9 + .../PersonalizationDesignRejectionReasons.cs | 9 + .../Issuing/PhysicalBundles/PhysicalBundle.cs | 24 ++ .../PhysicalBundles/PhysicalBundleFeatures.cs | 12 + .../Entities/Issuing/Tokens/Token.cs | 51 +++ .../Issuing/Tokens/TokenNetworkData.cs | 18 + .../Issuing/Tokens/TokenNetworkDataDevice.cs | 21 + .../Tokens/TokenNetworkDataMastercard.cs | 15 + .../Issuing/Tokens/TokenNetworkDataVisa.cs | 15 + .../Tokens/TokenNetworkDataWalletProvider.cs | 33 ++ ...workDataWalletProviderCardholderAddress.cs | 9 + .../Issuing/Transactions/Transaction.cs | 115 ++++++ .../Transactions/TransactionAmountDetails.cs | 9 + .../Transactions/TransactionNetworkData.cs | 12 + .../TransactionPurchaseDetails.cs | 21 + .../TransactionPurchaseDetailsFleet.cs | 15 + ...urchaseDetailsFleetCardholderPromptData.cs | 18 + ...onPurchaseDetailsFleetReportedBreakdown.cs | 12 + ...rchaseDetailsFleetReportedBreakdownFuel.cs | 6 + ...aseDetailsFleetReportedBreakdownNonFuel.cs | 6 + ...urchaseDetailsFleetReportedBreakdownTax.cs | 9 + .../TransactionPurchaseDetailsFlight.cs | 19 + ...TransactionPurchaseDetailsFlightSegment.cs | 21 + .../TransactionPurchaseDetailsFuel.cs | 18 + .../TransactionPurchaseDetailsLodging.cs | 10 + .../TransactionPurchaseDetailsReceipt.cs | 15 + .../Transactions/TransactionTreasury.cs | 9 + src/Stripe.net/Entities/LineItems/LineItem.cs | 43 +++ .../Entities/LineItems/LineItemDiscount.cs | 9 + .../Entities/LineItems/LineItemTax.cs | 15 + .../Entities/LoginLinks/LoginLink.cs | 13 + src/Stripe.net/Entities/Mandates/Mandate.cs | 46 +++ .../Mandates/MandateCustomerAcceptance.cs | 16 + .../MandateCustomerAcceptanceOnline.cs | 9 + .../Mandates/MandatePaymentMethodDetails.cs | 45 +++ .../MandatePaymentMethodDetailsAcssDebit.cs | 15 + .../MandatePaymentMethodDetailsAuBecsDebit.cs | 6 + .../MandatePaymentMethodDetailsBacsDebit.cs | 15 + .../MandatePaymentMethodDetailsPaypal.cs | 9 + .../MandatePaymentMethodDetailsSepaDebit.cs | 9 + ...andatePaymentMethodDetailsUsBankAccount.cs | 6 + .../Entities/Mandates/MandateSingleUse.cs | 9 + .../Entities/PaymentIntents/PaymentIntent.cs | 184 +++++++++ .../PaymentIntentAmountDetails.cs | 6 + .../PaymentIntentAmountDetailsTip.cs | 6 + .../PaymentIntentAutomaticPaymentMethods.cs | 9 + .../PaymentIntents/PaymentIntentNextAction.cs | 60 +++ ...entIntentNextActionAlipayHandleRedirect.cs | 15 + ...entIntentNextActionBoletoDisplayDetails.cs | 16 + ...ntIntentNextActionCardAwaitNotification.cs | 10 + ...ionCashappHandleRedirectOrDisplayQrCode.cs | 12 + ...happHandleRedirectOrDisplayQrCodeQrCode.cs | 13 + ...xtActionDisplayBankTransferInstructions.cs | 21 + ...ankTransferInstructionsFinancialAddress.cs | 27 ++ ...TransferInstructionsFinancialAddressAba.cs | 24 ++ ...ransferInstructionsFinancialAddressIban.cs | 15 + ...ferInstructionsFinancialAddressSortCode.cs | 12 + ...ransferInstructionsFinancialAddressSpei.cs | 12 + ...ansferInstructionsFinancialAddressSwift.cs | 24 ++ ...nsferInstructionsFinancialAddressZengin.cs | 24 ++ ...ntIntentNextActionKonbiniDisplayDetails.cs | 13 + ...ntNextActionKonbiniDisplayDetailsStores.cs | 15 + ...onKonbiniDisplayDetailsStoresFamilymart.cs | 9 + ...ActionKonbiniDisplayDetailsStoresLawson.cs | 9 + ...tionKonbiniDisplayDetailsStoresMinistop.cs | 9 + ...ionKonbiniDisplayDetailsStoresSeicomart.cs | 9 + ...ntentNextActionMultibancoDisplayDetails.cs | 16 + ...ymentIntentNextActionOxxoDisplayDetails.cs | 13 + ...mentIntentNextActionPaynowDisplayQrCode.cs | 15 + ...PaymentIntentNextActionPixDisplayQrCode.cs | 19 + ...tIntentNextActionPromptpayDisplayQrCode.cs | 15 + .../PaymentIntentNextActionRedirectToUrl.cs | 9 + ...ctionSwishHandleRedirectOrDisplayQrCode.cs | 12 + ...wishHandleRedirectOrDisplayQrCodeQrCode.cs | 12 + ...IntentNextActionVerifyWithMicrodeposits.cs | 13 + ...tIntentNextActionWechatPayDisplayQrCode.cs | 18 + ...NextActionWechatPayRedirectToAndroidApp.cs | 24 ++ ...tentNextActionWechatPayRedirectToIosApp.cs | 6 + ...IntentPaymentMethodConfigurationDetails.cs | 9 + .../PaymentIntentPaymentMethodOptions.cs | 138 +++++++ ...mentIntentPaymentMethodOptionsAcssDebit.cs | 12 + ...entMethodOptionsAcssDebitMandateOptions.cs | 15 + ...PaymentIntentPaymentMethodOptionsAffirm.cs | 12 + ...entPaymentMethodOptionsAfterpayClearpay.cs | 12 + ...PaymentIntentPaymentMethodOptionsAlipay.cs | 6 + .../PaymentIntentPaymentMethodOptionsAlma.cs | 6 + ...mentIntentPaymentMethodOptionsAmazonPay.cs | 9 + ...ntIntentPaymentMethodOptionsAuBecsDebit.cs | 6 + ...mentIntentPaymentMethodOptionsBacsDebit.cs | 9 + ...entIntentPaymentMethodOptionsBancontact.cs | 9 + .../PaymentIntentPaymentMethodOptionsBlik.cs | 6 + ...PaymentIntentPaymentMethodOptionsBoleto.cs | 9 + .../PaymentIntentPaymentMethodOptionsCard.cs | 42 ++ ...entPaymentMethodOptionsCardInstallments.cs | 12 + ...aymentMethodOptionsCardInstallmentsPlan.cs | 12 + ...tPaymentMethodOptionsCardMandateOptions.cs | 32 ++ ...ntIntentPaymentMethodOptionsCardPresent.cs | 12 + ...tPaymentMethodOptionsCardPresentRouting.cs | 6 + ...aymentIntentPaymentMethodOptionsCashapp.cs | 9 + ...tentPaymentMethodOptionsCustomerBalance.cs | 12 + ...ethodOptionsCustomerBalanceBankTransfer.cs | 12 + ...stomerBalanceBankTransferEuBankTransfer.cs | 6 + .../PaymentIntentPaymentMethodOptionsEps.cs | 6 + .../PaymentIntentPaymentMethodOptionsFpx.cs | 6 + ...aymentIntentPaymentMethodOptionsGiropay.cs | 6 + ...aymentIntentPaymentMethodOptionsGrabpay.cs | 6 + .../PaymentIntentPaymentMethodOptionsIdeal.cs | 6 + ...ymentIntentPaymentMethodOptionsKakaoPay.cs | 9 + ...PaymentIntentPaymentMethodOptionsKlarna.cs | 12 + ...aymentIntentPaymentMethodOptionsKonbini.cs | 19 + ...PaymentIntentPaymentMethodOptionsKrCard.cs | 9 + .../PaymentIntentPaymentMethodOptionsLink.cs | 12 + ...mentIntentPaymentMethodOptionsMobilepay.cs | 9 + ...entIntentPaymentMethodOptionsMultibanco.cs | 6 + ...ymentIntentPaymentMethodOptionsNaverPay.cs | 6 + .../PaymentIntentPaymentMethodOptionsOxxo.cs | 9 + .../PaymentIntentPaymentMethodOptionsP24.cs | 6 + .../PaymentIntentPaymentMethodOptionsPayco.cs | 6 + ...PaymentIntentPaymentMethodOptionsPaynow.cs | 6 + ...PaymentIntentPaymentMethodOptionsPaypal.cs | 15 + .../PaymentIntentPaymentMethodOptionsPix.cs | 13 + ...mentIntentPaymentMethodOptionsPromptpay.cs | 6 + ...entIntentPaymentMethodOptionsRevolutPay.cs | 9 + ...entIntentPaymentMethodOptionsSamsungPay.cs | 6 + ...mentIntentPaymentMethodOptionsSepaDebit.cs | 9 + ...PaymentIntentPaymentMethodOptionsSofort.cs | 9 + .../PaymentIntentPaymentMethodOptionsSwish.cs | 9 + .../PaymentIntentPaymentMethodOptionsTwint.cs | 6 + ...IntentPaymentMethodOptionsUsBankAccount.cs | 18 + ...ptionsUsBankAccountFinancialConnections.cs | 15 + ...sBankAccountFinancialConnectionsFilters.cs | 6 + ...ethodOptionsUsBankAccountMandateOptions.cs | 6 + ...mentIntentPaymentMethodOptionsWechatPay.cs | 12 + .../PaymentIntentPaymentMethodOptionsZip.cs | 6 + .../PaymentIntents/PaymentIntentProcessing.cs | 9 + .../PaymentIntentProcessingCard.cs | 6 + ...ntentProcessingCardCustomerNotification.cs | 10 + .../PaymentIntentTransferData.cs | 19 + .../Entities/PaymentLinks/PaymentLink.cs | 119 ++++++ .../PaymentLinkAfterCompletion.cs | 12 + ...ntLinkAfterCompletionHostedConfirmation.cs | 6 + .../PaymentLinkAfterCompletionRedirect.cs | 6 + .../PaymentLinks/PaymentLinkAutomaticTax.cs | 9 + .../PaymentLinkAutomaticTaxLiability.cs | 19 + .../PaymentLinkConsentCollection.cs | 12 + ...ntCollectionPaymentMethodReuseAgreement.cs | 6 + .../PaymentLinks/PaymentLinkCustomField.cs | 24 ++ .../PaymentLinkCustomFieldDropdown.cs | 6 + .../PaymentLinkCustomFieldDropdownOption.cs | 9 + .../PaymentLinkCustomFieldLabel.cs | 9 + .../PaymentLinkCustomFieldNumeric.cs | 9 + .../PaymentLinkCustomFieldText.cs | 9 + .../PaymentLinks/PaymentLinkCustomText.cs | 15 + .../PaymentLinkCustomTextAfterSubmit.cs | 6 + .../PaymentLinkCustomTextShippingAddress.cs | 6 + .../PaymentLinkCustomTextSubmit.cs | 6 + ...tLinkCustomTextTermsOfServiceAcceptance.cs | 6 + .../PaymentLinkInvoiceCreation.cs | 9 + .../PaymentLinkInvoiceCreationInvoiceData.cs | 33 ++ ...nkInvoiceCreationInvoiceDataCustomField.cs | 9 + ...entLinkInvoiceCreationInvoiceDataIssuer.cs | 19 + ...oiceCreationInvoiceDataRenderingOptions.cs | 6 + .../PaymentLinkPaymentIntentData.cs | 24 ++ .../PaymentLinkPhoneNumberCollection.cs | 6 + .../PaymentLinks/PaymentLinkRestrictions.cs | 6 + ...aymentLinkRestrictionsCompletedSessions.cs | 9 + .../PaymentLinkShippingAddressCollection.cs | 6 + .../PaymentLinks/PaymentLinkShippingOption.cs | 19 + .../PaymentLinkSubscriptionData.cs | 18 + ...mentLinkSubscriptionDataInvoiceSettings.cs | 6 + ...nkSubscriptionDataInvoiceSettingsIssuer.cs | 19 + ...aymentLinkSubscriptionDataTrialSettings.cs | 6 + ...ubscriptionDataTrialSettingsEndBehavior.cs | 6 + .../PaymentLinkTaxIdCollection.cs | 9 + .../PaymentLinks/PaymentLinkTransferData.cs | 19 + .../PaymentMethodConfiguration.cs | 150 ++++++++ .../PaymentMethodConfigurationAcssDebit.cs | 9 + ...ConfigurationAcssDebitDisplayPreference.cs | 12 + .../PaymentMethodConfigurationAffirm.cs | 9 + ...hodConfigurationAffirmDisplayPreference.cs | 12 + ...mentMethodConfigurationAfterpayClearpay.cs | 9 + ...rationAfterpayClearpayDisplayPreference.cs | 12 + .../PaymentMethodConfigurationAlipay.cs | 9 + ...hodConfigurationAlipayDisplayPreference.cs | 12 + .../PaymentMethodConfigurationAlma.cs | 9 + ...ethodConfigurationAlmaDisplayPreference.cs | 12 + .../PaymentMethodConfigurationAmazonPay.cs | 9 + ...ConfigurationAmazonPayDisplayPreference.cs | 12 + .../PaymentMethodConfigurationApplePay.cs | 9 + ...dConfigurationApplePayDisplayPreference.cs | 12 + .../PaymentMethodConfigurationAuBecsDebit.cs | 9 + ...nfigurationAuBecsDebitDisplayPreference.cs | 12 + .../PaymentMethodConfigurationBacsDebit.cs | 9 + ...ConfigurationBacsDebitDisplayPreference.cs | 12 + .../PaymentMethodConfigurationBancontact.cs | 9 + ...onfigurationBancontactDisplayPreference.cs | 12 + .../PaymentMethodConfigurationBlik.cs | 9 + ...ethodConfigurationBlikDisplayPreference.cs | 12 + .../PaymentMethodConfigurationBoleto.cs | 9 + ...hodConfigurationBoletoDisplayPreference.cs | 12 + .../PaymentMethodConfigurationCard.cs | 9 + ...ethodConfigurationCardDisplayPreference.cs | 12 + ...ymentMethodConfigurationCartesBancaires.cs | 9 + ...urationCartesBancairesDisplayPreference.cs | 12 + .../PaymentMethodConfigurationCashapp.cs | 9 + ...odConfigurationCashappDisplayPreference.cs | 12 + ...ymentMethodConfigurationCustomerBalance.cs | 9 + ...urationCustomerBalanceDisplayPreference.cs | 12 + .../PaymentMethodConfigurationEps.cs | 9 + ...MethodConfigurationEpsDisplayPreference.cs | 12 + .../PaymentMethodConfigurationFpx.cs | 9 + ...MethodConfigurationFpxDisplayPreference.cs | 12 + .../PaymentMethodConfigurationGiropay.cs | 9 + ...odConfigurationGiropayDisplayPreference.cs | 12 + .../PaymentMethodConfigurationGooglePay.cs | 9 + ...ConfigurationGooglePayDisplayPreference.cs | 12 + .../PaymentMethodConfigurationGrabpay.cs | 9 + ...odConfigurationGrabpayDisplayPreference.cs | 12 + .../PaymentMethodConfigurationIdeal.cs | 9 + ...thodConfigurationIdealDisplayPreference.cs | 12 + .../PaymentMethodConfigurationJcb.cs | 9 + ...MethodConfigurationJcbDisplayPreference.cs | 12 + .../PaymentMethodConfigurationKlarna.cs | 9 + ...hodConfigurationKlarnaDisplayPreference.cs | 12 + .../PaymentMethodConfigurationKonbini.cs | 9 + ...odConfigurationKonbiniDisplayPreference.cs | 12 + .../PaymentMethodConfigurationLink.cs | 9 + ...ethodConfigurationLinkDisplayPreference.cs | 12 + .../PaymentMethodConfigurationMobilepay.cs | 9 + ...ConfigurationMobilepayDisplayPreference.cs | 12 + .../PaymentMethodConfigurationMultibanco.cs | 9 + ...onfigurationMultibancoDisplayPreference.cs | 12 + .../PaymentMethodConfigurationOxxo.cs | 9 + ...ethodConfigurationOxxoDisplayPreference.cs | 12 + .../PaymentMethodConfigurationP24.cs | 9 + ...MethodConfigurationP24DisplayPreference.cs | 12 + .../PaymentMethodConfigurationPaynow.cs | 9 + ...hodConfigurationPaynowDisplayPreference.cs | 12 + .../PaymentMethodConfigurationPaypal.cs | 9 + ...hodConfigurationPaypalDisplayPreference.cs | 12 + .../PaymentMethodConfigurationPromptpay.cs | 9 + ...ConfigurationPromptpayDisplayPreference.cs | 12 + .../PaymentMethodConfigurationRevolutPay.cs | 9 + ...onfigurationRevolutPayDisplayPreference.cs | 12 + .../PaymentMethodConfigurationSepaDebit.cs | 9 + ...ConfigurationSepaDebitDisplayPreference.cs | 12 + .../PaymentMethodConfigurationSofort.cs | 9 + ...hodConfigurationSofortDisplayPreference.cs | 12 + .../PaymentMethodConfigurationSwish.cs | 9 + ...thodConfigurationSwishDisplayPreference.cs | 12 + .../PaymentMethodConfigurationTwint.cs | 9 + ...thodConfigurationTwintDisplayPreference.cs | 12 + ...PaymentMethodConfigurationUsBankAccount.cs | 9 + ...igurationUsBankAccountDisplayPreference.cs | 12 + .../PaymentMethodConfigurationWechatPay.cs | 9 + ...ConfigurationWechatPayDisplayPreference.cs | 12 + .../PaymentMethodConfigurationZip.cs | 9 + ...MethodConfigurationZipDisplayPreference.cs | 12 + .../PaymentMethodDomain.cs | 37 ++ .../PaymentMethodDomainAmazonPay.cs | 9 + ...ymentMethodDomainAmazonPayStatusDetails.cs | 6 + .../PaymentMethodDomainApplePay.cs | 9 + ...aymentMethodDomainApplePayStatusDetails.cs | 6 + .../PaymentMethodDomainGooglePay.cs | 9 + ...ymentMethodDomainGooglePayStatusDetails.cs | 6 + .../PaymentMethodDomainLink.cs | 9 + .../PaymentMethodDomainLinkStatusDetails.cs | 6 + .../PaymentMethodDomainPaypal.cs | 9 + .../PaymentMethodDomainPaypalStatusDetails.cs | 6 + .../Entities/PaymentMethods/PaymentMethod.cs | 179 +++++++++ .../PaymentMethods/PaymentMethodAcssDebit.cs | 18 + .../PaymentMethodAuBecsDebit.cs | 12 + .../PaymentMethods/PaymentMethodBacsDebit.cs | 12 + .../PaymentMethodBillingDetails.cs | 15 + .../PaymentMethods/PaymentMethodBoleto.cs | 6 + .../PaymentMethods/PaymentMethodCard.cs | 51 +++ .../PaymentMethods/PaymentMethodCardChecks.cs | 12 + .../PaymentMethodCardGeneratedFrom.cs | 22 ++ ...odCardGeneratedFromPaymentMethodDetails.cs | 9 + ...atedFromPaymentMethodDetailsCardPresent.cs | 79 ++++ ...mPaymentMethodDetailsCardPresentOffline.cs | 10 + ...mPaymentMethodDetailsCardPresentReceipt.cs | 30 ++ ...omPaymentMethodDetailsCardPresentWallet.cs | 6 + .../PaymentMethodCardNetworks.cs | 9 + .../PaymentMethodCardPresent.cs | 54 +++ .../PaymentMethodCardPresentNetworks.cs | 9 + .../PaymentMethodCardPresentOffline.cs | 10 + .../PaymentMethodCardPresentWallet.cs | 6 + .../PaymentMethodCardThreeDSecureUsage.cs | 6 + .../PaymentMethods/PaymentMethodCardWallet.cs | 30 ++ .../PaymentMethodCardWalletMasterpass.cs | 15 + .../PaymentMethodCardWalletVisaCheckout.cs | 15 + .../PaymentMethods/PaymentMethodCashapp.cs | 9 + .../PaymentMethods/PaymentMethodEps.cs | 6 + .../PaymentMethods/PaymentMethodFpx.cs | 9 + .../PaymentMethods/PaymentMethodIdeal.cs | 9 + .../PaymentMethodInteracPresent.cs | 45 +++ .../PaymentMethodInteracPresentNetworks.cs | 9 + .../PaymentMethods/PaymentMethodKlarna.cs | 6 + .../PaymentMethods/PaymentMethodKlarnaDob.cs | 12 + .../PaymentMethods/PaymentMethodKrCard.cs | 9 + .../PaymentMethods/PaymentMethodLink.cs | 9 + .../PaymentMethods/PaymentMethodNaverPay.cs | 6 + .../PaymentMethods/PaymentMethodP24.cs | 6 + .../PaymentMethods/PaymentMethodPaypal.cs | 9 + .../PaymentMethodRadarOptions.cs | 6 + .../PaymentMethods/PaymentMethodSepaDebit.cs | 21 + .../PaymentMethodSepaDebitGeneratedFrom.cs | 26 ++ .../PaymentMethods/PaymentMethodSofort.cs | 6 + .../PaymentMethodUsBankAccount.cs | 30 ++ .../PaymentMethodUsBankAccountNetworks.cs | 9 + ...PaymentMethodUsBankAccountStatusDetails.cs | 6 + ...MethodUsBankAccountStatusDetailsBlocked.cs | 9 + src/Stripe.net/Entities/Payouts/Payout.cs | 128 +++++++ .../Entities/Payouts/PayoutTraceId.cs | 9 + src/Stripe.net/Entities/Persons/Person.cs | 101 +++++ .../Persons/PersonAdditionalTosAcceptances.cs | 6 + .../PersonAdditionalTosAcceptancesAccount.cs | 13 + .../Persons/PersonFutureRequirements.cs | 21 + .../PersonFutureRequirementsAlternative.cs | 9 + .../Persons/PersonFutureRequirementsError.cs | 12 + .../Entities/Persons/PersonRelationship.cs | 27 ++ .../Entities/Persons/PersonRequirements.cs | 21 + .../Persons/PersonRequirementsAlternative.cs | 9 + .../Persons/PersonRequirementsError.cs | 12 + .../Entities/Persons/PersonVerification.cs | 18 + .../PersonVerificationAdditionalDocument.cs | 32 ++ .../Persons/PersonVerificationDocument.cs | 32 ++ src/Stripe.net/Entities/Plans/Plan.cs | 81 ++++ src/Stripe.net/Entities/Plans/PlanTier.cs | 18 + .../Entities/Plans/PlanTransformUsage.cs | 9 + src/Stripe.net/Entities/Prices/Price.cs | 81 ++++ .../Entities/Prices/PriceCurrencyOptions.cs | 18 + .../PriceCurrencyOptionsCustomUnitAmount.cs | 12 + .../Prices/PriceCurrencyOptionsTier.cs | 18 + .../Entities/Prices/PriceCustomUnitAmount.cs | 12 + .../Entities/Prices/PriceRecurring.cs | 21 + src/Stripe.net/Entities/Prices/PriceTier.cs | 18 + .../Entities/Prices/PriceTransformQuantity.cs | 9 + .../ProductFeatures/ProductFeature.cs | 19 + src/Stripe.net/Entities/Products/Product.cs | 83 ++++ .../Products/ProductMarketingFeature.cs | 6 + .../Products/ProductPackageDimensions.cs | 15 + .../Entities/PromotionCodes/PromotionCode.cs | 54 +++ .../PromotionCodeRestrictions.cs | 15 + ...romotionCodeRestrictionsCurrencyOptions.cs | 6 + src/Stripe.net/Entities/Quotes/Quote.cs | 174 +++++++++ .../Entities/Quotes/QuoteAutomaticTax.cs | 12 + .../Quotes/QuoteAutomaticTaxLiability.cs | 19 + .../Entities/Quotes/QuoteComputed.cs | 9 + .../Entities/Quotes/QuoteComputedRecurring.cs | 18 + .../QuoteComputedRecurringTotalDetails.cs | 15 + ...eComputedRecurringTotalDetailsBreakdown.cs | 9 + ...dRecurringTotalDetailsBreakdownDiscount.cs | 9 + ...mputedRecurringTotalDetailsBreakdownTax.cs | 15 + .../Entities/Quotes/QuoteComputedUpfront.cs | 15 + .../QuoteComputedUpfrontTotalDetails.cs | 15 + ...oteComputedUpfrontTotalDetailsBreakdown.cs | 9 + ...tedUpfrontTotalDetailsBreakdownDiscount.cs | 9 + ...ComputedUpfrontTotalDetailsBreakdownTax.cs | 15 + .../Entities/Quotes/QuoteFromQuote.cs | 19 + .../Entities/Quotes/QuoteInvoiceSettings.cs | 9 + .../Quotes/QuoteInvoiceSettingsIssuer.cs | 19 + .../Entities/Quotes/QuoteStatusTransitions.cs | 15 + .../Entities/Quotes/QuoteSubscriptionData.cs | 16 + .../Entities/Quotes/QuoteTotalDetails.cs | 15 + .../Quotes/QuoteTotalDetailsBreakdown.cs | 9 + .../QuoteTotalDetailsBreakdownDiscount.cs | 9 + .../Quotes/QuoteTotalDetailsBreakdownTax.cs | 15 + .../Entities/Quotes/QuoteTransferData.cs | 22 ++ .../EarlyFraudWarnings/EarlyFraudWarning.cs | 45 +++ .../Radar/ValueListItems/ValueListItem.cs | 29 ++ .../Entities/Radar/ValueLists/ValueList.cs | 38 ++ src/Stripe.net/Entities/Refunds/Refund.cs | 109 ++++++ .../Refunds/RefundDestinationDetails.cs | 99 +++++ .../Refunds/RefundDestinationDetailsBlik.cs | 12 + .../RefundDestinationDetailsBrBankTransfer.cs | 9 + .../Refunds/RefundDestinationDetailsCard.cs | 15 + .../RefundDestinationDetailsEuBankTransfer.cs | 9 + .../RefundDestinationDetailsGbBankTransfer.cs | 9 + .../RefundDestinationDetailsJpBankTransfer.cs | 9 + .../RefundDestinationDetailsMultibanco.cs | 9 + .../RefundDestinationDetailsMxBankTransfer.cs | 9 + .../Refunds/RefundDestinationDetailsP24.cs | 9 + .../Refunds/RefundDestinationDetailsSwish.cs | 12 + .../RefundDestinationDetailsThBankTransfer.cs | 9 + .../RefundDestinationDetailsUsBankTransfer.cs | 9 + .../Entities/Refunds/RefundNextAction.cs | 9 + .../Refunds/RefundNextActionDisplayDetails.cs | 10 + ...RefundNextActionDisplayDetailsEmailSent.cs | 10 + .../Reporting/ReportRuns/ReportRun.cs | 35 ++ .../ReportRuns/ReportRunParameters.cs | 29 ++ .../Reporting/ReportTypes/ReportType.cs | 33 ++ .../ReserveTransactions/ReserveTransaction.cs | 18 + src/Stripe.net/Entities/Reviews/Review.cs | 63 +++ .../Entities/Reviews/ReviewSession.cs | 15 + .../Entities/SetupAttempts/SetupAttempt.cs | 87 +++++ .../SetupAttemptPaymentMethodDetails.cs | 63 +++ ...upAttemptPaymentMethodDetailsBancontact.cs | 44 +++ .../SetupAttemptPaymentMethodDetailsCard.cs | 45 +++ ...upAttemptPaymentMethodDetailsCardChecks.cs | 12 + ...pAttemptPaymentMethodDetailsCardPresent.cs | 19 + ...tPaymentMethodDetailsCardPresentOffline.cs | 10 + ...mptPaymentMethodDetailsCardThreeDSecure.cs | 21 + ...upAttemptPaymentMethodDetailsCardWallet.cs | 12 + .../SetupAttemptPaymentMethodDetailsIdeal.cs | 38 ++ .../SetupAttemptPaymentMethodDetailsSofort.cs | 44 +++ .../Entities/SetupIntents/SetupIntent.cs | 131 +++++++ .../SetupIntentAutomaticPaymentMethods.cs | 9 + .../SetupIntents/SetupIntentNextAction.cs | 18 + ...ionCashappHandleRedirectOrDisplayQrCode.cs | 12 + ...happHandleRedirectOrDisplayQrCodeQrCode.cs | 13 + .../SetupIntentNextActionRedirectToUrl.cs | 9 + ...IntentNextActionVerifyWithMicrodeposits.cs | 13 + ...IntentPaymentMethodConfigurationDetails.cs | 9 + .../SetupIntentPaymentMethodOptions.cs | 30 ++ ...etupIntentPaymentMethodOptionsAcssDebit.cs | 12 + ...entMethodOptionsAcssDebitMandateOptions.cs | 18 + ...etupIntentPaymentMethodOptionsBacsDebit.cs | 6 + .../SetupIntentPaymentMethodOptionsCard.cs | 12 + ...tPaymentMethodOptionsCardMandateOptions.cs | 35 ++ .../SetupIntentPaymentMethodOptionsLink.cs | 6 + .../SetupIntentPaymentMethodOptionsPaypal.cs | 6 + ...etupIntentPaymentMethodOptionsSepaDebit.cs | 6 + ...IntentPaymentMethodOptionsUsBankAccount.cs | 12 + ...ptionsUsBankAccountFinancialConnections.cs | 15 + ...sBankAccountFinancialConnectionsFilters.cs | 6 + ...ethodOptionsUsBankAccountMandateOptions.cs | 6 + .../Entities/ShippingRates/ShippingRate.cs | 50 +++ .../ShippingRateDeliveryEstimate.cs | 9 + .../ShippingRateDeliveryEstimateMaximum.cs | 9 + .../ShippingRateDeliveryEstimateMinimum.cs | 9 + .../ShippingRates/ShippingRateFixedAmount.cs | 12 + .../ShippingRateFixedAmountCurrencyOptions.cs | 9 + .../ScheduledQueryRuns/ScheduledQueryRun.cs | 39 ++ .../ScheduledQueryRunError.cs | 6 + .../SourceMandateNotification.cs | 40 ++ .../SourceMandateNotificationAcssDebit.cs | 6 + .../SourceMandateNotificationBacsDebit.cs | 6 + .../SourceMandateNotificationSepaDebit.cs | 12 + .../SourceTransactions/SourceTransaction.cs | 46 +++ .../SourceTransactionAchCreditTransfer.cs | 15 + .../SourceTransactionChfCreditTransfer.cs | 18 + .../SourceTransactionGbpCreditTransfer.cs | 24 ++ .../SourceTransactionPaperCheck.cs | 9 + .../SourceTransactionSepaCreditTransfer.cs | 12 + src/Stripe.net/Entities/Sources/Source.cs | 118 ++++++ .../Sources/SourceAchCreditTransfer.cs | 27 ++ .../Entities/Sources/SourceAchDebit.cs | 21 + .../Entities/Sources/SourceAcssDebit.cs | 33 ++ .../Entities/Sources/SourceAlipay.cs | 12 + .../Entities/Sources/SourceAuBecsDebit.cs | 12 + .../Entities/Sources/SourceBancontact.cs | 21 + src/Stripe.net/Entities/Sources/SourceCard.cs | 54 +++ .../Entities/Sources/SourceCardPresent.cs | 81 ++++ .../Sources/SourceCodeVerification.cs | 9 + src/Stripe.net/Entities/Sources/SourceEps.cs | 9 + .../Entities/Sources/SourceGiropay.cs | 15 + .../Entities/Sources/SourceIdeal.cs | 15 + .../Entities/Sources/SourceKlarna.cs | 81 ++++ .../Entities/Sources/SourceMultibanco.cs | 33 ++ .../Entities/Sources/SourceOwner.cs | 27 ++ src/Stripe.net/Entities/Sources/SourceP24.cs | 6 + .../Entities/Sources/SourceReceiver.cs | 21 + .../Entities/Sources/SourceRedirect.cs | 15 + .../Sources/SourceSepaCreditTransfer.cs | 36 ++ .../Entities/Sources/SourceSepaDebit.cs | 24 ++ .../Entities/Sources/SourceSofort.cs | 24 ++ .../Entities/Sources/SourceSourceOrder.cs | 18 + .../Entities/Sources/SourceSourceOrderItem.cs | 21 + .../Entities/Sources/SourceThreeDSecure.cs | 63 +++ .../Entities/Sources/SourceWechat.cs | 12 + .../SubscriptionItems/SubscriptionItem.cs | 50 +++ .../SubscriptionItemBillingThresholds.cs | 6 + .../SubscriptionSchedule.cs | 92 +++++ .../SubscriptionScheduleCurrentPhase.cs | 11 + .../SubscriptionScheduleDefaultSettings.cs | 50 +++ ...tionScheduleDefaultSettingsAutomaticTax.cs | 9 + ...uleDefaultSettingsAutomaticTaxLiability.cs | 19 + ...cheduleDefaultSettingsBillingThresholds.cs | 9 + ...nScheduleDefaultSettingsInvoiceSettings.cs | 21 + ...uleDefaultSettingsInvoiceSettingsIssuer.cs | 19 + ...tionScheduleDefaultSettingsTransferData.cs | 19 + .../SubscriptionSchedulePhase.cs | 93 +++++ ...SubscriptionSchedulePhaseAddInvoiceItem.cs | 25 ++ ...tionSchedulePhaseAddInvoiceItemDiscount.cs | 36 ++ .../SubscriptionSchedulePhaseAutomaticTax.cs | 9 + ...ptionSchedulePhaseAutomaticTaxLiability.cs | 19 + ...scriptionSchedulePhaseBillingThresholds.cs | 9 + .../SubscriptionSchedulePhaseDiscount.cs | 36 ++ ...ubscriptionSchedulePhaseInvoiceSettings.cs | 21 + ...ptionSchedulePhaseInvoiceSettingsIssuer.cs | 19 + .../SubscriptionSchedulePhaseItem.cs | 41 ++ ...ptionSchedulePhaseItemBillingThresholds.cs | 6 + .../SubscriptionSchedulePhaseItemDiscount.cs | 36 ++ .../SubscriptionSchedulePhaseTransferData.cs | 19 + .../Entities/Subscriptions/Subscription.cs | 224 +++++++++++ .../Subscriptions/SubscriptionAutomaticTax.cs | 9 + .../SubscriptionAutomaticTaxLiability.cs | 19 + .../SubscriptionBillingCycleAnchorConfig.cs | 18 + .../SubscriptionBillingThresholds.cs | 9 + .../SubscriptionCancellationDetails.cs | 12 + .../SubscriptionInvoiceSettings.cs | 18 + .../SubscriptionInvoiceSettingsIssuer.cs | 19 + .../SubscriptionPauseCollection.cs | 10 + .../SubscriptionPaymentSettings.cs | 12 + ...tionPaymentSettingsPaymentMethodOptions.cs | 24 ++ ...ntSettingsPaymentMethodOptionsAcssDebit.cs | 9 + ...entMethodOptionsAcssDebitMandateOptions.cs | 6 + ...tSettingsPaymentMethodOptionsBancontact.cs | 6 + ...PaymentSettingsPaymentMethodOptionsCard.cs | 12 + ...sPaymentMethodOptionsCardMandateOptions.cs | 12 + ...ingsPaymentMethodOptionsCustomerBalance.cs | 9 + ...ethodOptionsCustomerBalanceBankTransfer.cs | 9 + ...stomerBalanceBankTransferEuBankTransfer.cs | 6 + ...ttingsPaymentMethodOptionsUsBankAccount.cs | 9 + ...ptionsUsBankAccountFinancialConnections.cs | 12 + ...sBankAccountFinancialConnectionsFilters.cs | 6 + .../SubscriptionPendingInvoiceItemInterval.cs | 9 + .../SubscriptionPendingUpdate.cs | 21 + .../Subscriptions/SubscriptionTransferData.cs | 19 + .../SubscriptionTrialSettings.cs | 6 + .../SubscriptionTrialSettingsEndBehavior.cs | 6 + .../CalculationLineItem.cs | 36 ++ .../CalculationLineItemTaxBreakdown.cs | 21 + ...ulationLineItemTaxBreakdownJurisdiction.cs | 15 + ...ationLineItemTaxBreakdownTaxRateDetails.cs | 12 + .../Entities/Tax/Calculations/Calculation.cs | 50 +++ .../CalculationCustomerDetails.cs | 18 + .../CalculationCustomerDetailsAddress.cs | 21 + .../CalculationCustomerDetailsTaxId.cs | 9 + .../CalculationShipFromDetails.cs | 6 + .../CalculationShipFromDetailsAddress.cs | 21 + .../Calculations/CalculationShippingCost.cs | 21 + .../CalculationShippingCostTaxBreakdown.cs | 21 + ...ionShippingCostTaxBreakdownJurisdiction.cs | 15 + ...nShippingCostTaxBreakdownTaxRateDetails.cs | 12 + .../Calculations/CalculationTaxBreakdown.cs | 18 + .../CalculationTaxBreakdownTaxRateDetails.cs | 21 + ...ionTaxBreakdownTaxRateDetailsFlatAmount.cs | 9 + .../Tax/Registrations/Registration.cs | 33 ++ .../RegistrationCountryOptions.cs | 198 ++++++++++ .../RegistrationCountryOptionsAe.cs | 6 + .../RegistrationCountryOptionsAt.cs | 9 + .../RegistrationCountryOptionsAtStandard.cs | 6 + .../RegistrationCountryOptionsAu.cs | 6 + .../RegistrationCountryOptionsBe.cs | 9 + .../RegistrationCountryOptionsBeStandard.cs | 6 + .../RegistrationCountryOptionsBg.cs | 9 + .../RegistrationCountryOptionsBgStandard.cs | 6 + .../RegistrationCountryOptionsBh.cs | 6 + .../RegistrationCountryOptionsBy.cs | 6 + .../RegistrationCountryOptionsCa.cs | 9 + ...trationCountryOptionsCaProvinceStandard.cs | 6 + .../RegistrationCountryOptionsCh.cs | 6 + .../RegistrationCountryOptionsCl.cs | 6 + .../RegistrationCountryOptionsCo.cs | 6 + .../RegistrationCountryOptionsCr.cs | 6 + .../RegistrationCountryOptionsCy.cs | 9 + .../RegistrationCountryOptionsCyStandard.cs | 6 + .../RegistrationCountryOptionsCz.cs | 9 + .../RegistrationCountryOptionsCzStandard.cs | 6 + .../RegistrationCountryOptionsDe.cs | 9 + .../RegistrationCountryOptionsDeStandard.cs | 6 + .../RegistrationCountryOptionsDk.cs | 9 + .../RegistrationCountryOptionsDkStandard.cs | 6 + .../RegistrationCountryOptionsEc.cs | 6 + .../RegistrationCountryOptionsEe.cs | 9 + .../RegistrationCountryOptionsEeStandard.cs | 6 + .../RegistrationCountryOptionsEg.cs | 6 + .../RegistrationCountryOptionsEs.cs | 9 + .../RegistrationCountryOptionsEsStandard.cs | 6 + .../RegistrationCountryOptionsFi.cs | 9 + .../RegistrationCountryOptionsFiStandard.cs | 6 + .../RegistrationCountryOptionsFr.cs | 9 + .../RegistrationCountryOptionsFrStandard.cs | 6 + .../RegistrationCountryOptionsGb.cs | 6 + .../RegistrationCountryOptionsGe.cs | 6 + .../RegistrationCountryOptionsGr.cs | 9 + .../RegistrationCountryOptionsGrStandard.cs | 6 + .../RegistrationCountryOptionsHr.cs | 9 + .../RegistrationCountryOptionsHrStandard.cs | 6 + .../RegistrationCountryOptionsHu.cs | 9 + .../RegistrationCountryOptionsHuStandard.cs | 6 + .../RegistrationCountryOptionsId.cs | 6 + .../RegistrationCountryOptionsIe.cs | 9 + .../RegistrationCountryOptionsIeStandard.cs | 6 + .../RegistrationCountryOptionsIs.cs | 6 + .../RegistrationCountryOptionsIt.cs | 9 + .../RegistrationCountryOptionsItStandard.cs | 6 + .../RegistrationCountryOptionsJp.cs | 6 + .../RegistrationCountryOptionsKe.cs | 6 + .../RegistrationCountryOptionsKr.cs | 6 + .../RegistrationCountryOptionsKz.cs | 6 + .../RegistrationCountryOptionsLt.cs | 9 + .../RegistrationCountryOptionsLtStandard.cs | 6 + .../RegistrationCountryOptionsLu.cs | 9 + .../RegistrationCountryOptionsLuStandard.cs | 6 + .../RegistrationCountryOptionsLv.cs | 9 + .../RegistrationCountryOptionsLvStandard.cs | 6 + .../RegistrationCountryOptionsMa.cs | 6 + .../RegistrationCountryOptionsMd.cs | 6 + .../RegistrationCountryOptionsMt.cs | 9 + .../RegistrationCountryOptionsMtStandard.cs | 6 + .../RegistrationCountryOptionsMx.cs | 6 + .../RegistrationCountryOptionsMy.cs | 6 + .../RegistrationCountryOptionsNg.cs | 6 + .../RegistrationCountryOptionsNl.cs | 9 + .../RegistrationCountryOptionsNlStandard.cs | 6 + .../RegistrationCountryOptionsNo.cs | 6 + .../RegistrationCountryOptionsNz.cs | 6 + .../RegistrationCountryOptionsOm.cs | 6 + .../RegistrationCountryOptionsPl.cs | 9 + .../RegistrationCountryOptionsPlStandard.cs | 6 + .../RegistrationCountryOptionsPt.cs | 9 + .../RegistrationCountryOptionsPtStandard.cs | 6 + .../RegistrationCountryOptionsRo.cs | 9 + .../RegistrationCountryOptionsRoStandard.cs | 6 + .../RegistrationCountryOptionsRs.cs | 6 + .../RegistrationCountryOptionsRu.cs | 6 + .../RegistrationCountryOptionsSa.cs | 6 + .../RegistrationCountryOptionsSe.cs | 9 + .../RegistrationCountryOptionsSeStandard.cs | 6 + .../RegistrationCountryOptionsSg.cs | 6 + .../RegistrationCountryOptionsSi.cs | 9 + .../RegistrationCountryOptionsSiStandard.cs | 6 + .../RegistrationCountryOptionsSk.cs | 9 + .../RegistrationCountryOptionsSkStandard.cs | 6 + .../RegistrationCountryOptionsTh.cs | 6 + .../RegistrationCountryOptionsTr.cs | 6 + .../RegistrationCountryOptionsTz.cs | 6 + .../RegistrationCountryOptionsUs.cs | 18 + ...rationCountryOptionsUsLocalAmusementTax.cs | 6 + ...gistrationCountryOptionsUsLocalLeaseTax.cs | 6 + ...gistrationCountryOptionsUsStateSalesTax.cs | 6 + ...onCountryOptionsUsStateSalesTaxElection.cs | 9 + .../RegistrationCountryOptionsUz.cs | 6 + .../RegistrationCountryOptionsVn.cs | 6 + .../RegistrationCountryOptionsZa.cs | 6 + .../Entities/Tax/Settings/Settings.cs | 21 + .../Entities/Tax/Settings/SettingsDefaults.cs | 9 + .../Tax/Settings/SettingsHeadOffice.cs | 6 + .../Tax/Settings/SettingsStatusDetails.cs | 9 + .../Settings/SettingsStatusDetailsPending.cs | 6 + .../TransactionLineItem.cs | 42 ++ .../TransactionLineItemReversal.cs | 6 + .../Entities/Tax/Transactions/Transaction.cs | 54 +++ .../TransactionCustomerDetails.cs | 18 + .../TransactionCustomerDetailsAddress.cs | 21 + .../TransactionCustomerDetailsTaxId.cs | 9 + .../Tax/Transactions/TransactionReversal.cs | 6 + .../TransactionShipFromDetails.cs | 6 + .../TransactionShipFromDetailsAddress.cs | 21 + .../Transactions/TransactionShippingCost.cs | 21 + .../TransactionShippingCostTaxBreakdown.cs | 21 + ...ionShippingCostTaxBreakdownJurisdiction.cs | 15 + ...nShippingCostTaxBreakdownTaxRateDetails.cs | 12 + src/Stripe.net/Entities/TaxCodes/TaxCode.cs | 15 + .../TaxDeductedAtSource.cs | 20 + src/Stripe.net/Entities/TaxIds/TaxId.cs | 48 +++ src/Stripe.net/Entities/TaxIds/TaxIdOwner.cs | 39 ++ .../Entities/TaxIds/TaxIdVerification.cs | 12 + src/Stripe.net/Entities/TaxRates/TaxRate.cs | 58 +++ .../Entities/TaxRates/TaxRateFlatAmount.cs | 9 + .../Terminal/Configurations/Configuration.cs | 40 ++ .../ConfigurationBbposWiseposE.cs | 16 + .../Configurations/ConfigurationOffline.cs | 6 + .../ConfigurationRebootWindow.cs | 9 + .../Configurations/ConfigurationStripeS700.cs | 16 + .../Configurations/ConfigurationTipping.cs | 48 +++ .../Configurations/ConfigurationTippingAud.cs | 12 + .../Configurations/ConfigurationTippingCad.cs | 12 + .../Configurations/ConfigurationTippingChf.cs | 12 + .../Configurations/ConfigurationTippingCzk.cs | 12 + .../Configurations/ConfigurationTippingDkk.cs | 12 + .../Configurations/ConfigurationTippingEur.cs | 12 + .../Configurations/ConfigurationTippingGbp.cs | 12 + .../Configurations/ConfigurationTippingHkd.cs | 12 + .../Configurations/ConfigurationTippingMyr.cs | 12 + .../Configurations/ConfigurationTippingNok.cs | 12 + .../Configurations/ConfigurationTippingNzd.cs | 12 + .../Configurations/ConfigurationTippingPln.cs | 12 + .../Configurations/ConfigurationTippingSek.cs | 12 + .../Configurations/ConfigurationTippingSgd.cs | 12 + .../Configurations/ConfigurationTippingUsd.cs | 12 + .../ConfigurationVerifoneP400.cs | 16 + .../ConnectionTokens/ConnectionToken.cs | 12 + .../Entities/Terminal/Locations/Location.cs | 28 ++ .../Entities/Terminal/Readers/Reader.cs | 53 +++ .../Entities/Terminal/Readers/ReaderAction.cs | 27 ++ .../ReaderActionProcessPaymentIntent.cs | 19 + ...ActionProcessPaymentIntentProcessConfig.cs | 12 + ...rocessPaymentIntentProcessConfigTipping.cs | 6 + .../Readers/ReaderActionProcessSetupIntent.cs | 22 ++ ...erActionProcessSetupIntentProcessConfig.cs | 6 + .../Readers/ReaderActionRefundPayment.cs | 54 +++ ...rActionRefundPaymentRefundPaymentConfig.cs | 6 + .../Readers/ReaderActionSetReaderDisplay.cs | 9 + .../ReaderActionSetReaderDisplayCart.cs | 15 + ...eaderActionSetReaderDisplayCartLineItem.cs | 12 + .../TestHelpers/TestClocks/TestClock.cs | 37 ++ .../TestClocks/TestClockStatusDetails.cs | 6 + .../TestClockStatusDetailsAdvancing.cs | 7 + src/Stripe.net/Entities/Tokens/Token.cs | 31 ++ src/Stripe.net/Entities/Topups/Topup.cs | 63 +++ .../TransferReversals/TransferReversal.cs | 65 ++++ src/Stripe.net/Entities/Transfers/Transfer.cs | 86 +++++ .../CreditReversals/CreditReversal.cs | 56 +++ .../CreditReversalStatusTransitions.cs | 7 + .../Treasury/DebitReversals/DebitReversal.cs | 59 +++ .../DebitReversalLinkedFlows.cs | 6 + .../DebitReversalStatusTransitions.cs | 7 + .../FinancialAccountFeatures.cs | 27 ++ .../FinancialAccountFeaturesCardIssuing.cs | 12 + ...lAccountFeaturesCardIssuingStatusDetail.cs | 12 + ...inancialAccountFeaturesDepositInsurance.cs | 12 + ...untFeaturesDepositInsuranceStatusDetail.cs | 12 + ...ancialAccountFeaturesFinancialAddresses.cs | 6 + ...ialAccountFeaturesFinancialAddressesAba.cs | 12 + ...aturesFinancialAddressesAbaStatusDetail.cs | 12 + ...inancialAccountFeaturesInboundTransfers.cs | 6 + ...ncialAccountFeaturesInboundTransfersAch.cs | 12 + ...FeaturesInboundTransfersAchStatusDetail.cs | 12 + ...inancialAccountFeaturesIntraStripeFlows.cs | 12 + ...untFeaturesIntraStripeFlowsStatusDetail.cs | 12 + ...inancialAccountFeaturesOutboundPayments.cs | 9 + ...ncialAccountFeaturesOutboundPaymentsAch.cs | 12 + ...FeaturesOutboundPaymentsAchStatusDetail.cs | 12 + ...tFeaturesOutboundPaymentsUsDomesticWire.cs | 12 + ...boundPaymentsUsDomesticWireStatusDetail.cs | 12 + ...nancialAccountFeaturesOutboundTransfers.cs | 9 + ...cialAccountFeaturesOutboundTransfersAch.cs | 12 + ...eaturesOutboundTransfersAchStatusDetail.cs | 12 + ...FeaturesOutboundTransfersUsDomesticWire.cs | 12 + ...oundTransfersUsDomesticWireStatusDetail.cs | 12 + .../FinancialAccounts/FinancialAccount.cs | 52 +++ .../FinancialAccountBalance.cs | 12 + .../FinancialAccountFinancialAddress.cs | 12 + .../FinancialAccountFinancialAddressAba.cs | 18 + .../FinancialAccountPlatformRestrictions.cs | 9 + .../FinancialAccountStatusDetails.cs | 6 + .../FinancialAccountStatusDetailsClosed.cs | 6 + .../InboundTransfers/InboundTransfer.cs | 74 ++++ .../InboundTransferFailureDetails.cs | 6 + .../InboundTransferLinkedFlows.cs | 6 + ...boundTransferOriginPaymentMethodDetails.cs | 12 + ...riginPaymentMethodDetailsBillingDetails.cs | 12 + ...OriginPaymentMethodDetailsUsBankAccount.cs | 37 ++ .../InboundTransferStatusTransitions.cs | 15 + .../OutboundPayments/OutboundPayment.cs | 81 ++++ ...dPaymentDestinationPaymentMethodDetails.cs | 15 + ...ationPaymentMethodDetailsBillingDetails.cs | 12 + ...ionPaymentMethodDetailsFinancialAccount.cs | 9 + ...nationPaymentMethodDetailsUsBankAccount.cs | 37 ++ .../OutboundPaymentEndUserDetails.cs | 9 + .../OutboundPaymentReturnedDetails.cs | 19 + .../OutboundPaymentStatusTransitions.cs | 19 + .../OutboundPaymentTrackingDetails.cs | 12 + .../OutboundPaymentTrackingDetailsAch.cs | 6 + ...undPaymentTrackingDetailsUsDomesticWire.cs | 12 + .../OutboundTransfers/OutboundTransfer.cs | 75 ++++ ...TransferDestinationPaymentMethodDetails.cs | 12 + ...ationPaymentMethodDetailsBillingDetails.cs | 12 + ...nationPaymentMethodDetailsUsBankAccount.cs | 37 ++ .../OutboundTransferReturnedDetails.cs | 19 + .../OutboundTransferStatusTransitions.cs | 19 + .../OutboundTransferTrackingDetails.cs | 12 + .../OutboundTransferTrackingDetailsAch.cs | 6 + ...ndTransferTrackingDetailsUsDomesticWire.cs | 12 + .../ReceivedCredits/ReceivedCredit.cs | 62 +++ ...vedCreditInitiatingPaymentMethodDetails.cs | 21 + ...atingPaymentMethodDetailsBillingDetails.cs | 12 + ...ingPaymentMethodDetailsFinancialAccount.cs | 9 + ...iatingPaymentMethodDetailsUsBankAccount.cs | 12 + .../ReceivedCreditLinkedFlows.cs | 21 + ...eivedCreditLinkedFlowsSourceFlowDetails.cs | 15 + .../ReceivedCreditReversalDetails.cs | 10 + .../Treasury/ReceivedDebits/ReceivedDebit.cs | 62 +++ ...ivedDebitInitiatingPaymentMethodDetails.cs | 21 + ...atingPaymentMethodDetailsBillingDetails.cs | 12 + ...ingPaymentMethodDetailsFinancialAccount.cs | 9 + ...iatingPaymentMethodDetailsUsBankAccount.cs | 12 + .../ReceivedDebitLinkedFlows.cs | 18 + .../ReceivedDebitReversalDetails.cs | 10 + .../TransactionEntries/TransactionEntry.cs | 54 +++ .../TransactionEntryBalanceImpact.cs | 12 + .../TransactionEntryFlowDetails.cs | 30 ++ .../Treasury/Transactions/Transaction.cs | 49 +++ .../Transactions/TransactionBalanceImpact.cs | 12 + .../Transactions/TransactionFlowDetails.cs | 30 ++ .../TransactionStatusTransitions.cs | 11 + .../UsageRecordSummary.cs | 24 ++ .../UsageRecordSummaryPeriod.cs | 11 + .../Entities/UsageRecords/UsageRecord.cs | 22 ++ .../MeterEventAdjustment.cs | 27 ++ .../MeterEventAdjustmentCancel.cs | 6 + .../MeterEventSessions/MeterEventSession.cs | 21 + .../V2/Billing/MeterEvents/MeterEvent.cs | 24 ++ .../V2/EventDestinations/EventDestination.cs | 54 +++ .../EventDestinationAmazonEventbridge.cs | 12 + .../EventDestinationStatusDetails.cs | 6 + .../EventDestinationStatusDetailsDisabled.cs | 6 + .../EventDestinationWebhookEndpoint.cs | 9 + src/Stripe.net/Entities/V2/Events/Event.cs | 24 ++ .../Entities/V2/Events/EventReason.cs | 9 + .../Entities/V2/Events/EventReasonRequest.cs | 9 + .../WebhookEndpoints/WebhookEndpoint.cs | 44 +++ ...V1BillingMeterErrorReportTriggeredEvent.cs | 11 + ...llingMeterErrorReportTriggeredEventData.cs | 15 + ...eterErrorReportTriggeredEventDataReason.cs | 9 + ...ReportTriggeredEventDataReasonErrorType.cs | 12 + ...eredEventDataReasonErrorTypeSampleError.cs | 9 + ...ntDataReasonErrorTypeSampleErrorRequest.cs | 6 + .../Events/V1BillingMeterNoMeterFoundEvent.cs | 7 + .../V1BillingMeterNoMeterFoundEventData.cs | 15 + ...BillingMeterNoMeterFoundEventDataReason.cs | 9 + ...terNoMeterFoundEventDataReasonErrorType.cs | 12 + ...oundEventDataReasonErrorTypeSampleError.cs | 9 + ...ntDataReasonErrorTypeSampleErrorRequest.cs | 6 + .../AccountCapabilityUpdateOptions.cs | 6 + ...ccountExternalAccountBankAccountOptions.cs | 24 ++ .../AccountExternalAccountCardOptions.cs | 45 +++ .../AccountExternalAccountCardTokenOptions.cs | 12 + .../AccountExternalAccountCreateOptions.cs | 13 + ...BankAccountOwnershipVerificationOptions.cs | 6 + .../AccountExternalAccountDocumentsOptions.cs | 6 + .../AccountExternalAccountListOptions.cs | 6 + .../AccountExternalAccountUpdateOptions.cs | 48 +++ .../AccountLinkCollectionOptionsOptions.cs | 9 + .../AccountLinks/AccountLinkCreateOptions.cs | 21 + ...nAdditionalTosAcceptancesAccountOptions.cs | 13 + ...ntPersonAdditionalTosAcceptancesOptions.cs | 6 + .../AccountPersonCreateOptions.cs | 84 ++++ .../AccountPersons/AccountPersonDobOptions.cs | 12 + ...sonDocumentsCompanyAuthorizationOptions.cs | 6 + .../AccountPersonDocumentsOptions.cs | 12 + .../AccountPersonDocumentsPassportOptions.cs | 6 + .../AccountPersonDocumentsVisaOptions.cs | 6 + .../AccountPersonListOptions.cs | 6 + .../AccountPersonRelationshipOptions.cs | 27 ++ .../AccountPersonUpdateOptions.cs | 84 ++++ ...onVerificationAdditionalDocumentOptions.cs | 9 + ...ccountPersonVerificationDocumentOptions.cs | 9 + .../AccountPersonVerificationOptions.cs | 9 + ...ponentsAccountManagementFeaturesOptions.cs | 9 + ...ssionComponentsAccountManagementOptions.cs | 9 + ...ponentsAccountOnboardingFeaturesOptions.cs | 9 + ...ssionComponentsAccountOnboardingOptions.cs | 9 + ...essionComponentsBalancesFeaturesOptions.cs | 18 + ...AccountSessionComponentsBalancesOptions.cs | 9 + ...ccountSessionComponentsDocumentsOptions.cs | 9 + ...onentsNotificationBannerFeaturesOptions.cs | 9 + ...sionComponentsNotificationBannerOptions.cs | 9 + .../AccountSessionComponentsOptions.cs | 36 ++ ...ComponentsPaymentDetailsFeaturesOptions.cs | 15 + ...tSessionComponentsPaymentDetailsOptions.cs | 9 + ...essionComponentsPaymentsFeaturesOptions.cs | 15 + ...AccountSessionComponentsPaymentsOptions.cs | 9 + ...SessionComponentsPayoutsFeaturesOptions.cs | 18 + ...ountSessionComponentsPayoutsListOptions.cs | 9 + .../AccountSessionComponentsPayoutsOptions.cs | 9 + ...essionComponentsTaxRegistrationsOptions.cs | 9 + ...ountSessionComponentsTaxSettingsOptions.cs | 9 + .../AccountSessionCreateOptions.cs | 9 + .../Accounts/AccountBankAccountOptions.cs | 24 ++ ...ountBusinessProfileAnnualRevenueOptions.cs | 12 + ...ssProfileMonthlyEstimatedRevenueOptions.cs | 9 + .../Accounts/AccountBusinessProfileOptions.cs | 36 ++ ...untCapabilitiesAcssDebitPaymentsOptions.cs | 6 + ...ccountCapabilitiesAffirmPaymentsOptions.cs | 6 + ...bilitiesAfterpayClearpayPaymentsOptions.cs | 6 + .../AccountCapabilitiesAlmaPaymentsOptions.cs | 6 + ...untCapabilitiesAmazonPayPaymentsOptions.cs | 6 + ...tCapabilitiesAuBecsDebitPaymentsOptions.cs | 6 + ...untCapabilitiesBacsDebitPaymentsOptions.cs | 6 + ...ntCapabilitiesBancontactPaymentsOptions.cs | 6 + ...CapabilitiesBankTransferPaymentsOptions.cs | 6 + .../AccountCapabilitiesBlikPaymentsOptions.cs | 6 + ...ccountCapabilitiesBoletoPaymentsOptions.cs | 6 + .../AccountCapabilitiesCardIssuingOptions.cs | 6 + .../AccountCapabilitiesCardPaymentsOptions.cs | 6 + ...abilitiesCartesBancairesPaymentsOptions.cs | 6 + ...countCapabilitiesCashappPaymentsOptions.cs | 6 + .../AccountCapabilitiesEpsPaymentsOptions.cs | 6 + .../AccountCapabilitiesFpxPaymentsOptions.cs | 6 + ...pabilitiesGbBankTransferPaymentsOptions.cs | 6 + ...countCapabilitiesGiropayPaymentsOptions.cs | 6 + ...countCapabilitiesGrabpayPaymentsOptions.cs | 6 + ...AccountCapabilitiesIdealPaymentsOptions.cs | 6 + ...litiesIndiaInternationalPaymentsOptions.cs | 6 + .../AccountCapabilitiesJcbPaymentsOptions.cs | 6 + ...pabilitiesJpBankTransferPaymentsOptions.cs | 6 + ...ountCapabilitiesKakaoPayPaymentsOptions.cs | 6 + ...ccountCapabilitiesKlarnaPaymentsOptions.cs | 6 + ...countCapabilitiesKonbiniPaymentsOptions.cs | 6 + ...ccountCapabilitiesKrCardPaymentsOptions.cs | 6 + ...ccountCapabilitiesLegacyPaymentsOptions.cs | 6 + .../AccountCapabilitiesLinkPaymentsOptions.cs | 6 + ...untCapabilitiesMobilepayPaymentsOptions.cs | 6 + ...ntCapabilitiesMultibancoPaymentsOptions.cs | 6 + ...pabilitiesMxBankTransferPaymentsOptions.cs | 6 + ...ountCapabilitiesNaverPayPaymentsOptions.cs | 6 + .../Accounts/AccountCapabilitiesOptions.cs | 162 ++++++++ .../AccountCapabilitiesOxxoPaymentsOptions.cs | 6 + .../AccountCapabilitiesP24PaymentsOptions.cs | 6 + ...AccountCapabilitiesPaycoPaymentsOptions.cs | 6 + ...ccountCapabilitiesPaynowPaymentsOptions.cs | 6 + ...untCapabilitiesPromptpayPaymentsOptions.cs | 6 + ...ntCapabilitiesRevolutPayPaymentsOptions.cs | 6 + ...ntCapabilitiesSamsungPayPaymentsOptions.cs | 6 + ...bilitiesSepaBankTransferPaymentsOptions.cs | 6 + ...untCapabilitiesSepaDebitPaymentsOptions.cs | 6 + ...ccountCapabilitiesSofortPaymentsOptions.cs | 6 + ...AccountCapabilitiesSwishPaymentsOptions.cs | 6 + ...tCapabilitiesTaxReportingUs1099KOptions.cs | 6 + ...pabilitiesTaxReportingUs1099MiscOptions.cs | 6 + .../AccountCapabilitiesTransfersOptions.cs | 6 + .../AccountCapabilitiesTreasuryOptions.cs | 6 + ...AccountCapabilitiesTwintPaymentsOptions.cs | 6 + ...bilitiesUsBankAccountAchPaymentsOptions.cs | 6 + ...pabilitiesUsBankTransferPaymentsOptions.cs | 6 + .../AccountCapabilitiesZipPaymentsOptions.cs | 6 + .../Services/Accounts/AccountCardOptions.cs | 48 +++ .../Accounts/AccountCompanyOptions.cs | 60 +++ ...countCompanyOwnershipDeclarationOptions.cs | 13 + ...countCompanyVerificationDocumentOptions.cs | 9 + .../AccountCompanyVerificationOptions.cs | 6 + .../Accounts/AccountControllerFeesOptions.cs | 6 + .../AccountControllerLossesOptions.cs | 6 + .../Accounts/AccountControllerOptions.cs | 15 + ...AccountControllerStripeDashboardOptions.cs | 6 + .../Services/Accounts/AccountCreateOptions.cs | 55 +++ ...BankAccountOwnershipVerificationOptions.cs | 6 + .../AccountDocumentsCompanyLicenseOptions.cs | 6 + ...tsCompanyMemorandumOfAssociationOptions.cs | 6 + ...ocumentsCompanyMinisterialDecreeOptions.cs | 6 + ...sCompanyRegistrationVerificationOptions.cs | 6 + ...ocumentsCompanyTaxIdVerificationOptions.cs | 6 + .../Accounts/AccountDocumentsOptions.cs | 24 ++ ...ountDocumentsProofOfRegistrationOptions.cs | 6 + .../Services/Accounts/AccountGroupsOptions.cs | 6 + .../Accounts/AccountIndividualOptions.cs | 72 ++++ .../AccountIndividualRelationshipOptions.cs | 18 + ...alVerificationAdditionalDocumentOptions.cs | 9 + ...ntIndividualVerificationDocumentOptions.cs | 9 + .../AccountIndividualVerificationOptions.cs | 9 + .../Services/Accounts/AccountRejectOptions.cs | 6 + ...AccountSettingsBacsDebitPaymentsOptions.cs | 6 + .../AccountSettingsBrandingOptions.cs | 15 + .../AccountSettingsCardIssuingOptions.cs | 6 + ...SettingsCardIssuingTosAcceptanceOptions.cs | 13 + ...untSettingsCardPaymentsDeclineOnOptions.cs | 9 + .../AccountSettingsCardPaymentsOptions.cs | 15 + .../AccountSettingsInvoicesOptions.cs | 6 + .../Accounts/AccountSettingsOptions.cs | 27 ++ .../AccountSettingsPaymentsOptions.cs | 12 + .../Accounts/AccountSettingsPayoutsOptions.cs | 12 + .../AccountSettingsPayoutsScheduleOptions.cs | 16 + .../AccountSettingsTreasuryOptions.cs | 6 + ...untSettingsTreasuryTosAcceptanceOptions.cs | 13 + .../Accounts/AccountTosAcceptanceOptions.cs | 16 + .../Services/Accounts/AccountUpdateOptions.cs | 46 +++ .../Services/Accounts/DobOptions.cs | 12 + .../ApplePayDomainCreateOptions.cs | 6 + .../ApplePayDomainListOptions.cs | 6 + .../ApplicationFeeRefundCreateOptions.cs | 9 + .../ApplicationFeeRefundUpdateOptions.cs | 6 + .../ApplicationFeeListOptions.cs | 6 + .../Apps/Secrets/SecretCreateOptions.cs | 16 + .../Apps/Secrets/SecretDeleteWhereOptions.cs | 9 + .../Apps/Secrets/SecretFindOptions.cs | 9 + .../Apps/Secrets/SecretListOptions.cs | 6 + .../Apps/Secrets/SecretScopeOptions.cs | 9 + .../BalanceTransactionListOptions.cs | 15 + ...BankAccountOwnershipVerificationOptions.cs | 6 + .../BankAccountDocumentsOptions.cs | 6 + .../BankAccounts/BankAccountUpdateOptions.cs | 18 + .../BankAccounts/BankAccountVerifyOptions.cs | 6 + .../Billing/Alerts/AlertCreateOptions.cs | 12 + .../Billing/Alerts/AlertListOptions.cs | 9 + .../AlertUsageThresholdFilterOptions.cs | 9 + .../Alerts/AlertUsageThresholdOptions.cs | 15 + ...eSummaryFilterApplicabilityScopeOptions.cs | 6 + .../CreditBalanceSummaryFilterOptions.cs | 12 + .../CreditBalanceSummaryGetOptions.cs | 9 + .../CreditBalanceTransactionListOptions.cs | 9 + .../CreditGrantAmountMonetaryOptions.cs | 9 + .../CreditGrants/CreditGrantAmountOptions.cs | 9 + .../CreditGrantApplicabilityConfigOptions.cs | 6 + ...ditGrantApplicabilityConfigScopeOptions.cs | 6 + .../CreditGrants/CreditGrantCreateOptions.cs | 29 ++ .../CreditGrants/CreditGrantListOptions.cs | 6 + .../CreditGrants/CreditGrantUpdateOptions.cs | 10 + .../MeterEventAdjustmentCancelOptions.cs | 6 + .../MeterEventAdjustmentCreateOptions.cs | 12 + .../MeterEventSummaryListOptions.cs | 17 + .../MeterEvents/MeterEventCreateOptions.cs | 16 + .../Billing/Meters/MeterCreateOptions.cs | 21 + .../Meters/MeterCustomerMappingOptions.cs | 9 + .../Meters/MeterDefaultAggregationOptions.cs | 6 + .../Billing/Meters/MeterListOptions.cs | 6 + .../Billing/Meters/MeterUpdateOptions.cs | 6 + .../Meters/MeterValueSettingsOptions.cs | 6 + .../ConfigurationBusinessProfileOptions.cs | 12 + .../ConfigurationCreateOptions.cs | 18 + ...figurationFeaturesCustomerUpdateOptions.cs | 9 + ...figurationFeaturesInvoiceHistoryOptions.cs | 6 + .../ConfigurationFeaturesOptions.cs | 18 + ...ationFeaturesPaymentMethodUpdateOptions.cs | 6 + ...criptionCancelCancellationReasonOptions.cs | 9 + ...rationFeaturesSubscriptionCancelOptions.cs | 15 + ...rationFeaturesSubscriptionUpdateOptions.cs | 18 + ...eaturesSubscriptionUpdateProductOptions.cs | 9 + ...dateScheduleAtPeriodEndConditionOptions.cs | 6 + ...riptionUpdateScheduleAtPeriodEndOptions.cs | 6 + .../ConfigurationListOptions.cs | 9 + .../ConfigurationLoginPageOptions.cs | 6 + .../ConfigurationUpdateOptions.cs | 21 + .../Sessions/SessionCreateOptions.cs | 21 + ...fterCompletionHostedConfirmationOptions.cs | 6 + .../SessionFlowDataAfterCompletionOptions.cs | 12 + ...nFlowDataAfterCompletionRedirectOptions.cs | 6 + .../Sessions/SessionFlowDataOptions.cs | 18 + ...essionFlowDataSubscriptionCancelOptions.cs | 9 + ...iptionCancelRetentionCouponOfferOptions.cs | 6 + ...wDataSubscriptionCancelRetentionOptions.cs | 9 + ...ubscriptionUpdateConfirmDiscountOptions.cs | 9 + ...ataSubscriptionUpdateConfirmItemOptions.cs | 12 + ...lowDataSubscriptionUpdateConfirmOptions.cs | 12 + ...essionFlowDataSubscriptionUpdateOptions.cs | 6 + ...BankAccountOwnershipVerificationOptions.cs | 6 + .../Services/Cards/CardDocumentsOptions.cs | 6 + .../Services/Cards/CardUpdateOptions.cs | 42 ++ .../Charges/CardCreateNestedOptions.cs | 45 +++ .../Services/Charges/ChargeCaptureOptions.cs | 30 ++ .../Services/Charges/ChargeCreateOptions.cs | 61 +++ .../Charges/ChargeDestinationOptions.cs | 9 + .../Charges/ChargeFraudDetailsOptions.cs | 6 + .../Charges/ChargeLevel3LineItemOptions.cs | 21 + .../Services/Charges/ChargeLevel3Options.cs | 21 + .../Services/Charges/ChargeListOptions.cs | 12 + .../Charges/ChargeRadarOptionsOptions.cs | 6 + .../Services/Charges/ChargeShippingOptions.cs | 18 + .../Charges/ChargeTransferDataOptions.cs | 9 + .../Services/Charges/ChargeUpdateOptions.cs | 27 ++ .../Sessions/SessionAdaptivePricingOptions.cs | 6 + .../Sessions/SessionAfterExpirationOptions.cs | 6 + .../SessionAfterExpirationRecoveryOptions.cs | 9 + .../SessionAutomaticTaxLiabilityOptions.cs | 9 + .../Sessions/SessionAutomaticTaxOptions.cs | 9 + .../SessionConsentCollectionOptions.cs | 12 + ...ctionPaymentMethodReuseAgreementOptions.cs | 6 + .../Checkout/Sessions/SessionCreateOptions.cs | 124 ++++++ ...SessionCustomFieldDropdownOptionOptions.cs | 9 + .../SessionCustomFieldDropdownOptions.cs | 9 + .../SessionCustomFieldLabelOptions.cs | 9 + .../SessionCustomFieldNumericOptions.cs | 12 + .../Sessions/SessionCustomFieldOptions.cs | 24 ++ .../Sessions/SessionCustomFieldTextOptions.cs | 12 + .../SessionCustomTextAfterSubmitOptions.cs | 6 + .../Sessions/SessionCustomTextOptions.cs | 15 + ...SessionCustomTextShippingAddressOptions.cs | 6 + .../SessionCustomTextSubmitOptions.cs | 6 + ...stomTextTermsOfServiceAcceptanceOptions.cs | 6 + .../Sessions/SessionCustomerDetailsOptions.cs | 6 + .../Sessions/SessionCustomerUpdateOptions.cs | 12 + .../Sessions/SessionDiscountOptions.cs | 9 + ...ceCreationInvoiceDataCustomFieldOptions.cs | 9 + ...InvoiceCreationInvoiceDataIssuerOptions.cs | 9 + ...essionInvoiceCreationInvoiceDataOptions.cs | 24 ++ ...ationInvoiceDataRenderingOptionsOptions.cs | 6 + .../Sessions/SessionInvoiceCreationOptions.cs | 9 + ...essionLineItemAdjustableQuantityOptions.cs | 12 + .../Sessions/SessionLineItemOptions.cs | 21 + .../SessionLineItemPriceDataOptions.cs | 24 ++ ...sionLineItemPriceDataProductDataOptions.cs | 18 + ...essionLineItemPriceDataRecurringOptions.cs | 9 + .../Checkout/Sessions/SessionListOptions.cs | 21 + .../SessionPaymentIntentDataOptions.cs | 39 ++ ...ionPaymentIntentDataTransferDataOptions.cs | 9 + .../SessionPaymentMethodDataOptions.cs | 6 + ...odOptionsAcssDebitMandateOptionsOptions.cs | 18 + ...ionPaymentMethodOptionsAcssDebitOptions.cs | 15 + ...essionPaymentMethodOptionsAffirmOptions.cs | 6 + ...entMethodOptionsAfterpayClearpayOptions.cs | 6 + ...essionPaymentMethodOptionsAlipayOptions.cs | 6 + ...ionPaymentMethodOptionsAmazonPayOptions.cs | 6 + ...nPaymentMethodOptionsAuBecsDebitOptions.cs | 6 + ...ionPaymentMethodOptionsBacsDebitOptions.cs | 9 + ...onPaymentMethodOptionsBancontactOptions.cs | 6 + ...essionPaymentMethodOptionsBoletoOptions.cs | 9 + ...entMethodOptionsCardInstallmentsOptions.cs | 6 + .../SessionPaymentMethodOptionsCardOptions.cs | 30 ++ ...ssionPaymentMethodOptionsCashappOptions.cs | 6 + ...alanceBankTransferEuBankTransferOptions.cs | 6 + ...tionsCustomerBalanceBankTransferOptions.cs | 12 + ...mentMethodOptionsCustomerBalanceOptions.cs | 12 + .../SessionPaymentMethodOptionsEpsOptions.cs | 6 + .../SessionPaymentMethodOptionsFpxOptions.cs | 6 + ...ssionPaymentMethodOptionsGiropayOptions.cs | 6 + ...ssionPaymentMethodOptionsGrabpayOptions.cs | 6 + ...SessionPaymentMethodOptionsIdealOptions.cs | 6 + ...sionPaymentMethodOptionsKakaoPayOptions.cs | 9 + ...essionPaymentMethodOptionsKlarnaOptions.cs | 6 + ...ssionPaymentMethodOptionsKonbiniOptions.cs | 9 + ...essionPaymentMethodOptionsKrCardOptions.cs | 9 + .../SessionPaymentMethodOptionsLinkOptions.cs | 6 + ...ionPaymentMethodOptionsMobilepayOptions.cs | 6 + ...onPaymentMethodOptionsMultibancoOptions.cs | 6 + ...sionPaymentMethodOptionsNaverPayOptions.cs | 9 + .../SessionPaymentMethodOptionsOptions.cs | 117 ++++++ .../SessionPaymentMethodOptionsOxxoOptions.cs | 9 + .../SessionPaymentMethodOptionsP24Options.cs | 9 + ...SessionPaymentMethodOptionsPaycoOptions.cs | 6 + ...essionPaymentMethodOptionsPaynowOptions.cs | 6 + ...essionPaymentMethodOptionsPaypalOptions.cs | 18 + .../SessionPaymentMethodOptionsPixOptions.cs | 6 + ...onPaymentMethodOptionsRevolutPayOptions.cs | 6 + ...onPaymentMethodOptionsSamsungPayOptions.cs | 6 + ...ionPaymentMethodOptionsSepaDebitOptions.cs | 9 + ...essionPaymentMethodOptionsSofortOptions.cs | 6 + ...SessionPaymentMethodOptionsSwishOptions.cs | 6 + ...sBankAccountFinancialConnectionsOptions.cs | 9 + ...aymentMethodOptionsUsBankAccountOptions.cs | 12 + ...ionPaymentMethodOptionsWechatPayOptions.cs | 12 + .../SessionPhoneNumberCollectionOptions.cs | 6 + ...SessionSavedPaymentMethodOptionsOptions.cs | 9 + .../Sessions/SessionSetupIntentDataOptions.cs | 12 + ...SessionShippingAddressCollectionOptions.cs | 6 + .../Sessions/SessionShippingOptionOptions.cs | 9 + ...gRateDataDeliveryEstimateMaximumOptions.cs | 9 + ...gRateDataDeliveryEstimateMinimumOptions.cs | 9 + ...ShippingRateDataDeliveryEstimateOptions.cs | 9 + ...teDataFixedAmountCurrencyOptionsOptions.cs | 9 + ...ptionShippingRateDataFixedAmountOptions.cs | 12 + ...onShippingOptionShippingRateDataOptions.cs | 24 ++ ...riptionDataInvoiceSettingsIssuerOptions.cs | 9 + ...nSubscriptionDataInvoiceSettingsOptions.cs | 6 + .../SessionSubscriptionDataOptions.cs | 41 ++ ...sionSubscriptionDataTransferDataOptions.cs | 9 + ...tionDataTrialSettingsEndBehaviorOptions.cs | 6 + ...ionSubscriptionDataTrialSettingsOptions.cs | 6 + .../Sessions/SessionTaxIdCollectionOptions.cs | 9 + .../Checkout/Sessions/SessionUpdateOptions.cs | 6 + .../Climate/Orders/OrderBeneficiaryOptions.cs | 6 + .../Climate/Orders/OrderCreateOptions.cs | 21 + .../Climate/Orders/OrderUpdateOptions.cs | 9 + .../Coupons/CouponAppliesToOptions.cs | 6 + .../Services/Coupons/CouponCreateOptions.cs | 40 ++ .../Coupons/CouponCurrencyOptionsOptions.cs | 6 + .../Services/Coupons/CouponUpdateOptions.cs | 12 + .../CreditNotePreviewLinesLineOptions.cs | 30 ++ ...ditNotePreviewLinesLineTaxAmountOptions.cs | 12 + .../CreditNotePreviewLinesListOptions.cs | 43 +++ ...editNotePreviewLinesShippingCostOptions.cs | 6 + .../CreditNotes/CreditNoteCreateOptions.cs | 43 +++ .../CreditNotes/CreditNoteLineOptions.cs | 30 ++ .../CreditNoteLineTaxAmountOptions.cs | 12 + .../CreditNotes/CreditNoteListOptions.cs | 9 + .../CreditNotes/CreditNotePreviewOptions.cs | 43 +++ .../CreditNoteShippingCostOptions.cs | 6 + .../CreditNotes/CreditNoteUpdateOptions.cs | 9 + ...CustomerBalanceTransactionCreateOptions.cs | 15 + ...CustomerBalanceTransactionUpdateOptions.cs | 9 + .../CustomerCashBalanceUpdateOptions.cs | 6 + ...ctionsBankTransferEuBankTransferOptions.cs | 6 + ...rFundingInstructionsBankTransferOptions.cs | 12 + ...ustomerFundingInstructionsCreateOptions.cs | 12 + .../CustomerPaymentMethodListOptions.cs | 9 + .../CustomerPaymentSourceCreateOptions.cs | 12 + .../CustomerPaymentSourceListOptions.cs | 6 + .../CustomerPaymentSourceOwnerOptions.cs | 15 + .../CustomerPaymentSourceUpdateOptions.cs | 42 ++ .../CustomerPaymentSourceVerifyOptions.cs | 6 + ...stomerSessionComponentsBuyButtonOptions.cs | 6 + .../CustomerSessionComponentsOptions.cs | 12 + ...ComponentsPaymentElementFeaturesOptions.cs | 21 + ...rSessionComponentsPaymentElementOptions.cs | 9 + ...merSessionComponentsPricingTableOptions.cs | 6 + .../CustomerSessionCreateOptions.cs | 9 + .../CustomerTaxIdCreateOptions.cs | 9 + .../Customers/CustomerCashBalanceOptions.cs | 6 + .../CustomerCashBalanceSettingsOptions.cs | 6 + .../Customers/CustomerCreateOptions.cs | 73 ++++ ...stomerInvoiceSettingsCustomFieldOptions.cs | 9 + .../CustomerInvoiceSettingsOptions.cs | 15 + ...rInvoiceSettingsRenderingOptionsOptions.cs | 9 + .../Services/Customers/CustomerListOptions.cs | 9 + .../Customers/CustomerTaxIdDataOptions.cs | 9 + .../Services/Customers/CustomerTaxOptions.cs | 9 + .../Customers/CustomerUpdateOptions.cs | 64 ++++ .../Services/Customers/ShippingOptions.cs | 12 + .../DisputeEvidenceEnhancedEvidenceOptions.cs | 6 + ...lingEvidence3DisputedTransactionOptions.cs | 27 ++ ...dEvidenceVisaCompellingEvidence3Options.cs | 9 + ...dence3PriorUndisputedTransactionOptions.cs | 27 ++ .../Disputes/DisputeEvidenceOptions.cs | 87 +++++ .../Services/Disputes/DisputeListOptions.cs | 9 + .../Services/Disputes/DisputeUpdateOptions.cs | 12 + .../ActiveEntitlementListOptions.cs | 6 + .../Features/FeatureCreateOptions.cs | 12 + .../Features/FeatureListOptions.cs | 9 + .../Features/FeatureUpdateOptions.cs | 12 + .../EphemeralKeyCreateOptions.cs | 18 + .../Services/Events/EventListOptions.cs | 12 + .../FileLinks/FileLinkCreateOptions.cs | 13 + .../Services/FileLinks/FileLinkListOptions.cs | 9 + .../FileLinks/FileLinkUpdateOptions.cs | 10 + .../Services/Files/FileCreateOptions.cs | 12 + .../Services/Files/FileFileLinkDataOptions.cs | 13 + .../Services/Files/FileListOptions.cs | 6 + .../AccountOwners/AccountOwnerListOptions.cs | 6 + .../Accounts/AccountAccountHolderOptions.cs | 9 + .../Accounts/AccountListOptions.cs | 9 + .../Accounts/AccountRefreshOptions.cs | 6 + .../Accounts/AccountSubscribeOptions.cs | 6 + .../Accounts/AccountUnsubscribeOptions.cs | 6 + .../Sessions/SessionAccountHolderOptions.cs | 12 + .../Sessions/SessionCreateOptions.cs | 18 + .../Sessions/SessionFiltersOptions.cs | 9 + .../Transactions/TransactionListOptions.cs | 13 + .../TransactionTransactionRefreshOptions.cs | 6 + .../Requests/RequestCreateOptions.cs | 18 + .../Requests/RequestRequestHeaderOptions.cs | 9 + .../Requests/RequestRequestOptions.cs | 9 + .../VerificationReportListOptions.cs | 12 + .../VerificationSessionCreateOptions.cs | 27 ++ .../VerificationSessionListOptions.cs | 12 + ...rificationSessionOptionsDocumentOptions.cs | 15 + .../VerificationSessionOptionsOptions.cs | 6 + ...rificationSessionProvidedDetailsOptions.cs | 9 + .../VerificationSessionUpdateOptions.cs | 15 + .../InvoiceItems/InvoiceItemCreateOptions.cs | 57 +++ .../InvoiceItemDiscountOptions.cs | 12 + .../InvoiceItems/InvoiceItemListOptions.cs | 12 + .../InvoiceItems/InvoiceItemPeriodOptions.cs | 11 + .../InvoiceItemPriceDataOptions.cs | 18 + .../InvoiceItems/InvoiceItemUpdateOptions.cs | 45 +++ .../InvoiceLineItemDiscountOptions.cs | 12 + .../InvoiceLineItemPeriodOptions.cs | 11 + .../InvoiceLineItemPriceDataOptions.cs | 21 + ...oiceLineItemPriceDataProductDataOptions.cs | 18 + .../InvoiceLineItemTaxAmountOptions.cs | 12 + ...oiceLineItemTaxAmountTaxRateDataOptions.cs | 27 ++ .../InvoiceLineItemUpdateOptions.cs | 36 ++ .../InvoiceRenderingTemplateGetOptions.cs | 6 + .../InvoiceRenderingTemplateListOptions.cs | 6 + ...comingLinesAutomaticTaxLiabilityOptions.cs | 9 + ...InvoiceUpcomingLinesAutomaticTaxOptions.cs | 9 + ...oiceUpcomingLinesCustomerDetailsOptions.cs | 18 + ...mingLinesCustomerDetailsShippingOptions.cs | 12 + ...pcomingLinesCustomerDetailsTaxIdOptions.cs | 9 + ...eUpcomingLinesCustomerDetailsTaxOptions.cs | 6 + .../InvoiceUpcomingLinesDiscountOptions.cs | 12 + ...UpcomingLinesInvoiceItemDiscountOptions.cs | 12 + .../InvoiceUpcomingLinesInvoiceItemOptions.cs | 51 +++ ...ceUpcomingLinesInvoiceItemPeriodOptions.cs | 11 + ...pcomingLinesInvoiceItemPriceDataOptions.cs | 18 + .../InvoiceUpcomingLinesIssuerOptions.cs | 9 + .../InvoiceUpcomingLinesListOptions.cs | 86 +++++ ...oiceUpcomingLinesScheduleDetailsOptions.cs | 12 + ...tailsPhaseAddInvoiceItemDiscountOptions.cs | 12 + ...heduleDetailsPhaseAddInvoiceItemOptions.cs | 18 + ...ailsPhaseAddInvoiceItemPriceDataOptions.cs | 18 + ...etailsPhaseAutomaticTaxLiabilityOptions.cs | 9 + ...ScheduleDetailsPhaseAutomaticTaxOptions.cs | 9 + ...uleDetailsPhaseBillingThresholdsOptions.cs | 9 + ...inesScheduleDetailsPhaseDiscountOptions.cs | 12 + ...etailsPhaseInvoiceSettingsIssuerOptions.cs | 9 + ...eduleDetailsPhaseInvoiceSettingsOptions.cs | 12 + ...etailsPhaseItemBillingThresholdsOptions.cs | 6 + ...ScheduleDetailsPhaseItemDiscountOptions.cs | 12 + ...ingLinesScheduleDetailsPhaseItemOptions.cs | 27 ++ ...cheduleDetailsPhaseItemPriceDataOptions.cs | 21 + ...tailsPhaseItemPriceDataRecurringOptions.cs | 9 + ...pcomingLinesScheduleDetailsPhaseOptions.cs | 75 ++++ ...ScheduleDetailsPhaseTransferDataOptions.cs | 9 + ...tionDetailsItemBillingThresholdsOptions.cs | 6 + ...sSubscriptionDetailsItemDiscountOptions.cs | 12 + ...mingLinesSubscriptionDetailsItemOptions.cs | 36 ++ ...SubscriptionDetailsItemPriceDataOptions.cs | 21 + ...ionDetailsItemPriceDataRecurringOptions.cs | 9 + ...UpcomingLinesSubscriptionDetailsOptions.cs | 41 ++ ...ubscriptionItemBillingThresholdsOptions.cs | 6 + ...ingLinesSubscriptionItemDiscountOptions.cs | 12 + ...iceUpcomingLinesSubscriptionItemOptions.cs | 36 ++ ...ngLinesSubscriptionItemPriceDataOptions.cs | 21 + ...bscriptionItemPriceDataRecurringOptions.cs | 9 + .../Invoices/InvoiceAddLinesOptions.cs | 9 + .../InvoiceAutomaticTaxLiabilityOptions.cs | 9 + .../Invoices/InvoiceAutomaticTaxOptions.cs | 9 + .../Services/Invoices/InvoiceCreateOptions.cs | 99 +++++ .../Invoices/InvoiceCreatePreviewOptions.cs | 45 +++ .../Invoices/InvoiceCustomFieldOptions.cs | 9 + .../Invoices/InvoiceCustomerDetailsOptions.cs | 18 + .../InvoiceCustomerDetailsTaxIdOptions.cs | 9 + .../InvoiceCustomerDetailsTaxOptions.cs | 6 + .../Invoices/InvoiceDiscountOptions.cs | 12 + .../Invoices/InvoiceFinalizeOptions.cs | 6 + .../Invoices/InvoiceFromInvoiceOptions.cs | 9 + .../Services/Invoices/InvoiceIssuerOptions.cs | 9 + .../Invoices/InvoiceLineDiscountOptions.cs | 12 + .../Services/Invoices/InvoiceLineOptions.cs | 45 +++ .../Invoices/InvoiceLinePeriodOptions.cs | 11 + .../Invoices/InvoiceLinePriceDataOptions.cs | 21 + .../InvoiceLinePriceDataProductDataOptions.cs | 18 + .../Invoices/InvoiceLineTaxAmountOptions.cs | 12 + .../InvoiceLineTaxAmountTaxRateDataOptions.cs | 27 ++ .../Services/Invoices/InvoiceListOptions.cs | 19 + .../Services/Invoices/InvoicePayOptions.cs | 21 + .../Invoices/InvoicePaymentSettingsOptions.cs | 12 + ...odOptionsAcssDebitMandateOptionsOptions.cs | 6 + ...ngsPaymentMethodOptionsAcssDebitOptions.cs | 9 + ...gsPaymentMethodOptionsBancontactOptions.cs | 6 + ...entMethodOptionsCardInstallmentsOptions.cs | 9 + ...ethodOptionsCardInstallmentsPlanOptions.cs | 12 + ...SettingsPaymentMethodOptionsCardOptions.cs | 9 + ...alanceBankTransferEuBankTransferOptions.cs | 6 + ...tionsCustomerBalanceBankTransferOptions.cs | 9 + ...mentMethodOptionsCustomerBalanceOptions.cs | 9 + ...mentSettingsPaymentMethodOptionsOptions.cs | 24 ++ ...countFinancialConnectionsFiltersOptions.cs | 6 + ...sBankAccountFinancialConnectionsOptions.cs | 12 + ...aymentMethodOptionsUsBankAccountOptions.cs | 9 + .../Invoices/InvoiceRemoveLinesOptions.cs | 9 + .../Invoices/InvoiceRenderingOptions.cs | 15 + .../Invoices/InvoiceRenderingPdfOptions.cs | 6 + .../Invoices/InvoiceScheduleDetailsOptions.cs | 12 + ...tailsPhaseAddInvoiceItemDiscountOptions.cs | 12 + ...heduleDetailsPhaseAddInvoiceItemOptions.cs | 18 + ...ailsPhaseAddInvoiceItemPriceDataOptions.cs | 18 + ...etailsPhaseAutomaticTaxLiabilityOptions.cs | 9 + ...ScheduleDetailsPhaseAutomaticTaxOptions.cs | 9 + ...uleDetailsPhaseBillingThresholdsOptions.cs | 9 + ...oiceScheduleDetailsPhaseDiscountOptions.cs | 12 + ...etailsPhaseInvoiceSettingsIssuerOptions.cs | 9 + ...eduleDetailsPhaseInvoiceSettingsOptions.cs | 12 + ...etailsPhaseItemBillingThresholdsOptions.cs | 6 + ...ScheduleDetailsPhaseItemDiscountOptions.cs | 12 + .../InvoiceScheduleDetailsPhaseItemOptions.cs | 27 ++ ...cheduleDetailsPhaseItemPriceDataOptions.cs | 21 + ...tailsPhaseItemPriceDataRecurringOptions.cs | 9 + .../InvoiceScheduleDetailsPhaseOptions.cs | 75 ++++ ...ScheduleDetailsPhaseTransferDataOptions.cs | 9 + .../Invoices/InvoiceShippingCostOptions.cs | 9 + ...gRateDataDeliveryEstimateMaximumOptions.cs | 9 + ...gRateDataDeliveryEstimateMinimumOptions.cs | 9 + ...ShippingRateDataDeliveryEstimateOptions.cs | 9 + ...teDataFixedAmountCurrencyOptionsOptions.cs | 9 + ...gCostShippingRateDataFixedAmountOptions.cs | 12 + ...oiceShippingCostShippingRateDataOptions.cs | 24 ++ .../Invoices/InvoiceShippingDetailsOptions.cs | 12 + ...tionDetailsItemBillingThresholdsOptions.cs | 6 + ...eSubscriptionDetailsItemDiscountOptions.cs | 12 + .../InvoiceSubscriptionDetailsItemOptions.cs | 36 ++ ...SubscriptionDetailsItemPriceDataOptions.cs | 21 + ...ionDetailsItemPriceDataRecurringOptions.cs | 9 + .../InvoiceSubscriptionDetailsOptions.cs | 41 ++ ...ubscriptionItemBillingThresholdsOptions.cs | 6 + .../InvoiceSubscriptionItemDiscountOptions.cs | 12 + .../InvoiceSubscriptionItemOptions.cs | 36 ++ ...InvoiceSubscriptionItemPriceDataOptions.cs | 21 + ...bscriptionItemPriceDataRecurringOptions.cs | 9 + .../Invoices/InvoiceTransferDataOptions.cs | 9 + .../Invoices/InvoiceUpdateLinesOptions.cs | 9 + .../Services/Invoices/InvoiceUpdateOptions.cs | 84 ++++ .../AuthorizationApproveOptions.cs | 9 + .../AuthorizationDeclineOptions.cs | 6 + .../AuthorizationListOptions.cs | 12 + .../AuthorizationUpdateOptions.cs | 6 + .../Cardholders/CardholderBillingOptions.cs | 6 + .../Cardholders/CardholderCompanyOptions.cs | 6 + .../Cardholders/CardholderCreateOptions.cs | 36 ++ .../CardholderIndividualCardIssuingOptions.cs | 6 + ...alCardIssuingUserTermsAcceptanceOptions.cs | 13 + .../CardholderIndividualDobOptions.cs | 12 + .../CardholderIndividualOptions.cs | 18 + ...erIndividualVerificationDocumentOptions.cs | 9 + ...CardholderIndividualVerificationOptions.cs | 6 + .../Cardholders/CardholderListOptions.cs | 15 + .../CardholderSpendingControlsOptions.cs | 21 + ...derSpendingControlsSpendingLimitOptions.cs | 12 + .../Cardholders/CardholderUpdateOptions.cs | 30 ++ .../Issuing/Cards/CardCreateOptions.cs | 42 ++ .../Services/Issuing/Cards/CardListOptions.cs | 24 ++ .../Services/Issuing/Cards/CardPinOptions.cs | 6 + .../CardShippingAddressValidationOptions.cs | 6 + .../Cards/CardShippingCustomsOptions.cs | 6 + .../Issuing/Cards/CardShippingOptions.cs | 27 ++ .../Cards/CardSpendingControlsOptions.cs | 18 + ...ardSpendingControlsSpendingLimitOptions.cs | 12 + .../Issuing/Cards/CardUpdateOptions.cs | 24 ++ .../Issuing/Disputes/DisputeCreateOptions.cs | 18 + .../DisputeEvidenceCanceledOptions.cs | 36 ++ .../DisputeEvidenceDuplicateOptions.cs | 21 + .../DisputeEvidenceFraudulentOptions.cs | 9 + ...videnceMerchandiseNotAsDescribedOptions.cs | 23 ++ ...puteEvidenceNoValidAuthorizationOptions.cs | 9 + .../DisputeEvidenceNotReceivedOptions.cs | 19 + .../Disputes/DisputeEvidenceOptions.cs | 30 ++ .../Disputes/DisputeEvidenceOtherOptions.cs | 15 + ...uteEvidenceServiceNotAsDescribedOptions.cs | 20 + .../Issuing/Disputes/DisputeListOptions.cs | 9 + .../Issuing/Disputes/DisputeSubmitOptions.cs | 6 + .../Disputes/DisputeTreasuryOptions.cs | 6 + .../Issuing/Disputes/DisputeUpdateOptions.cs | 12 + ...PersonalizationDesignCarrierTextOptions.cs | 15 + .../PersonalizationDesignCreateOptions.cs | 27 ++ .../PersonalizationDesignListOptions.cs | 12 + ...PersonalizationDesignPreferencesOptions.cs | 9 + .../PersonalizationDesignUpdateOptions.cs | 27 ++ .../PhysicalBundleListOptions.cs | 9 + .../Issuing/Tokens/TokenListOptions.cs | 9 + .../Issuing/Tokens/TokenUpdateOptions.cs | 6 + .../Transactions/TransactionListOptions.cs | 12 + .../Transactions/TransactionUpdateOptions.cs | 6 + ...aymentIntentApplyCustomerBalanceOptions.cs | 9 + ...entIntentAutomaticPaymentMethodsOptions.cs | 9 + .../PaymentIntentCancelOptions.cs | 6 + .../PaymentIntentCaptureOptions.cs | 24 ++ .../PaymentIntentConfirmOptions.cs | 54 +++ .../PaymentIntentCreateOptions.cs | 96 +++++ .../PaymentIntents/PaymentIntentGetOptions.cs | 6 + ...mentIntentIncrementAuthorizationOptions.cs | 21 + .../PaymentIntentListOptions.cs | 6 + ...dateDataCustomerAcceptanceOnlineOptions.cs | 9 + ...entMandateDataCustomerAcceptanceOptions.cs | 16 + .../PaymentIntentMandateDataOptions.cs | 6 + ...IntentPaymentMethodDataAcssDebitOptions.cs | 12 + ...tentPaymentMethodDataAuBecsDebitOptions.cs | 9 + ...IntentPaymentMethodDataBacsDebitOptions.cs | 9 + ...tPaymentMethodDataBillingDetailsOptions.cs | 15 + ...entIntentPaymentMethodDataBoletoOptions.cs | 6 + ...aymentIntentPaymentMethodDataEpsOptions.cs | 6 + ...aymentIntentPaymentMethodDataFpxOptions.cs | 9 + ...mentIntentPaymentMethodDataIdealOptions.cs | 6 + ...entIntentPaymentMethodDataKlarnaOptions.cs | 6 + ...tIntentPaymentMethodDataNaverPayOptions.cs | 6 + .../PaymentIntentPaymentMethodDataOptions.cs | 147 +++++++ ...aymentIntentPaymentMethodDataP24Options.cs | 6 + ...entPaymentMethodDataRadarOptionsOptions.cs | 6 + ...IntentPaymentMethodDataSepaDebitOptions.cs | 6 + ...entIntentPaymentMethodDataSofortOptions.cs | 6 + ...ntPaymentMethodDataUsBankAccountOptions.cs | 18 + ...odOptionsAcssDebitMandateOptionsOptions.cs | 15 + ...entPaymentMethodOptionsAcssDebitOptions.cs | 12 + ...IntentPaymentMethodOptionsAffirmOptions.cs | 12 + ...entMethodOptionsAfterpayClearpayOptions.cs | 12 + ...IntentPaymentMethodOptionsAlipayOptions.cs | 6 + ...ntIntentPaymentMethodOptionsAlmaOptions.cs | 6 + ...entPaymentMethodOptionsAmazonPayOptions.cs | 9 + ...tPaymentMethodOptionsAuBecsDebitOptions.cs | 6 + ...entPaymentMethodOptionsBacsDebitOptions.cs | 9 + ...ntPaymentMethodOptionsBancontactOptions.cs | 9 + ...ntIntentPaymentMethodOptionsBlikOptions.cs | 9 + ...IntentPaymentMethodOptionsBoletoOptions.cs | 9 + ...entMethodOptionsCardInstallmentsOptions.cs | 9 + ...ethodOptionsCardInstallmentsPlanOptions.cs | 12 + ...tMethodOptionsCardMandateOptionsOptions.cs | 32 ++ ...ntIntentPaymentMethodOptionsCardOptions.cs | 51 +++ ...tPaymentMethodOptionsCardPresentOptions.cs | 12 + ...tMethodOptionsCardPresentRoutingOptions.cs | 6 + ...ureNetworkOptionsCartesBancairesOptions.cs | 12 + ...nsCardThreeDSecureNetworkOptionsOptions.cs | 6 + ...entMethodOptionsCardThreeDSecureOptions.cs | 27 ++ ...ntentPaymentMethodOptionsCashappOptions.cs | 9 + ...alanceBankTransferEuBankTransferOptions.cs | 6 + ...tionsCustomerBalanceBankTransferOptions.cs | 12 + ...mentMethodOptionsCustomerBalanceOptions.cs | 12 + ...entIntentPaymentMethodOptionsEpsOptions.cs | 6 + ...entIntentPaymentMethodOptionsFpxOptions.cs | 6 + ...ntentPaymentMethodOptionsGiropayOptions.cs | 6 + ...ntentPaymentMethodOptionsGrabpayOptions.cs | 6 + ...tIntentPaymentMethodOptionsIdealOptions.cs | 6 + ...tentPaymentMethodOptionsKakaoPayOptions.cs | 9 + ...IntentPaymentMethodOptionsKlarnaOptions.cs | 12 + ...ntentPaymentMethodOptionsKonbiniOptions.cs | 19 + ...IntentPaymentMethodOptionsKrCardOptions.cs | 9 + ...ntIntentPaymentMethodOptionsLinkOptions.cs | 12 + ...entPaymentMethodOptionsMobilepayOptions.cs | 9 + ...ntPaymentMethodOptionsMultibancoOptions.cs | 6 + ...tentPaymentMethodOptionsNaverPayOptions.cs | 6 + ...aymentIntentPaymentMethodOptionsOptions.cs | 138 +++++++ ...ntIntentPaymentMethodOptionsOxxoOptions.cs | 9 + ...entIntentPaymentMethodOptionsP24Options.cs | 9 + ...tIntentPaymentMethodOptionsPaycoOptions.cs | 6 + ...IntentPaymentMethodOptionsPaynowOptions.cs | 6 + ...IntentPaymentMethodOptionsPaypalOptions.cs | 18 + ...entIntentPaymentMethodOptionsPixOptions.cs | 13 + ...entPaymentMethodOptionsPromptpayOptions.cs | 6 + ...ntPaymentMethodOptionsRevolutPayOptions.cs | 9 + ...ntPaymentMethodOptionsSamsungPayOptions.cs | 6 + ...entPaymentMethodOptionsSepaDebitOptions.cs | 9 + ...IntentPaymentMethodOptionsSofortOptions.cs | 9 + ...tIntentPaymentMethodOptionsSwishOptions.cs | 9 + ...tIntentPaymentMethodOptionsTwintOptions.cs | 6 + ...countFinancialConnectionsFiltersOptions.cs | 6 + ...sBankAccountFinancialConnectionsOptions.cs | 15 + ...tionsUsBankAccountMandateOptionsOptions.cs | 6 + ...thodOptionsUsBankAccountNetworksOptions.cs | 6 + ...aymentMethodOptionsUsBankAccountOptions.cs | 21 + ...entPaymentMethodOptionsWechatPayOptions.cs | 12 + ...entIntentPaymentMethodOptionsZipOptions.cs | 6 + .../PaymentIntentRadarOptionsOptions.cs | 6 + .../PaymentIntentTransferDataOptions.cs | 9 + .../PaymentIntentUpdateOptions.cs | 60 +++ ...PaymentIntentVerifyMicrodepositsOptions.cs | 9 + ...fterCompletionHostedConfirmationOptions.cs | 6 + .../PaymentLinkAfterCompletionOptions.cs | 12 + ...ymentLinkAfterCompletionRedirectOptions.cs | 6 + ...PaymentLinkAutomaticTaxLiabilityOptions.cs | 9 + .../PaymentLinkAutomaticTaxOptions.cs | 9 + .../PaymentLinkConsentCollectionOptions.cs | 12 + ...ctionPaymentMethodReuseAgreementOptions.cs | 6 + .../PaymentLinks/PaymentLinkCreateOptions.cs | 84 ++++ ...entLinkCustomFieldDropdownOptionOptions.cs | 9 + .../PaymentLinkCustomFieldDropdownOptions.cs | 6 + .../PaymentLinkCustomFieldLabelOptions.cs | 9 + .../PaymentLinkCustomFieldNumericOptions.cs | 9 + .../PaymentLinkCustomFieldOptions.cs | 24 ++ .../PaymentLinkCustomFieldTextOptions.cs | 9 + ...PaymentLinkCustomTextAfterSubmitOptions.cs | 6 + .../PaymentLinkCustomTextOptions.cs | 15 + ...entLinkCustomTextShippingAddressOptions.cs | 6 + .../PaymentLinkCustomTextSubmitOptions.cs | 6 + ...stomTextTermsOfServiceAcceptanceOptions.cs | 6 + ...ceCreationInvoiceDataCustomFieldOptions.cs | 9 + ...InvoiceCreationInvoiceDataIssuerOptions.cs | 9 + ...ntLinkInvoiceCreationInvoiceDataOptions.cs | 24 ++ ...ationInvoiceDataRenderingOptionsOptions.cs | 6 + .../PaymentLinkInvoiceCreationOptions.cs | 9 + ...ntLinkLineItemAdjustableQuantityOptions.cs | 12 + .../PaymentLinkLineItemOptions.cs | 15 + .../PaymentLinks/PaymentLinkListOptions.cs | 6 + .../PaymentLinkPaymentIntentDataOptions.cs | 24 ++ ...PaymentLinkPhoneNumberCollectionOptions.cs | 6 + ...inkRestrictionsCompletedSessionsOptions.cs | 6 + .../PaymentLinkRestrictionsOptions.cs | 6 + ...entLinkShippingAddressCollectionOptions.cs | 6 + .../PaymentLinkShippingOptionOptions.cs | 6 + ...riptionDataInvoiceSettingsIssuerOptions.cs | 9 + ...kSubscriptionDataInvoiceSettingsOptions.cs | 6 + .../PaymentLinkSubscriptionDataOptions.cs | 18 + ...tionDataTrialSettingsEndBehaviorOptions.cs | 6 + ...inkSubscriptionDataTrialSettingsOptions.cs | 6 + .../PaymentLinkTaxIdCollectionOptions.cs | 9 + .../PaymentLinkTransferDataOptions.cs | 9 + .../PaymentLinks/PaymentLinkUpdateOptions.cs | 63 +++ ...rationAcssDebitDisplayPreferenceOptions.cs | 6 + ...mentMethodConfigurationAcssDebitOptions.cs | 6 + ...igurationAffirmDisplayPreferenceOptions.cs | 6 + ...PaymentMethodConfigurationAffirmOptions.cs | 6 + ...fterpayClearpayDisplayPreferenceOptions.cs | 6 + ...hodConfigurationAfterpayClearpayOptions.cs | 6 + ...igurationAlipayDisplayPreferenceOptions.cs | 6 + ...PaymentMethodConfigurationAlipayOptions.cs | 6 + ...nfigurationAlmaDisplayPreferenceOptions.cs | 6 + .../PaymentMethodConfigurationAlmaOptions.cs | 6 + ...rationAmazonPayDisplayPreferenceOptions.cs | 6 + ...mentMethodConfigurationAmazonPayOptions.cs | 6 + ...urationApplePayDisplayPreferenceOptions.cs | 6 + ...onApplePayLaterDisplayPreferenceOptions.cs | 6 + ...MethodConfigurationApplePayLaterOptions.cs | 6 + ...ymentMethodConfigurationApplePayOptions.cs | 6 + ...tionAuBecsDebitDisplayPreferenceOptions.cs | 6 + ...ntMethodConfigurationAuBecsDebitOptions.cs | 6 + ...rationBacsDebitDisplayPreferenceOptions.cs | 6 + ...mentMethodConfigurationBacsDebitOptions.cs | 6 + ...ationBancontactDisplayPreferenceOptions.cs | 6 + ...entMethodConfigurationBancontactOptions.cs | 6 + ...nfigurationBlikDisplayPreferenceOptions.cs | 6 + .../PaymentMethodConfigurationBlikOptions.cs | 6 + ...igurationBoletoDisplayPreferenceOptions.cs | 6 + ...PaymentMethodConfigurationBoletoOptions.cs | 6 + ...nfigurationCardDisplayPreferenceOptions.cs | 6 + .../PaymentMethodConfigurationCardOptions.cs | 6 + ...CartesBancairesDisplayPreferenceOptions.cs | 6 + ...thodConfigurationCartesBancairesOptions.cs | 6 + ...gurationCashappDisplayPreferenceOptions.cs | 6 + ...aymentMethodConfigurationCashappOptions.cs | 6 + ...PaymentMethodConfigurationCreateOptions.cs | 135 +++++++ ...CustomerBalanceDisplayPreferenceOptions.cs | 6 + ...thodConfigurationCustomerBalanceOptions.cs | 6 + ...onfigurationEpsDisplayPreferenceOptions.cs | 6 + .../PaymentMethodConfigurationEpsOptions.cs | 6 + ...onfigurationFpxDisplayPreferenceOptions.cs | 6 + .../PaymentMethodConfigurationFpxOptions.cs | 6 + ...gurationGiropayDisplayPreferenceOptions.cs | 6 + ...aymentMethodConfigurationGiropayOptions.cs | 6 + ...rationGooglePayDisplayPreferenceOptions.cs | 6 + ...mentMethodConfigurationGooglePayOptions.cs | 6 + ...gurationGrabpayDisplayPreferenceOptions.cs | 6 + ...aymentMethodConfigurationGrabpayOptions.cs | 6 + ...figurationIdealDisplayPreferenceOptions.cs | 6 + .../PaymentMethodConfigurationIdealOptions.cs | 6 + ...onfigurationJcbDisplayPreferenceOptions.cs | 6 + .../PaymentMethodConfigurationJcbOptions.cs | 6 + ...igurationKlarnaDisplayPreferenceOptions.cs | 6 + ...PaymentMethodConfigurationKlarnaOptions.cs | 6 + ...gurationKonbiniDisplayPreferenceOptions.cs | 6 + ...aymentMethodConfigurationKonbiniOptions.cs | 6 + ...nfigurationLinkDisplayPreferenceOptions.cs | 6 + .../PaymentMethodConfigurationLinkOptions.cs | 6 + .../PaymentMethodConfigurationListOptions.cs | 6 + ...rationMobilepayDisplayPreferenceOptions.cs | 6 + ...mentMethodConfigurationMobilepayOptions.cs | 6 + ...ationMultibancoDisplayPreferenceOptions.cs | 6 + ...entMethodConfigurationMultibancoOptions.cs | 6 + ...nfigurationOxxoDisplayPreferenceOptions.cs | 6 + .../PaymentMethodConfigurationOxxoOptions.cs | 6 + ...onfigurationP24DisplayPreferenceOptions.cs | 6 + .../PaymentMethodConfigurationP24Options.cs | 6 + ...igurationPaynowDisplayPreferenceOptions.cs | 6 + ...PaymentMethodConfigurationPaynowOptions.cs | 6 + ...igurationPaypalDisplayPreferenceOptions.cs | 6 + ...PaymentMethodConfigurationPaypalOptions.cs | 6 + ...rationPromptpayDisplayPreferenceOptions.cs | 6 + ...mentMethodConfigurationPromptpayOptions.cs | 6 + ...ationRevolutPayDisplayPreferenceOptions.cs | 6 + ...entMethodConfigurationRevolutPayOptions.cs | 6 + ...rationSepaDebitDisplayPreferenceOptions.cs | 6 + ...mentMethodConfigurationSepaDebitOptions.cs | 6 + ...igurationSofortDisplayPreferenceOptions.cs | 6 + ...PaymentMethodConfigurationSofortOptions.cs | 6 + ...figurationSwishDisplayPreferenceOptions.cs | 6 + .../PaymentMethodConfigurationSwishOptions.cs | 6 + ...figurationTwintDisplayPreferenceOptions.cs | 6 + .../PaymentMethodConfigurationTwintOptions.cs | 6 + ...PaymentMethodConfigurationUpdateOptions.cs | 135 +++++++ ...onUsBankAccountDisplayPreferenceOptions.cs | 6 + ...MethodConfigurationUsBankAccountOptions.cs | 6 + ...rationWechatPayDisplayPreferenceOptions.cs | 6 + ...mentMethodConfigurationWechatPayOptions.cs | 6 + ...onfigurationZipDisplayPreferenceOptions.cs | 6 + .../PaymentMethodConfigurationZipOptions.cs | 6 + .../PaymentMethodDomainCreateOptions.cs | 9 + .../PaymentMethodDomainListOptions.cs | 9 + .../PaymentMethodDomainUpdateOptions.cs | 6 + .../PaymentMethodAcssDebitOptions.cs | 12 + .../PaymentMethodAttachOptions.cs | 6 + .../PaymentMethodAuBecsDebitOptions.cs | 9 + .../PaymentMethodBacsDebitOptions.cs | 9 + .../PaymentMethodBillingDetailsOptions.cs | 15 + .../PaymentMethodBoletoOptions.cs | 6 + .../PaymentMethodCardNetworksOptions.cs | 6 + .../PaymentMethodCardOptions.cs | 21 + .../PaymentMethodCreateOptions.cs | 156 ++++++++ .../PaymentMethods/PaymentMethodEpsOptions.cs | 6 + .../PaymentMethods/PaymentMethodFpxOptions.cs | 9 + .../PaymentMethodIdealOptions.cs | 6 + .../PaymentMethodKlarnaOptions.cs | 6 + .../PaymentMethodListOptions.cs | 9 + .../PaymentMethodNaverPayOptions.cs | 6 + .../PaymentMethods/PaymentMethodP24Options.cs | 6 + .../PaymentMethodRadarOptionsOptions.cs | 6 + .../PaymentMethodSepaDebitOptions.cs | 6 + .../PaymentMethodSofortOptions.cs | 6 + .../PaymentMethodUpdateOptions.cs | 24 ++ .../PaymentMethodUsBankAccountOptions.cs | 18 + .../Services/Payouts/PayoutCreateOptions.cs | 27 ++ .../Services/Payouts/PayoutListOptions.cs | 13 + .../Services/Payouts/PayoutReverseOptions.cs | 6 + .../Services/Payouts/PayoutUpdateOptions.cs | 6 + .../Services/Plans/PlanCreateOptions.cs | 58 +++ .../Services/Plans/PlanListOptions.cs | 9 + .../Services/Plans/PlanProductOptions.cs | 24 ++ .../Services/Plans/PlanTierOptions.cs | 19 + .../Plans/PlanTransformUsageOptions.cs | 9 + .../Services/Plans/PlanUpdateOptions.cs | 18 + .../Services/Prices/PriceCreateOptions.cs | 57 +++ ...eCurrencyOptionsCustomUnitAmountOptions.cs | 15 + .../Prices/PriceCurrencyOptionsOptions.cs | 18 + .../Prices/PriceCurrencyOptionsTierOptions.cs | 19 + .../Prices/PriceCustomUnitAmountOptions.cs | 15 + .../Services/Prices/PriceListOptions.cs | 21 + .../Prices/PriceProductDataOptions.cs | 24 ++ .../Prices/PriceRecurringListOptions.cs | 12 + .../Services/Prices/PriceRecurringOptions.cs | 21 + .../Services/Prices/PriceTierOptions.cs | 19 + .../Prices/PriceTransformQuantityOptions.cs | 9 + .../Services/Prices/PriceUpdateOptions.cs | 24 ++ .../ProductFeatureCreateOptions.cs | 6 + .../Services/Products/ProductCreateOptions.cs | 48 +++ ...aCurrencyOptionsCustomUnitAmountOptions.cs | 15 + ...tDefaultPriceDataCurrencyOptionsOptions.cs | 18 + ...aultPriceDataCurrencyOptionsTierOptions.cs | 19 + ...DefaultPriceDataCustomUnitAmountOptions.cs | 15 + .../ProductDefaultPriceDataOptions.cs | 24 ++ ...ProductDefaultPriceDataRecurringOptions.cs | 9 + .../Services/Products/ProductListOptions.cs | 18 + .../ProductMarketingFeatureOptions.cs | 6 + .../ProductPackageDimensionsOptions.cs | 15 + .../Services/Products/ProductUpdateOptions.cs | 42 ++ .../PromotionCodeCreateOptions.cs | 28 ++ .../PromotionCodeListOptions.cs | 15 + ...nCodeRestrictionsCurrencyOptionsOptions.cs | 6 + .../PromotionCodeRestrictionsOptions.cs | 15 + .../PromotionCodeUpdateOptions.cs | 12 + .../QuoteAutomaticTaxLiabilityOptions.cs | 9 + .../Quotes/QuoteAutomaticTaxOptions.cs | 9 + .../Services/Quotes/QuoteCreateOptions.cs | 61 +++ .../Services/Quotes/QuoteDiscountOptions.cs | 12 + .../Services/Quotes/QuoteFinalizeOptions.cs | 7 + .../Services/Quotes/QuoteFromQuoteOptions.cs | 9 + .../QuoteInvoiceSettingsIssuerOptions.cs | 9 + .../Quotes/QuoteInvoiceSettingsOptions.cs | 9 + .../Quotes/QuoteLineItemDiscountOptions.cs | 12 + .../Services/Quotes/QuoteLineItemOptions.cs | 21 + .../Quotes/QuoteLineItemPriceDataOptions.cs | 21 + .../QuoteLineItemPriceDataRecurringOptions.cs | 9 + .../Services/Quotes/QuoteListOptions.cs | 12 + .../Quotes/QuoteSubscriptionDataOptions.cs | 16 + .../Quotes/QuoteTransferDataOptions.cs | 12 + .../Services/Quotes/QuoteUpdateOptions.cs | 55 +++ .../EarlyFraudWarningListOptions.cs | 9 + .../ValueListItemCreateOptions.cs | 9 + .../ValueListItemListOptions.cs | 9 + .../ValueLists/ValueListCreateOptions.cs | 15 + .../Radar/ValueLists/ValueListListOptions.cs | 9 + .../ValueLists/ValueListUpdateOptions.cs | 12 + .../Services/Refunds/RefundCreateOptions.cs | 36 ++ .../Services/Refunds/RefundListOptions.cs | 9 + .../Services/Refunds/RefundUpdateOptions.cs | 6 + .../ReportRuns/ReportRunCreateOptions.cs | 9 + .../ReportRuns/ReportRunParametersOptions.cs | 29 ++ .../SetupAttempts/SetupAttemptListOptions.cs | 6 + ...tupIntentAutomaticPaymentMethodsOptions.cs | 9 + .../SetupIntents/SetupIntentCancelOptions.cs | 6 + .../SetupIntents/SetupIntentConfirmOptions.cs | 27 ++ .../SetupIntents/SetupIntentCreateOptions.cs | 60 +++ .../SetupIntents/SetupIntentGetOptions.cs | 6 + .../SetupIntents/SetupIntentListOptions.cs | 12 + ...dateDataCustomerAcceptanceOnlineOptions.cs | 9 + ...entMandateDataCustomerAcceptanceOptions.cs | 16 + .../SetupIntentMandateDataOptions.cs | 6 + ...IntentPaymentMethodDataAcssDebitOptions.cs | 12 + ...tentPaymentMethodDataAuBecsDebitOptions.cs | 9 + ...IntentPaymentMethodDataBacsDebitOptions.cs | 9 + ...tPaymentMethodDataBillingDetailsOptions.cs | 15 + ...tupIntentPaymentMethodDataBoletoOptions.cs | 6 + .../SetupIntentPaymentMethodDataEpsOptions.cs | 6 + .../SetupIntentPaymentMethodDataFpxOptions.cs | 9 + ...etupIntentPaymentMethodDataIdealOptions.cs | 6 + ...IntentPaymentMethodDataKlarnaDobOptions.cs | 12 + ...tupIntentPaymentMethodDataKlarnaOptions.cs | 6 + ...pIntentPaymentMethodDataNaverPayOptions.cs | 6 + .../SetupIntentPaymentMethodDataOptions.cs | 147 +++++++ .../SetupIntentPaymentMethodDataP24Options.cs | 6 + ...entPaymentMethodDataRadarOptionsOptions.cs | 6 + ...IntentPaymentMethodDataSepaDebitOptions.cs | 6 + ...tupIntentPaymentMethodDataSofortOptions.cs | 6 + ...ntPaymentMethodDataUsBankAccountOptions.cs | 18 + ...odOptionsAcssDebitMandateOptionsOptions.cs | 18 + ...entPaymentMethodOptionsAcssDebitOptions.cs | 12 + ...entPaymentMethodOptionsBacsDebitOptions.cs | 6 + ...tMethodOptionsCardMandateOptionsOptions.cs | 35 ++ ...upIntentPaymentMethodOptionsCardOptions.cs | 18 + ...ureNetworkOptionsCartesBancairesOptions.cs | 12 + ...nsCardThreeDSecureNetworkOptionsOptions.cs | 6 + ...entMethodOptionsCardThreeDSecureOptions.cs | 24 ++ ...upIntentPaymentMethodOptionsLinkOptions.cs | 6 + .../SetupIntentPaymentMethodOptionsOptions.cs | 30 ++ ...IntentPaymentMethodOptionsPaypalOptions.cs | 6 + ...entPaymentMethodOptionsSepaDebitOptions.cs | 6 + ...countFinancialConnectionsFiltersOptions.cs | 6 + ...sBankAccountFinancialConnectionsOptions.cs | 15 + ...tionsUsBankAccountMandateOptionsOptions.cs | 6 + ...thodOptionsUsBankAccountNetworksOptions.cs | 6 + ...aymentMethodOptionsUsBankAccountOptions.cs | 15 + .../SetupIntentSingleUseOptions.cs | 9 + .../SetupIntents/SetupIntentUpdateOptions.cs | 33 ++ .../SetupIntentVerifyMicrodepositsOptions.cs | 9 + .../ShippingRateCreateOptions.cs | 24 ++ ...ppingRateDeliveryEstimateMaximumOptions.cs | 9 + ...ppingRateDeliveryEstimateMinimumOptions.cs | 9 + .../ShippingRateDeliveryEstimateOptions.cs | 9 + ...ngRateFixedAmountCurrencyOptionsOptions.cs | 9 + .../ShippingRateFixedAmountOptions.cs | 12 + .../ShippingRates/ShippingRateListOptions.cs | 9 + .../ShippingRateUpdateOptions.cs | 15 + .../Services/Sources/SourceCardOptions.cs | 42 ++ .../Services/Sources/SourceGetOptions.cs | 6 + .../SourceMandateAcceptanceOfflineOptions.cs | 6 + .../SourceMandateAcceptanceOnlineOptions.cs | 13 + .../Sources/SourceMandateAcceptanceOptions.cs | 25 ++ .../Services/Sources/SourceMandateOptions.cs | 18 + .../Services/Sources/SourceOwnerOptions.cs | 15 + .../Services/Sources/SourceReceiverOptions.cs | 6 + .../Services/Sources/SourceRedirectOptions.cs | 6 + .../Sources/SourceSourceOrderItemOptions.cs | 21 + .../Sources/SourceSourceOrderOptions.cs | 9 + .../Services/Sources/SourceUpdateOptions.cs | 21 + .../Services/Sources/SourceVerifyOptions.cs | 6 + ...ubscriptionItemUsageRecordCreateOptions.cs | 13 + .../SubscriptionItemCreateOptions.cs | 40 ++ .../SubscriptionItemDeleteOptions.cs | 13 + .../SubscriptionItemListOptions.cs | 6 + .../SubscriptionItemUpdateOptions.cs | 40 ++ .../SubscriptionScheduleCancelOptions.cs | 9 + .../SubscriptionScheduleCreateOptions.cs | 25 ++ ...ultSettingsAutomaticTaxLiabilityOptions.cs | 9 + ...eduleDefaultSettingsAutomaticTaxOptions.cs | 9 + ...DefaultSettingsBillingThresholdsOptions.cs | 9 + ...ultSettingsInvoiceSettingsIssuerOptions.cs | 9 + ...leDefaultSettingsInvoiceSettingsOptions.cs | 12 + ...scriptionScheduleDefaultSettingsOptions.cs | 33 ++ ...eduleDefaultSettingsTransferDataOptions.cs | 9 + .../SubscriptionScheduleListOptions.cs | 21 + ...edulePhaseAddInvoiceItemDiscountOptions.cs | 12 + ...ptionSchedulePhaseAddInvoiceItemOptions.cs | 18 + ...dulePhaseAddInvoiceItemPriceDataOptions.cs | 18 + ...hedulePhaseAutomaticTaxLiabilityOptions.cs | 9 + ...riptionSchedulePhaseAutomaticTaxOptions.cs | 9 + ...onSchedulePhaseBillingThresholdsOptions.cs | 9 + ...ubscriptionSchedulePhaseDiscountOptions.cs | 12 + ...hedulePhaseInvoiceSettingsIssuerOptions.cs | 9 + ...tionSchedulePhaseInvoiceSettingsOptions.cs | 12 + ...hedulePhaseItemBillingThresholdsOptions.cs | 6 + ...riptionSchedulePhaseItemDiscountOptions.cs | 12 + .../SubscriptionSchedulePhaseItemOptions.cs | 27 ++ ...iptionSchedulePhaseItemPriceDataOptions.cs | 21 + ...edulePhaseItemPriceDataRecurringOptions.cs | 9 + .../SubscriptionSchedulePhaseOptions.cs | 75 ++++ ...riptionSchedulePhaseTransferDataOptions.cs | 9 + .../SubscriptionScheduleReleaseOptions.cs | 6 + .../SubscriptionScheduleUpdateOptions.cs | 18 + ...bscriptionAddInvoiceItemDiscountOptions.cs | 12 + .../SubscriptionAddInvoiceItemOptions.cs | 18 + ...scriptionAddInvoiceItemPriceDataOptions.cs | 18 + ...ubscriptionAutomaticTaxLiabilityOptions.cs | 9 + .../SubscriptionAutomaticTaxOptions.cs | 9 + ...criptionBillingCycleAnchorConfigOptions.cs | 18 + .../SubscriptionBillingThresholdsOptions.cs | 9 + .../SubscriptionCancelOptions.cs | 12 + .../SubscriptionCancellationDetailsOptions.cs | 9 + .../SubscriptionCreateOptions.cs | 109 ++++++ .../SubscriptionDiscountOptions.cs | 12 + ...ubscriptionInvoiceSettingsIssuerOptions.cs | 9 + .../SubscriptionInvoiceSettingsOptions.cs | 9 + ...ubscriptionItemBillingThresholdsOptions.cs | 6 + .../SubscriptionItemDiscountOptions.cs | 12 + .../Subscriptions/SubscriptionItemOptions.cs | 36 ++ .../SubscriptionItemPriceDataOptions.cs | 21 + ...bscriptionItemPriceDataRecurringOptions.cs | 9 + .../Subscriptions/SubscriptionListOptions.cs | 32 ++ .../SubscriptionPauseCollectionOptions.cs | 10 + .../SubscriptionPaymentSettingsOptions.cs | 12 + ...odOptionsAcssDebitMandateOptionsOptions.cs | 6 + ...ngsPaymentMethodOptionsAcssDebitOptions.cs | 9 + ...gsPaymentMethodOptionsBancontactOptions.cs | 6 + ...tMethodOptionsCardMandateOptionsOptions.cs | 12 + ...SettingsPaymentMethodOptionsCardOptions.cs | 12 + ...alanceBankTransferEuBankTransferOptions.cs | 6 + ...tionsCustomerBalanceBankTransferOptions.cs | 9 + ...mentMethodOptionsCustomerBalanceOptions.cs | 9 + ...mentSettingsPaymentMethodOptionsOptions.cs | 24 ++ ...countFinancialConnectionsFiltersOptions.cs | 6 + ...sBankAccountFinancialConnectionsOptions.cs | 12 + ...aymentMethodOptionsUsBankAccountOptions.cs | 9 + ...iptionPendingInvoiceItemIntervalOptions.cs | 9 + .../SubscriptionResumeOptions.cs | 13 + .../SubscriptionTransferDataOptions.cs | 9 + ...criptionTrialSettingsEndBehaviorOptions.cs | 6 + .../SubscriptionTrialSettingsOptions.cs | 6 + .../SubscriptionUpdateOptions.cs | 102 +++++ .../Calculations/CalculationCreateOptions.cs | 25 ++ .../CalculationCustomerDetailsOptions.cs | 18 + .../CalculationCustomerDetailsTaxIdOptions.cs | 9 + .../CalculationLineItemOptions.cs | 21 + .../CalculationShipFromDetailsOptions.cs | 6 + .../CalculationShippingCostOptions.cs | 15 + .../RegistrationCountryOptionsAeOptions.cs | 6 + .../RegistrationCountryOptionsAtOptions.cs | 9 + ...strationCountryOptionsAtStandardOptions.cs | 6 + .../RegistrationCountryOptionsAuOptions.cs | 6 + .../RegistrationCountryOptionsBeOptions.cs | 9 + ...strationCountryOptionsBeStandardOptions.cs | 6 + .../RegistrationCountryOptionsBgOptions.cs | 9 + ...strationCountryOptionsBgStandardOptions.cs | 6 + .../RegistrationCountryOptionsBhOptions.cs | 6 + .../RegistrationCountryOptionsByOptions.cs | 6 + .../RegistrationCountryOptionsCaOptions.cs | 9 + ...CountryOptionsCaProvinceStandardOptions.cs | 6 + .../RegistrationCountryOptionsChOptions.cs | 6 + .../RegistrationCountryOptionsClOptions.cs | 6 + .../RegistrationCountryOptionsCoOptions.cs | 6 + .../RegistrationCountryOptionsCrOptions.cs | 6 + .../RegistrationCountryOptionsCyOptions.cs | 9 + ...strationCountryOptionsCyStandardOptions.cs | 6 + .../RegistrationCountryOptionsCzOptions.cs | 9 + ...strationCountryOptionsCzStandardOptions.cs | 6 + .../RegistrationCountryOptionsDeOptions.cs | 9 + ...strationCountryOptionsDeStandardOptions.cs | 6 + .../RegistrationCountryOptionsDkOptions.cs | 9 + ...strationCountryOptionsDkStandardOptions.cs | 6 + .../RegistrationCountryOptionsEcOptions.cs | 6 + .../RegistrationCountryOptionsEeOptions.cs | 9 + ...strationCountryOptionsEeStandardOptions.cs | 6 + .../RegistrationCountryOptionsEgOptions.cs | 6 + .../RegistrationCountryOptionsEsOptions.cs | 9 + ...strationCountryOptionsEsStandardOptions.cs | 6 + .../RegistrationCountryOptionsFiOptions.cs | 9 + ...strationCountryOptionsFiStandardOptions.cs | 6 + .../RegistrationCountryOptionsFrOptions.cs | 9 + ...strationCountryOptionsFrStandardOptions.cs | 6 + .../RegistrationCountryOptionsGbOptions.cs | 6 + .../RegistrationCountryOptionsGeOptions.cs | 6 + .../RegistrationCountryOptionsGrOptions.cs | 9 + ...strationCountryOptionsGrStandardOptions.cs | 6 + .../RegistrationCountryOptionsHrOptions.cs | 9 + ...strationCountryOptionsHrStandardOptions.cs | 6 + .../RegistrationCountryOptionsHuOptions.cs | 9 + ...strationCountryOptionsHuStandardOptions.cs | 6 + .../RegistrationCountryOptionsIdOptions.cs | 6 + .../RegistrationCountryOptionsIeOptions.cs | 9 + ...strationCountryOptionsIeStandardOptions.cs | 6 + .../RegistrationCountryOptionsIsOptions.cs | 6 + .../RegistrationCountryOptionsItOptions.cs | 9 + ...strationCountryOptionsItStandardOptions.cs | 6 + .../RegistrationCountryOptionsJpOptions.cs | 6 + .../RegistrationCountryOptionsKeOptions.cs | 6 + .../RegistrationCountryOptionsKrOptions.cs | 6 + .../RegistrationCountryOptionsKzOptions.cs | 6 + .../RegistrationCountryOptionsLtOptions.cs | 9 + ...strationCountryOptionsLtStandardOptions.cs | 6 + .../RegistrationCountryOptionsLuOptions.cs | 9 + ...strationCountryOptionsLuStandardOptions.cs | 6 + .../RegistrationCountryOptionsLvOptions.cs | 9 + ...strationCountryOptionsLvStandardOptions.cs | 6 + .../RegistrationCountryOptionsMaOptions.cs | 6 + .../RegistrationCountryOptionsMdOptions.cs | 6 + .../RegistrationCountryOptionsMtOptions.cs | 9 + ...strationCountryOptionsMtStandardOptions.cs | 6 + .../RegistrationCountryOptionsMxOptions.cs | 6 + .../RegistrationCountryOptionsMyOptions.cs | 6 + .../RegistrationCountryOptionsNgOptions.cs | 6 + .../RegistrationCountryOptionsNlOptions.cs | 9 + ...strationCountryOptionsNlStandardOptions.cs | 6 + .../RegistrationCountryOptionsNoOptions.cs | 6 + .../RegistrationCountryOptionsNzOptions.cs | 6 + .../RegistrationCountryOptionsOmOptions.cs | 6 + .../RegistrationCountryOptionsOptions.cs | 198 ++++++++++ .../RegistrationCountryOptionsPlOptions.cs | 9 + ...strationCountryOptionsPlStandardOptions.cs | 6 + .../RegistrationCountryOptionsPtOptions.cs | 9 + ...strationCountryOptionsPtStandardOptions.cs | 6 + .../RegistrationCountryOptionsRoOptions.cs | 9 + ...strationCountryOptionsRoStandardOptions.cs | 6 + .../RegistrationCountryOptionsRsOptions.cs | 6 + .../RegistrationCountryOptionsRuOptions.cs | 6 + .../RegistrationCountryOptionsSaOptions.cs | 6 + .../RegistrationCountryOptionsSeOptions.cs | 9 + ...strationCountryOptionsSeStandardOptions.cs | 6 + .../RegistrationCountryOptionsSgOptions.cs | 6 + .../RegistrationCountryOptionsSiOptions.cs | 9 + ...strationCountryOptionsSiStandardOptions.cs | 6 + .../RegistrationCountryOptionsSkOptions.cs | 9 + ...strationCountryOptionsSkStandardOptions.cs | 6 + .../RegistrationCountryOptionsThOptions.cs | 6 + .../RegistrationCountryOptionsTrOptions.cs | 6 + .../RegistrationCountryOptionsTzOptions.cs | 6 + ...ountryOptionsUsLocalAmusementTaxOptions.cs | 6 + ...ionCountryOptionsUsLocalLeaseTaxOptions.cs | 6 + .../RegistrationCountryOptionsUsOptions.cs | 18 + ...ryOptionsUsStateSalesTaxElectionOptions.cs | 9 + ...ionCountryOptionsUsStateSalesTaxOptions.cs | 6 + .../RegistrationCountryOptionsUzOptions.cs | 6 + .../RegistrationCountryOptionsVnOptions.cs | 6 + .../RegistrationCountryOptionsZaOptions.cs | 6 + .../RegistrationCreateOptions.cs | 17 + .../Registrations/RegistrationListOptions.cs | 6 + .../RegistrationUpdateOptions.cs | 11 + .../Tax/Settings/SettingsDefaultsOptions.cs | 9 + .../Tax/Settings/SettingsHeadOfficeOptions.cs | 6 + .../Tax/Settings/SettingsUpdateOptions.cs | 9 + ...TransactionCreateFromCalculationOptions.cs | 16 + .../TransactionCreateReversalOptions.cs | 24 ++ .../TransactionLineItemOptions.cs | 21 + .../TransactionShippingCostOptions.cs | 9 + .../Services/TaxIds/TaxIdCreateOptions.cs | 12 + .../Services/TaxIds/TaxIdListOptions.cs | 6 + .../Services/TaxIds/TaxIdOwnerOptions.cs | 12 + .../Services/TaxRates/TaxRateCreateOptions.cs | 33 ++ .../Services/TaxRates/TaxRateListOptions.cs | 9 + .../Services/TaxRates/TaxRateUpdateOptions.cs | 27 ++ .../ConfigurationBbposWiseposEOptions.cs | 6 + .../ConfigurationCreateOptions.cs | 24 ++ .../ConfigurationListOptions.cs | 6 + .../ConfigurationOfflineOptions.cs | 6 + .../ConfigurationRebootWindowOptions.cs | 9 + .../ConfigurationStripeS700Options.cs | 6 + .../ConfigurationTippingAudOptions.cs | 12 + .../ConfigurationTippingCadOptions.cs | 12 + .../ConfigurationTippingChfOptions.cs | 12 + .../ConfigurationTippingCzkOptions.cs | 12 + .../ConfigurationTippingDkkOptions.cs | 12 + .../ConfigurationTippingEurOptions.cs | 12 + .../ConfigurationTippingGbpOptions.cs | 12 + .../ConfigurationTippingHkdOptions.cs | 12 + .../ConfigurationTippingMyrOptions.cs | 12 + .../ConfigurationTippingNokOptions.cs | 12 + .../ConfigurationTippingNzdOptions.cs | 12 + .../ConfigurationTippingOptions.cs | 48 +++ .../ConfigurationTippingPlnOptions.cs | 12 + .../ConfigurationTippingSekOptions.cs | 12 + .../ConfigurationTippingSgdOptions.cs | 12 + .../ConfigurationTippingUsdOptions.cs | 12 + .../ConfigurationUpdateOptions.cs | 24 ++ .../ConfigurationVerifoneP400Options.cs | 6 + .../ConnectionTokenCreateOptions.cs | 6 + .../Locations/LocationCreateOptions.cs | 15 + .../Locations/LocationUpdateOptions.cs | 15 + .../Readers/ReaderCartLineItemOptions.cs | 12 + .../Terminal/Readers/ReaderCartOptions.cs | 15 + .../Terminal/Readers/ReaderCreateOptions.cs | 15 + .../Terminal/Readers/ReaderListOptions.cs | 15 + .../Readers/ReaderProcessConfigOptions.cs | 15 + .../ReaderProcessConfigTippingOptions.cs | 6 + .../ReaderProcessPaymentIntentOptions.cs | 9 + .../ReaderProcessSetupIntentOptions.cs | 12 + .../ReaderRefundPaymentConfigOptions.cs | 6 + .../Readers/ReaderRefundPaymentOptions.cs | 24 ++ .../Readers/ReaderSetReaderDisplayOptions.cs | 9 + .../Terminal/Readers/ReaderUpdateOptions.cs | 9 + .../ConfirmationTokenCreateOptions.cs | 18 + ...nTokenPaymentMethodDataAcssDebitOptions.cs | 12 + ...okenPaymentMethodDataAuBecsDebitOptions.cs | 9 + ...nTokenPaymentMethodDataBacsDebitOptions.cs | 9 + ...nPaymentMethodDataBillingDetailsOptions.cs | 15 + ...tionTokenPaymentMethodDataBoletoOptions.cs | 6 + ...rmationTokenPaymentMethodDataEpsOptions.cs | 6 + ...rmationTokenPaymentMethodDataFpxOptions.cs | 9 + ...ationTokenPaymentMethodDataIdealOptions.cs | 6 + ...nTokenPaymentMethodDataKlarnaDobOptions.cs | 12 + ...tionTokenPaymentMethodDataKlarnaOptions.cs | 6 + ...onTokenPaymentMethodDataNaverPayOptions.cs | 6 + ...nfirmationTokenPaymentMethodDataOptions.cs | 147 +++++++ ...rmationTokenPaymentMethodDataP24Options.cs | 6 + ...kenPaymentMethodDataRadarOptionsOptions.cs | 6 + ...nTokenPaymentMethodDataSepaDebitOptions.cs | 6 + ...tionTokenPaymentMethodDataSofortOptions.cs | 6 + ...enPaymentMethodDataUsBankAccountOptions.cs | 18 + .../ConfirmationTokenShippingOptions.cs | 12 + .../CustomerFundCashBalanceOptions.cs | 12 + .../AuthorizationAmountDetailsOptions.cs | 9 + .../AuthorizationCaptureOptions.cs | 12 + .../AuthorizationCreateOptions.cs | 45 +++ .../AuthorizationFinalizeAmountOptions.cs | 12 + ...izationFleetCardholderPromptDataOptions.cs | 18 + .../AuthorizationFleetOptions.cs | 15 + ...zationFleetReportedBreakdownFuelOptions.cs | 6 + ...ionFleetReportedBreakdownNonFuelOptions.cs | 6 + ...horizationFleetReportedBreakdownOptions.cs | 12 + ...izationFleetReportedBreakdownTaxOptions.cs | 9 + .../AuthorizationFuelOptions.cs | 18 + .../AuthorizationIncrementOptions.cs | 9 + .../AuthorizationMerchantDataOptions.cs | 30 ++ .../AuthorizationNetworkDataOptions.cs | 6 + ...DetailsFleetCardholderPromptDataOptions.cs | 18 + ...uthorizationPurchaseDetailsFleetOptions.cs | 15 + ...etailsFleetReportedBreakdownFuelOptions.cs | 6 + ...ilsFleetReportedBreakdownNonFuelOptions.cs | 6 + ...aseDetailsFleetReportedBreakdownOptions.cs | 12 + ...DetailsFleetReportedBreakdownTaxOptions.cs | 9 + ...thorizationPurchaseDetailsFlightOptions.cs | 19 + ...tionPurchaseDetailsFlightSegmentOptions.cs | 21 + ...AuthorizationPurchaseDetailsFuelOptions.cs | 18 + ...horizationPurchaseDetailsLodgingOptions.cs | 10 + .../AuthorizationPurchaseDetailsOptions.cs | 21 + ...horizationPurchaseDetailsReceiptOptions.cs | 15 + .../AuthorizationRespondOptions.cs | 6 + .../AuthorizationReverseOptions.cs | 6 + ...ationDataAuthenticationExemptionOptions.cs | 9 + .../AuthorizationVerificationDataOptions.cs | 21 + ...tionVerificationDataThreeDSecureOptions.cs | 6 + .../PersonalizationDesignRejectOptions.cs | 6 + ...nalizationDesignRejectionReasonsOptions.cs | 9 + .../TransactionCreateForceCaptureOptions.cs | 18 + .../TransactionCreateUnlinkedRefundOptions.cs | 18 + .../TransactionMerchantDataOptions.cs | 30 ++ ...DetailsFleetCardholderPromptDataOptions.cs | 18 + .../TransactionPurchaseDetailsFleetOptions.cs | 15 + ...etailsFleetReportedBreakdownFuelOptions.cs | 6 + ...ilsFleetReportedBreakdownNonFuelOptions.cs | 6 + ...aseDetailsFleetReportedBreakdownOptions.cs | 12 + ...DetailsFleetReportedBreakdownTaxOptions.cs | 9 + ...TransactionPurchaseDetailsFlightOptions.cs | 19 + ...tionPurchaseDetailsFlightSegmentOptions.cs | 21 + .../TransactionPurchaseDetailsFuelOptions.cs | 18 + ...ransactionPurchaseDetailsLodgingOptions.cs | 10 + .../TransactionPurchaseDetailsOptions.cs | 21 + ...ransactionPurchaseDetailsReceiptOptions.cs | 15 + .../Transactions/TransactionRefundOptions.cs | 6 + .../Readers/ReaderCardPresentOptions.cs | 6 + .../Readers/ReaderInteracPresentOptions.cs | 6 + .../ReaderPresentPaymentMethodOptions.cs | 15 + .../TestClocks/TestClockAdvanceOptions.cs | 7 + .../TestClocks/TestClockCreateOptions.cs | 10 + .../InboundTransferFailOptions.cs | 6 + .../InboundTransferFailureDetailsOptions.cs | 6 + ...oundPaymentReturnOutboundPaymentOptions.cs | 6 + .../OutboundPaymentReturnedDetailsOptions.cs | 6 + ...utboundPaymentTrackingDetailsAchOptions.cs | 6 + .../OutboundPaymentTrackingDetailsOptions.cs | 12 + ...entTrackingDetailsUsDomesticWireOptions.cs | 12 + .../OutboundPaymentUpdateOptions.cs | 6 + ...ndTransferReturnOutboundTransferOptions.cs | 6 + .../OutboundTransferReturnedDetailsOptions.cs | 6 + ...tboundTransferTrackingDetailsAchOptions.cs | 6 + .../OutboundTransferTrackingDetailsOptions.cs | 12 + ...ferTrackingDetailsUsDomesticWireOptions.cs | 12 + .../OutboundTransferUpdateOptions.cs | 6 + .../ReceivedCreditCreateOptions.cs | 21 + ...itInitiatingPaymentMethodDetailsOptions.cs | 9 + ...aymentMethodDetailsUsBankAccountOptions.cs | 12 + .../ReceivedDebitCreateOptions.cs | 21 + ...itInitiatingPaymentMethodDetailsOptions.cs | 9 + ...aymentMethodDetailsUsBankAccountOptions.cs | 12 + .../Tokens/TokenAccountCompanyOptions.cs | 63 +++ ...countCompanyOwnershipDeclarationOptions.cs | 13 + ...countCompanyVerificationDocumentOptions.cs | 9 + .../TokenAccountCompanyVerificationOptions.cs | 6 + .../Tokens/TokenAccountIndividualOptions.cs | 72 ++++ ...kenAccountIndividualRelationshipOptions.cs | 18 + ...alVerificationAdditionalDocumentOptions.cs | 9 + ...ntIndividualVerificationDocumentOptions.cs | 9 + ...kenAccountIndividualVerificationOptions.cs | 9 + .../Services/Tokens/TokenAccountOptions.cs | 15 + .../Tokens/TokenBankAccountOptions.cs | 27 ++ .../Tokens/TokenCardNetworksOptions.cs | 6 + .../Services/Tokens/TokenCardOptions.cs | 42 ++ .../Services/Tokens/TokenCreateOptions.cs | 26 ++ .../Services/Tokens/TokenCvcUpdateOptions.cs | 6 + ...nAdditionalTosAcceptancesAccountOptions.cs | 13 + ...enPersonAdditionalTosAcceptancesOptions.cs | 6 + ...sonDocumentsCompanyAuthorizationOptions.cs | 6 + .../Tokens/TokenPersonDocumentsOptions.cs | 12 + .../TokenPersonDocumentsPassportOptions.cs | 6 + .../Tokens/TokenPersonDocumentsVisaOptions.cs | 6 + .../Services/Tokens/TokenPersonOptions.cs | 81 ++++ .../Tokens/TokenPersonRelationshipOptions.cs | 27 ++ ...onVerificationAdditionalDocumentOptions.cs | 9 + .../TokenPersonVerificationDocumentOptions.cs | 9 + .../Tokens/TokenPersonVerificationOptions.cs | 9 + .../Services/Tokens/TokenPiiOptions.cs | 6 + .../Services/Topups/TopupCreateOptions.cs | 24 ++ .../Services/Topups/TopupListOptions.cs | 10 + .../Services/Topups/TopupUpdateOptions.cs | 9 + .../TransferReversalCreateOptions.cs | 15 + .../TransferReversalUpdateOptions.cs | 6 + .../Transfers/TransferCreateOptions.cs | 27 ++ .../Services/Transfers/TransferListOptions.cs | 9 + .../Transfers/TransferUpdateOptions.cs | 9 + .../CreditReversalCreateOptions.cs | 9 + .../CreditReversalListOptions.cs | 12 + .../DebitReversalCreateOptions.cs | 9 + .../DebitReversalListOptions.cs | 15 + .../FinancialAccountFeaturesUpdateOptions.cs | 24 ++ .../FinancialAccountCreateOptions.cs | 15 + ...ancialAccountFeaturesCardIssuingOptions.cs | 6 + ...lAccountFeaturesDepositInsuranceOptions.cs | 6 + ...untFeaturesFinancialAddressesAbaOptions.cs | 6 + ...ccountFeaturesFinancialAddressesOptions.cs | 6 + ...countFeaturesInboundTransfersAchOptions.cs | 6 + ...lAccountFeaturesInboundTransfersOptions.cs | 6 + ...lAccountFeaturesIntraStripeFlowsOptions.cs | 6 + .../FinancialAccountFeaturesOptions.cs | 24 ++ ...countFeaturesOutboundPaymentsAchOptions.cs | 6 + ...lAccountFeaturesOutboundPaymentsOptions.cs | 9 + ...esOutboundPaymentsUsDomesticWireOptions.cs | 6 + ...ountFeaturesOutboundTransfersAchOptions.cs | 6 + ...AccountFeaturesOutboundTransfersOptions.cs | 9 + ...sOutboundTransfersUsDomesticWireOptions.cs | 6 + ...ncialAccountPlatformRestrictionsOptions.cs | 9 + .../FinancialAccountUpdateOptions.cs | 12 + .../InboundTransferCreateOptions.cs | 24 ++ .../InboundTransferListOptions.cs | 9 + .../OutboundPaymentCreateOptions.cs | 36 ++ ...nPaymentMethodDataBillingDetailsOptions.cs | 15 + ...mentDestinationPaymentMethodDataOptions.cs | 18 + ...onPaymentMethodDataUsBankAccountOptions.cs | 18 + ...tDestinationPaymentMethodOptionsOptions.cs | 6 + ...aymentMethodOptionsUsBankAccountOptions.cs | 6 + .../OutboundPaymentEndUserDetailsOptions.cs | 9 + .../OutboundPaymentListOptions.cs | 12 + .../OutboundTransferCreateOptions.cs | 27 ++ ...rDestinationPaymentMethodOptionsOptions.cs | 6 + ...aymentMethodOptionsUsBankAccountOptions.cs | 6 + .../OutboundTransferListOptions.cs | 9 + .../ReceivedCreditLinkedFlowsOptions.cs | 6 + .../ReceivedCreditListOptions.cs | 12 + .../ReceivedDebitListOptions.cs | 9 + .../TransactionEntryListOptions.cs | 16 + .../Transactions/TransactionListOptions.cs | 15 + .../TransactionStatusTransitionsOptions.cs | 7 + ...MeterEventAdjustmentCreateCancelOptions.cs | 6 + .../MeterEventAdjustmentCreateOptions.cs | 12 + .../MeterEventStreamCreateEventOptions.cs | 15 + .../MeterEventStreamCreateOptions.cs | 6 + .../MeterEvents/MeterEventCreateOptions.cs | 15 + ...stinationCreateAmazonEventbridgeOptions.cs | 9 + .../EventDestinationCreateOptions.cs | 36 ++ ...DestinationCreateWebhookEndpointOptions.cs | 6 + .../EventDestinationGetOptions.cs | 6 + .../EventDestinationListOptions.cs | 9 + .../EventDestinationUpdateOptions.cs | 21 + ...DestinationUpdateWebhookEndpointOptions.cs | 6 + .../V2/Core/Events/EventListOptions.cs | 9 + .../WebhookEndpointCreateOptions.cs | 21 + .../WebhookEndpointUpdateOptions.cs | 18 + 2781 files changed, 45631 insertions(+) diff --git a/src/Stripe.net/Entities/AccountLinks/AccountLink.cs b/src/Stripe.net/Entities/AccountLinks/AccountLink.cs index 8bacf57d3e..86581ad248 100644 --- a/src/Stripe.net/Entities/AccountLinks/AccountLink.cs +++ b/src/Stripe.net/Entities/AccountLinks/AccountLink.cs @@ -4,6 +4,9 @@ namespace Stripe using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// Account Links are the means by which a Connect platform grants a connected account @@ -18,6 +21,9 @@ public class AccountLink : StripeEntity, IHasObject /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// @@ -25,6 +31,10 @@ public class AccountLink : StripeEntity, IHasObject /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -32,12 +42,19 @@ public class AccountLink : StripeEntity, IHasObject /// [JsonProperty("expires_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("expires_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime ExpiresAt { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// /// The URL for the account link. /// [JsonProperty("url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("url")] +#endif public string Url { get; set; } } } diff --git a/src/Stripe.net/Entities/AccountSessions/AccountSession.cs b/src/Stripe.net/Entities/AccountSessions/AccountSession.cs index 0aee88d5df..6fdf220ecd 100644 --- a/src/Stripe.net/Entities/AccountSessions/AccountSession.cs +++ b/src/Stripe.net/Entities/AccountSessions/AccountSession.cs @@ -4,6 +4,9 @@ namespace Stripe using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// An AccountSession allows a Connect platform to grant access to a connected account in @@ -23,12 +26,18 @@ public class AccountSession : StripeEntity, IHasObject /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// /// The ID of the account the AccountSession was created for. /// [JsonProperty("account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account")] +#endif public string Account { get; set; } /// @@ -45,9 +54,15 @@ public class AccountSession : StripeEntity, IHasObject /// handled. /// [JsonProperty("client_secret")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("client_secret")] +#endif public string ClientSecret { get; set; } [JsonProperty("components")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("components")] +#endif public AccountSessionComponents Components { get; set; } /// @@ -55,6 +70,10 @@ public class AccountSession : StripeEntity, IHasObject /// [JsonProperty("expires_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("expires_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime ExpiresAt { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -62,6 +81,9 @@ public class AccountSession : StripeEntity, IHasObject /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } } } diff --git a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponents.cs b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponents.cs index 51c2e07602..ffab307ac5 100644 --- a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponents.cs +++ b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponents.cs @@ -2,40 +2,76 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountSessionComponents : StripeEntity { [JsonProperty("account_management")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_management")] +#endif public AccountSessionComponentsAccountManagement AccountManagement { get; set; } [JsonProperty("account_onboarding")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_onboarding")] +#endif public AccountSessionComponentsAccountOnboarding AccountOnboarding { get; set; } [JsonProperty("balances")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("balances")] +#endif public AccountSessionComponentsBalances Balances { get; set; } [JsonProperty("documents")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("documents")] +#endif public AccountSessionComponentsDocuments Documents { get; set; } [JsonProperty("notification_banner")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("notification_banner")] +#endif public AccountSessionComponentsNotificationBanner NotificationBanner { get; set; } [JsonProperty("payment_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_details")] +#endif public AccountSessionComponentsPaymentDetails PaymentDetails { get; set; } [JsonProperty("payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payments")] +#endif public AccountSessionComponentsPayments Payments { get; set; } [JsonProperty("payouts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payouts")] +#endif public AccountSessionComponentsPayouts Payouts { get; set; } [JsonProperty("payouts_list")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payouts_list")] +#endif public AccountSessionComponentsPayoutsList PayoutsList { get; set; } [JsonProperty("tax_registrations")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_registrations")] +#endif public AccountSessionComponentsTaxRegistrations TaxRegistrations { get; set; } [JsonProperty("tax_settings")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_settings")] +#endif public AccountSessionComponentsTaxSettings TaxSettings { get; set; } } } diff --git a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsAccountManagement.cs b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsAccountManagement.cs index 6ff6b25dfa..83f1a231a5 100644 --- a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsAccountManagement.cs +++ b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsAccountManagement.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountSessionComponentsAccountManagement : StripeEntity { @@ -9,9 +12,15 @@ public class AccountSessionComponentsAccountManagement : StripeEntity [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool Enabled { get; set; } [JsonProperty("features")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("features")] +#endif public AccountSessionComponentsAccountManagementFeatures Features { get; set; } } } diff --git a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsAccountManagementFeatures.cs b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsAccountManagementFeatures.cs index 5d1a954b53..8d2affccfe 100644 --- a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsAccountManagementFeatures.cs +++ b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsAccountManagementFeatures.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountSessionComponentsAccountManagementFeatures : StripeEntity { @@ -13,6 +16,9 @@ public class AccountSessionComponentsAccountManagementFeatures : StripeEntity [JsonProperty("disable_stripe_user_authentication")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("disable_stripe_user_authentication")] +#endif public bool DisableStripeUserAuthentication { get; set; } /// @@ -23,6 +29,9 @@ public class AccountSessionComponentsAccountManagementFeatures : StripeEntitytrue. /// [JsonProperty("external_account_collection")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("external_account_collection")] +#endif public bool ExternalAccountCollection { get; set; } } } diff --git a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsAccountOnboarding.cs b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsAccountOnboarding.cs index e39c061b65..b71a604731 100644 --- a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsAccountOnboarding.cs +++ b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsAccountOnboarding.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountSessionComponentsAccountOnboarding : StripeEntity { @@ -9,9 +12,15 @@ public class AccountSessionComponentsAccountOnboarding : StripeEntity [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool Enabled { get; set; } [JsonProperty("features")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("features")] +#endif public AccountSessionComponentsAccountOnboardingFeatures Features { get; set; } } } diff --git a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsAccountOnboardingFeatures.cs b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsAccountOnboardingFeatures.cs index c937b7d582..e51fa3352e 100644 --- a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsAccountOnboardingFeatures.cs +++ b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsAccountOnboardingFeatures.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountSessionComponentsAccountOnboardingFeatures : StripeEntity { @@ -13,6 +16,9 @@ public class AccountSessionComponentsAccountOnboardingFeatures : StripeEntity [JsonProperty("disable_stripe_user_authentication")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("disable_stripe_user_authentication")] +#endif public bool DisableStripeUserAuthentication { get; set; } /// @@ -23,6 +29,9 @@ public class AccountSessionComponentsAccountOnboardingFeatures : StripeEntitytrue. /// [JsonProperty("external_account_collection")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("external_account_collection")] +#endif public bool ExternalAccountCollection { get; set; } } } diff --git a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsBalances.cs b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsBalances.cs index f2a462fb2f..63aa8b6bb6 100644 --- a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsBalances.cs +++ b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsBalances.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountSessionComponentsBalances : StripeEntity { @@ -9,9 +12,15 @@ public class AccountSessionComponentsBalances : StripeEntity [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool Enabled { get; set; } [JsonProperty("features")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("features")] +#endif public AccountSessionComponentsBalancesFeatures Features { get; set; } } } diff --git a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsBalancesFeatures.cs b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsBalancesFeatures.cs index cc0aab2487..7f9d679e43 100644 --- a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsBalancesFeatures.cs +++ b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsBalancesFeatures.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountSessionComponentsBalancesFeatures : StripeEntity { @@ -13,6 +16,9 @@ public class AccountSessionComponentsBalancesFeatures : StripeEntity [JsonProperty("disable_stripe_user_authentication")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("disable_stripe_user_authentication")] +#endif public bool DisableStripeUserAuthentication { get; set; } /// @@ -20,6 +26,9 @@ public class AccountSessionComponentsBalancesFeatures : StripeEntityfalse otherwise. /// [JsonProperty("edit_payout_schedule")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("edit_payout_schedule")] +#endif public bool EditPayoutSchedule { get; set; } /// @@ -30,6 +39,9 @@ public class AccountSessionComponentsBalancesFeatures : StripeEntitytrue. /// [JsonProperty("external_account_collection")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("external_account_collection")] +#endif public bool ExternalAccountCollection { get; set; } /// @@ -37,6 +49,9 @@ public class AccountSessionComponentsBalancesFeatures : StripeEntityfalse otherwise. /// [JsonProperty("instant_payouts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("instant_payouts")] +#endif public bool InstantPayouts { get; set; } /// @@ -44,6 +59,9 @@ public class AccountSessionComponentsBalancesFeatures : StripeEntityfalse otherwise. /// [JsonProperty("standard_payouts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("standard_payouts")] +#endif public bool StandardPayouts { get; set; } } } diff --git a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsDocuments.cs b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsDocuments.cs index b74a4292b3..7551ecf4bb 100644 --- a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsDocuments.cs +++ b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsDocuments.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountSessionComponentsDocuments : StripeEntity { @@ -9,9 +12,15 @@ public class AccountSessionComponentsDocuments : StripeEntity [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool Enabled { get; set; } [JsonProperty("features")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("features")] +#endif public AccountSessionComponentsDocumentsFeatures Features { get; set; } } } diff --git a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsNotificationBanner.cs b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsNotificationBanner.cs index 8fb832ea2f..0962420f72 100644 --- a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsNotificationBanner.cs +++ b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsNotificationBanner.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountSessionComponentsNotificationBanner : StripeEntity { @@ -9,9 +12,15 @@ public class AccountSessionComponentsNotificationBanner : StripeEntity [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool Enabled { get; set; } [JsonProperty("features")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("features")] +#endif public AccountSessionComponentsNotificationBannerFeatures Features { get; set; } } } diff --git a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsNotificationBannerFeatures.cs b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsNotificationBannerFeatures.cs index 655f784ba8..f4c91bbc60 100644 --- a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsNotificationBannerFeatures.cs +++ b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsNotificationBannerFeatures.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountSessionComponentsNotificationBannerFeatures : StripeEntity { @@ -13,6 +16,9 @@ public class AccountSessionComponentsNotificationBannerFeatures : StripeEntity [JsonProperty("disable_stripe_user_authentication")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("disable_stripe_user_authentication")] +#endif public bool DisableStripeUserAuthentication { get; set; } /// @@ -23,6 +29,9 @@ public class AccountSessionComponentsNotificationBannerFeatures : StripeEntitytrue. /// [JsonProperty("external_account_collection")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("external_account_collection")] +#endif public bool ExternalAccountCollection { get; set; } } } diff --git a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsPaymentDetails.cs b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsPaymentDetails.cs index 277f17ecab..5219eb6f2a 100644 --- a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsPaymentDetails.cs +++ b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsPaymentDetails.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountSessionComponentsPaymentDetails : StripeEntity { @@ -9,9 +12,15 @@ public class AccountSessionComponentsPaymentDetails : StripeEntity [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool Enabled { get; set; } [JsonProperty("features")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("features")] +#endif public AccountSessionComponentsPaymentDetailsFeatures Features { get; set; } } } diff --git a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsPaymentDetailsFeatures.cs b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsPaymentDetailsFeatures.cs index 02e441b2ce..448cead3b6 100644 --- a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsPaymentDetailsFeatures.cs +++ b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsPaymentDetailsFeatures.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountSessionComponentsPaymentDetailsFeatures : StripeEntity { @@ -10,6 +13,9 @@ public class AccountSessionComponentsPaymentDetailsFeatures : StripeEntity [JsonProperty("capture_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("capture_payments")] +#endif public bool CapturePayments { get; set; } /// @@ -17,6 +23,9 @@ public class AccountSessionComponentsPaymentDetailsFeatures : StripeEntityfalse by default. /// [JsonProperty("destination_on_behalf_of_charge_management")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("destination_on_behalf_of_charge_management")] +#endif public bool DestinationOnBehalfOfChargeManagement { get; set; } /// @@ -24,12 +33,18 @@ public class AccountSessionComponentsPaymentDetailsFeatures : StripeEntitytrue by default. /// [JsonProperty("dispute_management")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("dispute_management")] +#endif public bool DisputeManagement { get; set; } /// /// Whether to allow sending refunds. This is true by default. /// [JsonProperty("refund_management")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("refund_management")] +#endif public bool RefundManagement { get; set; } } } diff --git a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsPayments.cs b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsPayments.cs index ba20cb3783..a0a831a97e 100644 --- a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsPayments.cs +++ b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsPayments.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountSessionComponentsPayments : StripeEntity { @@ -9,9 +12,15 @@ public class AccountSessionComponentsPayments : StripeEntity [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool Enabled { get; set; } [JsonProperty("features")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("features")] +#endif public AccountSessionComponentsPaymentsFeatures Features { get; set; } } } diff --git a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsPaymentsFeatures.cs b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsPaymentsFeatures.cs index 822ec1ca73..a8844c71af 100644 --- a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsPaymentsFeatures.cs +++ b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsPaymentsFeatures.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountSessionComponentsPaymentsFeatures : StripeEntity { @@ -10,6 +13,9 @@ public class AccountSessionComponentsPaymentsFeatures : StripeEntity [JsonProperty("capture_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("capture_payments")] +#endif public bool CapturePayments { get; set; } /// @@ -17,6 +23,9 @@ public class AccountSessionComponentsPaymentsFeatures : StripeEntityfalse by default. /// [JsonProperty("destination_on_behalf_of_charge_management")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("destination_on_behalf_of_charge_management")] +#endif public bool DestinationOnBehalfOfChargeManagement { get; set; } /// @@ -24,12 +33,18 @@ public class AccountSessionComponentsPaymentsFeatures : StripeEntitytrue by default. /// [JsonProperty("dispute_management")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("dispute_management")] +#endif public bool DisputeManagement { get; set; } /// /// Whether to allow sending refunds. This is true by default. /// [JsonProperty("refund_management")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("refund_management")] +#endif public bool RefundManagement { get; set; } } } diff --git a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsPayouts.cs b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsPayouts.cs index fc6e67a68e..1a11e88321 100644 --- a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsPayouts.cs +++ b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsPayouts.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountSessionComponentsPayouts : StripeEntity { @@ -9,9 +12,15 @@ public class AccountSessionComponentsPayouts : StripeEntity [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool Enabled { get; set; } [JsonProperty("features")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("features")] +#endif public AccountSessionComponentsPayoutsFeatures Features { get; set; } } } diff --git a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsPayoutsFeatures.cs b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsPayoutsFeatures.cs index 0285e8cd5a..8c649ad382 100644 --- a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsPayoutsFeatures.cs +++ b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsPayoutsFeatures.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountSessionComponentsPayoutsFeatures : StripeEntity { @@ -13,6 +16,9 @@ public class AccountSessionComponentsPayoutsFeatures : StripeEntity [JsonProperty("disable_stripe_user_authentication")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("disable_stripe_user_authentication")] +#endif public bool DisableStripeUserAuthentication { get; set; } /// @@ -20,6 +26,9 @@ public class AccountSessionComponentsPayoutsFeatures : StripeEntityfalse otherwise. /// [JsonProperty("edit_payout_schedule")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("edit_payout_schedule")] +#endif public bool EditPayoutSchedule { get; set; } /// @@ -30,6 +39,9 @@ public class AccountSessionComponentsPayoutsFeatures : StripeEntitytrue. /// [JsonProperty("external_account_collection")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("external_account_collection")] +#endif public bool ExternalAccountCollection { get; set; } /// @@ -37,6 +49,9 @@ public class AccountSessionComponentsPayoutsFeatures : StripeEntityfalse otherwise. /// [JsonProperty("instant_payouts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("instant_payouts")] +#endif public bool InstantPayouts { get; set; } /// @@ -44,6 +59,9 @@ public class AccountSessionComponentsPayoutsFeatures : StripeEntityfalse otherwise. /// [JsonProperty("standard_payouts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("standard_payouts")] +#endif public bool StandardPayouts { get; set; } } } diff --git a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsPayoutsList.cs b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsPayoutsList.cs index b8ea1bff94..0155d120ca 100644 --- a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsPayoutsList.cs +++ b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsPayoutsList.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountSessionComponentsPayoutsList : StripeEntity { @@ -9,9 +12,15 @@ public class AccountSessionComponentsPayoutsList : StripeEntity [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool Enabled { get; set; } [JsonProperty("features")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("features")] +#endif public AccountSessionComponentsPayoutsListFeatures Features { get; set; } } } diff --git a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsTaxRegistrations.cs b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsTaxRegistrations.cs index 8a389a9202..9707d853d4 100644 --- a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsTaxRegistrations.cs +++ b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsTaxRegistrations.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountSessionComponentsTaxRegistrations : StripeEntity { @@ -9,9 +12,15 @@ public class AccountSessionComponentsTaxRegistrations : StripeEntity [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool Enabled { get; set; } [JsonProperty("features")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("features")] +#endif public AccountSessionComponentsTaxRegistrationsFeatures Features { get; set; } } } diff --git a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsTaxSettings.cs b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsTaxSettings.cs index 8721703aea..7a9e5092d0 100644 --- a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsTaxSettings.cs +++ b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsTaxSettings.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountSessionComponentsTaxSettings : StripeEntity { @@ -9,9 +12,15 @@ public class AccountSessionComponentsTaxSettings : StripeEntity [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool Enabled { get; set; } [JsonProperty("features")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("features")] +#endif public AccountSessionComponentsTaxSettingsFeatures Features { get; set; } } } diff --git a/src/Stripe.net/Entities/Accounts/Account.cs b/src/Stripe.net/Entities/Accounts/Account.cs index 231f358114..7bc283e15e 100644 --- a/src/Stripe.net/Entities/Accounts/Account.cs +++ b/src/Stripe.net/Entities/Accounts/Account.cs @@ -5,6 +5,9 @@ namespace Stripe using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// This is an object representing a Stripe account. You can retrieve it to see properties @@ -30,18 +33,27 @@ public class Account : StripeEntity, IHasId, IHasMetadata, IHasObject, /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// /// Business information about the account. /// [JsonProperty("business_profile")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("business_profile")] +#endif public AccountBusinessProfile BusinessProfile { get; set; } /// @@ -55,27 +67,45 @@ public class Account : StripeEntity, IHasId, IHasMetadata, IHasObject, /// non_profit. /// [JsonProperty("business_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("business_type")] +#endif public string BusinessType { get; set; } [JsonProperty("capabilities")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("capabilities")] +#endif public AccountCapabilities Capabilities { get; set; } /// /// Whether the account can process charges. /// [JsonProperty("charges_enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("charges_enabled")] +#endif public bool ChargesEnabled { get; set; } [JsonProperty("company")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("company")] +#endif public AccountCompany Company { get; set; } [JsonProperty("controller")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("controller")] +#endif public AccountController Controller { get; set; } /// /// The account's country. /// [JsonProperty("country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country")] +#endif public string Country { get; set; } /// @@ -83,6 +113,10 @@ public class Account : StripeEntity, IHasId, IHasMetadata, IHasObject, /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -91,12 +125,19 @@ public class Account : StripeEntity, IHasId, IHasMetadata, IHasObject, /// account's country. /// [JsonProperty("default_currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("default_currency")] +#endif public string DefaultCurrency { get; set; } /// /// Whether this object is deleted or not. /// [JsonProperty("deleted", NullValueHandling = NullValueHandling.Ignore)] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("deleted")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] +#endif public bool? Deleted { get; set; } /// @@ -107,6 +148,9 @@ public class Account : StripeEntity, IHasId, IHasMetadata, IHasObject, /// account details. /// [JsonProperty("details_submitted")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("details_submitted")] +#endif public bool DetailsSubmitted { get; set; } /// @@ -114,6 +158,9 @@ public class Account : StripeEntity, IHasId, IHasMetadata, IHasObject, /// Stripe doesn't market to this field without explicit approval from the platform. /// [JsonProperty("email")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("email")] +#endif public string Email { get; set; } /// @@ -122,15 +169,24 @@ public class Account : StripeEntity, IHasId, IHasMetadata, IHasObject, /// is true. /// [JsonProperty("external_accounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("external_accounts")] +#endif public StripeList ExternalAccounts { get; set; } [JsonProperty("future_requirements")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("future_requirements")] +#endif public AccountFutureRequirements FutureRequirements { get; set; } /// /// The groups associated with the account. /// [JsonProperty("groups")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("groups")] +#endif public AccountGroups Groups { get; set; } /// @@ -149,6 +205,9 @@ public class Account : StripeEntity, IHasId, IHasMetadata, IHasObject, /// identity verification with the API. /// [JsonProperty("individual")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("individual")] +#endif public Person Individual { get; set; } /// @@ -157,24 +216,39 @@ public class Account : StripeEntity, IHasId, IHasMetadata, IHasObject, /// object in a structured format. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// Whether the funds in this account can be paid out. /// [JsonProperty("payouts_enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payouts_enabled")] +#endif public bool PayoutsEnabled { get; set; } [JsonProperty("requirements")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requirements")] +#endif public AccountRequirements Requirements { get; set; } /// /// Options for customizing how the account functions within Stripe. /// [JsonProperty("settings")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("settings")] +#endif public AccountSettings Settings { get; set; } [JsonProperty("tos_acceptance")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tos_acceptance")] +#endif public AccountTosAcceptance TosAcceptance { get; set; } /// @@ -183,6 +257,9 @@ public class Account : StripeEntity, IHasId, IHasMetadata, IHasObject, /// One of: custom, express, none, or standard. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Accounts/AccountBusinessProfile.cs b/src/Stripe.net/Entities/Accounts/AccountBusinessProfile.cs index 327b22aca6..0fbbd3d6eb 100644 --- a/src/Stripe.net/Entities/Accounts/AccountBusinessProfile.cs +++ b/src/Stripe.net/Entities/Accounts/AccountBusinessProfile.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountBusinessProfile : StripeEntity { @@ -9,6 +12,9 @@ public class AccountBusinessProfile : StripeEntity /// The applicant's gross annual revenue for its preceding fiscal year. /// [JsonProperty("annual_revenue")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("annual_revenue")] +#endif public AccountBusinessProfileAnnualRevenue AnnualRevenue { get; set; } /// @@ -16,6 +22,9 @@ public class AccountBusinessProfile : StripeEntity /// the business. /// [JsonProperty("estimated_worker_count")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("estimated_worker_count")] +#endif public long? EstimatedWorkerCount { get; set; } /// @@ -24,15 +33,24 @@ public class AccountBusinessProfile : StripeEntity /// provide. /// [JsonProperty("mcc")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mcc")] +#endif public string Mcc { get; set; } [JsonProperty("monthly_estimated_revenue")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("monthly_estimated_revenue")] +#endif public AccountBusinessProfileMonthlyEstimatedRevenue MonthlyEstimatedRevenue { get; set; } /// /// The customer-facing business name. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } /// @@ -40,36 +58,54 @@ public class AccountBusinessProfile : StripeEntity /// used by Stripe for risk and underwriting purposes. /// [JsonProperty("product_description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("product_description")] +#endif public string ProductDescription { get; set; } /// /// A publicly available mailing address for sending support issues to. /// [JsonProperty("support_address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("support_address")] +#endif public Address SupportAddress { get; set; } /// /// A publicly available email address for sending support issues to. /// [JsonProperty("support_email")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("support_email")] +#endif public string SupportEmail { get; set; } /// /// A publicly available phone number to call with support issues. /// [JsonProperty("support_phone")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("support_phone")] +#endif public string SupportPhone { get; set; } /// /// A publicly available website for handling support issues. /// [JsonProperty("support_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("support_url")] +#endif public string SupportUrl { get; set; } /// /// The business's publicly available website. /// [JsonProperty("url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("url")] +#endif public string Url { get; set; } } } diff --git a/src/Stripe.net/Entities/Accounts/AccountBusinessProfileAnnualRevenue.cs b/src/Stripe.net/Entities/Accounts/AccountBusinessProfileAnnualRevenue.cs index 2662eae9ea..d3929e576b 100644 --- a/src/Stripe.net/Entities/Accounts/AccountBusinessProfileAnnualRevenue.cs +++ b/src/Stripe.net/Entities/Accounts/AccountBusinessProfileAnnualRevenue.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountBusinessProfileAnnualRevenue : StripeEntity { @@ -10,6 +13,9 @@ public class AccountBusinessProfileAnnualRevenue : StripeEntitysmallest currency unit. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long? Amount { get; set; } /// @@ -18,6 +24,9 @@ public class AccountBusinessProfileAnnualRevenue : StripeEntity. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// @@ -25,6 +34,9 @@ public class AccountBusinessProfileAnnualRevenue : StripeEntity [JsonProperty("fiscal_year_end")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fiscal_year_end")] +#endif public string FiscalYearEnd { get; set; } } } diff --git a/src/Stripe.net/Entities/Accounts/AccountBusinessProfileMonthlyEstimatedRevenue.cs b/src/Stripe.net/Entities/Accounts/AccountBusinessProfileMonthlyEstimatedRevenue.cs index 4b69bd93f0..a8f7cb09bb 100644 --- a/src/Stripe.net/Entities/Accounts/AccountBusinessProfileMonthlyEstimatedRevenue.cs +++ b/src/Stripe.net/Entities/Accounts/AccountBusinessProfileMonthlyEstimatedRevenue.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountBusinessProfileMonthlyEstimatedRevenue : StripeEntity { @@ -10,6 +13,9 @@ public class AccountBusinessProfileMonthlyEstimatedRevenue : StripeEntitysmallest currency unit. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long Amount { get; set; } /// @@ -18,6 +24,9 @@ public class AccountBusinessProfileMonthlyEstimatedRevenue : StripeEntity. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } } } diff --git a/src/Stripe.net/Entities/Accounts/AccountCapabilities.cs b/src/Stripe.net/Entities/Accounts/AccountCapabilities.cs index e5da7b427c..f7a60972df 100644 --- a/src/Stripe.net/Entities/Accounts/AccountCapabilities.cs +++ b/src/Stripe.net/Entities/Accounts/AccountCapabilities.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountCapabilities : StripeEntity { @@ -11,6 +14,9 @@ public class AccountCapabilities : StripeEntity /// One of: active, inactive, or pending. /// [JsonProperty("acss_debit_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("acss_debit_payments")] +#endif public string AcssDebitPayments { get; set; } /// @@ -19,6 +25,9 @@ public class AccountCapabilities : StripeEntity /// One of: active, inactive, or pending. /// [JsonProperty("affirm_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("affirm_payments")] +#endif public string AffirmPayments { get; set; } /// @@ -27,6 +36,9 @@ public class AccountCapabilities : StripeEntity /// One of: active, inactive, or pending. /// [JsonProperty("afterpay_clearpay_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("afterpay_clearpay_payments")] +#endif public string AfterpayClearpayPayments { get; set; } /// @@ -35,6 +47,9 @@ public class AccountCapabilities : StripeEntity /// One of: active, inactive, or pending. /// [JsonProperty("alma_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("alma_payments")] +#endif public string AlmaPayments { get; set; } /// @@ -43,6 +58,9 @@ public class AccountCapabilities : StripeEntity /// One of: active, inactive, or pending. /// [JsonProperty("amazon_pay_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amazon_pay_payments")] +#endif public string AmazonPayPayments { get; set; } /// @@ -51,6 +69,9 @@ public class AccountCapabilities : StripeEntity /// One of: active, inactive, or pending. /// [JsonProperty("au_becs_debit_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("au_becs_debit_payments")] +#endif public string AuBecsDebitPayments { get; set; } /// @@ -59,6 +80,9 @@ public class AccountCapabilities : StripeEntity /// One of: active, inactive, or pending. /// [JsonProperty("bacs_debit_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bacs_debit_payments")] +#endif public string BacsDebitPayments { get; set; } /// @@ -67,6 +91,9 @@ public class AccountCapabilities : StripeEntity /// One of: active, inactive, or pending. /// [JsonProperty("bancontact_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bancontact_payments")] +#endif public string BancontactPayments { get; set; } /// @@ -75,6 +102,9 @@ public class AccountCapabilities : StripeEntity /// One of: active, inactive, or pending. /// [JsonProperty("bank_transfer_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_transfer_payments")] +#endif public string BankTransferPayments { get; set; } /// @@ -83,6 +113,9 @@ public class AccountCapabilities : StripeEntity /// One of: active, inactive, or pending. /// [JsonProperty("blik_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("blik_payments")] +#endif public string BlikPayments { get; set; } /// @@ -91,6 +124,9 @@ public class AccountCapabilities : StripeEntity /// One of: active, inactive, or pending. /// [JsonProperty("boleto_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("boleto_payments")] +#endif public string BoletoPayments { get; set; } /// @@ -99,6 +135,9 @@ public class AccountCapabilities : StripeEntity /// One of: active, inactive, or pending. /// [JsonProperty("card_issuing")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card_issuing")] +#endif public string CardIssuing { get; set; } /// @@ -107,6 +146,9 @@ public class AccountCapabilities : StripeEntity /// One of: active, inactive, or pending. /// [JsonProperty("card_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card_payments")] +#endif public string CardPayments { get; set; } /// @@ -115,6 +157,9 @@ public class AccountCapabilities : StripeEntity /// One of: active, inactive, or pending. /// [JsonProperty("cartes_bancaires_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cartes_bancaires_payments")] +#endif public string CartesBancairesPayments { get; set; } /// @@ -123,6 +168,9 @@ public class AccountCapabilities : StripeEntity /// One of: active, inactive, or pending. /// [JsonProperty("cashapp_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cashapp_payments")] +#endif public string CashappPayments { get; set; } /// @@ -131,6 +179,9 @@ public class AccountCapabilities : StripeEntity /// One of: active, inactive, or pending. /// [JsonProperty("eps_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("eps_payments")] +#endif public string EpsPayments { get; set; } /// @@ -139,6 +190,9 @@ public class AccountCapabilities : StripeEntity /// One of: active, inactive, or pending. /// [JsonProperty("fpx_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fpx_payments")] +#endif public string FpxPayments { get; set; } /// @@ -147,6 +201,9 @@ public class AccountCapabilities : StripeEntity /// One of: active, inactive, or pending. /// [JsonProperty("gb_bank_transfer_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("gb_bank_transfer_payments")] +#endif public string GbBankTransferPayments { get; set; } /// @@ -155,6 +212,9 @@ public class AccountCapabilities : StripeEntity /// One of: active, inactive, or pending. /// [JsonProperty("giropay_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("giropay_payments")] +#endif public string GiropayPayments { get; set; } /// @@ -163,6 +223,9 @@ public class AccountCapabilities : StripeEntity /// One of: active, inactive, or pending. /// [JsonProperty("grabpay_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("grabpay_payments")] +#endif public string GrabpayPayments { get; set; } /// @@ -171,6 +234,9 @@ public class AccountCapabilities : StripeEntity /// One of: active, inactive, or pending. /// [JsonProperty("ideal_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ideal_payments")] +#endif public string IdealPayments { get; set; } /// @@ -179,6 +245,9 @@ public class AccountCapabilities : StripeEntity /// One of: active, inactive, or pending. /// [JsonProperty("india_international_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("india_international_payments")] +#endif public string IndiaInternationalPayments { get; set; } /// @@ -187,6 +256,9 @@ public class AccountCapabilities : StripeEntity /// One of: active, inactive, or pending. /// [JsonProperty("jcb_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("jcb_payments")] +#endif public string JcbPayments { get; set; } /// @@ -195,6 +267,9 @@ public class AccountCapabilities : StripeEntity /// One of: active, inactive, or pending. /// [JsonProperty("jp_bank_transfer_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("jp_bank_transfer_payments")] +#endif public string JpBankTransferPayments { get; set; } /// @@ -203,6 +278,9 @@ public class AccountCapabilities : StripeEntity /// One of: active, inactive, or pending. /// [JsonProperty("kakao_pay_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("kakao_pay_payments")] +#endif public string KakaoPayPayments { get; set; } /// @@ -211,6 +289,9 @@ public class AccountCapabilities : StripeEntity /// One of: active, inactive, or pending. /// [JsonProperty("klarna_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("klarna_payments")] +#endif public string KlarnaPayments { get; set; } /// @@ -219,6 +300,9 @@ public class AccountCapabilities : StripeEntity /// One of: active, inactive, or pending. /// [JsonProperty("konbini_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("konbini_payments")] +#endif public string KonbiniPayments { get; set; } /// @@ -227,6 +311,9 @@ public class AccountCapabilities : StripeEntity /// One of: active, inactive, or pending. /// [JsonProperty("kr_card_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("kr_card_payments")] +#endif public string KrCardPayments { get; set; } /// @@ -234,6 +321,9 @@ public class AccountCapabilities : StripeEntity /// One of: active, inactive, or pending. /// [JsonProperty("legacy_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("legacy_payments")] +#endif public string LegacyPayments { get; set; } /// @@ -242,6 +332,9 @@ public class AccountCapabilities : StripeEntity /// One of: active, inactive, or pending. /// [JsonProperty("link_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("link_payments")] +#endif public string LinkPayments { get; set; } /// @@ -250,6 +343,9 @@ public class AccountCapabilities : StripeEntity /// One of: active, inactive, or pending. /// [JsonProperty("mobilepay_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mobilepay_payments")] +#endif public string MobilepayPayments { get; set; } /// @@ -258,6 +354,9 @@ public class AccountCapabilities : StripeEntity /// One of: active, inactive, or pending. /// [JsonProperty("multibanco_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("multibanco_payments")] +#endif public string MultibancoPayments { get; set; } /// @@ -266,6 +365,9 @@ public class AccountCapabilities : StripeEntity /// One of: active, inactive, or pending. /// [JsonProperty("mx_bank_transfer_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mx_bank_transfer_payments")] +#endif public string MxBankTransferPayments { get; set; } /// @@ -274,6 +376,9 @@ public class AccountCapabilities : StripeEntity /// One of: active, inactive, or pending. /// [JsonProperty("naver_pay_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("naver_pay_payments")] +#endif public string NaverPayPayments { get; set; } /// @@ -282,6 +387,9 @@ public class AccountCapabilities : StripeEntity /// One of: active, inactive, or pending. /// [JsonProperty("oxxo_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("oxxo_payments")] +#endif public string OxxoPayments { get; set; } /// @@ -290,6 +398,9 @@ public class AccountCapabilities : StripeEntity /// One of: active, inactive, or pending. /// [JsonProperty("p24_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("p24_payments")] +#endif public string P24Payments { get; set; } /// @@ -298,6 +409,9 @@ public class AccountCapabilities : StripeEntity /// One of: active, inactive, or pending. /// [JsonProperty("payco_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payco_payments")] +#endif public string PaycoPayments { get; set; } /// @@ -306,6 +420,9 @@ public class AccountCapabilities : StripeEntity /// One of: active, inactive, or pending. /// [JsonProperty("paynow_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("paynow_payments")] +#endif public string PaynowPayments { get; set; } /// @@ -314,6 +431,9 @@ public class AccountCapabilities : StripeEntity /// One of: active, inactive, or pending. /// [JsonProperty("promptpay_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("promptpay_payments")] +#endif public string PromptpayPayments { get; set; } /// @@ -322,6 +442,9 @@ public class AccountCapabilities : StripeEntity /// One of: active, inactive, or pending. /// [JsonProperty("revolut_pay_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("revolut_pay_payments")] +#endif public string RevolutPayPayments { get; set; } /// @@ -330,6 +453,9 @@ public class AccountCapabilities : StripeEntity /// One of: active, inactive, or pending. /// [JsonProperty("samsung_pay_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("samsung_pay_payments")] +#endif public string SamsungPayPayments { get; set; } /// @@ -338,6 +464,9 @@ public class AccountCapabilities : StripeEntity /// One of: active, inactive, or pending. /// [JsonProperty("sepa_bank_transfer_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sepa_bank_transfer_payments")] +#endif public string SepaBankTransferPayments { get; set; } /// @@ -346,6 +475,9 @@ public class AccountCapabilities : StripeEntity /// One of: active, inactive, or pending. /// [JsonProperty("sepa_debit_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sepa_debit_payments")] +#endif public string SepaDebitPayments { get; set; } /// @@ -354,6 +486,9 @@ public class AccountCapabilities : StripeEntity /// One of: active, inactive, or pending. /// [JsonProperty("sofort_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sofort_payments")] +#endif public string SofortPayments { get; set; } /// @@ -362,6 +497,9 @@ public class AccountCapabilities : StripeEntity /// One of: active, inactive, or pending. /// [JsonProperty("swish_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("swish_payments")] +#endif public string SwishPayments { get; set; } /// @@ -369,6 +507,9 @@ public class AccountCapabilities : StripeEntity /// One of: active, inactive, or pending. /// [JsonProperty("tax_reporting_us_1099_k")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_reporting_us_1099_k")] +#endif public string TaxReportingUs1099K { get; set; } /// @@ -376,6 +517,9 @@ public class AccountCapabilities : StripeEntity /// One of: active, inactive, or pending. /// [JsonProperty("tax_reporting_us_1099_misc")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_reporting_us_1099_misc")] +#endif public string TaxReportingUs1099Misc { get; set; } /// @@ -384,6 +528,9 @@ public class AccountCapabilities : StripeEntity /// One of: active, inactive, or pending. /// [JsonProperty("transfers")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transfers")] +#endif public string Transfers { get; set; } /// @@ -391,6 +538,9 @@ public class AccountCapabilities : StripeEntity /// One of: active, inactive, or pending. /// [JsonProperty("treasury")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("treasury")] +#endif public string Treasury { get; set; } /// @@ -399,6 +549,9 @@ public class AccountCapabilities : StripeEntity /// One of: active, inactive, or pending. /// [JsonProperty("twint_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("twint_payments")] +#endif public string TwintPayments { get; set; } /// @@ -407,6 +560,9 @@ public class AccountCapabilities : StripeEntity /// One of: active, inactive, or pending. /// [JsonProperty("us_bank_account_ach_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("us_bank_account_ach_payments")] +#endif public string UsBankAccountAchPayments { get; set; } /// @@ -415,6 +571,9 @@ public class AccountCapabilities : StripeEntity /// One of: active, inactive, or pending. /// [JsonProperty("us_bank_transfer_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("us_bank_transfer_payments")] +#endif public string UsBankTransferPayments { get; set; } /// @@ -423,6 +582,9 @@ public class AccountCapabilities : StripeEntity /// One of: active, inactive, or pending. /// [JsonProperty("zip_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("zip_payments")] +#endif public string ZipPayments { get; set; } } } diff --git a/src/Stripe.net/Entities/Accounts/AccountCompany.cs b/src/Stripe.net/Entities/Accounts/AccountCompany.cs index 0b5808baad..4e04e6baf2 100644 --- a/src/Stripe.net/Entities/Accounts/AccountCompany.cs +++ b/src/Stripe.net/Entities/Accounts/AccountCompany.cs @@ -2,22 +2,34 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountCompany : StripeEntity { [JsonProperty("address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address")] +#endif public Address Address { get; set; } /// /// The Kana variation of the company's primary address (Japan only). /// [JsonProperty("address_kana")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_kana")] +#endif public AddressJapan AddressKana { get; set; } /// /// The Kanji variation of the company's primary address (Japan only). /// [JsonProperty("address_kanji")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_kanji")] +#endif public AddressJapan AddressKanji { get; set; } /// @@ -27,6 +39,9 @@ public class AccountCompany : StripeEntity /// directors_provided parameter. /// [JsonProperty("directors_provided")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("directors_provided")] +#endif public bool DirectorsProvided { get; set; } /// @@ -37,6 +52,9 @@ public class AccountCompany : StripeEntity /// executives were provided. /// [JsonProperty("executives_provided")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("executives_provided")] +#endif public bool ExecutivesProvided { get; set; } /// @@ -44,30 +62,45 @@ public class AccountCompany : StripeEntity /// only). /// [JsonProperty("export_license_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("export_license_id")] +#endif public string ExportLicenseId { get; set; } /// /// The purpose code to use for export transactions (India only). /// [JsonProperty("export_purpose_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("export_purpose_code")] +#endif public string ExportPurposeCode { get; set; } /// /// The company's legal name. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } /// /// The Kana variation of the company's legal name (Japan only). /// [JsonProperty("name_kana")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name_kana")] +#endif public string NameKana { get; set; } /// /// The Kanji variation of the company's legal name (Japan only). /// [JsonProperty("name_kanji")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name_kanji")] +#endif public string NameKanji { get; set; } /// @@ -80,6 +113,9 @@ public class AccountCompany : StripeEntity /// percent_ownership of each owner together). /// [JsonProperty("owners_provided")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("owners_provided")] +#endif public bool OwnersProvided { get; set; } /// @@ -87,12 +123,18 @@ public class AccountCompany : StripeEntity /// both current and correct. /// [JsonProperty("ownership_declaration")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ownership_declaration")] +#endif public AccountCompanyOwnershipDeclaration OwnershipDeclaration { get; set; } /// /// The company's phone number (used for verification). /// [JsonProperty("phone")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("phone")] +#endif public string Phone { get; set; } /// @@ -111,12 +153,18 @@ public class AccountCompany : StripeEntity /// unincorporated_partnership. /// [JsonProperty("structure")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("structure")] +#endif public string Structure { get; set; } /// /// Whether the company's business ID number was provided. /// [JsonProperty("tax_id_provided")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_id_provided")] +#endif public bool TaxIdProvided { get; set; } /// @@ -124,18 +172,27 @@ public class AccountCompany : StripeEntity /// only). /// [JsonProperty("tax_id_registrar")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_id_registrar")] +#endif public string TaxIdRegistrar { get; set; } /// /// Whether the company's business VAT number was provided. /// [JsonProperty("vat_id_provided")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("vat_id_provided")] +#endif public bool VatIdProvided { get; set; } /// /// Information on the verification state of the company. /// [JsonProperty("verification")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("verification")] +#endif public AccountCompanyVerification Verification { get; set; } } } diff --git a/src/Stripe.net/Entities/Accounts/AccountCompanyOwnershipDeclaration.cs b/src/Stripe.net/Entities/Accounts/AccountCompanyOwnershipDeclaration.cs index 56abe7cf78..35febcdef9 100644 --- a/src/Stripe.net/Entities/Accounts/AccountCompanyOwnershipDeclaration.cs +++ b/src/Stripe.net/Entities/Accounts/AccountCompanyOwnershipDeclaration.cs @@ -4,6 +4,9 @@ namespace Stripe using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountCompanyOwnershipDeclaration : StripeEntity { @@ -12,18 +15,28 @@ public class AccountCompanyOwnershipDeclaration : StripeEntity [JsonProperty("date")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("date")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? Date { get; set; } /// /// The IP address from which the beneficial owner attestation was made. /// [JsonProperty("ip")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ip")] +#endif public string Ip { get; set; } /// /// The user-agent string from the browser where the beneficial owner attestation was made. /// [JsonProperty("user_agent")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("user_agent")] +#endif public string UserAgent { get; set; } } } diff --git a/src/Stripe.net/Entities/Accounts/AccountCompanyVerification.cs b/src/Stripe.net/Entities/Accounts/AccountCompanyVerification.cs index e322ad0885..ad03c351e4 100644 --- a/src/Stripe.net/Entities/Accounts/AccountCompanyVerification.cs +++ b/src/Stripe.net/Entities/Accounts/AccountCompanyVerification.cs @@ -2,10 +2,16 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountCompanyVerification : StripeEntity { [JsonProperty("document")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("document")] +#endif public AccountCompanyVerificationDocument Document { get; set; } } } diff --git a/src/Stripe.net/Entities/Accounts/AccountCompanyVerificationDocument.cs b/src/Stripe.net/Entities/Accounts/AccountCompanyVerificationDocument.cs index e52c959c01..a86823f0e1 100644 --- a/src/Stripe.net/Entities/Accounts/AccountCompanyVerificationDocument.cs +++ b/src/Stripe.net/Entities/Accounts/AccountCompanyVerificationDocument.cs @@ -3,7 +3,13 @@ namespace Stripe { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class AccountCompanyVerificationDocument : StripeEntity { #region Expandable Back @@ -15,6 +21,9 @@ public class AccountCompanyVerificationDocument : StripeEntityadditional_verification. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string BackId { get => this.InternalBack?.Id; @@ -30,6 +39,9 @@ public string BackId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public File Back { get => this.InternalBack?.ExpandedObject; @@ -38,6 +50,10 @@ public File Back [JsonProperty("back")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("back")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalBack { get; set; } #endregion @@ -45,6 +61,9 @@ public File Back /// A user-displayable string describing the verification state of this document. /// [JsonProperty("details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("details")] +#endif public string Details { get; set; } /// @@ -57,6 +76,9 @@ public File Back /// code specifying the verification state for this document. /// [JsonProperty("details_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("details_code")] +#endif public string DetailsCode { get; set; } #region Expandable Front @@ -68,6 +90,9 @@ public File Back /// value of additional_verification. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string FrontId { get => this.InternalFront?.Id; @@ -83,6 +108,9 @@ public string FrontId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public File Front { get => this.InternalFront?.ExpandedObject; @@ -91,6 +119,10 @@ public File Front [JsonProperty("front")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("front")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalFront { get; set; } #endregion } diff --git a/src/Stripe.net/Entities/Accounts/AccountController.cs b/src/Stripe.net/Entities/Accounts/AccountController.cs index b79260bbed..fe8273fb13 100644 --- a/src/Stripe.net/Entities/Accounts/AccountController.cs +++ b/src/Stripe.net/Entities/Accounts/AccountController.cs @@ -2,10 +2,16 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountController : StripeEntity { [JsonProperty("fees")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fees")] +#endif public AccountControllerFees Fees { get; set; } /// @@ -15,9 +21,15 @@ public class AccountController : StripeEntity /// controls. Otherwise, this field is null. /// [JsonProperty("is_controller")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("is_controller")] +#endif public bool IsController { get; set; } [JsonProperty("losses")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("losses")] +#endif public AccountControllerLosses Losses { get; set; } /// @@ -26,9 +38,15 @@ public class AccountController : StripeEntity /// One of: application, or stripe. /// [JsonProperty("requirement_collection")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requirement_collection")] +#endif public string RequirementCollection { get; set; } [JsonProperty("stripe_dashboard")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("stripe_dashboard")] +#endif public AccountControllerStripeDashboard StripeDashboard { get; set; } /// @@ -37,6 +55,9 @@ public class AccountController : StripeEntity /// One of: account, or application. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Accounts/AccountControllerFees.cs b/src/Stripe.net/Entities/Accounts/AccountControllerFees.cs index d1500628d7..24175a75a9 100644 --- a/src/Stripe.net/Entities/Accounts/AccountControllerFees.cs +++ b/src/Stripe.net/Entities/Accounts/AccountControllerFees.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountControllerFees : StripeEntity { @@ -14,6 +17,9 @@ public class AccountControllerFees : StripeEntity /// application_express. /// [JsonProperty("payer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payer")] +#endif public string Payer { get; set; } } } diff --git a/src/Stripe.net/Entities/Accounts/AccountControllerLosses.cs b/src/Stripe.net/Entities/Accounts/AccountControllerLosses.cs index 62259213ac..67b316b256 100644 --- a/src/Stripe.net/Entities/Accounts/AccountControllerLosses.cs +++ b/src/Stripe.net/Entities/Accounts/AccountControllerLosses.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountControllerLosses : StripeEntity { @@ -11,6 +14,9 @@ public class AccountControllerLosses : StripeEntity /// One of: application, or stripe. /// [JsonProperty("payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payments")] +#endif public string Payments { get; set; } } } diff --git a/src/Stripe.net/Entities/Accounts/AccountControllerStripeDashboard.cs b/src/Stripe.net/Entities/Accounts/AccountControllerStripeDashboard.cs index 72bc2e7380..052d49943a 100644 --- a/src/Stripe.net/Entities/Accounts/AccountControllerStripeDashboard.cs +++ b/src/Stripe.net/Entities/Accounts/AccountControllerStripeDashboard.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountControllerStripeDashboard : StripeEntity { @@ -11,6 +14,9 @@ public class AccountControllerStripeDashboard : StripeEntityexpress, full, or none. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Accounts/AccountFutureRequirements.cs b/src/Stripe.net/Entities/Accounts/AccountFutureRequirements.cs index 88a30b094e..f2594c3ae9 100644 --- a/src/Stripe.net/Entities/Accounts/AccountFutureRequirements.cs +++ b/src/Stripe.net/Entities/Accounts/AccountFutureRequirements.cs @@ -5,6 +5,9 @@ namespace Stripe using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountFutureRequirements : StripeEntity { @@ -13,6 +16,9 @@ public class AccountFutureRequirements : StripeEntity /// fields instead. /// [JsonProperty("alternatives")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("alternatives")] +#endif public List Alternatives { get; set; } /// @@ -23,6 +29,10 @@ public class AccountFutureRequirements : StripeEntity /// [JsonProperty("current_deadline")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("current_deadline")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? CurrentDeadline { get; set; } /// @@ -31,6 +41,9 @@ public class AccountFutureRequirements : StripeEntity /// requirements hash. /// [JsonProperty("currently_due")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currently_due")] +#endif public List CurrentlyDue { get; set; } /// @@ -43,6 +56,9 @@ public class AccountFutureRequirements : StripeEntity /// requirements.pending_verification, or under_review. /// [JsonProperty("disabled_reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("disabled_reason")] +#endif public string DisabledReason { get; set; } /// @@ -50,6 +66,9 @@ public class AccountFutureRequirements : StripeEntity /// or verification failed. /// [JsonProperty("errors")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("errors")] +#endif public List Errors { get; set; } /// @@ -57,6 +76,9 @@ public class AccountFutureRequirements : StripeEntity /// become required, they appear in currently_due as well. /// [JsonProperty("eventually_due")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("eventually_due")] +#endif public List EventuallyDue { get; set; } /// @@ -66,6 +88,9 @@ public class AccountFutureRequirements : StripeEntity /// requirements.past_due. /// [JsonProperty("past_due")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("past_due")] +#endif public List PastDue { get; set; } /// @@ -77,6 +102,9 @@ public class AccountFutureRequirements : StripeEntity /// pending. /// [JsonProperty("pending_verification")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("pending_verification")] +#endif public List PendingVerification { get; set; } } } diff --git a/src/Stripe.net/Entities/Accounts/AccountFutureRequirementsAlternative.cs b/src/Stripe.net/Entities/Accounts/AccountFutureRequirementsAlternative.cs index 219510e264..0cafc95438 100644 --- a/src/Stripe.net/Entities/Accounts/AccountFutureRequirementsAlternative.cs +++ b/src/Stripe.net/Entities/Accounts/AccountFutureRequirementsAlternative.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountFutureRequirementsAlternative : StripeEntity { @@ -10,6 +13,9 @@ public class AccountFutureRequirementsAlternative : StripeEntityoriginal_fields_due. /// [JsonProperty("alternative_fields_due")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("alternative_fields_due")] +#endif public List AlternativeFieldsDue { get; set; } /// @@ -17,6 +23,9 @@ public class AccountFutureRequirementsAlternative : StripeEntityalternative_fields_due. /// [JsonProperty("original_fields_due")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("original_fields_due")] +#endif public List OriginalFieldsDue { get; set; } } } diff --git a/src/Stripe.net/Entities/Accounts/AccountFutureRequirementsError.cs b/src/Stripe.net/Entities/Accounts/AccountFutureRequirementsError.cs index dd8d1342f0..c5e8e112b8 100644 --- a/src/Stripe.net/Entities/Accounts/AccountFutureRequirementsError.cs +++ b/src/Stripe.net/Entities/Accounts/AccountFutureRequirementsError.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountFutureRequirementsError : StripeEntity { @@ -69,6 +72,9 @@ public class AccountFutureRequirementsError : StripeEntityverification_supportability. /// [JsonProperty("code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("code")] +#endif public string Code { get; set; } /// @@ -76,6 +82,9 @@ public class AccountFutureRequirementsError : StripeEntity [JsonProperty("reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reason")] +#endif public string Reason { get; set; } /// @@ -83,6 +92,9 @@ public class AccountFutureRequirementsError : StripeEntity [JsonProperty("requirement")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requirement")] +#endif public string Requirement { get; set; } } } diff --git a/src/Stripe.net/Entities/Accounts/AccountGroups.cs b/src/Stripe.net/Entities/Accounts/AccountGroups.cs index decfb24b42..5e4eb86f5b 100644 --- a/src/Stripe.net/Entities/Accounts/AccountGroups.cs +++ b/src/Stripe.net/Entities/Accounts/AccountGroups.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountGroups : StripeEntity { @@ -12,6 +15,9 @@ public class AccountGroups : StripeEntity /// tool documentation for details. /// [JsonProperty("payments_pricing")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payments_pricing")] +#endif public string PaymentsPricing { get; set; } } } diff --git a/src/Stripe.net/Entities/Accounts/AccountRequirements.cs b/src/Stripe.net/Entities/Accounts/AccountRequirements.cs index 508030f1ae..f981d132ee 100644 --- a/src/Stripe.net/Entities/Accounts/AccountRequirements.cs +++ b/src/Stripe.net/Entities/Accounts/AccountRequirements.cs @@ -5,6 +5,9 @@ namespace Stripe using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountRequirements : StripeEntity { @@ -13,6 +16,9 @@ public class AccountRequirements : StripeEntity /// fields instead. /// [JsonProperty("alternatives")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("alternatives")] +#endif public List Alternatives { get; set; } /// @@ -22,6 +28,10 @@ public class AccountRequirements : StripeEntity /// [JsonProperty("current_deadline")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("current_deadline")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? CurrentDeadline { get; set; } /// @@ -30,6 +40,9 @@ public class AccountRequirements : StripeEntity /// is disabled. /// [JsonProperty("currently_due")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currently_due")] +#endif public List CurrentlyDue { get; set; } /// @@ -44,6 +57,9 @@ public class AccountRequirements : StripeEntity /// requirements.pending_verification, or under_review. /// [JsonProperty("disabled_reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("disabled_reason")] +#endif public string DisabledReason { get; set; } /// @@ -51,6 +67,9 @@ public class AccountRequirements : StripeEntity /// or verification failed. /// [JsonProperty("errors")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("errors")] +#endif public List Errors { get; set; } /// @@ -59,6 +78,9 @@ public class AccountRequirements : StripeEntity /// current_deadline becomes set. /// [JsonProperty("eventually_due")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("eventually_due")] +#endif public List EventuallyDue { get; set; } /// @@ -66,6 +88,9 @@ public class AccountRequirements : StripeEntity /// collected to enable the account. /// [JsonProperty("past_due")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("past_due")] +#endif public List PastDue { get; set; } /// @@ -77,6 +102,9 @@ public class AccountRequirements : StripeEntity /// verification is still pending. /// [JsonProperty("pending_verification")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("pending_verification")] +#endif public List PendingVerification { get; set; } } } diff --git a/src/Stripe.net/Entities/Accounts/AccountRequirementsAlternative.cs b/src/Stripe.net/Entities/Accounts/AccountRequirementsAlternative.cs index 67417940d9..1a342f531d 100644 --- a/src/Stripe.net/Entities/Accounts/AccountRequirementsAlternative.cs +++ b/src/Stripe.net/Entities/Accounts/AccountRequirementsAlternative.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountRequirementsAlternative : StripeEntity { @@ -10,6 +13,9 @@ public class AccountRequirementsAlternative : StripeEntityoriginal_fields_due. /// [JsonProperty("alternative_fields_due")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("alternative_fields_due")] +#endif public List AlternativeFieldsDue { get; set; } /// @@ -17,6 +23,9 @@ public class AccountRequirementsAlternative : StripeEntityalternative_fields_due. /// [JsonProperty("original_fields_due")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("original_fields_due")] +#endif public List OriginalFieldsDue { get; set; } } } diff --git a/src/Stripe.net/Entities/Accounts/AccountRequirementsError.cs b/src/Stripe.net/Entities/Accounts/AccountRequirementsError.cs index cc1a2e6ffe..9367a9426a 100644 --- a/src/Stripe.net/Entities/Accounts/AccountRequirementsError.cs +++ b/src/Stripe.net/Entities/Accounts/AccountRequirementsError.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountRequirementsError : StripeEntity { @@ -69,6 +72,9 @@ public class AccountRequirementsError : StripeEntity /// verification_supportability. /// [JsonProperty("code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("code")] +#endif public string Code { get; set; } /// @@ -76,6 +82,9 @@ public class AccountRequirementsError : StripeEntity /// about the error. /// [JsonProperty("reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reason")] +#endif public string Reason { get; set; } /// @@ -83,6 +92,9 @@ public class AccountRequirementsError : StripeEntity /// be resolved. /// [JsonProperty("requirement")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requirement")] +#endif public string Requirement { get; set; } } } diff --git a/src/Stripe.net/Entities/Accounts/AccountSettings.cs b/src/Stripe.net/Entities/Accounts/AccountSettings.cs index 64d82493ab..43b9443f38 100644 --- a/src/Stripe.net/Entities/Accounts/AccountSettings.cs +++ b/src/Stripe.net/Entities/Accounts/AccountSettings.cs @@ -2,37 +2,70 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountSettings : StripeEntity { [JsonProperty("bacs_debit_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bacs_debit_payments")] +#endif public AccountSettingsBacsDebitPayments BacsDebitPayments { get; set; } [JsonProperty("branding")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("branding")] +#endif public AccountSettingsBranding Branding { get; set; } [JsonProperty("card_issuing")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card_issuing")] +#endif public AccountSettingsCardIssuing CardIssuing { get; set; } [JsonProperty("card_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card_payments")] +#endif public AccountSettingsCardPayments CardPayments { get; set; } [JsonProperty("dashboard")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("dashboard")] +#endif public AccountSettingsDashboard Dashboard { get; set; } [JsonProperty("invoices")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("invoices")] +#endif public AccountSettingsInvoices Invoices { get; set; } [JsonProperty("payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payments")] +#endif public AccountSettingsPayments Payments { get; set; } [JsonProperty("payouts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payouts")] +#endif public AccountSettingsPayouts Payouts { get; set; } [JsonProperty("sepa_debit_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sepa_debit_payments")] +#endif public AccountSettingsSepaDebitPayments SepaDebitPayments { get; set; } [JsonProperty("treasury")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("treasury")] +#endif public AccountSettingsTreasury Treasury { get; set; } } } diff --git a/src/Stripe.net/Entities/Accounts/AccountSettingsBacsDebitPayments.cs b/src/Stripe.net/Entities/Accounts/AccountSettingsBacsDebitPayments.cs index f2cd4c8147..f3eb0dce88 100644 --- a/src/Stripe.net/Entities/Accounts/AccountSettingsBacsDebitPayments.cs +++ b/src/Stripe.net/Entities/Accounts/AccountSettingsBacsDebitPayments.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountSettingsBacsDebitPayments : StripeEntity { @@ -15,6 +18,9 @@ public class AccountSettingsBacsDebitPayments : StripeEntity [JsonProperty("display_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_name")] +#endif public string DisplayName { get; set; } /// @@ -23,6 +29,9 @@ public class AccountSettingsBacsDebitPayments : StripeEntity [JsonProperty("service_user_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("service_user_number")] +#endif public string ServiceUserNumber { get; set; } } } diff --git a/src/Stripe.net/Entities/Accounts/AccountSettingsBranding.cs b/src/Stripe.net/Entities/Accounts/AccountSettingsBranding.cs index b4343a9246..89ac1de501 100644 --- a/src/Stripe.net/Entities/Accounts/AccountSettingsBranding.cs +++ b/src/Stripe.net/Entities/Accounts/AccountSettingsBranding.cs @@ -3,7 +3,13 @@ namespace Stripe { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class AccountSettingsBranding : StripeEntity { #region Expandable Icon @@ -14,6 +20,9 @@ public class AccountSettingsBranding : StripeEntity /// for the account. Must be square and at least 128px x 128px. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string IconId { get => this.InternalIcon?.Id; @@ -28,6 +37,9 @@ public string IconId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public File Icon { get => this.InternalIcon?.ExpandedObject; @@ -36,6 +48,10 @@ public File Icon [JsonProperty("icon")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("icon")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalIcon { get; set; } #endregion @@ -48,6 +64,9 @@ public File Icon /// account's name next to it if provided. Must be at least 128px x 128px. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string LogoId { get => this.InternalLogo?.Id; @@ -63,6 +82,9 @@ public string LogoId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public File Logo { get => this.InternalLogo?.ExpandedObject; @@ -71,6 +93,10 @@ public File Logo [JsonProperty("logo")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("logo")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalLogo { get; set; } #endregion @@ -78,12 +104,18 @@ public File Logo /// A CSS hex color value representing the primary branding color for this account. /// [JsonProperty("primary_color")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("primary_color")] +#endif public string PrimaryColor { get; set; } /// /// A CSS hex color value representing the secondary branding color for this account. /// [JsonProperty("secondary_color")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("secondary_color")] +#endif public string SecondaryColor { get; set; } } } diff --git a/src/Stripe.net/Entities/Accounts/AccountSettingsCardIssuing.cs b/src/Stripe.net/Entities/Accounts/AccountSettingsCardIssuing.cs index 9710876a00..5e1629d04a 100644 --- a/src/Stripe.net/Entities/Accounts/AccountSettingsCardIssuing.cs +++ b/src/Stripe.net/Entities/Accounts/AccountSettingsCardIssuing.cs @@ -2,10 +2,16 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountSettingsCardIssuing : StripeEntity { [JsonProperty("tos_acceptance")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tos_acceptance")] +#endif public AccountSettingsCardIssuingTosAcceptance TosAcceptance { get; set; } } } diff --git a/src/Stripe.net/Entities/Accounts/AccountSettingsCardIssuingTosAcceptance.cs b/src/Stripe.net/Entities/Accounts/AccountSettingsCardIssuingTosAcceptance.cs index 9f3581805d..d9f4661809 100644 --- a/src/Stripe.net/Entities/Accounts/AccountSettingsCardIssuingTosAcceptance.cs +++ b/src/Stripe.net/Entities/Accounts/AccountSettingsCardIssuingTosAcceptance.cs @@ -4,6 +4,9 @@ namespace Stripe using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountSettingsCardIssuingTosAcceptance : StripeEntity { @@ -13,12 +16,19 @@ public class AccountSettingsCardIssuingTosAcceptance : StripeEntity [JsonProperty("date")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("date")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? Date { get; set; } /// /// The IP address from which the account representative accepted the service agreement. /// [JsonProperty("ip")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ip")] +#endif public string Ip { get; set; } /// @@ -26,6 +36,9 @@ public class AccountSettingsCardIssuingTosAcceptance : StripeEntity [JsonProperty("user_agent")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("user_agent")] +#endif public string UserAgent { get; set; } } } diff --git a/src/Stripe.net/Entities/Accounts/AccountSettingsCardPayments.cs b/src/Stripe.net/Entities/Accounts/AccountSettingsCardPayments.cs index 32a0fa2681..4c2fdd2f60 100644 --- a/src/Stripe.net/Entities/Accounts/AccountSettingsCardPayments.cs +++ b/src/Stripe.net/Entities/Accounts/AccountSettingsCardPayments.cs @@ -2,10 +2,16 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountSettingsCardPayments : StripeEntity { [JsonProperty("decline_on")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("decline_on")] +#endif public AccountSettingsDeclineOn DeclineOn { get; set; } /// @@ -15,6 +21,9 @@ public class AccountSettingsCardPayments : StripeEntity [JsonProperty("statement_descriptor_prefix")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("statement_descriptor_prefix")] +#endif public string StatementDescriptorPrefix { get; set; } /// @@ -25,6 +34,9 @@ public class AccountSettingsCardPayments : StripeEntity [JsonProperty("statement_descriptor_prefix_kana")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("statement_descriptor_prefix_kana")] +#endif public string StatementDescriptorPrefixKana { get; set; } /// @@ -35,6 +47,9 @@ public class AccountSettingsCardPayments : StripeEntity [JsonProperty("statement_descriptor_prefix_kanji")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("statement_descriptor_prefix_kanji")] +#endif public string StatementDescriptorPrefixKanji { get; set; } } } diff --git a/src/Stripe.net/Entities/Accounts/AccountSettingsDashboard.cs b/src/Stripe.net/Entities/Accounts/AccountSettingsDashboard.cs index 73da60b8d9..9f5b923011 100644 --- a/src/Stripe.net/Entities/Accounts/AccountSettingsDashboard.cs +++ b/src/Stripe.net/Entities/Accounts/AccountSettingsDashboard.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountSettingsDashboard : StripeEntity { @@ -10,6 +13,9 @@ public class AccountSettingsDashboard : StripeEntity /// between accounts. /// [JsonProperty("display_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_name")] +#endif public string DisplayName { get; set; } /// @@ -18,6 +24,9 @@ public class AccountSettingsDashboard : StripeEntity /// Database. /// [JsonProperty("timezone")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("timezone")] +#endif public string Timezone { get; set; } } } diff --git a/src/Stripe.net/Entities/Accounts/AccountSettingsInvoices.cs b/src/Stripe.net/Entities/Accounts/AccountSettingsInvoices.cs index 3037466ea0..c67803874d 100644 --- a/src/Stripe.net/Entities/Accounts/AccountSettingsInvoices.cs +++ b/src/Stripe.net/Entities/Accounts/AccountSettingsInvoices.cs @@ -5,7 +5,13 @@ namespace Stripe using System.Linq; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class AccountSettingsInvoices : StripeEntity { #region Expandable DefaultAccountTaxIds @@ -16,6 +22,9 @@ public class AccountSettingsInvoices : StripeEntity /// IDs get added when an invoice is finalized. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public List DefaultAccountTaxIdIds { get => this.InternalDefaultAccountTaxIds?.Select((x) => x.Id).ToList(); @@ -30,6 +39,9 @@ public List DefaultAccountTaxIdIds /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public List DefaultAccountTaxIds { get => this.InternalDefaultAccountTaxIds?.Select((x) => x.ExpandedObject).ToList(); @@ -37,6 +49,9 @@ public List DefaultAccountTaxIds } [JsonProperty("default_account_tax_ids", ItemConverterType = typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("default_account_tax_ids")] +#endif internal List> InternalDefaultAccountTaxIds { get; set; } #endregion } diff --git a/src/Stripe.net/Entities/Accounts/AccountSettingsPayments.cs b/src/Stripe.net/Entities/Accounts/AccountSettingsPayments.cs index efda8893f0..c8379c5e9e 100644 --- a/src/Stripe.net/Entities/Accounts/AccountSettingsPayments.cs +++ b/src/Stripe.net/Entities/Accounts/AccountSettingsPayments.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountSettingsPayments : StripeEntity { @@ -10,6 +13,9 @@ public class AccountSettingsPayments : StripeEntity /// field prefixes any dynamic statement_descriptor specified on the charge. /// [JsonProperty("statement_descriptor")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("statement_descriptor")] +#endif public string StatementDescriptor { get; set; } /// @@ -19,6 +25,9 @@ public class AccountSettingsPayments : StripeEntity /// requirements. /// [JsonProperty("statement_descriptor_kana")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("statement_descriptor_kana")] +#endif public string StatementDescriptorKana { get; set; } /// @@ -28,6 +37,9 @@ public class AccountSettingsPayments : StripeEntity /// requirements. /// [JsonProperty("statement_descriptor_kanji")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("statement_descriptor_kanji")] +#endif public string StatementDescriptorKanji { get; set; } /// @@ -37,6 +49,9 @@ public class AccountSettingsPayments : StripeEntity /// requirements. /// [JsonProperty("statement_descriptor_prefix_kana")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("statement_descriptor_prefix_kana")] +#endif public string StatementDescriptorPrefixKana { get; set; } /// @@ -46,6 +61,9 @@ public class AccountSettingsPayments : StripeEntity /// requirements. /// [JsonProperty("statement_descriptor_prefix_kanji")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("statement_descriptor_prefix_kanji")] +#endif public string StatementDescriptorPrefixKanji { get; set; } } } diff --git a/src/Stripe.net/Entities/Accounts/AccountSettingsPayouts.cs b/src/Stripe.net/Entities/Accounts/AccountSettingsPayouts.cs index df4864c76c..7a136a1503 100644 --- a/src/Stripe.net/Entities/Accounts/AccountSettingsPayouts.cs +++ b/src/Stripe.net/Entities/Accounts/AccountSettingsPayouts.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountSettingsPayouts : StripeEntity { @@ -13,9 +16,15 @@ public class AccountSettingsPayouts : StripeEntity /// is application, which includes Custom accounts, otherwise true. /// [JsonProperty("debit_negative_balances")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("debit_negative_balances")] +#endif public bool DebitNegativeBalances { get; set; } [JsonProperty("schedule")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("schedule")] +#endif public AccountSettingsPayoutsSchedule Schedule { get; set; } /// @@ -23,6 +32,9 @@ public class AccountSettingsPayouts : StripeEntity /// defaults to the platform's bank descriptor as set in the Dashboard. /// [JsonProperty("statement_descriptor")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("statement_descriptor")] +#endif public string StatementDescriptor { get; set; } } } diff --git a/src/Stripe.net/Entities/Accounts/AccountSettingsPayoutsSchedule.cs b/src/Stripe.net/Entities/Accounts/AccountSettingsPayoutsSchedule.cs index 903478c236..1161bb7c55 100644 --- a/src/Stripe.net/Entities/Accounts/AccountSettingsPayoutsSchedule.cs +++ b/src/Stripe.net/Entities/Accounts/AccountSettingsPayoutsSchedule.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountSettingsPayoutsSchedule : StripeEntity { @@ -9,6 +12,9 @@ public class AccountSettingsPayoutsSchedule : StripeEntity [JsonProperty("delay_days")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("delay_days")] +#endif public long DelayDays { get; set; } /// @@ -16,6 +22,9 @@ public class AccountSettingsPayoutsSchedule : StripeEntitydaily, weekly, or monthly. /// [JsonProperty("interval")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interval")] +#endif public string Interval { get; set; } /// @@ -24,6 +33,9 @@ public class AccountSettingsPayoutsSchedule : StripeEntity [JsonProperty("monthly_anchor")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("monthly_anchor")] +#endif public long MonthlyAnchor { get; set; } /// @@ -31,6 +43,9 @@ public class AccountSettingsPayoutsSchedule : StripeEntityinterval is weekly. /// [JsonProperty("weekly_anchor")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("weekly_anchor")] +#endif public string WeeklyAnchor { get; set; } } } diff --git a/src/Stripe.net/Entities/Accounts/AccountSettingsSepaDebitPayments.cs b/src/Stripe.net/Entities/Accounts/AccountSettingsSepaDebitPayments.cs index f828800df0..080f30a9f6 100644 --- a/src/Stripe.net/Entities/Accounts/AccountSettingsSepaDebitPayments.cs +++ b/src/Stripe.net/Entities/Accounts/AccountSettingsSepaDebitPayments.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountSettingsSepaDebitPayments : StripeEntity { @@ -9,6 +12,9 @@ public class AccountSettingsSepaDebitPayments : StripeEntity [JsonProperty("creditor_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("creditor_id")] +#endif public string CreditorId { get; set; } } } diff --git a/src/Stripe.net/Entities/Accounts/AccountSettingsTreasury.cs b/src/Stripe.net/Entities/Accounts/AccountSettingsTreasury.cs index 0b8b1193ba..0e9f8fe90a 100644 --- a/src/Stripe.net/Entities/Accounts/AccountSettingsTreasury.cs +++ b/src/Stripe.net/Entities/Accounts/AccountSettingsTreasury.cs @@ -2,10 +2,16 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountSettingsTreasury : StripeEntity { [JsonProperty("tos_acceptance")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tos_acceptance")] +#endif public AccountSettingsTreasuryTosAcceptance TosAcceptance { get; set; } } } diff --git a/src/Stripe.net/Entities/Accounts/AccountSettingsTreasuryTosAcceptance.cs b/src/Stripe.net/Entities/Accounts/AccountSettingsTreasuryTosAcceptance.cs index b17cba9f54..9c5c1654aa 100644 --- a/src/Stripe.net/Entities/Accounts/AccountSettingsTreasuryTosAcceptance.cs +++ b/src/Stripe.net/Entities/Accounts/AccountSettingsTreasuryTosAcceptance.cs @@ -4,6 +4,9 @@ namespace Stripe using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountSettingsTreasuryTosAcceptance : StripeEntity { @@ -13,12 +16,19 @@ public class AccountSettingsTreasuryTosAcceptance : StripeEntity [JsonProperty("date")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("date")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? Date { get; set; } /// /// The IP address from which the account representative accepted the service agreement. /// [JsonProperty("ip")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ip")] +#endif public string Ip { get; set; } /// @@ -26,6 +36,9 @@ public class AccountSettingsTreasuryTosAcceptance : StripeEntity [JsonProperty("user_agent")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("user_agent")] +#endif public string UserAgent { get; set; } } } diff --git a/src/Stripe.net/Entities/Accounts/AccountTosAcceptance.cs b/src/Stripe.net/Entities/Accounts/AccountTosAcceptance.cs index d4fd7e9495..480091714a 100644 --- a/src/Stripe.net/Entities/Accounts/AccountTosAcceptance.cs +++ b/src/Stripe.net/Entities/Accounts/AccountTosAcceptance.cs @@ -4,6 +4,9 @@ namespace Stripe using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountTosAcceptance : StripeEntity { @@ -13,18 +16,28 @@ public class AccountTosAcceptance : StripeEntity /// [JsonProperty("date")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("date")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? Date { get; set; } /// /// The IP address from which the account representative accepted their service agreement. /// [JsonProperty("ip")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ip")] +#endif public string Ip { get; set; } /// /// The user's service agreement type. /// [JsonProperty("service_agreement")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("service_agreement")] +#endif public string ServiceAgreement { get; set; } /// @@ -32,6 +45,9 @@ public class AccountTosAcceptance : StripeEntity /// service agreement. /// [JsonProperty("user_agent")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("user_agent")] +#endif public string UserAgent { get; set; } } } diff --git a/src/Stripe.net/Entities/ApplePayDomains/ApplePayDomain.cs b/src/Stripe.net/Entities/ApplePayDomains/ApplePayDomain.cs index 2261b97b7a..6dde6e4204 100644 --- a/src/Stripe.net/Entities/ApplePayDomains/ApplePayDomain.cs +++ b/src/Stripe.net/Entities/ApplePayDomains/ApplePayDomain.cs @@ -4,6 +4,9 @@ namespace Stripe using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ApplePayDomain : StripeEntity, IHasId, IHasObject { @@ -11,12 +14,18 @@ public class ApplePayDomain : StripeEntity, IHasId, IHasObject /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// @@ -24,15 +33,26 @@ public class ApplePayDomain : StripeEntity, IHasId, IHasObject /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// /// Whether this object is deleted or not. /// [JsonProperty("deleted", NullValueHandling = NullValueHandling.Ignore)] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("deleted")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] +#endif public bool? Deleted { get; set; } [JsonProperty("domain_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("domain_name")] +#endif public string DomainName { get; set; } /// @@ -40,6 +60,9 @@ public class ApplePayDomain : StripeEntity, IHasId, IHasObject /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } } } diff --git a/src/Stripe.net/Entities/ApplicationFeeRefunds/ApplicationFeeRefund.cs b/src/Stripe.net/Entities/ApplicationFeeRefunds/ApplicationFeeRefund.cs index 83c622c089..f1665caa38 100644 --- a/src/Stripe.net/Entities/ApplicationFeeRefunds/ApplicationFeeRefund.cs +++ b/src/Stripe.net/Entities/ApplicationFeeRefunds/ApplicationFeeRefund.cs @@ -5,6 +5,9 @@ namespace Stripe using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// Application Fee Refund objects allow you to refund an application fee that has @@ -15,24 +18,36 @@ namespace Stripe /// href="https://stripe.com/docs/connect/destination-charges#refunding-app-fee">Refunding /// application fees. /// +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class ApplicationFeeRefund : StripeEntity, IHasId, IHasMetadata, IHasObject, IBalanceTransactionSource { /// /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// /// Amount, in cents (or local equivalent). /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long Amount { get; set; } #region Expandable BalanceTransaction @@ -42,6 +57,9 @@ public class ApplicationFeeRefund : StripeEntity, IHasId, /// Balance transaction that describes the impact on your account balance. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string BalanceTransactionId { get => this.InternalBalanceTransaction?.Id; @@ -55,6 +73,9 @@ public string BalanceTransactionId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public BalanceTransaction BalanceTransaction { get => this.InternalBalanceTransaction?.ExpandedObject; @@ -63,6 +84,10 @@ public BalanceTransaction BalanceTransaction [JsonProperty("balance_transaction")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("balance_transaction")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalBalanceTransaction { get; set; } #endregion @@ -71,6 +96,10 @@ public BalanceTransaction BalanceTransaction /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -79,6 +108,9 @@ public BalanceTransaction BalanceTransaction /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } #region Expandable Fee @@ -88,6 +120,9 @@ public BalanceTransaction BalanceTransaction /// ID of the application fee that was refunded. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string FeeId { get => this.InternalFee?.Id; @@ -101,6 +136,9 @@ public string FeeId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public ApplicationFee Fee { get => this.InternalFee?.ExpandedObject; @@ -109,6 +147,10 @@ public ApplicationFee Fee [JsonProperty("fee")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fee")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalFee { get; set; } #endregion @@ -118,6 +160,9 @@ public ApplicationFee Fee /// object in a structured format. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } } } diff --git a/src/Stripe.net/Entities/ApplicationFees/ApplicationFee.cs b/src/Stripe.net/Entities/ApplicationFees/ApplicationFee.cs index 065681896d..b70c237f0e 100644 --- a/src/Stripe.net/Entities/ApplicationFees/ApplicationFee.cs +++ b/src/Stripe.net/Entities/ApplicationFees/ApplicationFee.cs @@ -4,19 +4,31 @@ namespace Stripe using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class ApplicationFee : StripeEntity, IHasId, IHasObject, IBalanceTransactionSource { /// /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } #region Expandable Account @@ -26,6 +38,9 @@ public class ApplicationFee : StripeEntity, IHasId, IHasObject, /// ID of the Stripe account this fee was taken from. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string AccountId { get => this.InternalAccount?.Id; @@ -39,6 +54,9 @@ public string AccountId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Account Account { get => this.InternalAccount?.ExpandedObject; @@ -47,6 +65,10 @@ public Account Account [JsonProperty("account")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalAccount { get; set; } #endregion @@ -54,6 +76,9 @@ public Account Account /// Amount earned, in cents (or local equivalent). /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long Amount { get; set; } /// @@ -61,6 +86,9 @@ public Account Account /// the fee if a partial refund was issued). /// [JsonProperty("amount_refunded")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_refunded")] +#endif public long AmountRefunded { get; set; } #region Expandable Application @@ -70,6 +98,9 @@ public Account Account /// ID of the Connect application that earned the fee. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string ApplicationId { get => this.InternalApplication?.Id; @@ -83,6 +114,9 @@ public string ApplicationId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Application Application { get => this.InternalApplication?.ExpandedObject; @@ -91,6 +125,10 @@ public Application Application [JsonProperty("application")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("application")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalApplication { get; set; } #endregion @@ -102,6 +140,9 @@ public Application Application /// account balance (not including refunds). /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string BalanceTransactionId { get => this.InternalBalanceTransaction?.Id; @@ -116,6 +157,9 @@ public string BalanceTransactionId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public BalanceTransaction BalanceTransaction { get => this.InternalBalanceTransaction?.ExpandedObject; @@ -124,6 +168,10 @@ public BalanceTransaction BalanceTransaction [JsonProperty("balance_transaction")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("balance_transaction")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalBalanceTransaction { get; set; } #endregion @@ -134,6 +182,9 @@ public BalanceTransaction BalanceTransaction /// ID of the charge that the application fee was taken from. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string ChargeId { get => this.InternalCharge?.Id; @@ -147,6 +198,9 @@ public string ChargeId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Charge Charge { get => this.InternalCharge?.ExpandedObject; @@ -155,6 +209,10 @@ public Charge Charge [JsonProperty("charge")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("charge")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalCharge { get; set; } #endregion @@ -163,6 +221,10 @@ public Charge Charge /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -171,6 +233,9 @@ public Charge Charge /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// @@ -178,6 +243,9 @@ public Charge Charge /// fee was created from. /// [JsonProperty("fee_source")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fee_source")] +#endif public ApplicationFeeFeeSource FeeSource { get; set; } /// @@ -185,6 +253,9 @@ public Charge Charge /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } #region Expandable OriginatingTransaction @@ -195,6 +266,9 @@ public Charge Charge /// charge using the destination parameter. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string OriginatingTransactionId { get => this.InternalOriginatingTransaction?.Id; @@ -209,6 +283,9 @@ public string OriginatingTransactionId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Charge OriginatingTransaction { get => this.InternalOriginatingTransaction?.ExpandedObject; @@ -217,6 +294,10 @@ public Charge OriginatingTransaction [JsonProperty("originating_transaction")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("originating_transaction")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalOriginatingTransaction { get; set; } #endregion @@ -225,12 +306,18 @@ public Charge OriginatingTransaction /// attribute will still be false. /// [JsonProperty("refunded")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("refunded")] +#endif public bool Refunded { get; set; } /// /// A list of refunds that have been applied to the fee. /// [JsonProperty("refunds")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("refunds")] +#endif public StripeList Refunds { get; set; } } } diff --git a/src/Stripe.net/Entities/ApplicationFees/ApplicationFeeFeeSource.cs b/src/Stripe.net/Entities/ApplicationFees/ApplicationFeeFeeSource.cs index 8f246b2dfd..3234bc6ccd 100644 --- a/src/Stripe.net/Entities/ApplicationFees/ApplicationFeeFeeSource.cs +++ b/src/Stripe.net/Entities/ApplicationFees/ApplicationFeeFeeSource.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ApplicationFeeFeeSource : StripeEntity { @@ -9,12 +12,18 @@ public class ApplicationFeeFeeSource : StripeEntity /// Charge ID that created this application fee. /// [JsonProperty("charge")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("charge")] +#endif public string Charge { get; set; } /// /// Payout ID that created this application fee. /// [JsonProperty("payout")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payout")] +#endif public string Payout { get; set; } /// @@ -22,6 +31,9 @@ public class ApplicationFeeFeeSource : StripeEntity /// One of: charge, or payout. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Applications/Application.cs b/src/Stripe.net/Entities/Applications/Application.cs index f525c48c6f..fa99bcc73e 100644 --- a/src/Stripe.net/Entities/Applications/Application.cs +++ b/src/Stripe.net/Entities/Applications/Application.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class Application : StripeEntity, IHasId, IHasObject { @@ -9,24 +12,37 @@ public class Application : StripeEntity, IHasId, IHasObject /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// /// Whether this object is deleted or not. /// [JsonProperty("deleted", NullValueHandling = NullValueHandling.Ignore)] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("deleted")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] +#endif public bool? Deleted { get; set; } /// /// The name of the application. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } } } diff --git a/src/Stripe.net/Entities/Apps/Secrets/Secret.cs b/src/Stripe.net/Entities/Apps/Secrets/Secret.cs index bc93ce8b5c..a9120c282b 100644 --- a/src/Stripe.net/Entities/Apps/Secrets/Secret.cs +++ b/src/Stripe.net/Entities/Apps/Secrets/Secret.cs @@ -4,6 +4,9 @@ namespace Stripe.Apps using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// Secret Store is an API that allows Stripe Apps developers to securely persist secrets @@ -30,12 +33,18 @@ public class Secret : StripeEntity, IHasId, IHasObject /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// @@ -43,12 +52,19 @@ public class Secret : StripeEntity, IHasId, IHasObject /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// /// If true, indicates that this secret has been deleted. /// [JsonProperty("deleted", NullValueHandling = NullValueHandling.Ignore)] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("deleted")] +#endif public bool Deleted { get; set; } /// @@ -56,6 +72,10 @@ public class Secret : StripeEntity, IHasId, IHasObject /// [JsonProperty("expires_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("expires_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? ExpiresAt { get; set; } /// @@ -63,21 +83,33 @@ public class Secret : StripeEntity, IHasId, IHasObject /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// /// A name for the secret that's unique within the scope. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } /// /// The plaintext secret value to be stored. /// [JsonProperty("payload")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payload")] +#endif public string Payload { get; set; } [JsonProperty("scope")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("scope")] +#endif public SecretScope Scope { get; set; } } } diff --git a/src/Stripe.net/Entities/Apps/Secrets/SecretScope.cs b/src/Stripe.net/Entities/Apps/Secrets/SecretScope.cs index 9343fe46e8..fc8fa5b3ea 100644 --- a/src/Stripe.net/Entities/Apps/Secrets/SecretScope.cs +++ b/src/Stripe.net/Entities/Apps/Secrets/SecretScope.cs @@ -2,6 +2,9 @@ namespace Stripe.Apps { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SecretScope : StripeEntity { @@ -10,12 +13,18 @@ public class SecretScope : StripeEntity /// One of: account, or user. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } /// /// The user ID, if type is set to "user". /// [JsonProperty("user")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("user")] +#endif public string User { get; set; } } } diff --git a/src/Stripe.net/Entities/BalanceTransactions/BalanceTransaction.cs b/src/Stripe.net/Entities/BalanceTransactions/BalanceTransaction.cs index d56c4bfa20..52c4ff836d 100644 --- a/src/Stripe.net/Entities/BalanceTransactions/BalanceTransaction.cs +++ b/src/Stripe.net/Entities/BalanceTransactions/BalanceTransaction.cs @@ -5,6 +5,9 @@ namespace Stripe using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// Balance transactions represent funds moving through your Stripe account. Stripe creates @@ -14,18 +17,27 @@ namespace Stripe /// href="https://stripe.com/docs/reports/balance-transaction-types">Balance transaction /// types. /// +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class BalanceTransaction : StripeEntity, IHasId, IHasObject { /// /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// @@ -34,6 +46,9 @@ public class BalanceTransaction : StripeEntity, IHasId, IHas /// another party. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long Amount { get; set; } /// @@ -41,6 +56,10 @@ public class BalanceTransaction : StripeEntity, IHasId, IHas /// [JsonProperty("available_on")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("available_on")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime AvailableOn { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -48,6 +67,10 @@ public class BalanceTransaction : StripeEntity, IHasId, IHas /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -56,12 +79,18 @@ public class BalanceTransaction : StripeEntity, IHasId, IHas /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// /// An arbitrary string attached to the object. Often useful for displaying to users. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// @@ -74,6 +103,9 @@ public class BalanceTransaction : StripeEntity, IHasId, IHas /// and the exchange_rate is 1.234. /// [JsonProperty("exchange_rate")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("exchange_rate")] +#endif public decimal? ExchangeRate { get; set; } /// @@ -81,12 +113,18 @@ public class BalanceTransaction : StripeEntity, IHasId, IHas /// positive integer when assessed. /// [JsonProperty("fee")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fee")] +#endif public long Fee { get; set; } /// /// Detailed breakdown of fees (in cents (or local equivalent)) paid for this transaction. /// [JsonProperty("fee_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fee_details")] +#endif public List FeeDetails { get; set; } /// @@ -96,6 +134,9 @@ public class BalanceTransaction : StripeEntity, IHasId, IHas /// - fee. /// [JsonProperty("net")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("net")] +#endif public long Net { get; set; } /// @@ -104,6 +145,9 @@ public class BalanceTransaction : StripeEntity, IHasId, IHas /// help you understand balance transactions from an accounting perspective. /// [JsonProperty("reporting_category")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reporting_category")] +#endif public string ReportingCategory { get; set; } #region Expandable Source @@ -113,6 +157,9 @@ public class BalanceTransaction : StripeEntity, IHasId, IHas /// This transaction relates to the Stripe object. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string SourceId { get => this.InternalSource?.Id; @@ -126,6 +173,9 @@ public string SourceId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public IBalanceTransactionSource Source { get => this.InternalSource?.ExpandedObject; @@ -134,6 +184,10 @@ public IBalanceTransactionSource Source [JsonProperty("source")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("source")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalSource { get; set; } #endregion @@ -142,6 +196,9 @@ public IBalanceTransactionSource Source /// available or pending. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } /// @@ -178,6 +235,9 @@ public IBalanceTransactionSource Source /// or transfer_refund. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/BalanceTransactions/BalanceTransactionFeeDetail.cs b/src/Stripe.net/Entities/BalanceTransactions/BalanceTransactionFeeDetail.cs index a6251f8a1a..65a604fc13 100644 --- a/src/Stripe.net/Entities/BalanceTransactions/BalanceTransactionFeeDetail.cs +++ b/src/Stripe.net/Entities/BalanceTransactions/BalanceTransactionFeeDetail.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class BalanceTransactionFeeDetail : StripeEntity { @@ -9,12 +12,18 @@ public class BalanceTransactionFeeDetail : StripeEntity [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long Amount { get; set; } /// /// ID of the Connect application that earned the fee. /// [JsonProperty("application")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("application")] +#endif public string Application { get; set; } /// @@ -23,12 +32,18 @@ public class BalanceTransactionFeeDetail : StripeEntity. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// /// An arbitrary string attached to the object. Often useful for displaying to users. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// @@ -36,6 +51,9 @@ public class BalanceTransactionFeeDetail : StripeEntitystripe_fee or tax. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Balances/Balance.cs b/src/Stripe.net/Entities/Balances/Balance.cs index 8eef1b78bc..00d97fdb2e 100644 --- a/src/Stripe.net/Entities/Balances/Balance.cs +++ b/src/Stripe.net/Entities/Balances/Balance.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// This is an object representing your Stripe balance. You can retrieve it to see the @@ -24,6 +27,9 @@ public class Balance : StripeEntity, IHasObject /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// @@ -33,6 +39,9 @@ public class Balance : StripeEntity, IHasObject /// balance for each currency and payment type in the source_types property. /// [JsonProperty("available")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("available")] +#endif public List Available { get; set; } /// @@ -42,15 +51,24 @@ public class Balance : StripeEntity, IHasObject /// balance for each currency and payment type in the source_types property. /// [JsonProperty("connect_reserved")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("connect_reserved")] +#endif public List ConnectReserved { get; set; } /// /// Funds that you can pay out using Instant Payouts. /// [JsonProperty("instant_available")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("instant_available")] +#endif public List InstantAvailable { get; set; } [JsonProperty("issuing")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("issuing")] +#endif public BalanceIssuing Issuing { get; set; } /// @@ -58,6 +76,9 @@ public class Balance : StripeEntity, IHasObject /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// @@ -65,6 +86,9 @@ public class Balance : StripeEntity, IHasObject /// each currency and each payment type in the source_types property. /// [JsonProperty("pending")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("pending")] +#endif public List Pending { get; set; } } } diff --git a/src/Stripe.net/Entities/Balances/BalanceInstantAvailable.cs b/src/Stripe.net/Entities/Balances/BalanceInstantAvailable.cs index c04ad1cf5a..06665afa66 100644 --- a/src/Stripe.net/Entities/Balances/BalanceInstantAvailable.cs +++ b/src/Stripe.net/Entities/Balances/BalanceInstantAvailable.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class BalanceInstantAvailable : StripeEntity { @@ -10,6 +13,9 @@ public class BalanceInstantAvailable : StripeEntity /// Balance amount. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long Amount { get; set; } /// @@ -18,15 +24,24 @@ public class BalanceInstantAvailable : StripeEntity /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// /// Breakdown of balance by destination. /// [JsonProperty("net_available")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("net_available")] +#endif public List NetAvailable { get; set; } [JsonProperty("source_types")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("source_types")] +#endif public BalanceInstantAvailableSourceTypes SourceTypes { get; set; } } } diff --git a/src/Stripe.net/Entities/Balances/BalanceInstantAvailableNetAvailable.cs b/src/Stripe.net/Entities/Balances/BalanceInstantAvailableNetAvailable.cs index 37674075c8..c3f293570e 100644 --- a/src/Stripe.net/Entities/Balances/BalanceInstantAvailableNetAvailable.cs +++ b/src/Stripe.net/Entities/Balances/BalanceInstantAvailableNetAvailable.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class BalanceInstantAvailableNetAvailable : StripeEntity { @@ -9,15 +12,24 @@ public class BalanceInstantAvailableNetAvailable : StripeEntity [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long Amount { get; set; } /// /// ID of the external account for this net balance (not expandable). /// [JsonProperty("destination")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("destination")] +#endif public string Destination { get; set; } [JsonProperty("source_types")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("source_types")] +#endif public BalanceInstantAvailableNetAvailableSourceTypes SourceTypes { get; set; } } } diff --git a/src/Stripe.net/Entities/Balances/BalanceInstantAvailableNetAvailableSourceTypes.cs b/src/Stripe.net/Entities/Balances/BalanceInstantAvailableNetAvailableSourceTypes.cs index 6e2af3976d..8e2b49d236 100644 --- a/src/Stripe.net/Entities/Balances/BalanceInstantAvailableNetAvailableSourceTypes.cs +++ b/src/Stripe.net/Entities/Balances/BalanceInstantAvailableNetAvailableSourceTypes.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class BalanceInstantAvailableNetAvailableSourceTypes : StripeEntity { @@ -9,18 +12,27 @@ public class BalanceInstantAvailableNetAvailableSourceTypes : StripeEntity [JsonProperty("bank_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_account")] +#endif public long BankAccount { get; set; } /// /// Amount for card. /// [JsonProperty("card")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card")] +#endif public long Card { get; set; } /// /// Amount for FPX. /// [JsonProperty("fpx")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fpx")] +#endif public long Fpx { get; set; } } } diff --git a/src/Stripe.net/Entities/Balances/BalanceInstantAvailableSourceTypes.cs b/src/Stripe.net/Entities/Balances/BalanceInstantAvailableSourceTypes.cs index 2bda26a314..691130675d 100644 --- a/src/Stripe.net/Entities/Balances/BalanceInstantAvailableSourceTypes.cs +++ b/src/Stripe.net/Entities/Balances/BalanceInstantAvailableSourceTypes.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class BalanceInstantAvailableSourceTypes : StripeEntity { @@ -9,18 +12,27 @@ public class BalanceInstantAvailableSourceTypes : StripeEntity [JsonProperty("bank_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_account")] +#endif public long BankAccount { get; set; } /// /// Amount for card. /// [JsonProperty("card")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card")] +#endif public long Card { get; set; } /// /// Amount for FPX. /// [JsonProperty("fpx")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fpx")] +#endif public long Fpx { get; set; } } } diff --git a/src/Stripe.net/Entities/Balances/BalanceIssuing.cs b/src/Stripe.net/Entities/Balances/BalanceIssuing.cs index 2a7c2413cf..e278fbf8f1 100644 --- a/src/Stripe.net/Entities/Balances/BalanceIssuing.cs +++ b/src/Stripe.net/Entities/Balances/BalanceIssuing.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class BalanceIssuing : StripeEntity { @@ -10,6 +13,9 @@ public class BalanceIssuing : StripeEntity /// Funds that are available for use. /// [JsonProperty("available")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("available")] +#endif public List Available { get; set; } } } diff --git a/src/Stripe.net/Entities/BankAccounts/BankAccount.cs b/src/Stripe.net/Entities/BankAccounts/BankAccount.cs index 03c0d4e687..d8a215d97f 100644 --- a/src/Stripe.net/Entities/BankAccounts/BankAccount.cs +++ b/src/Stripe.net/Entities/BankAccounts/BankAccount.cs @@ -4,6 +4,9 @@ namespace Stripe using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// These bank accounts are payment methods on Customer objects. @@ -15,18 +18,27 @@ namespace Stripe /// Related guide: Bank debits /// and transfers. /// +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class BankAccount : StripeEntity, IHasId, IHasMetadata, IHasObject, IExternalAccount, IPaymentSource { /// /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } #region Expandable Account @@ -36,6 +48,9 @@ public class BankAccount : StripeEntity, IHasId, IHasMetadata, IHas /// The ID of the account that the bank account is associated with. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string AccountId { get => this.InternalAccount?.Id; @@ -49,6 +64,9 @@ public string AccountId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Account Account { get => this.InternalAccount?.ExpandedObject; @@ -57,6 +75,10 @@ public Account Account [JsonProperty("account")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalAccount { get; set; } #endregion @@ -64,6 +86,9 @@ public Account Account /// The name of the person or business that owns the bank account. /// [JsonProperty("account_holder_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_holder_name")] +#endif public string AccountHolderName { get; set; } /// @@ -71,6 +96,9 @@ public Account Account /// company. /// [JsonProperty("account_holder_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_holder_type")] +#endif public string AccountHolderType { get; set; } /// @@ -78,6 +106,9 @@ public Account Account /// countries. In Japan, this can only be futsu or toza. /// [JsonProperty("account_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_type")] +#endif public string AccountType { get; set; } /// @@ -86,18 +117,27 @@ public Account Account /// One of: instant, or standard. /// [JsonProperty("available_payout_methods")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("available_payout_methods")] +#endif public List AvailablePayoutMethods { get; set; } /// /// Name of the bank associated with the routing number (e.g., WELLS FARGO). /// [JsonProperty("bank_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_name")] +#endif public string BankName { get; set; } /// /// Two-letter ISO code representing the country the bank account is located in. /// [JsonProperty("country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country")] +#endif public string Country { get; set; } /// @@ -105,6 +145,9 @@ public Account Account /// paid out to the bank account. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } #region Expandable Customer @@ -114,6 +157,9 @@ public Account Account /// The ID of the customer that the bank account is associated with. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string CustomerId { get => this.InternalCustomer?.Id; @@ -127,6 +173,9 @@ public string CustomerId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Customer Customer { get => this.InternalCustomer?.ExpandedObject; @@ -135,6 +184,10 @@ public Customer Customer [JsonProperty("customer")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalCustomer { get; set; } #endregion @@ -142,12 +195,19 @@ public Customer Customer /// Whether this bank account is the default external account for its currency. /// [JsonProperty("default_for_currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("default_for_currency")] +#endif public bool? DefaultForCurrency { get; set; } /// /// Whether this object is deleted or not. /// [JsonProperty("deleted", NullValueHandling = NullValueHandling.Ignore)] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("deleted")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] +#endif public bool? Deleted { get; set; } /// @@ -155,6 +215,9 @@ public Customer Customer /// whether two bank accounts are the same. /// [JsonProperty("fingerprint")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fingerprint")] +#endif public string Fingerprint { get; set; } /// @@ -164,12 +227,18 @@ public Customer Customer /// and by when. /// [JsonProperty("future_requirements")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("future_requirements")] +#endif public BankAccountFutureRequirements FutureRequirements { get; set; } /// /// The last four digits of the bank account number. /// [JsonProperty("last4")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last4")] +#endif public string Last4 { get; set; } /// @@ -178,6 +247,9 @@ public Customer Customer /// object in a structured format. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -185,12 +257,18 @@ public Customer Customer /// needs to be collected. /// [JsonProperty("requirements")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requirements")] +#endif public BankAccountRequirements Requirements { get; set; } /// /// The routing transit number for the bank account. /// [JsonProperty("routing_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("routing_number")] +#endif public string RoutingNumber { get; set; } /// @@ -216,6 +294,9 @@ public Customer Customer /// payouts. This means the other statuses don't apply. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } } } diff --git a/src/Stripe.net/Entities/BankAccounts/BankAccountFutureRequirements.cs b/src/Stripe.net/Entities/BankAccounts/BankAccountFutureRequirements.cs index 999f6e04c3..38eae8556d 100644 --- a/src/Stripe.net/Entities/BankAccounts/BankAccountFutureRequirements.cs +++ b/src/Stripe.net/Entities/BankAccounts/BankAccountFutureRequirements.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class BankAccountFutureRequirements : StripeEntity { @@ -12,6 +15,9 @@ public class BankAccountFutureRequirements : StripeEntity [JsonProperty("currently_due")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currently_due")] +#endif public List CurrentlyDue { get; set; } /// @@ -19,6 +25,9 @@ public class BankAccountFutureRequirements : StripeEntity [JsonProperty("errors")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("errors")] +#endif public List Errors { get; set; } /// @@ -26,6 +35,9 @@ public class BankAccountFutureRequirements : StripeEntity [JsonProperty("past_due")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("past_due")] +#endif public List PastDue { get; set; } /// @@ -37,6 +49,9 @@ public class BankAccountFutureRequirements : StripeEntity [JsonProperty("pending_verification")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("pending_verification")] +#endif public List PendingVerification { get; set; } } } diff --git a/src/Stripe.net/Entities/BankAccounts/BankAccountFutureRequirementsError.cs b/src/Stripe.net/Entities/BankAccounts/BankAccountFutureRequirementsError.cs index 687e218961..233075bd4f 100644 --- a/src/Stripe.net/Entities/BankAccounts/BankAccountFutureRequirementsError.cs +++ b/src/Stripe.net/Entities/BankAccounts/BankAccountFutureRequirementsError.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class BankAccountFutureRequirementsError : StripeEntity { @@ -69,6 +72,9 @@ public class BankAccountFutureRequirementsError : StripeEntityverification_supportability. /// [JsonProperty("code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("code")] +#endif public string Code { get; set; } /// @@ -76,6 +82,9 @@ public class BankAccountFutureRequirementsError : StripeEntity [JsonProperty("reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reason")] +#endif public string Reason { get; set; } /// @@ -83,6 +92,9 @@ public class BankAccountFutureRequirementsError : StripeEntity [JsonProperty("requirement")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requirement")] +#endif public string Requirement { get; set; } } } diff --git a/src/Stripe.net/Entities/BankAccounts/BankAccountRequirements.cs b/src/Stripe.net/Entities/BankAccounts/BankAccountRequirements.cs index 47384f5687..4399b335fa 100644 --- a/src/Stripe.net/Entities/BankAccounts/BankAccountRequirements.cs +++ b/src/Stripe.net/Entities/BankAccounts/BankAccountRequirements.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class BankAccountRequirements : StripeEntity { @@ -12,6 +15,9 @@ public class BankAccountRequirements : StripeEntity /// account is disabled. /// [JsonProperty("currently_due")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currently_due")] +#endif public List CurrentlyDue { get; set; } /// @@ -19,6 +25,9 @@ public class BankAccountRequirements : StripeEntity /// or verification failed. /// [JsonProperty("errors")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("errors")] +#endif public List Errors { get; set; } /// @@ -26,6 +35,9 @@ public class BankAccountRequirements : StripeEntity /// collected to enable the external account. /// [JsonProperty("past_due")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("past_due")] +#endif public List PastDue { get; set; } /// @@ -37,6 +49,9 @@ public class BankAccountRequirements : StripeEntity /// verification is still pending. /// [JsonProperty("pending_verification")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("pending_verification")] +#endif public List PendingVerification { get; set; } } } diff --git a/src/Stripe.net/Entities/BankAccounts/BankAccountRequirementsError.cs b/src/Stripe.net/Entities/BankAccounts/BankAccountRequirementsError.cs index 309cd0ba65..a51381f28f 100644 --- a/src/Stripe.net/Entities/BankAccounts/BankAccountRequirementsError.cs +++ b/src/Stripe.net/Entities/BankAccounts/BankAccountRequirementsError.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class BankAccountRequirementsError : StripeEntity { @@ -69,6 +72,9 @@ public class BankAccountRequirementsError : StripeEntityverification_supportability. /// [JsonProperty("code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("code")] +#endif public string Code { get; set; } /// @@ -76,6 +82,9 @@ public class BankAccountRequirementsError : StripeEntity [JsonProperty("reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reason")] +#endif public string Reason { get; set; } /// @@ -83,6 +92,9 @@ public class BankAccountRequirementsError : StripeEntity [JsonProperty("requirement")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requirement")] +#endif public string Requirement { get; set; } } } diff --git a/src/Stripe.net/Entities/Billing/AlertTriggereds/AlertTriggered.cs b/src/Stripe.net/Entities/Billing/AlertTriggereds/AlertTriggered.cs index a9b8c5ad93..7ff0b6e94f 100644 --- a/src/Stripe.net/Entities/Billing/AlertTriggereds/AlertTriggered.cs +++ b/src/Stripe.net/Entities/Billing/AlertTriggereds/AlertTriggered.cs @@ -4,6 +4,9 @@ namespace Stripe.Billing using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AlertTriggered : StripeEntity, IHasObject { @@ -11,6 +14,9 @@ public class AlertTriggered : StripeEntity, IHasObject /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// @@ -19,6 +25,9 @@ public class AlertTriggered : StripeEntity, IHasObject /// certain user made 100 API requests. /// [JsonProperty("alert")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("alert")] +#endif public Alert Alert { get; set; } /// @@ -26,12 +35,19 @@ public class AlertTriggered : StripeEntity, IHasObject /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// /// ID of customer for which the alert triggered. /// [JsonProperty("customer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] +#endif public string Customer { get; set; } /// @@ -39,12 +55,18 @@ public class AlertTriggered : StripeEntity, IHasObject /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// /// The value triggering the alert. /// [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public long Value { get; set; } } } diff --git a/src/Stripe.net/Entities/Billing/Alerts/Alert.cs b/src/Stripe.net/Entities/Billing/Alerts/Alert.cs index 3213e8dd00..79dfe66d02 100644 --- a/src/Stripe.net/Entities/Billing/Alerts/Alert.cs +++ b/src/Stripe.net/Entities/Billing/Alerts/Alert.cs @@ -2,6 +2,9 @@ namespace Stripe.Billing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// A billing alert is a resource that notifies you when a certain usage threshold on a @@ -14,18 +17,27 @@ public class Alert : StripeEntity, IHasId, IHasObject /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// /// Defines the type of the alert. /// [JsonProperty("alert_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("alert_type")] +#endif public string AlertType { get; set; } /// @@ -33,6 +45,9 @@ public class Alert : StripeEntity, IHasId, IHasObject /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// @@ -40,12 +55,18 @@ public class Alert : StripeEntity, IHasId, IHasObject /// One of: active, archived, or inactive. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } /// /// Title of the alert. /// [JsonProperty("title")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("title")] +#endif public string Title { get; set; } /// @@ -53,6 +74,9 @@ public class Alert : StripeEntity, IHasId, IHasObject /// href="https://stripe.com/docs/api/billing/meter">Billing Meter. /// [JsonProperty("usage_threshold")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("usage_threshold")] +#endif public AlertUsageThreshold UsageThreshold { get; set; } } } diff --git a/src/Stripe.net/Entities/Billing/Alerts/AlertUsageThreshold.cs b/src/Stripe.net/Entities/Billing/Alerts/AlertUsageThreshold.cs index 46f6ba9d80..9096360f48 100644 --- a/src/Stripe.net/Entities/Billing/Alerts/AlertUsageThreshold.cs +++ b/src/Stripe.net/Entities/Billing/Alerts/AlertUsageThreshold.cs @@ -4,7 +4,13 @@ namespace Stripe.Billing using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class AlertUsageThreshold : StripeEntity { /// @@ -12,12 +18,18 @@ public class AlertUsageThreshold : StripeEntity /// filter at this time. /// [JsonProperty("filters")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("filters")] +#endif public List Filters { get; set; } /// /// The value at which this alert will trigger. /// [JsonProperty("gte")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("gte")] +#endif public long Gte { get; set; } #region Expandable Meter @@ -28,6 +40,9 @@ public class AlertUsageThreshold : StripeEntity /// monitored. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string MeterId { get => this.InternalMeter?.Id; @@ -42,6 +57,9 @@ public string MeterId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Meter Meter { get => this.InternalMeter?.ExpandedObject; @@ -50,6 +68,10 @@ public Meter Meter [JsonProperty("meter")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("meter")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalMeter { get; set; } #endregion @@ -57,6 +79,9 @@ public Meter Meter /// Defines how the alert will behave. /// [JsonProperty("recurrence")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("recurrence")] +#endif public string Recurrence { get; set; } } } diff --git a/src/Stripe.net/Entities/Billing/Alerts/AlertUsageThresholdFilter.cs b/src/Stripe.net/Entities/Billing/Alerts/AlertUsageThresholdFilter.cs index 32ddff964b..9128ddd109 100644 --- a/src/Stripe.net/Entities/Billing/Alerts/AlertUsageThresholdFilter.cs +++ b/src/Stripe.net/Entities/Billing/Alerts/AlertUsageThresholdFilter.cs @@ -3,7 +3,13 @@ namespace Stripe.Billing { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class AlertUsageThresholdFilter : StripeEntity { #region Expandable Customer @@ -13,6 +19,9 @@ public class AlertUsageThresholdFilter : StripeEntity /// Limit the scope of the alert to this customer ID. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string CustomerId { get => this.InternalCustomer?.Id; @@ -26,6 +35,9 @@ public string CustomerId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Customer Customer { get => this.InternalCustomer?.ExpandedObject; @@ -34,10 +46,17 @@ public Customer Customer [JsonProperty("customer")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalCustomer { get; set; } #endregion [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Billing/CreditBalanceSummaries/CreditBalanceSummary.cs b/src/Stripe.net/Entities/Billing/CreditBalanceSummaries/CreditBalanceSummary.cs index 7974c02bdc..b9a636aba1 100644 --- a/src/Stripe.net/Entities/Billing/CreditBalanceSummaries/CreditBalanceSummary.cs +++ b/src/Stripe.net/Entities/Billing/CreditBalanceSummaries/CreditBalanceSummary.cs @@ -4,16 +4,25 @@ namespace Stripe.Billing using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// Indicates the billing credit balance for billing credits granted to a customer. /// +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class CreditBalanceSummary : StripeEntity, IHasObject { /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// @@ -21,6 +30,9 @@ public class CreditBalanceSummary : StripeEntity, IHasObje /// credit grants in a single currency, then this will have a single balance entry. /// [JsonProperty("balances")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("balances")] +#endif public List Balances { get; set; } #region Expandable Customer @@ -30,6 +42,9 @@ public class CreditBalanceSummary : StripeEntity, IHasObje /// The customer the balance is for. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string CustomerId { get => this.InternalCustomer?.Id; @@ -43,6 +58,9 @@ public string CustomerId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Customer Customer { get => this.InternalCustomer?.ExpandedObject; @@ -51,6 +69,10 @@ public Customer Customer [JsonProperty("customer")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalCustomer { get; set; } #endregion @@ -59,6 +81,9 @@ public Customer Customer /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } } } diff --git a/src/Stripe.net/Entities/Billing/CreditBalanceSummaries/CreditBalanceSummaryBalance.cs b/src/Stripe.net/Entities/Billing/CreditBalanceSummaries/CreditBalanceSummaryBalance.cs index dcad4f1789..0439c3e8a8 100644 --- a/src/Stripe.net/Entities/Billing/CreditBalanceSummaries/CreditBalanceSummaryBalance.cs +++ b/src/Stripe.net/Entities/Billing/CreditBalanceSummaries/CreditBalanceSummaryBalance.cs @@ -2,13 +2,22 @@ namespace Stripe.Billing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CreditBalanceSummaryBalance : StripeEntity { [JsonProperty("available_balance")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("available_balance")] +#endif public CreditBalanceSummaryBalanceAvailableBalance AvailableBalance { get; set; } [JsonProperty("ledger_balance")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ledger_balance")] +#endif public CreditBalanceSummaryBalanceLedgerBalance LedgerBalance { get; set; } } } diff --git a/src/Stripe.net/Entities/Billing/CreditBalanceSummaries/CreditBalanceSummaryBalanceAvailableBalance.cs b/src/Stripe.net/Entities/Billing/CreditBalanceSummaries/CreditBalanceSummaryBalanceAvailableBalance.cs index 6250acfeef..7f0f649cae 100644 --- a/src/Stripe.net/Entities/Billing/CreditBalanceSummaries/CreditBalanceSummaryBalanceAvailableBalance.cs +++ b/src/Stripe.net/Entities/Billing/CreditBalanceSummaries/CreditBalanceSummaryBalanceAvailableBalance.cs @@ -2,6 +2,9 @@ namespace Stripe.Billing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CreditBalanceSummaryBalanceAvailableBalance : StripeEntity { @@ -9,12 +12,18 @@ public class CreditBalanceSummaryBalanceAvailableBalance : StripeEntity [JsonProperty("monetary")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("monetary")] +#endif public CreditBalanceSummaryBalanceAvailableBalanceMonetary Monetary { get; set; } /// /// The type of this amount. We currently only support monetary billing credits. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Billing/CreditBalanceSummaries/CreditBalanceSummaryBalanceAvailableBalanceMonetary.cs b/src/Stripe.net/Entities/Billing/CreditBalanceSummaries/CreditBalanceSummaryBalanceAvailableBalanceMonetary.cs index af529f85d7..16a895e44b 100644 --- a/src/Stripe.net/Entities/Billing/CreditBalanceSummaries/CreditBalanceSummaryBalanceAvailableBalanceMonetary.cs +++ b/src/Stripe.net/Entities/Billing/CreditBalanceSummaries/CreditBalanceSummaryBalanceAvailableBalanceMonetary.cs @@ -2,6 +2,9 @@ namespace Stripe.Billing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CreditBalanceSummaryBalanceAvailableBalanceMonetary : StripeEntity { @@ -11,12 +14,18 @@ public class CreditBalanceSummaryBalanceAvailableBalanceMonetary : StripeEntity< /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// /// A positive integer representing the amount. /// [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public long Value { get; set; } } } diff --git a/src/Stripe.net/Entities/Billing/CreditBalanceSummaries/CreditBalanceSummaryBalanceLedgerBalance.cs b/src/Stripe.net/Entities/Billing/CreditBalanceSummaries/CreditBalanceSummaryBalanceLedgerBalance.cs index 1f26b3e703..43f7cc4251 100644 --- a/src/Stripe.net/Entities/Billing/CreditBalanceSummaries/CreditBalanceSummaryBalanceLedgerBalance.cs +++ b/src/Stripe.net/Entities/Billing/CreditBalanceSummaries/CreditBalanceSummaryBalanceLedgerBalance.cs @@ -2,6 +2,9 @@ namespace Stripe.Billing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CreditBalanceSummaryBalanceLedgerBalance : StripeEntity { @@ -9,12 +12,18 @@ public class CreditBalanceSummaryBalanceLedgerBalance : StripeEntity [JsonProperty("monetary")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("monetary")] +#endif public CreditBalanceSummaryBalanceLedgerBalanceMonetary Monetary { get; set; } /// /// The type of this amount. We currently only support monetary billing credits. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Billing/CreditBalanceSummaries/CreditBalanceSummaryBalanceLedgerBalanceMonetary.cs b/src/Stripe.net/Entities/Billing/CreditBalanceSummaries/CreditBalanceSummaryBalanceLedgerBalanceMonetary.cs index 8d3698a52e..5ef1c3319e 100644 --- a/src/Stripe.net/Entities/Billing/CreditBalanceSummaries/CreditBalanceSummaryBalanceLedgerBalanceMonetary.cs +++ b/src/Stripe.net/Entities/Billing/CreditBalanceSummaries/CreditBalanceSummaryBalanceLedgerBalanceMonetary.cs @@ -2,6 +2,9 @@ namespace Stripe.Billing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CreditBalanceSummaryBalanceLedgerBalanceMonetary : StripeEntity { @@ -11,12 +14,18 @@ public class CreditBalanceSummaryBalanceLedgerBalanceMonetary : StripeEntity. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// /// A positive integer representing the amount. /// [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public long Value { get; set; } } } diff --git a/src/Stripe.net/Entities/Billing/CreditBalanceTransactions/CreditBalanceTransaction.cs b/src/Stripe.net/Entities/Billing/CreditBalanceTransactions/CreditBalanceTransaction.cs index 68fd6bc1fe..ff02b09ee3 100644 --- a/src/Stripe.net/Entities/Billing/CreditBalanceTransactions/CreditBalanceTransaction.cs +++ b/src/Stripe.net/Entities/Billing/CreditBalanceTransactions/CreditBalanceTransaction.cs @@ -4,23 +4,35 @@ namespace Stripe.Billing using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// A credit balance transaction is a resource representing a transaction (either a credit /// or a debit) against an existing credit grant. /// +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class CreditBalanceTransaction : StripeEntity, IHasId, IHasObject { /// /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// @@ -28,6 +40,10 @@ public class CreditBalanceTransaction : StripeEntity, /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -35,6 +51,9 @@ public class CreditBalanceTransaction : StripeEntity, /// credit. /// [JsonProperty("credit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("credit")] +#endif public CreditBalanceTransactionCredit Credit { get; set; } #region Expandable CreditGrant @@ -44,6 +63,9 @@ public class CreditBalanceTransaction : StripeEntity, /// The credit grant associated with this credit balance transaction. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string CreditGrantId { get => this.InternalCreditGrant?.Id; @@ -57,6 +79,9 @@ public string CreditGrantId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public CreditGrant CreditGrant { get => this.InternalCreditGrant?.ExpandedObject; @@ -65,6 +90,10 @@ public CreditGrant CreditGrant [JsonProperty("credit_grant")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("credit_grant")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalCreditGrant { get; set; } #endregion @@ -72,6 +101,9 @@ public CreditGrant CreditGrant /// Debit details for this credit balance transaction. Only present if type is debit. /// [JsonProperty("debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("debit")] +#endif public CreditBalanceTransactionDebit Debit { get; set; } /// @@ -79,6 +111,10 @@ public CreditGrant CreditGrant /// [JsonProperty("effective_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("effective_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime EffectiveAt { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -86,6 +122,9 @@ public CreditGrant CreditGrant /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } #region Expandable TestClock @@ -95,6 +134,9 @@ public CreditGrant CreditGrant /// ID of the test clock this credit balance transaction belongs to. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string TestClockId { get => this.InternalTestClock?.Id; @@ -108,6 +150,9 @@ public string TestClockId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public TestHelpers.TestClock TestClock { get => this.InternalTestClock?.ExpandedObject; @@ -116,6 +161,10 @@ public TestHelpers.TestClock TestClock [JsonProperty("test_clock")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("test_clock")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalTestClock { get; set; } #endregion @@ -124,6 +173,9 @@ public TestHelpers.TestClock TestClock /// One of: credit, or debit. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Billing/CreditBalanceTransactions/CreditBalanceTransactionCredit.cs b/src/Stripe.net/Entities/Billing/CreditBalanceTransactions/CreditBalanceTransactionCredit.cs index fbb8110b52..dda43b5b14 100644 --- a/src/Stripe.net/Entities/Billing/CreditBalanceTransactions/CreditBalanceTransactionCredit.cs +++ b/src/Stripe.net/Entities/Billing/CreditBalanceTransactions/CreditBalanceTransactionCredit.cs @@ -2,16 +2,25 @@ namespace Stripe.Billing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CreditBalanceTransactionCredit : StripeEntity { [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public CreditBalanceTransactionCreditAmount Amount { get; set; } /// /// The type of credit transaction. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Billing/CreditBalanceTransactions/CreditBalanceTransactionCreditAmount.cs b/src/Stripe.net/Entities/Billing/CreditBalanceTransactions/CreditBalanceTransactionCreditAmount.cs index bee09c36b2..536890028b 100644 --- a/src/Stripe.net/Entities/Billing/CreditBalanceTransactions/CreditBalanceTransactionCreditAmount.cs +++ b/src/Stripe.net/Entities/Billing/CreditBalanceTransactions/CreditBalanceTransactionCreditAmount.cs @@ -2,6 +2,9 @@ namespace Stripe.Billing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CreditBalanceTransactionCreditAmount : StripeEntity { @@ -9,12 +12,18 @@ public class CreditBalanceTransactionCreditAmount : StripeEntity [JsonProperty("monetary")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("monetary")] +#endif public CreditBalanceTransactionCreditAmountMonetary Monetary { get; set; } /// /// The type of this amount. We currently only support monetary billing credits. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Billing/CreditBalanceTransactions/CreditBalanceTransactionCreditAmountMonetary.cs b/src/Stripe.net/Entities/Billing/CreditBalanceTransactions/CreditBalanceTransactionCreditAmountMonetary.cs index d9e4e74dd3..0b11ac350a 100644 --- a/src/Stripe.net/Entities/Billing/CreditBalanceTransactions/CreditBalanceTransactionCreditAmountMonetary.cs +++ b/src/Stripe.net/Entities/Billing/CreditBalanceTransactions/CreditBalanceTransactionCreditAmountMonetary.cs @@ -2,6 +2,9 @@ namespace Stripe.Billing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CreditBalanceTransactionCreditAmountMonetary : StripeEntity { @@ -11,12 +14,18 @@ public class CreditBalanceTransactionCreditAmountMonetary : StripeEntity. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// /// A positive integer representing the amount. /// [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public long Value { get; set; } } } diff --git a/src/Stripe.net/Entities/Billing/CreditBalanceTransactions/CreditBalanceTransactionDebit.cs b/src/Stripe.net/Entities/Billing/CreditBalanceTransactions/CreditBalanceTransactionDebit.cs index 61d2167103..4af677b20d 100644 --- a/src/Stripe.net/Entities/Billing/CreditBalanceTransactions/CreditBalanceTransactionDebit.cs +++ b/src/Stripe.net/Entities/Billing/CreditBalanceTransactions/CreditBalanceTransactionDebit.cs @@ -2,10 +2,16 @@ namespace Stripe.Billing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CreditBalanceTransactionDebit : StripeEntity { [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public CreditBalanceTransactionDebitAmount Amount { get; set; } /// @@ -13,6 +19,9 @@ public class CreditBalanceTransactionDebit : StripeEntitytype is credits_applied. /// [JsonProperty("credits_applied")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("credits_applied")] +#endif public CreditBalanceTransactionDebitCreditsApplied CreditsApplied { get; set; } /// @@ -20,6 +29,9 @@ public class CreditBalanceTransactionDebit : StripeEntitycredits_applied, credits_expired, or credits_voided. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Billing/CreditBalanceTransactions/CreditBalanceTransactionDebitAmount.cs b/src/Stripe.net/Entities/Billing/CreditBalanceTransactions/CreditBalanceTransactionDebitAmount.cs index 781147480d..65f3c3a886 100644 --- a/src/Stripe.net/Entities/Billing/CreditBalanceTransactions/CreditBalanceTransactionDebitAmount.cs +++ b/src/Stripe.net/Entities/Billing/CreditBalanceTransactions/CreditBalanceTransactionDebitAmount.cs @@ -2,6 +2,9 @@ namespace Stripe.Billing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CreditBalanceTransactionDebitAmount : StripeEntity { @@ -9,12 +12,18 @@ public class CreditBalanceTransactionDebitAmount : StripeEntity [JsonProperty("monetary")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("monetary")] +#endif public CreditBalanceTransactionDebitAmountMonetary Monetary { get; set; } /// /// The type of this amount. We currently only support monetary billing credits. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Billing/CreditBalanceTransactions/CreditBalanceTransactionDebitAmountMonetary.cs b/src/Stripe.net/Entities/Billing/CreditBalanceTransactions/CreditBalanceTransactionDebitAmountMonetary.cs index 3cefd89802..26f99ded9d 100644 --- a/src/Stripe.net/Entities/Billing/CreditBalanceTransactions/CreditBalanceTransactionDebitAmountMonetary.cs +++ b/src/Stripe.net/Entities/Billing/CreditBalanceTransactions/CreditBalanceTransactionDebitAmountMonetary.cs @@ -2,6 +2,9 @@ namespace Stripe.Billing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CreditBalanceTransactionDebitAmountMonetary : StripeEntity { @@ -11,12 +14,18 @@ public class CreditBalanceTransactionDebitAmountMonetary : StripeEntity. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// /// A positive integer representing the amount. /// [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public long Value { get; set; } } } diff --git a/src/Stripe.net/Entities/Billing/CreditBalanceTransactions/CreditBalanceTransactionDebitCreditsApplied.cs b/src/Stripe.net/Entities/Billing/CreditBalanceTransactions/CreditBalanceTransactionDebitCreditsApplied.cs index 1e6fa25a5e..16ae884912 100644 --- a/src/Stripe.net/Entities/Billing/CreditBalanceTransactions/CreditBalanceTransactionDebitCreditsApplied.cs +++ b/src/Stripe.net/Entities/Billing/CreditBalanceTransactions/CreditBalanceTransactionDebitCreditsApplied.cs @@ -3,7 +3,13 @@ namespace Stripe.Billing { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class CreditBalanceTransactionDebitCreditsApplied : StripeEntity { #region Expandable Invoice @@ -13,6 +19,9 @@ public class CreditBalanceTransactionDebitCreditsApplied : StripeEntity [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string InvoiceId { get => this.InternalInvoice?.Id; @@ -26,6 +35,9 @@ public string InvoiceId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Invoice Invoice { get => this.InternalInvoice?.ExpandedObject; @@ -34,6 +46,10 @@ public Invoice Invoice [JsonProperty("invoice")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("invoice")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalInvoice { get; set; } #endregion @@ -41,6 +57,9 @@ public Invoice Invoice /// The invoice line item to which the billing credits were applied. /// [JsonProperty("invoice_line_item")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("invoice_line_item")] +#endif public string InvoiceLineItem { get; set; } } } diff --git a/src/Stripe.net/Entities/Billing/CreditGrants/CreditGrant.cs b/src/Stripe.net/Entities/Billing/CreditGrants/CreditGrant.cs index d7e7908360..292b053eb8 100644 --- a/src/Stripe.net/Entities/Billing/CreditGrants/CreditGrant.cs +++ b/src/Stripe.net/Entities/Billing/CreditGrants/CreditGrant.cs @@ -5,6 +5,9 @@ namespace Stripe.Billing using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// A credit grant is an API resource that documents the allocation of some billing credits @@ -14,24 +17,39 @@ namespace Stripe.Billing /// href="https://docs.stripe.com/billing/subscriptions/usage-based/billing-credits">Billing /// credits. /// +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class CreditGrant : StripeEntity, IHasId, IHasMetadata, IHasObject { /// /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public CreditGrantAmount Amount { get; set; } [JsonProperty("applicability_config")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("applicability_config")] +#endif public CreditGrantApplicabilityConfig ApplicabilityConfig { get; set; } /// @@ -40,6 +58,9 @@ public class CreditGrant : StripeEntity, IHasId, IHasMetadata, IHas /// One of: paid, or promotional. /// [JsonProperty("category")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("category")] +#endif public string Category { get; set; } /// @@ -47,6 +68,10 @@ public class CreditGrant : StripeEntity, IHasId, IHasMetadata, IHas /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; #region Expandable Customer @@ -56,6 +81,9 @@ public class CreditGrant : StripeEntity, IHasId, IHasMetadata, IHas /// ID of the customer receiving the billing credits. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string CustomerId { get => this.InternalCustomer?.Id; @@ -69,6 +97,9 @@ public string CustomerId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Customer Customer { get => this.InternalCustomer?.ExpandedObject; @@ -77,6 +108,10 @@ public Customer Customer [JsonProperty("customer")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalCustomer { get; set; } #endregion @@ -85,6 +120,10 @@ public Customer Customer /// [JsonProperty("effective_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("effective_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? EffectiveAt { get; set; } /// @@ -93,6 +132,10 @@ public Customer Customer /// [JsonProperty("expires_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("expires_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? ExpiresAt { get; set; } /// @@ -100,6 +143,9 @@ public Customer Customer /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// @@ -108,12 +154,18 @@ public Customer Customer /// object in a structured format. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// A descriptive name shown in dashboard. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } #region Expandable TestClock @@ -123,6 +175,9 @@ public Customer Customer /// ID of the test clock this credit grant belongs to. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string TestClockId { get => this.InternalTestClock?.Id; @@ -136,6 +191,9 @@ public string TestClockId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public TestHelpers.TestClock TestClock { get => this.InternalTestClock?.ExpandedObject; @@ -144,6 +202,10 @@ public TestHelpers.TestClock TestClock [JsonProperty("test_clock")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("test_clock")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalTestClock { get; set; } #endregion @@ -152,6 +214,10 @@ public TestHelpers.TestClock TestClock /// [JsonProperty("updated")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("updated")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Updated { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -160,6 +226,10 @@ public TestHelpers.TestClock TestClock /// [JsonProperty("voided_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("voided_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? VoidedAt { get; set; } } } diff --git a/src/Stripe.net/Entities/Billing/CreditGrants/CreditGrantAmount.cs b/src/Stripe.net/Entities/Billing/CreditGrants/CreditGrantAmount.cs index beedffd047..ec1a9110b1 100644 --- a/src/Stripe.net/Entities/Billing/CreditGrants/CreditGrantAmount.cs +++ b/src/Stripe.net/Entities/Billing/CreditGrants/CreditGrantAmount.cs @@ -2,6 +2,9 @@ namespace Stripe.Billing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CreditGrantAmount : StripeEntity { @@ -9,12 +12,18 @@ public class CreditGrantAmount : StripeEntity /// The monetary amount. /// [JsonProperty("monetary")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("monetary")] +#endif public CreditGrantAmountMonetary Monetary { get; set; } /// /// The type of this amount. We currently only support monetary billing credits. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Billing/CreditGrants/CreditGrantAmountMonetary.cs b/src/Stripe.net/Entities/Billing/CreditGrants/CreditGrantAmountMonetary.cs index 256410e7ba..6e9afe0883 100644 --- a/src/Stripe.net/Entities/Billing/CreditGrants/CreditGrantAmountMonetary.cs +++ b/src/Stripe.net/Entities/Billing/CreditGrants/CreditGrantAmountMonetary.cs @@ -2,6 +2,9 @@ namespace Stripe.Billing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CreditGrantAmountMonetary : StripeEntity { @@ -11,12 +14,18 @@ public class CreditGrantAmountMonetary : StripeEntity /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// /// A positive integer representing the amount. /// [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public long Value { get; set; } } } diff --git a/src/Stripe.net/Entities/Billing/CreditGrants/CreditGrantApplicabilityConfig.cs b/src/Stripe.net/Entities/Billing/CreditGrants/CreditGrantApplicabilityConfig.cs index 1f68d4e058..8c9a809ca6 100644 --- a/src/Stripe.net/Entities/Billing/CreditGrants/CreditGrantApplicabilityConfig.cs +++ b/src/Stripe.net/Entities/Billing/CreditGrants/CreditGrantApplicabilityConfig.cs @@ -2,10 +2,16 @@ namespace Stripe.Billing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CreditGrantApplicabilityConfig : StripeEntity { [JsonProperty("scope")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("scope")] +#endif public CreditGrantApplicabilityConfigScope Scope { get; set; } } } diff --git a/src/Stripe.net/Entities/Billing/CreditGrants/CreditGrantApplicabilityConfigScope.cs b/src/Stripe.net/Entities/Billing/CreditGrants/CreditGrantApplicabilityConfigScope.cs index 5cc86cc9bc..f8a503a64c 100644 --- a/src/Stripe.net/Entities/Billing/CreditGrants/CreditGrantApplicabilityConfigScope.cs +++ b/src/Stripe.net/Entities/Billing/CreditGrants/CreditGrantApplicabilityConfigScope.cs @@ -2,6 +2,9 @@ namespace Stripe.Billing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CreditGrantApplicabilityConfigScope : StripeEntity { @@ -11,6 +14,9 @@ public class CreditGrantApplicabilityConfigScope : StripeEntityBilling Meter attached to them. /// [JsonProperty("price_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("price_type")] +#endif public string PriceType { get; set; } } } diff --git a/src/Stripe.net/Entities/Billing/MeterEventAdjustments/MeterEventAdjustment.cs b/src/Stripe.net/Entities/Billing/MeterEventAdjustments/MeterEventAdjustment.cs index 3fc47f2830..83c81ab004 100644 --- a/src/Stripe.net/Entities/Billing/MeterEventAdjustments/MeterEventAdjustment.cs +++ b/src/Stripe.net/Entities/Billing/MeterEventAdjustments/MeterEventAdjustment.cs @@ -2,6 +2,9 @@ namespace Stripe.Billing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// A billing meter event adjustment is a resource that allows you to cancel a meter event. @@ -14,18 +17,27 @@ public class MeterEventAdjustment : StripeEntity, IHasObje /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// /// Specifies which event to cancel. /// [JsonProperty("cancel")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cancel")] +#endif public MeterEventAdjustmentCancel Cancel { get; set; } /// /// The name of the meter event. Corresponds with the event_name field on a meter. /// [JsonProperty("event_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("event_name")] +#endif public string EventName { get; set; } /// @@ -33,6 +45,9 @@ public class MeterEventAdjustment : StripeEntity, IHasObje /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// @@ -40,6 +55,9 @@ public class MeterEventAdjustment : StripeEntity, IHasObje /// One of: complete, or pending. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } /// @@ -47,6 +65,9 @@ public class MeterEventAdjustment : StripeEntity, IHasObje /// period cancellation is not supported yet. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Billing/MeterEventAdjustments/MeterEventAdjustmentCancel.cs b/src/Stripe.net/Entities/Billing/MeterEventAdjustments/MeterEventAdjustmentCancel.cs index fb9af0ca83..e971f43cdd 100644 --- a/src/Stripe.net/Entities/Billing/MeterEventAdjustments/MeterEventAdjustmentCancel.cs +++ b/src/Stripe.net/Entities/Billing/MeterEventAdjustments/MeterEventAdjustmentCancel.cs @@ -2,6 +2,9 @@ namespace Stripe.Billing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class MeterEventAdjustmentCancel : StripeEntity { @@ -9,6 +12,9 @@ public class MeterEventAdjustmentCancel : StripeEntity [JsonProperty("identifier")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("identifier")] +#endif public string Identifier { get; set; } } } diff --git a/src/Stripe.net/Entities/Billing/MeterEventSummaries/MeterEventSummary.cs b/src/Stripe.net/Entities/Billing/MeterEventSummaries/MeterEventSummary.cs index 01b98f39e9..7bca18aa73 100644 --- a/src/Stripe.net/Entities/Billing/MeterEventSummaries/MeterEventSummary.cs +++ b/src/Stripe.net/Entities/Billing/MeterEventSummaries/MeterEventSummary.cs @@ -4,6 +4,9 @@ namespace Stripe.Billing using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// A billing meter event summary represents an aggregated view of a customer's billing @@ -16,12 +19,18 @@ public class MeterEventSummary : StripeEntity, IHasId, IHasOb /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// @@ -30,6 +39,9 @@ public class MeterEventSummary : StripeEntity, IHasId, IHasOb /// default_aggregation. /// [JsonProperty("aggregated_value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("aggregated_value")] +#endif public decimal AggregatedValue { get; set; } /// @@ -38,6 +50,10 @@ public class MeterEventSummary : StripeEntity, IHasId, IHasOb /// [JsonProperty("end_time")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("end_time")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime EndTime { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -45,12 +61,18 @@ public class MeterEventSummary : StripeEntity, IHasId, IHasOb /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// /// The meter associated with this event summary. /// [JsonProperty("meter")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("meter")] +#endif public string Meter { get; set; } /// @@ -59,6 +81,10 @@ public class MeterEventSummary : StripeEntity, IHasId, IHasOb /// [JsonProperty("start_time")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("start_time")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime StartTime { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; } } diff --git a/src/Stripe.net/Entities/Billing/MeterEvents/MeterEvent.cs b/src/Stripe.net/Entities/Billing/MeterEvents/MeterEvent.cs index d1e021a12e..4bc4b2a10b 100644 --- a/src/Stripe.net/Entities/Billing/MeterEvents/MeterEvent.cs +++ b/src/Stripe.net/Entities/Billing/MeterEvents/MeterEvent.cs @@ -5,6 +5,9 @@ namespace Stripe.Billing using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// A billing meter event represents a customer's usage of a product. Meter events are used @@ -18,6 +21,9 @@ public class MeterEvent : StripeEntity, IHasObject /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// @@ -25,18 +31,28 @@ public class MeterEvent : StripeEntity, IHasObject /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// /// The name of the meter event. Corresponds with the event_name field on a meter. /// [JsonProperty("event_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("event_name")] +#endif public string EventName { get; set; } /// /// A unique identifier for the event. /// [JsonProperty("identifier")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("identifier")] +#endif public string Identifier { get; set; } /// @@ -44,6 +60,9 @@ public class MeterEvent : StripeEntity, IHasObject /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// @@ -54,6 +73,9 @@ public class MeterEvent : StripeEntity, IHasObject /// href="https://stripe.com/docs/billing/subscriptions/usage-based/recording-usage#payload-key-overrides">payload. /// [JsonProperty("payload")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payload")] +#endif public Dictionary Payload { get; set; } /// @@ -62,6 +84,10 @@ public class MeterEvent : StripeEntity, IHasObject /// [JsonProperty("timestamp")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("timestamp")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Timestamp { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; } } diff --git a/src/Stripe.net/Entities/Billing/Meters/Meter.cs b/src/Stripe.net/Entities/Billing/Meters/Meter.cs index 48e4a1bf1a..4e65d0db8a 100644 --- a/src/Stripe.net/Entities/Billing/Meters/Meter.cs +++ b/src/Stripe.net/Entities/Billing/Meters/Meter.cs @@ -4,6 +4,9 @@ namespace Stripe.Billing using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// A billing meter is a resource that allows you to track usage of a particular event. For @@ -20,12 +23,18 @@ public class Meter : StripeEntity, IHasId, IHasObject /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// @@ -33,18 +42,31 @@ public class Meter : StripeEntity, IHasId, IHasObject /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; [JsonProperty("customer_mapping")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_mapping")] +#endif public MeterCustomerMapping CustomerMapping { get; set; } [JsonProperty("default_aggregation")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("default_aggregation")] +#endif public MeterDefaultAggregation DefaultAggregation { get; set; } /// /// The meter's name. /// [JsonProperty("display_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_name")] +#endif public string DisplayName { get; set; } /// @@ -52,6 +74,9 @@ public class Meter : StripeEntity, IHasId, IHasObject /// field on meter events. /// [JsonProperty("event_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("event_name")] +#endif public string EventName { get; set; } /// @@ -59,6 +84,9 @@ public class Meter : StripeEntity, IHasId, IHasObject /// One of: day, or hour. /// [JsonProperty("event_time_window")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("event_time_window")] +#endif public string EventTimeWindow { get; set; } /// @@ -66,6 +94,9 @@ public class Meter : StripeEntity, IHasId, IHasObject /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// @@ -73,9 +104,15 @@ public class Meter : StripeEntity, IHasId, IHasObject /// One of: active, or inactive. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } [JsonProperty("status_transitions")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status_transitions")] +#endif public MeterStatusTransitions StatusTransitions { get; set; } /// @@ -83,9 +120,16 @@ public class Meter : StripeEntity, IHasId, IHasObject /// [JsonProperty("updated")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("updated")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Updated { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; [JsonProperty("value_settings")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value_settings")] +#endif public MeterValueSettings ValueSettings { get; set; } } } diff --git a/src/Stripe.net/Entities/Billing/Meters/MeterCustomerMapping.cs b/src/Stripe.net/Entities/Billing/Meters/MeterCustomerMapping.cs index 511407d1b1..2cccbd1fbc 100644 --- a/src/Stripe.net/Entities/Billing/Meters/MeterCustomerMapping.cs +++ b/src/Stripe.net/Entities/Billing/Meters/MeterCustomerMapping.cs @@ -2,6 +2,9 @@ namespace Stripe.Billing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class MeterCustomerMapping : StripeEntity { @@ -9,12 +12,18 @@ public class MeterCustomerMapping : StripeEntity /// The key in the meter event payload to use for mapping the event to a customer. /// [JsonProperty("event_payload_key")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("event_payload_key")] +#endif public string EventPayloadKey { get; set; } /// /// The method for mapping a meter event to a customer. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Billing/Meters/MeterDefaultAggregation.cs b/src/Stripe.net/Entities/Billing/Meters/MeterDefaultAggregation.cs index 23d47f2fef..7c16418e78 100644 --- a/src/Stripe.net/Entities/Billing/Meters/MeterDefaultAggregation.cs +++ b/src/Stripe.net/Entities/Billing/Meters/MeterDefaultAggregation.cs @@ -2,6 +2,9 @@ namespace Stripe.Billing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class MeterDefaultAggregation : StripeEntity { @@ -10,6 +13,9 @@ public class MeterDefaultAggregation : StripeEntity /// One of: count, or sum. /// [JsonProperty("formula")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("formula")] +#endif public string Formula { get; set; } } } diff --git a/src/Stripe.net/Entities/Billing/Meters/MeterStatusTransitions.cs b/src/Stripe.net/Entities/Billing/Meters/MeterStatusTransitions.cs index 2321104f84..96e097367c 100644 --- a/src/Stripe.net/Entities/Billing/Meters/MeterStatusTransitions.cs +++ b/src/Stripe.net/Entities/Billing/Meters/MeterStatusTransitions.cs @@ -4,6 +4,9 @@ namespace Stripe.Billing using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class MeterStatusTransitions : StripeEntity { @@ -12,6 +15,10 @@ public class MeterStatusTransitions : StripeEntity /// [JsonProperty("deactivated_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("deactivated_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? DeactivatedAt { get; set; } } } diff --git a/src/Stripe.net/Entities/Billing/Meters/MeterValueSettings.cs b/src/Stripe.net/Entities/Billing/Meters/MeterValueSettings.cs index d83ee54a11..06def3fd4c 100644 --- a/src/Stripe.net/Entities/Billing/Meters/MeterValueSettings.cs +++ b/src/Stripe.net/Entities/Billing/Meters/MeterValueSettings.cs @@ -2,6 +2,9 @@ namespace Stripe.Billing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class MeterValueSettings : StripeEntity { @@ -9,6 +12,9 @@ public class MeterValueSettings : StripeEntity /// The key in the meter event payload to use as the value for this meter. /// [JsonProperty("event_payload_key")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("event_payload_key")] +#endif public string EventPayloadKey { get; set; } } } diff --git a/src/Stripe.net/Entities/BillingPortal/Configurations/Configuration.cs b/src/Stripe.net/Entities/BillingPortal/Configurations/Configuration.cs index 7d530a99da..11a75ce89e 100644 --- a/src/Stripe.net/Entities/BillingPortal/Configurations/Configuration.cs +++ b/src/Stripe.net/Entities/BillingPortal/Configurations/Configuration.cs @@ -5,28 +5,43 @@ namespace Stripe.BillingPortal using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// A portal configuration describes the functionality and behavior of a portal session. /// +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class Configuration : StripeEntity, IHasId, IHasMetadata, IHasObject { /// /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// /// Whether the configuration is active and can be used to create portal sessions. /// [JsonProperty("active")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("active")] +#endif public bool Active { get; set; } #region Expandable Application @@ -36,6 +51,9 @@ public class Configuration : StripeEntity, IHasId, IHasMetadata, /// ID of the Connect Application that created the configuration. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string ApplicationId { get => this.InternalApplication?.Id; @@ -49,6 +67,9 @@ public string ApplicationId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Application Application { get => this.InternalApplication?.ExpandedObject; @@ -57,10 +78,17 @@ public Application Application [JsonProperty("application")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("application")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalApplication { get; set; } #endregion [JsonProperty("business_profile")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("business_profile")] +#endif public ConfigurationBusinessProfile BusinessProfile { get; set; } /// @@ -68,6 +96,10 @@ public Application Application /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -77,9 +109,15 @@ public Application Application /// when creating the session. /// [JsonProperty("default_return_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("default_return_url")] +#endif public string DefaultReturnUrl { get; set; } [JsonProperty("features")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("features")] +#endif public ConfigurationFeatures Features { get; set; } /// @@ -88,6 +126,9 @@ public Application Application /// overriden when creating the session. /// [JsonProperty("is_default")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("is_default")] +#endif public bool IsDefault { get; set; } /// @@ -95,9 +136,15 @@ public Application Application /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } [JsonProperty("login_page")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("login_page")] +#endif public ConfigurationLoginPage LoginPage { get; set; } /// @@ -106,6 +153,9 @@ public Application Application /// object in a structured format. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -113,6 +163,10 @@ public Application Application /// [JsonProperty("updated")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("updated")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Updated { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; } } diff --git a/src/Stripe.net/Entities/BillingPortal/Configurations/ConfigurationBusinessProfile.cs b/src/Stripe.net/Entities/BillingPortal/Configurations/ConfigurationBusinessProfile.cs index 5095081ddf..05cbfdb8c7 100644 --- a/src/Stripe.net/Entities/BillingPortal/Configurations/ConfigurationBusinessProfile.cs +++ b/src/Stripe.net/Entities/BillingPortal/Configurations/ConfigurationBusinessProfile.cs @@ -2,6 +2,9 @@ namespace Stripe.BillingPortal { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfigurationBusinessProfile : StripeEntity { @@ -9,18 +12,27 @@ public class ConfigurationBusinessProfile : StripeEntity [JsonProperty("headline")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("headline")] +#endif public string Headline { get; set; } /// /// A link to the business’s publicly available privacy policy. /// [JsonProperty("privacy_policy_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("privacy_policy_url")] +#endif public string PrivacyPolicyUrl { get; set; } /// /// A link to the business’s publicly available terms of service. /// [JsonProperty("terms_of_service_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("terms_of_service_url")] +#endif public string TermsOfServiceUrl { get; set; } } } diff --git a/src/Stripe.net/Entities/BillingPortal/Configurations/ConfigurationFeatures.cs b/src/Stripe.net/Entities/BillingPortal/Configurations/ConfigurationFeatures.cs index 8575b51a3f..fbd2a274f2 100644 --- a/src/Stripe.net/Entities/BillingPortal/Configurations/ConfigurationFeatures.cs +++ b/src/Stripe.net/Entities/BillingPortal/Configurations/ConfigurationFeatures.cs @@ -2,22 +2,40 @@ namespace Stripe.BillingPortal { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfigurationFeatures : StripeEntity { [JsonProperty("customer_update")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_update")] +#endif public ConfigurationFeaturesCustomerUpdate CustomerUpdate { get; set; } [JsonProperty("invoice_history")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("invoice_history")] +#endif public ConfigurationFeaturesInvoiceHistory InvoiceHistory { get; set; } [JsonProperty("payment_method_update")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_update")] +#endif public ConfigurationFeaturesPaymentMethodUpdate PaymentMethodUpdate { get; set; } [JsonProperty("subscription_cancel")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("subscription_cancel")] +#endif public ConfigurationFeaturesSubscriptionCancel SubscriptionCancel { get; set; } [JsonProperty("subscription_update")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("subscription_update")] +#endif public ConfigurationFeaturesSubscriptionUpdate SubscriptionUpdate { get; set; } } } diff --git a/src/Stripe.net/Entities/BillingPortal/Configurations/ConfigurationFeaturesCustomerUpdate.cs b/src/Stripe.net/Entities/BillingPortal/Configurations/ConfigurationFeaturesCustomerUpdate.cs index a8a4b966dc..b33e3498c0 100644 --- a/src/Stripe.net/Entities/BillingPortal/Configurations/ConfigurationFeaturesCustomerUpdate.cs +++ b/src/Stripe.net/Entities/BillingPortal/Configurations/ConfigurationFeaturesCustomerUpdate.cs @@ -3,6 +3,9 @@ namespace Stripe.BillingPortal { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfigurationFeaturesCustomerUpdate : StripeEntity { @@ -13,12 +16,18 @@ public class ConfigurationFeaturesCustomerUpdate : StripeEntitytax_id. /// [JsonProperty("allowed_updates")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("allowed_updates")] +#endif public List AllowedUpdates { get; set; } /// /// Whether the feature is enabled. /// [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool Enabled { get; set; } } } diff --git a/src/Stripe.net/Entities/BillingPortal/Configurations/ConfigurationFeaturesInvoiceHistory.cs b/src/Stripe.net/Entities/BillingPortal/Configurations/ConfigurationFeaturesInvoiceHistory.cs index 21fcaff9f2..cf67268f5a 100644 --- a/src/Stripe.net/Entities/BillingPortal/Configurations/ConfigurationFeaturesInvoiceHistory.cs +++ b/src/Stripe.net/Entities/BillingPortal/Configurations/ConfigurationFeaturesInvoiceHistory.cs @@ -2,6 +2,9 @@ namespace Stripe.BillingPortal { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfigurationFeaturesInvoiceHistory : StripeEntity { @@ -9,6 +12,9 @@ public class ConfigurationFeaturesInvoiceHistory : StripeEntity [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool Enabled { get; set; } } } diff --git a/src/Stripe.net/Entities/BillingPortal/Configurations/ConfigurationFeaturesPaymentMethodUpdate.cs b/src/Stripe.net/Entities/BillingPortal/Configurations/ConfigurationFeaturesPaymentMethodUpdate.cs index 3c433cecfa..e0954104d7 100644 --- a/src/Stripe.net/Entities/BillingPortal/Configurations/ConfigurationFeaturesPaymentMethodUpdate.cs +++ b/src/Stripe.net/Entities/BillingPortal/Configurations/ConfigurationFeaturesPaymentMethodUpdate.cs @@ -2,6 +2,9 @@ namespace Stripe.BillingPortal { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfigurationFeaturesPaymentMethodUpdate : StripeEntity { @@ -9,6 +12,9 @@ public class ConfigurationFeaturesPaymentMethodUpdate : StripeEntity [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool Enabled { get; set; } } } diff --git a/src/Stripe.net/Entities/BillingPortal/Configurations/ConfigurationFeaturesSubscriptionCancel.cs b/src/Stripe.net/Entities/BillingPortal/Configurations/ConfigurationFeaturesSubscriptionCancel.cs index a0eb22545b..4bf9fd4a05 100644 --- a/src/Stripe.net/Entities/BillingPortal/Configurations/ConfigurationFeaturesSubscriptionCancel.cs +++ b/src/Stripe.net/Entities/BillingPortal/Configurations/ConfigurationFeaturesSubscriptionCancel.cs @@ -2,16 +2,25 @@ namespace Stripe.BillingPortal { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfigurationFeaturesSubscriptionCancel : StripeEntity { [JsonProperty("cancellation_reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cancellation_reason")] +#endif public ConfigurationFeaturesSubscriptionCancelCancellationReason CancellationReason { get; set; } /// /// Whether the feature is enabled. /// [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool Enabled { get; set; } /// @@ -19,6 +28,9 @@ public class ConfigurationFeaturesSubscriptionCancel : StripeEntityat_period_end, or immediately. /// [JsonProperty("mode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mode")] +#endif public string Mode { get; set; } /// @@ -27,6 +39,9 @@ public class ConfigurationFeaturesSubscriptionCancel : StripeEntityalways_invoice, create_prorations, or none. /// [JsonProperty("proration_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("proration_behavior")] +#endif public string ProrationBehavior { get; set; } } } diff --git a/src/Stripe.net/Entities/BillingPortal/Configurations/ConfigurationFeaturesSubscriptionCancelCancellationReason.cs b/src/Stripe.net/Entities/BillingPortal/Configurations/ConfigurationFeaturesSubscriptionCancelCancellationReason.cs index 8f84da92ba..ddf451934b 100644 --- a/src/Stripe.net/Entities/BillingPortal/Configurations/ConfigurationFeaturesSubscriptionCancelCancellationReason.cs +++ b/src/Stripe.net/Entities/BillingPortal/Configurations/ConfigurationFeaturesSubscriptionCancelCancellationReason.cs @@ -3,6 +3,9 @@ namespace Stripe.BillingPortal { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfigurationFeaturesSubscriptionCancelCancellationReason : StripeEntity { @@ -10,6 +13,9 @@ public class ConfigurationFeaturesSubscriptionCancelCancellationReason : StripeE /// Whether the feature is enabled. /// [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool Enabled { get; set; } /// @@ -19,6 +25,9 @@ public class ConfigurationFeaturesSubscriptionCancelCancellationReason : StripeE /// unused. /// [JsonProperty("options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("options")] +#endif public List Options { get; set; } } } diff --git a/src/Stripe.net/Entities/BillingPortal/Configurations/ConfigurationFeaturesSubscriptionUpdate.cs b/src/Stripe.net/Entities/BillingPortal/Configurations/ConfigurationFeaturesSubscriptionUpdate.cs index 4c6da7618d..ed8f838764 100644 --- a/src/Stripe.net/Entities/BillingPortal/Configurations/ConfigurationFeaturesSubscriptionUpdate.cs +++ b/src/Stripe.net/Entities/BillingPortal/Configurations/ConfigurationFeaturesSubscriptionUpdate.cs @@ -3,6 +3,9 @@ namespace Stripe.BillingPortal { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfigurationFeaturesSubscriptionUpdate : StripeEntity { @@ -12,18 +15,27 @@ public class ConfigurationFeaturesSubscriptionUpdate : StripeEntityprice, promotion_code, or quantity. /// [JsonProperty("default_allowed_updates")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("default_allowed_updates")] +#endif public List DefaultAllowedUpdates { get; set; } /// /// Whether the feature is enabled. /// [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool Enabled { get; set; } /// /// The list of up to 10 products that support subscription updates. /// [JsonProperty("products")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("products")] +#endif public List Products { get; set; } /// @@ -33,9 +45,15 @@ public class ConfigurationFeaturesSubscriptionUpdate : StripeEntityalways_invoice, create_prorations, or none. /// [JsonProperty("proration_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("proration_behavior")] +#endif public string ProrationBehavior { get; set; } [JsonProperty("schedule_at_period_end")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("schedule_at_period_end")] +#endif public ConfigurationFeaturesSubscriptionUpdateScheduleAtPeriodEnd ScheduleAtPeriodEnd { get; set; } } } diff --git a/src/Stripe.net/Entities/BillingPortal/Configurations/ConfigurationFeaturesSubscriptionUpdateProduct.cs b/src/Stripe.net/Entities/BillingPortal/Configurations/ConfigurationFeaturesSubscriptionUpdateProduct.cs index 2c6e3a8a6d..9c35a9f62d 100644 --- a/src/Stripe.net/Entities/BillingPortal/Configurations/ConfigurationFeaturesSubscriptionUpdateProduct.cs +++ b/src/Stripe.net/Entities/BillingPortal/Configurations/ConfigurationFeaturesSubscriptionUpdateProduct.cs @@ -3,6 +3,9 @@ namespace Stripe.BillingPortal { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfigurationFeaturesSubscriptionUpdateProduct : StripeEntity { @@ -10,12 +13,18 @@ public class ConfigurationFeaturesSubscriptionUpdateProduct : StripeEntity [JsonProperty("prices")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("prices")] +#endif public List Prices { get; set; } /// /// The product ID. /// [JsonProperty("product")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("product")] +#endif public string Product { get; set; } } } diff --git a/src/Stripe.net/Entities/BillingPortal/Configurations/ConfigurationFeaturesSubscriptionUpdateScheduleAtPeriodEnd.cs b/src/Stripe.net/Entities/BillingPortal/Configurations/ConfigurationFeaturesSubscriptionUpdateScheduleAtPeriodEnd.cs index 95b8261885..ce7c0ade70 100644 --- a/src/Stripe.net/Entities/BillingPortal/Configurations/ConfigurationFeaturesSubscriptionUpdateScheduleAtPeriodEnd.cs +++ b/src/Stripe.net/Entities/BillingPortal/Configurations/ConfigurationFeaturesSubscriptionUpdateScheduleAtPeriodEnd.cs @@ -3,6 +3,9 @@ namespace Stripe.BillingPortal { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfigurationFeaturesSubscriptionUpdateScheduleAtPeriodEnd : StripeEntity { @@ -11,6 +14,9 @@ public class ConfigurationFeaturesSubscriptionUpdateScheduleAtPeriodEnd : Stripe /// of the current period. /// [JsonProperty("conditions")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("conditions")] +#endif public List Conditions { get; set; } } } diff --git a/src/Stripe.net/Entities/BillingPortal/Configurations/ConfigurationFeaturesSubscriptionUpdateScheduleAtPeriodEndCondition.cs b/src/Stripe.net/Entities/BillingPortal/Configurations/ConfigurationFeaturesSubscriptionUpdateScheduleAtPeriodEndCondition.cs index 17d5b3d627..565738fc43 100644 --- a/src/Stripe.net/Entities/BillingPortal/Configurations/ConfigurationFeaturesSubscriptionUpdateScheduleAtPeriodEndCondition.cs +++ b/src/Stripe.net/Entities/BillingPortal/Configurations/ConfigurationFeaturesSubscriptionUpdateScheduleAtPeriodEndCondition.cs @@ -2,6 +2,9 @@ namespace Stripe.BillingPortal { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfigurationFeaturesSubscriptionUpdateScheduleAtPeriodEndCondition : StripeEntity { @@ -10,6 +13,9 @@ public class ConfigurationFeaturesSubscriptionUpdateScheduleAtPeriodEndCondition /// One of: decreasing_item_amount, or shortening_interval. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/BillingPortal/Configurations/ConfigurationLoginPage.cs b/src/Stripe.net/Entities/BillingPortal/Configurations/ConfigurationLoginPage.cs index b9ffa681f0..df04f9bd62 100644 --- a/src/Stripe.net/Entities/BillingPortal/Configurations/ConfigurationLoginPage.cs +++ b/src/Stripe.net/Entities/BillingPortal/Configurations/ConfigurationLoginPage.cs @@ -2,6 +2,9 @@ namespace Stripe.BillingPortal { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfigurationLoginPage : StripeEntity { @@ -12,6 +15,9 @@ public class ConfigurationLoginPage : StripeEntity /// If false, the previously generated url, if any, will be deactivated. /// [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool Enabled { get; set; } /// @@ -21,6 +27,9 @@ public class ConfigurationLoginPage : StripeEntity /// receive a link to their customer portal. /// [JsonProperty("url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("url")] +#endif public string Url { get; set; } } } diff --git a/src/Stripe.net/Entities/BillingPortal/Sessions/Session.cs b/src/Stripe.net/Entities/BillingPortal/Sessions/Session.cs index 9ccc397bf3..4dc22184ee 100644 --- a/src/Stripe.net/Entities/BillingPortal/Sessions/Session.cs +++ b/src/Stripe.net/Entities/BillingPortal/Sessions/Session.cs @@ -4,6 +4,9 @@ namespace Stripe.BillingPortal using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// The Billing customer portal is a Stripe-hosted UI for subscription and billing @@ -20,18 +23,27 @@ namespace Stripe.BillingPortal /// /// Related guide: Customer management. /// +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class Session : StripeEntity, IHasId, IHasObject { /// /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } #region Expandable Configuration @@ -41,6 +53,9 @@ public class Session : StripeEntity, IHasId, IHasObject /// The configuration used by this session, describing the features available. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string ConfigurationId { get => this.InternalConfiguration?.Id; @@ -54,6 +69,9 @@ public string ConfigurationId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Configuration Configuration { get => this.InternalConfiguration?.ExpandedObject; @@ -62,6 +80,10 @@ public Configuration Configuration [JsonProperty("configuration")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("configuration")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalConfiguration { get; set; } #endregion @@ -70,12 +92,19 @@ public Configuration Configuration /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// /// The ID of the customer for this session. /// [JsonProperty("customer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] +#endif public string Customer { get; set; } /// @@ -84,6 +113,9 @@ public Configuration Configuration /// more about using customer portal deep links and flows. /// [JsonProperty("flow")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("flow")] +#endif public SessionFlow Flow { get; set; } /// @@ -91,6 +123,9 @@ public Configuration Configuration /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// @@ -105,6 +140,9 @@ public Configuration Configuration /// tr, vi, zh, zh-HK, or zh-TW. /// [JsonProperty("locale")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("locale")] +#endif public string Locale { get; set; } /// @@ -118,6 +156,9 @@ public Configuration Configuration /// displays. /// [JsonProperty("on_behalf_of")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("on_behalf_of")] +#endif public string OnBehalfOf { get; set; } /// @@ -125,12 +166,18 @@ public Configuration Configuration /// website. /// [JsonProperty("return_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("return_url")] +#endif public string ReturnUrl { get; set; } /// /// The short-lived URL of the session that gives customers access to the customer portal. /// [JsonProperty("url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("url")] +#endif public string Url { get; set; } } } diff --git a/src/Stripe.net/Entities/BillingPortal/Sessions/SessionFlow.cs b/src/Stripe.net/Entities/BillingPortal/Sessions/SessionFlow.cs index f4512888ce..260e6856a7 100644 --- a/src/Stripe.net/Entities/BillingPortal/Sessions/SessionFlow.cs +++ b/src/Stripe.net/Entities/BillingPortal/Sessions/SessionFlow.cs @@ -2,28 +2,43 @@ namespace Stripe.BillingPortal { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionFlow : StripeEntity { [JsonProperty("after_completion")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("after_completion")] +#endif public SessionFlowAfterCompletion AfterCompletion { get; set; } /// /// Configuration when flow.type=subscription_cancel. /// [JsonProperty("subscription_cancel")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("subscription_cancel")] +#endif public SessionFlowSubscriptionCancel SubscriptionCancel { get; set; } /// /// Configuration when flow.type=subscription_update. /// [JsonProperty("subscription_update")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("subscription_update")] +#endif public SessionFlowSubscriptionUpdate SubscriptionUpdate { get; set; } /// /// Configuration when flow.type=subscription_update_confirm. /// [JsonProperty("subscription_update_confirm")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("subscription_update_confirm")] +#endif public SessionFlowSubscriptionUpdateConfirm SubscriptionUpdateConfirm { get; set; } /// @@ -32,6 +47,9 @@ public class SessionFlow : StripeEntity /// subscription_update, or subscription_update_confirm. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/BillingPortal/Sessions/SessionFlowAfterCompletion.cs b/src/Stripe.net/Entities/BillingPortal/Sessions/SessionFlowAfterCompletion.cs index 08126036cf..ebcb5868aa 100644 --- a/src/Stripe.net/Entities/BillingPortal/Sessions/SessionFlowAfterCompletion.cs +++ b/src/Stripe.net/Entities/BillingPortal/Sessions/SessionFlowAfterCompletion.cs @@ -2,6 +2,9 @@ namespace Stripe.BillingPortal { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionFlowAfterCompletion : StripeEntity { @@ -9,12 +12,18 @@ public class SessionFlowAfterCompletion : StripeEntityafter_completion.type=hosted_confirmation. /// [JsonProperty("hosted_confirmation")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("hosted_confirmation")] +#endif public SessionFlowAfterCompletionHostedConfirmation HostedConfirmation { get; set; } /// /// Configuration when after_completion.type=redirect. /// [JsonProperty("redirect")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("redirect")] +#endif public SessionFlowAfterCompletionRedirect Redirect { get; set; } /// @@ -22,6 +31,9 @@ public class SessionFlowAfterCompletion : StripeEntityhosted_confirmation, portal_homepage, or redirect. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/BillingPortal/Sessions/SessionFlowAfterCompletionHostedConfirmation.cs b/src/Stripe.net/Entities/BillingPortal/Sessions/SessionFlowAfterCompletionHostedConfirmation.cs index b17c341d8b..16594c8b3a 100644 --- a/src/Stripe.net/Entities/BillingPortal/Sessions/SessionFlowAfterCompletionHostedConfirmation.cs +++ b/src/Stripe.net/Entities/BillingPortal/Sessions/SessionFlowAfterCompletionHostedConfirmation.cs @@ -2,6 +2,9 @@ namespace Stripe.BillingPortal { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionFlowAfterCompletionHostedConfirmation : StripeEntity { @@ -9,6 +12,9 @@ public class SessionFlowAfterCompletionHostedConfirmation : StripeEntity [JsonProperty("custom_message")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("custom_message")] +#endif public string CustomMessage { get; set; } } } diff --git a/src/Stripe.net/Entities/BillingPortal/Sessions/SessionFlowAfterCompletionRedirect.cs b/src/Stripe.net/Entities/BillingPortal/Sessions/SessionFlowAfterCompletionRedirect.cs index 08a872ea53..f2b3575671 100644 --- a/src/Stripe.net/Entities/BillingPortal/Sessions/SessionFlowAfterCompletionRedirect.cs +++ b/src/Stripe.net/Entities/BillingPortal/Sessions/SessionFlowAfterCompletionRedirect.cs @@ -2,6 +2,9 @@ namespace Stripe.BillingPortal { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionFlowAfterCompletionRedirect : StripeEntity { @@ -9,6 +12,9 @@ public class SessionFlowAfterCompletionRedirect : StripeEntity [JsonProperty("return_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("return_url")] +#endif public string ReturnUrl { get; set; } } } diff --git a/src/Stripe.net/Entities/BillingPortal/Sessions/SessionFlowSubscriptionCancel.cs b/src/Stripe.net/Entities/BillingPortal/Sessions/SessionFlowSubscriptionCancel.cs index 72f18f82da..81bee9cf71 100644 --- a/src/Stripe.net/Entities/BillingPortal/Sessions/SessionFlowSubscriptionCancel.cs +++ b/src/Stripe.net/Entities/BillingPortal/Sessions/SessionFlowSubscriptionCancel.cs @@ -2,6 +2,9 @@ namespace Stripe.BillingPortal { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionFlowSubscriptionCancel : StripeEntity { @@ -9,12 +12,18 @@ public class SessionFlowSubscriptionCancel : StripeEntity [JsonProperty("retention")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("retention")] +#endif public SessionFlowSubscriptionCancelRetention Retention { get; set; } /// /// The ID of the subscription to be canceled. /// [JsonProperty("subscription")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("subscription")] +#endif public string Subscription { get; set; } } } diff --git a/src/Stripe.net/Entities/BillingPortal/Sessions/SessionFlowSubscriptionCancelRetention.cs b/src/Stripe.net/Entities/BillingPortal/Sessions/SessionFlowSubscriptionCancelRetention.cs index 6c0a144605..efeab892f7 100644 --- a/src/Stripe.net/Entities/BillingPortal/Sessions/SessionFlowSubscriptionCancelRetention.cs +++ b/src/Stripe.net/Entities/BillingPortal/Sessions/SessionFlowSubscriptionCancelRetention.cs @@ -2,6 +2,9 @@ namespace Stripe.BillingPortal { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionFlowSubscriptionCancelRetention : StripeEntity { @@ -9,12 +12,18 @@ public class SessionFlowSubscriptionCancelRetention : StripeEntityretention.type=coupon_offer. /// [JsonProperty("coupon_offer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("coupon_offer")] +#endif public SessionFlowSubscriptionCancelRetentionCouponOffer CouponOffer { get; set; } /// /// Type of retention strategy that will be used. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/BillingPortal/Sessions/SessionFlowSubscriptionCancelRetentionCouponOffer.cs b/src/Stripe.net/Entities/BillingPortal/Sessions/SessionFlowSubscriptionCancelRetentionCouponOffer.cs index 1447b8c315..27480a647b 100644 --- a/src/Stripe.net/Entities/BillingPortal/Sessions/SessionFlowSubscriptionCancelRetentionCouponOffer.cs +++ b/src/Stripe.net/Entities/BillingPortal/Sessions/SessionFlowSubscriptionCancelRetentionCouponOffer.cs @@ -2,6 +2,9 @@ namespace Stripe.BillingPortal { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionFlowSubscriptionCancelRetentionCouponOffer : StripeEntity { @@ -9,6 +12,9 @@ public class SessionFlowSubscriptionCancelRetentionCouponOffer : StripeEntity [JsonProperty("coupon")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("coupon")] +#endif public string Coupon { get; set; } } } diff --git a/src/Stripe.net/Entities/BillingPortal/Sessions/SessionFlowSubscriptionUpdate.cs b/src/Stripe.net/Entities/BillingPortal/Sessions/SessionFlowSubscriptionUpdate.cs index 3d60259714..dc8c88f449 100644 --- a/src/Stripe.net/Entities/BillingPortal/Sessions/SessionFlowSubscriptionUpdate.cs +++ b/src/Stripe.net/Entities/BillingPortal/Sessions/SessionFlowSubscriptionUpdate.cs @@ -2,6 +2,9 @@ namespace Stripe.BillingPortal { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionFlowSubscriptionUpdate : StripeEntity { @@ -9,6 +12,9 @@ public class SessionFlowSubscriptionUpdate : StripeEntity [JsonProperty("subscription")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("subscription")] +#endif public string Subscription { get; set; } } } diff --git a/src/Stripe.net/Entities/BillingPortal/Sessions/SessionFlowSubscriptionUpdateConfirm.cs b/src/Stripe.net/Entities/BillingPortal/Sessions/SessionFlowSubscriptionUpdateConfirm.cs index 711ded7d32..7846c77525 100644 --- a/src/Stripe.net/Entities/BillingPortal/Sessions/SessionFlowSubscriptionUpdateConfirm.cs +++ b/src/Stripe.net/Entities/BillingPortal/Sessions/SessionFlowSubscriptionUpdateConfirm.cs @@ -3,6 +3,9 @@ namespace Stripe.BillingPortal { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionFlowSubscriptionUpdateConfirm : StripeEntity { @@ -11,6 +14,9 @@ public class SessionFlowSubscriptionUpdateConfirm : StripeEntity [JsonProperty("discounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discounts")] +#endif public List Discounts { get; set; } /// @@ -19,12 +25,18 @@ public class SessionFlowSubscriptionUpdateConfirm : StripeEntity [JsonProperty("items")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("items")] +#endif public List Items { get; set; } /// /// The ID of the subscription to be updated. /// [JsonProperty("subscription")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("subscription")] +#endif public string Subscription { get; set; } } } diff --git a/src/Stripe.net/Entities/BillingPortal/Sessions/SessionFlowSubscriptionUpdateConfirmDiscount.cs b/src/Stripe.net/Entities/BillingPortal/Sessions/SessionFlowSubscriptionUpdateConfirmDiscount.cs index 388e69d787..04f101106e 100644 --- a/src/Stripe.net/Entities/BillingPortal/Sessions/SessionFlowSubscriptionUpdateConfirmDiscount.cs +++ b/src/Stripe.net/Entities/BillingPortal/Sessions/SessionFlowSubscriptionUpdateConfirmDiscount.cs @@ -2,6 +2,9 @@ namespace Stripe.BillingPortal { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionFlowSubscriptionUpdateConfirmDiscount : StripeEntity { @@ -9,12 +12,18 @@ public class SessionFlowSubscriptionUpdateConfirmDiscount : StripeEntity [JsonProperty("coupon")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("coupon")] +#endif public string Coupon { get; set; } /// /// The ID of a promotion code to apply to this subscription update. /// [JsonProperty("promotion_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("promotion_code")] +#endif public string PromotionCode { get; set; } } } diff --git a/src/Stripe.net/Entities/BillingPortal/Sessions/SessionFlowSubscriptionUpdateConfirmItem.cs b/src/Stripe.net/Entities/BillingPortal/Sessions/SessionFlowSubscriptionUpdateConfirmItem.cs index 2ce802db40..354f332c1a 100644 --- a/src/Stripe.net/Entities/BillingPortal/Sessions/SessionFlowSubscriptionUpdateConfirmItem.cs +++ b/src/Stripe.net/Entities/BillingPortal/Sessions/SessionFlowSubscriptionUpdateConfirmItem.cs @@ -2,6 +2,9 @@ namespace Stripe.BillingPortal { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionFlowSubscriptionUpdateConfirmItem : StripeEntity, IHasId { @@ -11,6 +14,9 @@ public class SessionFlowSubscriptionUpdateConfirmItem : StripeEntity to be updated. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// @@ -19,6 +25,9 @@ public class SessionFlowSubscriptionUpdateConfirmItem : StripeEntityfeatures.subscription_update.products. /// [JsonProperty("price")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("price")] +#endif public string Price { get; set; } /// @@ -26,6 +35,9 @@ public class SessionFlowSubscriptionUpdateConfirmItem : StripeEntity [JsonProperty("quantity")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("quantity")] +#endif public long Quantity { get; set; } } } diff --git a/src/Stripe.net/Entities/Capabilities/Capability.cs b/src/Stripe.net/Entities/Capabilities/Capability.cs index b460af24e2..3e726450fc 100644 --- a/src/Stripe.net/Entities/Capabilities/Capability.cs +++ b/src/Stripe.net/Entities/Capabilities/Capability.cs @@ -4,6 +4,9 @@ namespace Stripe using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// This is an object representing a capability for a Stripe account. @@ -11,18 +14,27 @@ namespace Stripe /// Related guide: Account /// capabilities. /// +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class Capability : StripeEntity, IHasId, IHasObject { /// /// The identifier for the capability. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } #region Expandable Account @@ -32,6 +44,9 @@ public class Capability : StripeEntity, IHasId, IHasObject /// The account for which the capability enables functionality. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string AccountId { get => this.InternalAccount?.Id; @@ -45,6 +60,9 @@ public string AccountId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Account Account { get => this.InternalAccount?.ExpandedObject; @@ -53,16 +71,26 @@ public Account Account [JsonProperty("account")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalAccount { get; set; } #endregion [JsonProperty("future_requirements")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("future_requirements")] +#endif public CapabilityFutureRequirements FutureRequirements { get; set; } /// /// Whether the capability has been requested. /// [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif public bool Requested { get; set; } /// @@ -70,9 +98,16 @@ public Account Account /// [JsonProperty("requested_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? RequestedAt { get; set; } [JsonProperty("requirements")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requirements")] +#endif public CapabilityRequirements Requirements { get; set; } /// @@ -81,6 +116,9 @@ public Account Account /// unrequested. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } } } diff --git a/src/Stripe.net/Entities/Capabilities/CapabilityFutureRequirements.cs b/src/Stripe.net/Entities/Capabilities/CapabilityFutureRequirements.cs index 1dc119e81c..fc4c025db0 100644 --- a/src/Stripe.net/Entities/Capabilities/CapabilityFutureRequirements.cs +++ b/src/Stripe.net/Entities/Capabilities/CapabilityFutureRequirements.cs @@ -5,6 +5,9 @@ namespace Stripe using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CapabilityFutureRequirements : StripeEntity { @@ -13,6 +16,9 @@ public class CapabilityFutureRequirements : StripeEntity [JsonProperty("alternatives")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("alternatives")] +#endif public List Alternatives { get; set; } /// @@ -23,6 +29,10 @@ public class CapabilityFutureRequirements : StripeEntity [JsonProperty("current_deadline")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("current_deadline")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? CurrentDeadline { get; set; } /// @@ -31,6 +41,9 @@ public class CapabilityFutureRequirements : StripeEntityrequirements hash. /// [JsonProperty("currently_due")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currently_due")] +#endif public List CurrentlyDue { get; set; } /// @@ -43,6 +56,9 @@ public class CapabilityFutureRequirements : StripeEntityrequirements.fields_needed. /// [JsonProperty("disabled_reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("disabled_reason")] +#endif public string DisabledReason { get; set; } /// @@ -50,6 +66,9 @@ public class CapabilityFutureRequirements : StripeEntity [JsonProperty("errors")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("errors")] +#endif public List Errors { get; set; } /// @@ -57,6 +76,9 @@ public class CapabilityFutureRequirements : StripeEntitycurrently_due as well. /// [JsonProperty("eventually_due")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("eventually_due")] +#endif public List EventuallyDue { get; set; } /// @@ -66,6 +88,9 @@ public class CapabilityFutureRequirements : StripeEntityrequirements.past_due. /// [JsonProperty("past_due")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("past_due")] +#endif public List PastDue { get; set; } /// @@ -77,6 +102,9 @@ public class CapabilityFutureRequirements : StripeEntity [JsonProperty("pending_verification")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("pending_verification")] +#endif public List PendingVerification { get; set; } } } diff --git a/src/Stripe.net/Entities/Capabilities/CapabilityFutureRequirementsAlternative.cs b/src/Stripe.net/Entities/Capabilities/CapabilityFutureRequirementsAlternative.cs index acda904506..5804eb74ef 100644 --- a/src/Stripe.net/Entities/Capabilities/CapabilityFutureRequirementsAlternative.cs +++ b/src/Stripe.net/Entities/Capabilities/CapabilityFutureRequirementsAlternative.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CapabilityFutureRequirementsAlternative : StripeEntity { @@ -10,6 +13,9 @@ public class CapabilityFutureRequirementsAlternative : StripeEntityoriginal_fields_due. /// [JsonProperty("alternative_fields_due")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("alternative_fields_due")] +#endif public List AlternativeFieldsDue { get; set; } /// @@ -17,6 +23,9 @@ public class CapabilityFutureRequirementsAlternative : StripeEntityalternative_fields_due. /// [JsonProperty("original_fields_due")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("original_fields_due")] +#endif public List OriginalFieldsDue { get; set; } } } diff --git a/src/Stripe.net/Entities/Capabilities/CapabilityFutureRequirementsError.cs b/src/Stripe.net/Entities/Capabilities/CapabilityFutureRequirementsError.cs index 726c60f913..b1b9fb5bdb 100644 --- a/src/Stripe.net/Entities/Capabilities/CapabilityFutureRequirementsError.cs +++ b/src/Stripe.net/Entities/Capabilities/CapabilityFutureRequirementsError.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CapabilityFutureRequirementsError : StripeEntity { @@ -69,6 +72,9 @@ public class CapabilityFutureRequirementsError : StripeEntityverification_supportability. /// [JsonProperty("code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("code")] +#endif public string Code { get; set; } /// @@ -76,6 +82,9 @@ public class CapabilityFutureRequirementsError : StripeEntity [JsonProperty("reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reason")] +#endif public string Reason { get; set; } /// @@ -83,6 +92,9 @@ public class CapabilityFutureRequirementsError : StripeEntity [JsonProperty("requirement")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requirement")] +#endif public string Requirement { get; set; } } } diff --git a/src/Stripe.net/Entities/Capabilities/CapabilityRequirements.cs b/src/Stripe.net/Entities/Capabilities/CapabilityRequirements.cs index d55f043df9..65a5b8a3f4 100644 --- a/src/Stripe.net/Entities/Capabilities/CapabilityRequirements.cs +++ b/src/Stripe.net/Entities/Capabilities/CapabilityRequirements.cs @@ -5,6 +5,9 @@ namespace Stripe using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CapabilityRequirements : StripeEntity { @@ -13,6 +16,9 @@ public class CapabilityRequirements : StripeEntity /// fields instead. /// [JsonProperty("alternatives")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("alternatives")] +#endif public List Alternatives { get; set; } /// @@ -22,6 +28,10 @@ public class CapabilityRequirements : StripeEntity /// [JsonProperty("current_deadline")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("current_deadline")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? CurrentDeadline { get; set; } /// @@ -30,6 +40,9 @@ public class CapabilityRequirements : StripeEntity /// capability is disabled. /// [JsonProperty("currently_due")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currently_due")] +#endif public List CurrentlyDue { get; set; } /// @@ -42,6 +55,9 @@ public class CapabilityRequirements : StripeEntity /// or requirements.fields_needed. /// [JsonProperty("disabled_reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("disabled_reason")] +#endif public string DisabledReason { get; set; } /// @@ -49,6 +65,9 @@ public class CapabilityRequirements : StripeEntity /// or verification failed. /// [JsonProperty("errors")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("errors")] +#endif public List Errors { get; set; } /// @@ -57,6 +76,9 @@ public class CapabilityRequirements : StripeEntity /// current_deadline becomes set. /// [JsonProperty("eventually_due")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("eventually_due")] +#endif public List EventuallyDue { get; set; } /// @@ -64,6 +86,9 @@ public class CapabilityRequirements : StripeEntity /// collected to enable the capability on the account. /// [JsonProperty("past_due")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("past_due")] +#endif public List PastDue { get; set; } /// @@ -75,6 +100,9 @@ public class CapabilityRequirements : StripeEntity /// verification is still pending. /// [JsonProperty("pending_verification")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("pending_verification")] +#endif public List PendingVerification { get; set; } } } diff --git a/src/Stripe.net/Entities/Capabilities/CapabilityRequirementsAlternative.cs b/src/Stripe.net/Entities/Capabilities/CapabilityRequirementsAlternative.cs index f698304177..e390f41909 100644 --- a/src/Stripe.net/Entities/Capabilities/CapabilityRequirementsAlternative.cs +++ b/src/Stripe.net/Entities/Capabilities/CapabilityRequirementsAlternative.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CapabilityRequirementsAlternative : StripeEntity { @@ -10,6 +13,9 @@ public class CapabilityRequirementsAlternative : StripeEntityoriginal_fields_due. /// [JsonProperty("alternative_fields_due")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("alternative_fields_due")] +#endif public List AlternativeFieldsDue { get; set; } /// @@ -17,6 +23,9 @@ public class CapabilityRequirementsAlternative : StripeEntityalternative_fields_due. /// [JsonProperty("original_fields_due")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("original_fields_due")] +#endif public List OriginalFieldsDue { get; set; } } } diff --git a/src/Stripe.net/Entities/Cards/Card.cs b/src/Stripe.net/Entities/Cards/Card.cs index 4ff3810573..29c7f98ec9 100644 --- a/src/Stripe.net/Entities/Cards/Card.cs +++ b/src/Stripe.net/Entities/Cards/Card.cs @@ -4,6 +4,9 @@ namespace Stripe using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// You can store multiple cards on a customer in order to charge the customer later. You @@ -13,18 +16,27 @@ namespace Stripe /// Related guide: Card payments with /// Sources. /// +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class Card : StripeEntity, IHasId, IHasMetadata, IHasObject, IExternalAccount, IPaymentSource { /// /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } #region Expandable Account @@ -38,6 +50,9 @@ public class Card : StripeEntity, IHasId, IHasMetadata, IHasObject, IExter /// is application, which includes Custom accounts. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string AccountId { get => this.InternalAccount?.Id; @@ -55,6 +70,9 @@ public string AccountId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Account Account { get => this.InternalAccount?.ExpandedObject; @@ -63,6 +81,10 @@ public Account Account [JsonProperty("account")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalAccount { get; set; } #endregion @@ -70,18 +92,27 @@ public Account Account /// City/District/Suburb/Town/Village. /// [JsonProperty("address_city")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_city")] +#endif public string AddressCity { get; set; } /// /// Billing address country, if provided when creating card. /// [JsonProperty("address_country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_country")] +#endif public string AddressCountry { get; set; } /// /// Address line 1 (Street address/PO Box/Company name). /// [JsonProperty("address_line1")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_line1")] +#endif public string AddressLine1 { get; set; } /// @@ -89,24 +120,36 @@ public Account Account /// unavailable, or unchecked. /// [JsonProperty("address_line1_check")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_line1_check")] +#endif public string AddressLine1Check { get; set; } /// /// Address line 2 (Apartment/Suite/Unit/Building). /// [JsonProperty("address_line2")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_line2")] +#endif public string AddressLine2 { get; set; } /// /// State/County/Province/Region. /// [JsonProperty("address_state")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_state")] +#endif public string AddressState { get; set; } /// /// ZIP or postal code. /// [JsonProperty("address_zip")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_zip")] +#endif public string AddressZip { get; set; } /// @@ -114,6 +157,9 @@ public Account Account /// unavailable, or unchecked. /// [JsonProperty("address_zip_check")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_zip_check")] +#endif public string AddressZipCheck { get; set; } /// @@ -122,6 +168,9 @@ public Account Account /// One of: instant, or standard. /// [JsonProperty("available_payout_methods")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("available_payout_methods")] +#endif public List AvailablePayoutMethods { get; set; } /// @@ -130,6 +179,9 @@ public Account Account /// UnionPay, Visa, or Unknown. /// [JsonProperty("brand")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("brand")] +#endif public string Brand { get; set; } /// @@ -137,6 +189,9 @@ public Account Account /// to get a sense of the international breakdown of cards you've collected. /// [JsonProperty("country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country")] +#endif public string Country { get; set; } /// @@ -149,6 +204,9 @@ public Account Account /// is application, which includes Custom accounts. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } #region Expandable Customer @@ -159,6 +217,9 @@ public Account Account /// the card belongs to an account or recipient instead. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string CustomerId { get => this.InternalCustomer?.Id; @@ -173,6 +234,9 @@ public string CustomerId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Customer Customer { get => this.InternalCustomer?.ExpandedObject; @@ -181,6 +245,10 @@ public Customer Customer [JsonProperty("customer")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalCustomer { get; set; } #endregion @@ -193,6 +261,9 @@ public Customer Customer /// if a card is valid without a charge. /// [JsonProperty("cvc_check")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cvc_check")] +#endif public string CvcCheck { get; set; } /// @@ -202,12 +273,19 @@ public Customer Customer /// is application, which includes Custom accounts. /// [JsonProperty("default_for_currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("default_for_currency")] +#endif public bool? DefaultForCurrency { get; set; } /// /// Whether this object is deleted or not. /// [JsonProperty("deleted", NullValueHandling = NullValueHandling.Ignore)] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("deleted")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] +#endif public bool? Deleted { get; set; } /// @@ -215,24 +293,36 @@ public Customer Customer /// only and not typically available in standard API requests.). /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// /// (For tokenized numbers only.) The last four digits of the device account number. /// [JsonProperty("dynamic_last4")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("dynamic_last4")] +#endif public string DynamicLast4 { get; set; } /// /// Two-digit number representing the card's expiration month. /// [JsonProperty("exp_month")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("exp_month")] +#endif public long ExpMonth { get; set; } /// /// Four-digit number representing the card's expiration year. /// [JsonProperty("exp_year")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("exp_year")] +#endif public long ExpYear { get; set; } /// @@ -245,6 +335,9 @@ public Customer Customer /// fingerprints for the same card---one for India and one for the rest of the world.. /// [JsonProperty("fingerprint")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fingerprint")] +#endif public string Fingerprint { get; set; } /// @@ -252,6 +345,9 @@ public Customer Customer /// unknown. /// [JsonProperty("funding")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("funding")] +#endif public string Funding { get; set; } /// @@ -259,6 +355,9 @@ public Customer Customer /// available in standard API requests.). /// [JsonProperty("iin")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("iin")] +#endif public string Iin { get; set; } /// @@ -266,12 +365,18 @@ public Customer Customer /// in standard API requests.). /// [JsonProperty("issuer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("issuer")] +#endif public string Issuer { get; set; } /// /// The last four digits of the card. /// [JsonProperty("last4")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last4")] +#endif public string Last4 { get; set; } /// @@ -280,15 +385,24 @@ public Customer Customer /// object in a structured format. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// Cardholder name. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } [JsonProperty("networks")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("networks")] +#endif public CardNetworks Networks { get; set; } /// @@ -298,6 +412,9 @@ public Customer Customer /// until account details are updated. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } /// @@ -306,6 +423,9 @@ public Customer Customer /// visa_checkout, or null. /// [JsonProperty("tokenization_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tokenization_method")] +#endif public string TokenizationMethod { get; set; } } } diff --git a/src/Stripe.net/Entities/Cards/CardNetworks.cs b/src/Stripe.net/Entities/Cards/CardNetworks.cs index 8d583439c0..3c68c4ca83 100644 --- a/src/Stripe.net/Entities/Cards/CardNetworks.cs +++ b/src/Stripe.net/Entities/Cards/CardNetworks.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CardNetworks : StripeEntity { @@ -11,6 +14,9 @@ public class CardNetworks : StripeEntity /// valid for the card. /// [JsonProperty("preferred")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preferred")] +#endif public string Preferred { get; set; } } } diff --git a/src/Stripe.net/Entities/CashBalances/CashBalance.cs b/src/Stripe.net/Entities/CashBalances/CashBalance.cs index 63abbecdaf..46e69847e8 100644 --- a/src/Stripe.net/Entities/CashBalances/CashBalance.cs +++ b/src/Stripe.net/Entities/CashBalances/CashBalance.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// A customer's Cash balance represents real funds. Customers can add funds to their @@ -15,6 +18,9 @@ public class CashBalance : StripeEntity, IHasObject /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// @@ -23,12 +29,18 @@ public class CashBalance : StripeEntity, IHasObject /// href="https://stripe.com/docs/currencies#zero-decimal">smallest currency unit. /// [JsonProperty("available")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("available")] +#endif public Dictionary Available { get; set; } /// /// The ID of the customer whose cash balance this object represents. /// [JsonProperty("customer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] +#endif public string Customer { get; set; } /// @@ -36,9 +48,15 @@ public class CashBalance : StripeEntity, IHasObject /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } [JsonProperty("settings")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("settings")] +#endif public CashBalanceSettings Settings { get; set; } } } diff --git a/src/Stripe.net/Entities/CashBalances/CashBalanceSettings.cs b/src/Stripe.net/Entities/CashBalances/CashBalanceSettings.cs index 44512f5f36..cafed2e7d0 100644 --- a/src/Stripe.net/Entities/CashBalances/CashBalanceSettings.cs +++ b/src/Stripe.net/Entities/CashBalances/CashBalanceSettings.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CashBalanceSettings : StripeEntity { @@ -10,6 +13,9 @@ public class CashBalanceSettings : StripeEntity /// One of: automatic, or manual. /// [JsonProperty("reconciliation_mode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reconciliation_mode")] +#endif public string ReconciliationMode { get; set; } /// @@ -17,6 +23,9 @@ public class CashBalanceSettings : StripeEntity /// to this customer cash balance. /// [JsonProperty("using_merchant_default")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("using_merchant_default")] +#endif public bool UsingMerchantDefault { get; set; } } } diff --git a/src/Stripe.net/Entities/Charges/Charge.cs b/src/Stripe.net/Entities/Charges/Charge.cs index 60487e9e07..452ad563c5 100644 --- a/src/Stripe.net/Entities/Charges/Charge.cs +++ b/src/Stripe.net/Entities/Charges/Charge.cs @@ -5,6 +5,9 @@ namespace Stripe using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// The Charge object represents a single attempt to move money into your Stripe @@ -13,18 +16,27 @@ namespace Stripe /// Some legacy payment flows create Charges directly, which is not recommended for new /// integrations. /// +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class Charge : StripeEntity, IHasId, IHasMetadata, IHasObject, IBalanceTransactionSource { /// /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// @@ -37,6 +49,9 @@ public class Charge : StripeEntity, IHasId, IHasMetadata, IHasObject, IB /// 99999999 for a USD charge of $999,999.99). /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long Amount { get; set; } /// @@ -44,6 +59,9 @@ public class Charge : StripeEntity, IHasId, IHasMetadata, IHasObject, IB /// the charge if a partial capture was made). /// [JsonProperty("amount_captured")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_captured")] +#endif public long AmountCaptured { get; set; } /// @@ -51,6 +69,9 @@ public class Charge : StripeEntity, IHasId, IHasMetadata, IHasObject, IB /// the charge if a partial refund was issued). /// [JsonProperty("amount_refunded")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_refunded")] +#endif public long AmountRefunded { get; set; } #region Expandable Application @@ -60,6 +81,9 @@ public class Charge : StripeEntity, IHasId, IHasMetadata, IHasObject, IB /// ID of the Connect application that created the charge. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string ApplicationId { get => this.InternalApplication?.Id; @@ -73,6 +97,9 @@ public string ApplicationId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Application Application { get => this.InternalApplication?.ExpandedObject; @@ -81,6 +108,10 @@ public Application Application [JsonProperty("application")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("application")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalApplication { get; set; } #endregion @@ -93,6 +124,9 @@ public Application Application /// documentation for details. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string ApplicationFeeId { get => this.InternalApplicationFee?.Id; @@ -108,6 +142,9 @@ public string ApplicationFeeId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public ApplicationFee ApplicationFee { get => this.InternalApplicationFee?.ExpandedObject; @@ -116,6 +153,10 @@ public ApplicationFee ApplicationFee [JsonProperty("application_fee")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("application_fee")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalApplicationFee { get; set; } #endregion @@ -125,12 +166,18 @@ public ApplicationFee ApplicationFee /// documentation for details. /// [JsonProperty("application_fee_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("application_fee_amount")] +#endif public long? ApplicationFeeAmount { get; set; } /// /// Authorization code on the charge. /// [JsonProperty("authorization_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("authorization_code")] +#endif public string AuthorizationCode { get; set; } #region Expandable BalanceTransaction @@ -141,6 +188,9 @@ public ApplicationFee ApplicationFee /// balance (not including refunds or disputes). /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string BalanceTransactionId { get => this.InternalBalanceTransaction?.Id; @@ -155,6 +205,9 @@ public string BalanceTransactionId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public BalanceTransaction BalanceTransaction { get => this.InternalBalanceTransaction?.ExpandedObject; @@ -163,10 +216,17 @@ public BalanceTransaction BalanceTransaction [JsonProperty("balance_transaction")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("balance_transaction")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalBalanceTransaction { get; set; } #endregion [JsonProperty("billing_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_details")] +#endif public ChargeBillingDetails BillingDetails { get; set; } /// @@ -176,6 +236,9 @@ public BalanceTransaction BalanceTransaction /// only exists for card payments. /// [JsonProperty("calculated_statement_descriptor")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("calculated_statement_descriptor")] +#endif public string CalculatedStatementDescriptor { get; set; } /// @@ -183,6 +246,9 @@ public BalanceTransaction BalanceTransaction /// uncaptured or has since been captured. /// [JsonProperty("captured")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("captured")] +#endif public bool Captured { get; set; } /// @@ -190,6 +256,10 @@ public BalanceTransaction BalanceTransaction /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -198,6 +268,9 @@ public BalanceTransaction BalanceTransaction /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } #region Expandable Customer @@ -207,6 +280,9 @@ public BalanceTransaction BalanceTransaction /// ID of the customer this charge is for if one exists. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string CustomerId { get => this.InternalCustomer?.Id; @@ -220,6 +296,9 @@ public string CustomerId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Customer Customer { get => this.InternalCustomer?.ExpandedObject; @@ -228,6 +307,10 @@ public Customer Customer [JsonProperty("customer")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalCustomer { get; set; } #endregion @@ -235,12 +318,18 @@ public Customer Customer /// An arbitrary string attached to the object. Often useful for displaying to users. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// /// Whether the charge has been disputed. /// [JsonProperty("disputed")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("disputed")] +#endif public bool Disputed { get; set; } #region Expandable FailureBalanceTransaction @@ -251,6 +340,9 @@ public Customer Customer /// due to payment failure. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string FailureBalanceTransactionId { get => this.InternalFailureBalanceTransaction?.Id; @@ -265,6 +357,9 @@ public string FailureBalanceTransactionId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public BalanceTransaction FailureBalanceTransaction { get => this.InternalFailureBalanceTransaction?.ExpandedObject; @@ -273,6 +368,10 @@ public BalanceTransaction FailureBalanceTransaction [JsonProperty("failure_balance_transaction")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("failure_balance_transaction")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalFailureBalanceTransaction { get; set; } #endregion @@ -281,18 +380,27 @@ public BalanceTransaction FailureBalanceTransaction /// href="https://stripe.com/docs/error-codes">the errors section for a list of codes). /// [JsonProperty("failure_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("failure_code")] +#endif public string FailureCode { get; set; } /// /// Message to user further explaining reason for charge failure if available. /// [JsonProperty("failure_message")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("failure_message")] +#endif public string FailureMessage { get; set; } /// /// Information on fraud assessments for the charge. /// [JsonProperty("fraud_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fraud_details")] +#endif public ChargeFraudDetails FraudDetails { get; set; } #region Expandable Invoice @@ -302,6 +410,9 @@ public BalanceTransaction FailureBalanceTransaction /// ID of the invoice this charge is for if one exists. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string InvoiceId { get => this.InternalInvoice?.Id; @@ -315,6 +426,9 @@ public string InvoiceId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Invoice Invoice { get => this.InternalInvoice?.ExpandedObject; @@ -323,10 +437,17 @@ public Invoice Invoice [JsonProperty("invoice")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("invoice")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalInvoice { get; set; } #endregion [JsonProperty("level3")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("level3")] +#endif public ChargeLevel3 Level3 { get; set; } /// @@ -334,6 +455,9 @@ public Invoice Invoice /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// @@ -342,6 +466,9 @@ public Invoice Invoice /// object in a structured format. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } #region Expandable OnBehalfOf @@ -354,6 +481,9 @@ public Invoice Invoice /// documentation for details. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string OnBehalfOfId { get => this.InternalOnBehalfOf?.Id; @@ -370,6 +500,9 @@ public string OnBehalfOfId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Account OnBehalfOf { get => this.InternalOnBehalfOf?.ExpandedObject; @@ -378,6 +511,10 @@ public Account OnBehalfOf [JsonProperty("on_behalf_of")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("on_behalf_of")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalOnBehalfOf { get; set; } #endregion @@ -386,12 +523,18 @@ public Account OnBehalfOf /// href="https://stripe.com/docs/declines">understanding declines for details. /// [JsonProperty("outcome")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("outcome")] +#endif public ChargeOutcome Outcome { get; set; } /// /// true if the charge succeeded, or was successfully authorized for later capture. /// [JsonProperty("paid")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("paid")] +#endif public bool Paid { get; set; } #region Expandable PaymentIntent @@ -401,6 +544,9 @@ public Account OnBehalfOf /// ID of the PaymentIntent associated with this charge, if one exists. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string PaymentIntentId { get => this.InternalPaymentIntent?.Id; @@ -414,6 +560,9 @@ public string PaymentIntentId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public PaymentIntent PaymentIntent { get => this.InternalPaymentIntent?.ExpandedObject; @@ -422,6 +571,10 @@ public PaymentIntent PaymentIntent [JsonProperty("payment_intent")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_intent")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalPaymentIntent { get; set; } #endregion @@ -429,12 +582,18 @@ public PaymentIntent PaymentIntent /// ID of the payment method used in this charge. /// [JsonProperty("payment_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method")] +#endif public string PaymentMethod { get; set; } /// /// Details about the payment method at the time of the transaction. /// [JsonProperty("payment_method_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_details")] +#endif public ChargePaymentMethodDetails PaymentMethodDetails { get; set; } /// @@ -443,12 +602,18 @@ public PaymentIntent PaymentIntent /// information. /// [JsonProperty("radar_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("radar_options")] +#endif public ChargeRadarOptions RadarOptions { get; set; } /// /// This is the email address that the receipt for this charge was sent to. /// [JsonProperty("receipt_email")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("receipt_email")] +#endif public string ReceiptEmail { get; set; } /// @@ -456,6 +621,9 @@ public PaymentIntent PaymentIntent /// attribute will be null until a receipt has been sent. /// [JsonProperty("receipt_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("receipt_number")] +#endif public string ReceiptNumber { get; set; } /// @@ -464,6 +632,9 @@ public PaymentIntent PaymentIntent /// the receipt will be stylized as an Invoice receipt. /// [JsonProperty("receipt_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("receipt_url")] +#endif public string ReceiptUrl { get; set; } /// @@ -471,12 +642,18 @@ public PaymentIntent PaymentIntent /// this attribute will still be false. /// [JsonProperty("refunded")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("refunded")] +#endif public bool Refunded { get; set; } /// /// A list of refunds that have been applied to the charge. /// [JsonProperty("refunds")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("refunds")] +#endif public StripeList Refunds { get; set; } #region Expandable Review @@ -486,6 +663,9 @@ public PaymentIntent PaymentIntent /// ID of the review associated with this charge if one exists. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string ReviewId { get => this.InternalReview?.Id; @@ -499,6 +679,9 @@ public string ReviewId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Review Review { get => this.InternalReview?.ExpandedObject; @@ -507,6 +690,10 @@ public Review Review [JsonProperty("review")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("review")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalReview { get; set; } #endregion @@ -514,6 +701,9 @@ public Review Review /// Shipping information for the charge. /// [JsonProperty("shipping")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping")] +#endif public Shipping Shipping { get; set; } /// @@ -523,6 +713,9 @@ public Review Review /// [JsonProperty("source")] [JsonConverter(typeof(StripeObjectConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("source")] +#endif public IPaymentSource Source { get; set; } #region Expandable SourceTransfer @@ -534,6 +727,9 @@ public Review Review /// Connect documentation for details. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string SourceTransferId { get => this.InternalSourceTransfer?.Id; @@ -549,6 +745,9 @@ public string SourceTransferId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Transfer SourceTransfer { get => this.InternalSourceTransfer?.ExpandedObject; @@ -557,6 +756,10 @@ public Transfer SourceTransfer [JsonProperty("source_transfer")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("source_transfer")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalSourceTransfer { get; set; } #endregion @@ -571,6 +774,9 @@ public Transfer SourceTransfer /// statement_descriptor_suffix, in which case this value is used as the suffix. /// [JsonProperty("statement_descriptor")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("statement_descriptor")] +#endif public string StatementDescriptor { get; set; } /// @@ -581,6 +787,9 @@ public Transfer SourceTransfer /// the account's statement descriptor. /// [JsonProperty("statement_descriptor_suffix")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("statement_descriptor_suffix")] +#endif public string StatementDescriptorSuffix { get; set; } /// @@ -588,6 +797,9 @@ public Transfer SourceTransfer /// One of: failed, pending, or succeeded. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } #region Expandable Transfer @@ -598,6 +810,9 @@ public Transfer SourceTransfer /// created using the destination parameter). /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string TransferId { get => this.InternalTransfer?.Id; @@ -612,6 +827,9 @@ public string TransferId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Transfer Transfer { get => this.InternalTransfer?.ExpandedObject; @@ -620,6 +838,10 @@ public Transfer Transfer [JsonProperty("transfer")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transfer")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalTransfer { get; set; } #endregion @@ -629,6 +851,9 @@ public Transfer Transfer /// the Connect documentation for details. /// [JsonProperty("transfer_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transfer_data")] +#endif public ChargeTransferData TransferData { get; set; } /// @@ -637,6 +862,9 @@ public Transfer Transfer /// documentation for details. /// [JsonProperty("transfer_group")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transfer_group")] +#endif public string TransferGroup { get; set; } } } diff --git a/src/Stripe.net/Entities/Charges/ChargeBillingDetails.cs b/src/Stripe.net/Entities/Charges/ChargeBillingDetails.cs index 78ead560cb..7bc3476a0c 100644 --- a/src/Stripe.net/Entities/Charges/ChargeBillingDetails.cs +++ b/src/Stripe.net/Entities/Charges/ChargeBillingDetails.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ChargeBillingDetails : StripeEntity { @@ -9,24 +12,36 @@ public class ChargeBillingDetails : StripeEntity /// Billing address. /// [JsonProperty("address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address")] +#endif public Address Address { get; set; } /// /// Email address. /// [JsonProperty("email")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("email")] +#endif public string Email { get; set; } /// /// Full name. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } /// /// Billing phone number (including extension). /// [JsonProperty("phone")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("phone")] +#endif public string Phone { get; set; } } } diff --git a/src/Stripe.net/Entities/Charges/ChargeFraudDetails.cs b/src/Stripe.net/Entities/Charges/ChargeFraudDetails.cs index 7f76d07ead..bf84940c13 100644 --- a/src/Stripe.net/Entities/Charges/ChargeFraudDetails.cs +++ b/src/Stripe.net/Entities/Charges/ChargeFraudDetails.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ChargeFraudDetails : StripeEntity { @@ -9,6 +12,9 @@ public class ChargeFraudDetails : StripeEntity /// Assessments from Stripe. If set, the value is fraudulent. /// [JsonProperty("stripe_report")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("stripe_report")] +#endif public string StripeReport { get; set; } /// @@ -16,6 +22,9 @@ public class ChargeFraudDetails : StripeEntity /// fraudulent. /// [JsonProperty("user_report")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("user_report")] +#endif public string UserReport { get; set; } } } diff --git a/src/Stripe.net/Entities/Charges/ChargeLevel3.cs b/src/Stripe.net/Entities/Charges/ChargeLevel3.cs index b0d5906173..2089ffaf5f 100644 --- a/src/Stripe.net/Entities/Charges/ChargeLevel3.cs +++ b/src/Stripe.net/Entities/Charges/ChargeLevel3.cs @@ -3,25 +3,46 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ChargeLevel3 : StripeEntity { [JsonProperty("customer_reference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_reference")] +#endif public string CustomerReference { get; set; } [JsonProperty("line_items")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("line_items")] +#endif public List LineItems { get; set; } [JsonProperty("merchant_reference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("merchant_reference")] +#endif public string MerchantReference { get; set; } [JsonProperty("shipping_address_zip")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping_address_zip")] +#endif public string ShippingAddressZip { get; set; } [JsonProperty("shipping_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping_amount")] +#endif public long ShippingAmount { get; set; } [JsonProperty("shipping_from_zip")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping_from_zip")] +#endif public string ShippingFromZip { get; set; } } } diff --git a/src/Stripe.net/Entities/Charges/ChargeOutcome.cs b/src/Stripe.net/Entities/Charges/ChargeOutcome.cs index 727bdfccd9..5f0549e20a 100644 --- a/src/Stripe.net/Entities/Charges/ChargeOutcome.cs +++ b/src/Stripe.net/Entities/Charges/ChargeOutcome.cs @@ -3,7 +3,13 @@ namespace Stripe { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class ChargeOutcome : StripeEntity { /// @@ -14,6 +20,9 @@ public class ChargeOutcome : StripeEntity /// bank authorization, and may temporarily appear as "pending" on a cardholder's statement. /// [JsonProperty("network_status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("network_status")] +#endif public string NetworkStatus { get; set; } /// @@ -25,6 +34,9 @@ public class ChargeOutcome : StripeEntity /// href="https://stripe.com/docs/declines">understanding declines for more details. /// [JsonProperty("reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reason")] +#endif public string Reason { get; set; } /// @@ -35,6 +47,9 @@ public class ChargeOutcome : StripeEntity /// will have the value unknown. This field is only available with Radar. /// [JsonProperty("risk_level")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("risk_level")] +#endif public string RiskLevel { get; set; } /// @@ -44,6 +59,9 @@ public class ChargeOutcome : StripeEntity /// field will not be present. This field is only available with Radar for Fraud Teams. /// [JsonProperty("risk_score")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("risk_score")] +#endif public long RiskScore { get; set; } #region Expandable Rule @@ -53,6 +71,9 @@ public class ChargeOutcome : StripeEntity /// The ID of the Radar rule that matched the payment, if applicable. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string RuleId { get => this.InternalRule?.Id; @@ -66,6 +87,9 @@ public string RuleId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Radar.Rule Rule { get => this.InternalRule?.ExpandedObject; @@ -74,6 +98,10 @@ public Radar.Rule Rule [JsonProperty("rule")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("rule")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalRule { get; set; } #endregion @@ -82,6 +110,9 @@ public Radar.Rule Rule /// recipient of the payment), not your customer. /// [JsonProperty("seller_message")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("seller_message")] +#endif public string SellerMessage { get; set; } /// @@ -91,6 +122,9 @@ public Radar.Rule Rule /// href="https://stripe.com/docs/radar/reviews">Radar reviews for details. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetails.cs b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetails.cs index 6abd0a6f7c..73ba18da48 100644 --- a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetails.cs +++ b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetails.cs @@ -2,142 +2,280 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ChargePaymentMethodDetails : StripeEntity { [JsonProperty("ach_credit_transfer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ach_credit_transfer")] +#endif public ChargePaymentMethodDetailsAchCreditTransfer AchCreditTransfer { get; set; } [JsonProperty("ach_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ach_debit")] +#endif public ChargePaymentMethodDetailsAchDebit AchDebit { get; set; } [JsonProperty("acss_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("acss_debit")] +#endif public ChargePaymentMethodDetailsAcssDebit AcssDebit { get; set; } [JsonProperty("affirm")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("affirm")] +#endif public ChargePaymentMethodDetailsAffirm Affirm { get; set; } [JsonProperty("afterpay_clearpay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("afterpay_clearpay")] +#endif public ChargePaymentMethodDetailsAfterpayClearpay AfterpayClearpay { get; set; } [JsonProperty("alipay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("alipay")] +#endif public ChargePaymentMethodDetailsAlipay Alipay { get; set; } [JsonProperty("alma")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("alma")] +#endif public ChargePaymentMethodDetailsAlma Alma { get; set; } [JsonProperty("amazon_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amazon_pay")] +#endif public ChargePaymentMethodDetailsAmazonPay AmazonPay { get; set; } [JsonProperty("au_becs_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("au_becs_debit")] +#endif public ChargePaymentMethodDetailsAuBecsDebit AuBecsDebit { get; set; } [JsonProperty("bacs_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bacs_debit")] +#endif public ChargePaymentMethodDetailsBacsDebit BacsDebit { get; set; } [JsonProperty("bancontact")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bancontact")] +#endif public ChargePaymentMethodDetailsBancontact Bancontact { get; set; } [JsonProperty("blik")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("blik")] +#endif public ChargePaymentMethodDetailsBlik Blik { get; set; } [JsonProperty("boleto")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("boleto")] +#endif public ChargePaymentMethodDetailsBoleto Boleto { get; set; } [JsonProperty("card")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card")] +#endif public ChargePaymentMethodDetailsCard Card { get; set; } [JsonProperty("card_present")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card_present")] +#endif public ChargePaymentMethodDetailsCardPresent CardPresent { get; set; } [JsonProperty("cashapp")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cashapp")] +#endif public ChargePaymentMethodDetailsCashapp Cashapp { get; set; } [JsonProperty("customer_balance")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_balance")] +#endif public ChargePaymentMethodDetailsCustomerBalance CustomerBalance { get; set; } [JsonProperty("eps")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("eps")] +#endif public ChargePaymentMethodDetailsEps Eps { get; set; } [JsonProperty("fpx")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fpx")] +#endif public ChargePaymentMethodDetailsFpx Fpx { get; set; } [JsonProperty("giropay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("giropay")] +#endif public ChargePaymentMethodDetailsGiropay Giropay { get; set; } [JsonProperty("grabpay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("grabpay")] +#endif public ChargePaymentMethodDetailsGrabpay Grabpay { get; set; } [JsonProperty("ideal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ideal")] +#endif public ChargePaymentMethodDetailsIdeal Ideal { get; set; } [JsonProperty("interac_present")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interac_present")] +#endif public ChargePaymentMethodDetailsInteracPresent InteracPresent { get; set; } [JsonProperty("kakao_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("kakao_pay")] +#endif public ChargePaymentMethodDetailsKakaoPay KakaoPay { get; set; } [JsonProperty("klarna")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("klarna")] +#endif public ChargePaymentMethodDetailsKlarna Klarna { get; set; } [JsonProperty("konbini")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("konbini")] +#endif public ChargePaymentMethodDetailsKonbini Konbini { get; set; } [JsonProperty("kr_card")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("kr_card")] +#endif public ChargePaymentMethodDetailsKrCard KrCard { get; set; } [JsonProperty("link")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("link")] +#endif public ChargePaymentMethodDetailsLink Link { get; set; } [JsonProperty("mobilepay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mobilepay")] +#endif public ChargePaymentMethodDetailsMobilepay Mobilepay { get; set; } [JsonProperty("multibanco")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("multibanco")] +#endif public ChargePaymentMethodDetailsMultibanco Multibanco { get; set; } [JsonProperty("naver_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("naver_pay")] +#endif public ChargePaymentMethodDetailsNaverPay NaverPay { get; set; } [JsonProperty("oxxo")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("oxxo")] +#endif public ChargePaymentMethodDetailsOxxo Oxxo { get; set; } [JsonProperty("p24")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("p24")] +#endif public ChargePaymentMethodDetailsP24 P24 { get; set; } [JsonProperty("payco")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payco")] +#endif public ChargePaymentMethodDetailsPayco Payco { get; set; } [JsonProperty("paynow")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("paynow")] +#endif public ChargePaymentMethodDetailsPaynow Paynow { get; set; } [JsonProperty("paypal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("paypal")] +#endif public ChargePaymentMethodDetailsPaypal Paypal { get; set; } [JsonProperty("pix")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("pix")] +#endif public ChargePaymentMethodDetailsPix Pix { get; set; } [JsonProperty("promptpay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("promptpay")] +#endif public ChargePaymentMethodDetailsPromptpay Promptpay { get; set; } [JsonProperty("revolut_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("revolut_pay")] +#endif public ChargePaymentMethodDetailsRevolutPay RevolutPay { get; set; } [JsonProperty("samsung_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("samsung_pay")] +#endif public ChargePaymentMethodDetailsSamsungPay SamsungPay { get; set; } [JsonProperty("sepa_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sepa_debit")] +#endif public ChargePaymentMethodDetailsSepaDebit SepaDebit { get; set; } [JsonProperty("sofort")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sofort")] +#endif public ChargePaymentMethodDetailsSofort Sofort { get; set; } [JsonProperty("stripe_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("stripe_account")] +#endif public ChargePaymentMethodDetailsStripeAccount StripeAccount { get; set; } [JsonProperty("swish")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("swish")] +#endif public ChargePaymentMethodDetailsSwish Swish { get; set; } [JsonProperty("twint")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("twint")] +#endif public ChargePaymentMethodDetailsTwint Twint { get; set; } /// @@ -150,18 +288,33 @@ public class ChargePaymentMethodDetails : StripeEntity [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } [JsonProperty("us_bank_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("us_bank_account")] +#endif public ChargePaymentMethodDetailsUsBankAccount UsBankAccount { get; set; } [JsonProperty("wechat")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("wechat")] +#endif public ChargePaymentMethodDetailsWechat Wechat { get; set; } [JsonProperty("wechat_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("wechat_pay")] +#endif public ChargePaymentMethodDetailsWechatPay WechatPay { get; set; } [JsonProperty("zip")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("zip")] +#endif public ChargePaymentMethodDetailsZip Zip { get; set; } } } diff --git a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsAchCreditTransfer.cs b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsAchCreditTransfer.cs index 813a9fbc79..46d8e201b0 100644 --- a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsAchCreditTransfer.cs +++ b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsAchCreditTransfer.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ChargePaymentMethodDetailsAchCreditTransfer : StripeEntity { @@ -9,24 +12,36 @@ public class ChargePaymentMethodDetailsAchCreditTransfer : StripeEntity [JsonProperty("account_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_number")] +#endif public string AccountNumber { get; set; } /// /// Name of the bank associated with the routing number. /// [JsonProperty("bank_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_name")] +#endif public string BankName { get; set; } /// /// Routing transit number for the bank account to transfer funds to. /// [JsonProperty("routing_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("routing_number")] +#endif public string RoutingNumber { get; set; } /// /// SWIFT code of the bank associated with the routing number. /// [JsonProperty("swift_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("swift_code")] +#endif public string SwiftCode { get; set; } } } diff --git a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsAchDebit.cs b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsAchDebit.cs index 0218ecbfe1..436fe3eba0 100644 --- a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsAchDebit.cs +++ b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsAchDebit.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ChargePaymentMethodDetailsAchDebit : StripeEntity { @@ -11,18 +14,27 @@ public class ChargePaymentMethodDetailsAchDebit : StripeEntitycompany, or individual. /// [JsonProperty("account_holder_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_holder_type")] +#endif public string AccountHolderType { get; set; } /// /// Name of the bank associated with the bank account. /// [JsonProperty("bank_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_name")] +#endif public string BankName { get; set; } /// /// Two-letter ISO code representing the country the bank account is located in. /// [JsonProperty("country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country")] +#endif public string Country { get; set; } /// @@ -30,18 +42,27 @@ public class ChargePaymentMethodDetailsAchDebit : StripeEntity [JsonProperty("fingerprint")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fingerprint")] +#endif public string Fingerprint { get; set; } /// /// Last four digits of the bank account number. /// [JsonProperty("last4")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last4")] +#endif public string Last4 { get; set; } /// /// Routing transit number of the bank account. /// [JsonProperty("routing_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("routing_number")] +#endif public string RoutingNumber { get; set; } } } diff --git a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsAcssDebit.cs b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsAcssDebit.cs index 5d10921404..3dc2c23517 100644 --- a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsAcssDebit.cs +++ b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsAcssDebit.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ChargePaymentMethodDetailsAcssDebit : StripeEntity { @@ -9,6 +12,9 @@ public class ChargePaymentMethodDetailsAcssDebit : StripeEntity [JsonProperty("bank_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_name")] +#endif public string BankName { get; set; } /// @@ -16,30 +22,45 @@ public class ChargePaymentMethodDetailsAcssDebit : StripeEntity [JsonProperty("fingerprint")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fingerprint")] +#endif public string Fingerprint { get; set; } /// /// Institution number of the bank account. /// [JsonProperty("institution_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("institution_number")] +#endif public string InstitutionNumber { get; set; } /// /// Last four digits of the bank account number. /// [JsonProperty("last4")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last4")] +#endif public string Last4 { get; set; } /// /// ID of the mandate used to make this payment. /// [JsonProperty("mandate")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mandate")] +#endif public string Mandate { get; set; } /// /// Transit number of the bank account. /// [JsonProperty("transit_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transit_number")] +#endif public string TransitNumber { get; set; } } } diff --git a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsAffirm.cs b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsAffirm.cs index 5aa8f2fe7a..e26fe02920 100644 --- a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsAffirm.cs +++ b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsAffirm.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ChargePaymentMethodDetailsAffirm : StripeEntity { @@ -9,6 +12,9 @@ public class ChargePaymentMethodDetailsAffirm : StripeEntity [JsonProperty("transaction_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transaction_id")] +#endif public string TransactionId { get; set; } } } diff --git a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsAfterpayClearpay.cs b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsAfterpayClearpay.cs index 7d605fd9a7..399edee52e 100644 --- a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsAfterpayClearpay.cs +++ b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsAfterpayClearpay.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ChargePaymentMethodDetailsAfterpayClearpay : StripeEntity { @@ -9,12 +12,18 @@ public class ChargePaymentMethodDetailsAfterpayClearpay : StripeEntity [JsonProperty("order_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("order_id")] +#endif public string OrderId { get; set; } /// /// Order identifier shown to the merchant in Afterpay’s online portal. /// [JsonProperty("reference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reference")] +#endif public string Reference { get; set; } } } diff --git a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsAlipay.cs b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsAlipay.cs index 7fcb93fb44..7f3c38915f 100644 --- a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsAlipay.cs +++ b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsAlipay.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ChargePaymentMethodDetailsAlipay : StripeEntity { @@ -10,6 +13,9 @@ public class ChargePaymentMethodDetailsAlipay : StripeEntity [JsonProperty("buyer_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("buyer_id")] +#endif public string BuyerId { get; set; } /// @@ -17,12 +23,18 @@ public class ChargePaymentMethodDetailsAlipay : StripeEntity [JsonProperty("fingerprint")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fingerprint")] +#endif public string Fingerprint { get; set; } /// /// Transaction ID of this particular Alipay transaction. /// [JsonProperty("transaction_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transaction_id")] +#endif public string TransactionId { get; set; } } } diff --git a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsAuBecsDebit.cs b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsAuBecsDebit.cs index 1655e74925..159a8c4a93 100644 --- a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsAuBecsDebit.cs +++ b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsAuBecsDebit.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ChargePaymentMethodDetailsAuBecsDebit : StripeEntity { @@ -9,6 +12,9 @@ public class ChargePaymentMethodDetailsAuBecsDebit : StripeEntity [JsonProperty("bsb_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bsb_number")] +#endif public string BsbNumber { get; set; } /// @@ -16,18 +22,27 @@ public class ChargePaymentMethodDetailsAuBecsDebit : StripeEntity [JsonProperty("fingerprint")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fingerprint")] +#endif public string Fingerprint { get; set; } /// /// Last four digits of the bank account number. /// [JsonProperty("last4")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last4")] +#endif public string Last4 { get; set; } /// /// ID of the mandate used to make this payment. /// [JsonProperty("mandate")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mandate")] +#endif public string Mandate { get; set; } } } diff --git a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsBacsDebit.cs b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsBacsDebit.cs index 8aa31eed20..81b9c06431 100644 --- a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsBacsDebit.cs +++ b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsBacsDebit.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ChargePaymentMethodDetailsBacsDebit : StripeEntity { @@ -10,24 +13,36 @@ public class ChargePaymentMethodDetailsBacsDebit : StripeEntity [JsonProperty("fingerprint")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fingerprint")] +#endif public string Fingerprint { get; set; } /// /// Last four digits of the bank account number. /// [JsonProperty("last4")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last4")] +#endif public string Last4 { get; set; } /// /// ID of the mandate used to make this payment. /// [JsonProperty("mandate")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mandate")] +#endif public string Mandate { get; set; } /// /// Sort code of the bank account. (e.g., 10-20-30). /// [JsonProperty("sort_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sort_code")] +#endif public string SortCode { get; set; } } } diff --git a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsBancontact.cs b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsBancontact.cs index bdb164c018..286139eef9 100644 --- a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsBancontact.cs +++ b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsBancontact.cs @@ -3,25 +3,40 @@ namespace Stripe { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class ChargePaymentMethodDetailsBancontact : StripeEntity { /// /// Bank code of bank associated with the bank account. /// [JsonProperty("bank_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_code")] +#endif public string BankCode { get; set; } /// /// Name of the bank associated with the bank account. /// [JsonProperty("bank_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_name")] +#endif public string BankName { get; set; } /// /// Bank Identifier Code of the bank associated with the bank account. /// [JsonProperty("bic")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bic")] +#endif public string Bic { get; set; } #region Expandable GeneratedSepaDebit @@ -31,6 +46,9 @@ public class ChargePaymentMethodDetailsBancontact : StripeEntity [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string GeneratedSepaDebitId { get => this.InternalGeneratedSepaDebit?.Id; @@ -44,6 +62,9 @@ public string GeneratedSepaDebitId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public PaymentMethod GeneratedSepaDebit { get => this.InternalGeneratedSepaDebit?.ExpandedObject; @@ -52,6 +73,10 @@ public PaymentMethod GeneratedSepaDebit [JsonProperty("generated_sepa_debit")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("generated_sepa_debit")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalGeneratedSepaDebit { get; set; } #endregion @@ -62,6 +87,9 @@ public PaymentMethod GeneratedSepaDebit /// The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string GeneratedSepaDebitMandateId { get => this.InternalGeneratedSepaDebitMandate?.Id; @@ -75,6 +103,9 @@ public string GeneratedSepaDebitMandateId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Mandate GeneratedSepaDebitMandate { get => this.InternalGeneratedSepaDebitMandate?.ExpandedObject; @@ -83,6 +114,10 @@ public Mandate GeneratedSepaDebitMandate [JsonProperty("generated_sepa_debit_mandate")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("generated_sepa_debit_mandate")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalGeneratedSepaDebitMandate { get; set; } #endregion @@ -90,6 +125,9 @@ public Mandate GeneratedSepaDebitMandate /// Last four characters of the IBAN. /// [JsonProperty("iban_last4")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("iban_last4")] +#endif public string IbanLast4 { get; set; } /// @@ -98,6 +136,9 @@ public Mandate GeneratedSepaDebitMandate /// One of: de, en, fr, or nl. /// [JsonProperty("preferred_language")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preferred_language")] +#endif public string PreferredLanguage { get; set; } /// @@ -105,6 +146,9 @@ public Mandate GeneratedSepaDebitMandate /// supported) at the time of authorization or settlement. They cannot be set or mutated. /// [JsonProperty("verified_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("verified_name")] +#endif public string VerifiedName { get; set; } } } diff --git a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsBlik.cs b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsBlik.cs index 2ffd5de339..022e486370 100644 --- a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsBlik.cs +++ b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsBlik.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ChargePaymentMethodDetailsBlik : StripeEntity { @@ -9,6 +12,9 @@ public class ChargePaymentMethodDetailsBlik : StripeEntity [JsonProperty("buyer_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("buyer_id")] +#endif public string BuyerId { get; set; } } } diff --git a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsBoleto.cs b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsBoleto.cs index c32714ee21..b44989a447 100644 --- a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsBoleto.cs +++ b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsBoleto.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ChargePaymentMethodDetailsBoleto : StripeEntity { @@ -10,6 +13,9 @@ public class ChargePaymentMethodDetailsBoleto : StripeEntity [JsonProperty("tax_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_id")] +#endif public string TaxId { get; set; } } } diff --git a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsCard.cs b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsCard.cs index 994309728f..b7bf2aa78c 100644 --- a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsCard.cs +++ b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsCard.cs @@ -4,6 +4,9 @@ namespace Stripe using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ChargePaymentMethodDetailsCard : StripeEntity { @@ -11,12 +14,18 @@ public class ChargePaymentMethodDetailsCard : StripeEntity [JsonProperty("amount_authorized")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_authorized")] +#endif public long? AmountAuthorized { get; set; } /// /// Authorization code on the charge. /// [JsonProperty("authorization_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("authorization_code")] +#endif public string AuthorizationCode { get; set; } /// @@ -25,6 +34,9 @@ public class ChargePaymentMethodDetailsCard : StripeEntityunknown. /// [JsonProperty("brand")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("brand")] +#endif public string Brand { get; set; } /// @@ -33,12 +45,19 @@ public class ChargePaymentMethodDetailsCard : StripeEntity [JsonProperty("capture_before")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("capture_before")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime CaptureBefore { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// /// Check results by Card networks on Card address and CVC at time of payment. /// [JsonProperty("checks")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("checks")] +#endif public ChargePaymentMethodDetailsCardChecks Checks { get; set; } /// @@ -46,6 +65,9 @@ public class ChargePaymentMethodDetailsCard : StripeEntity [JsonProperty("country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country")] +#endif public string Country { get; set; } /// @@ -53,21 +75,33 @@ public class ChargePaymentMethodDetailsCard : StripeEntity [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// /// Two-digit number representing the card's expiration month. /// [JsonProperty("exp_month")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("exp_month")] +#endif public long ExpMonth { get; set; } /// /// Four-digit number representing the card's expiration year. /// [JsonProperty("exp_year")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("exp_year")] +#endif public long ExpYear { get; set; } [JsonProperty("extended_authorization")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("extended_authorization")] +#endif public ChargePaymentMethodDetailsCardExtendedAuthorization ExtendedAuthorization { get; set; } /// @@ -80,6 +114,9 @@ public class ChargePaymentMethodDetailsCard : StripeEntity. /// [JsonProperty("fingerprint")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fingerprint")] +#endif public string Fingerprint { get; set; } /// @@ -87,6 +124,9 @@ public class ChargePaymentMethodDetailsCard : StripeEntityunknown. /// [JsonProperty("funding")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("funding")] +#endif public string Funding { get; set; } /// @@ -94,9 +134,15 @@ public class ChargePaymentMethodDetailsCard : StripeEntity [JsonProperty("iin")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("iin")] +#endif public string Iin { get; set; } [JsonProperty("incremental_authorization")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("incremental_authorization")] +#endif public ChargePaymentMethodDetailsCardIncrementalAuthorization IncrementalAuthorization { get; set; } /// @@ -106,6 +152,9 @@ public class ChargePaymentMethodDetailsCard : StripeEntityinstallments integration guide. /// [JsonProperty("installments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("installments")] +#endif public ChargePaymentMethodDetailsCardInstallments Installments { get; set; } /// @@ -113,27 +162,42 @@ public class ChargePaymentMethodDetailsCard : StripeEntity [JsonProperty("issuer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("issuer")] +#endif public string Issuer { get; set; } /// /// The last four digits of the card. /// [JsonProperty("last4")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last4")] +#endif public string Last4 { get; set; } /// /// ID of the mandate used to make this payment or created by it. /// [JsonProperty("mandate")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mandate")] +#endif public string Mandate { get; set; } /// /// True if this payment was marked as MOTO and out of scope for SCA. /// [JsonProperty("moto")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("moto")] +#endif public bool? Moto { get; set; } [JsonProperty("multicapture")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("multicapture")] +#endif public ChargePaymentMethodDetailsCardMulticapture Multicapture { get; set; } /// @@ -143,6 +207,9 @@ public class ChargePaymentMethodDetailsCard : StripeEntityvisa, or unknown. /// [JsonProperty("network")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("network")] +#endif public string Network { get; set; } /// @@ -150,21 +217,33 @@ public class ChargePaymentMethodDetailsCard : StripeEntity [JsonProperty("network_token")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("network_token")] +#endif public ChargePaymentMethodDetailsCardNetworkToken NetworkToken { get; set; } [JsonProperty("overcapture")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("overcapture")] +#endif public ChargePaymentMethodDetailsCardOvercapture Overcapture { get; set; } /// /// Populated if this transaction used 3D Secure authentication. /// [JsonProperty("three_d_secure")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("three_d_secure")] +#endif public ChargePaymentMethodDetailsCardThreeDSecure ThreeDSecure { get; set; } /// /// If this Card is part of a card wallet, this contains the details of the card wallet. /// [JsonProperty("wallet")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("wallet")] +#endif public ChargePaymentMethodDetailsCardWallet Wallet { get; set; } } } diff --git a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsCardChecks.cs b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsCardChecks.cs index 734d3882dd..06e2d9f912 100644 --- a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsCardChecks.cs +++ b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsCardChecks.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ChargePaymentMethodDetailsCardChecks : StripeEntity { @@ -10,6 +13,9 @@ public class ChargePaymentMethodDetailsCardChecks : StripeEntityunavailable, or unchecked. /// [JsonProperty("address_line1_check")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_line1_check")] +#endif public string AddressLine1Check { get; set; } /// @@ -17,6 +23,9 @@ public class ChargePaymentMethodDetailsCardChecks : StripeEntityfail, unavailable, or unchecked. /// [JsonProperty("address_postal_code_check")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_postal_code_check")] +#endif public string AddressPostalCodeCheck { get; set; } /// @@ -24,6 +33,9 @@ public class ChargePaymentMethodDetailsCardChecks : StripeEntityunavailable, or unchecked. /// [JsonProperty("cvc_check")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cvc_check")] +#endif public string CvcCheck { get; set; } } } diff --git a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsCardExtendedAuthorization.cs b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsCardExtendedAuthorization.cs index 74bae299a2..c64c731907 100644 --- a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsCardExtendedAuthorization.cs +++ b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsCardExtendedAuthorization.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ChargePaymentMethodDetailsCardExtendedAuthorization : StripeEntity { @@ -11,6 +14,9 @@ public class ChargePaymentMethodDetailsCardExtendedAuthorization : StripeEntity< /// One of: disabled, or enabled. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } } } diff --git a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsCardIncrementalAuthorization.cs b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsCardIncrementalAuthorization.cs index b624112434..0233698d85 100644 --- a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsCardIncrementalAuthorization.cs +++ b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsCardIncrementalAuthorization.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ChargePaymentMethodDetailsCardIncrementalAuthorization : StripeEntity { @@ -10,6 +13,9 @@ public class ChargePaymentMethodDetailsCardIncrementalAuthorization : StripeEnti /// One of: available, or unavailable. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } } } diff --git a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsCardInstallments.cs b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsCardInstallments.cs index 680ae7276f..dcf9a81305 100644 --- a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsCardInstallments.cs +++ b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsCardInstallments.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ChargePaymentMethodDetailsCardInstallments : StripeEntity { @@ -9,6 +12,9 @@ public class ChargePaymentMethodDetailsCardInstallments : StripeEntity [JsonProperty("plan")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("plan")] +#endif public PaymentIntentPaymentMethodOptionsCardInstallmentsPlan Plan { get; set; } } } diff --git a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsCardMulticapture.cs b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsCardMulticapture.cs index 838b0db1e5..bfe8fff72f 100644 --- a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsCardMulticapture.cs +++ b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsCardMulticapture.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ChargePaymentMethodDetailsCardMulticapture : StripeEntity { @@ -10,6 +13,9 @@ public class ChargePaymentMethodDetailsCardMulticapture : StripeEntityavailable, or unavailable. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } } } diff --git a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsCardNetworkToken.cs b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsCardNetworkToken.cs index 3efce276fe..36d7fc7d29 100644 --- a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsCardNetworkToken.cs +++ b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsCardNetworkToken.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ChargePaymentMethodDetailsCardNetworkToken : StripeEntity { @@ -10,6 +13,9 @@ public class ChargePaymentMethodDetailsCardNetworkToken : StripeEntity [JsonProperty("used")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("used")] +#endif public bool Used { get; set; } } } diff --git a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsCardOvercapture.cs b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsCardOvercapture.cs index 05094c72ce..8f91de76b3 100644 --- a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsCardOvercapture.cs +++ b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsCardOvercapture.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ChargePaymentMethodDetailsCardOvercapture : StripeEntity { @@ -9,6 +12,9 @@ public class ChargePaymentMethodDetailsCardOvercapture : StripeEntity [JsonProperty("maximum_amount_capturable")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("maximum_amount_capturable")] +#endif public long MaximumAmountCapturable { get; set; } /// @@ -16,6 +22,9 @@ public class ChargePaymentMethodDetailsCardOvercapture : StripeEntityavailable, or unavailable. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } } } diff --git a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsCardPresent.cs b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsCardPresent.cs index 815df4b697..6cf1a56195 100644 --- a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsCardPresent.cs +++ b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsCardPresent.cs @@ -5,6 +5,9 @@ namespace Stripe using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ChargePaymentMethodDetailsCardPresent : StripeEntity { @@ -12,6 +15,9 @@ public class ChargePaymentMethodDetailsCardPresent : StripeEntity [JsonProperty("amount_authorized")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_authorized")] +#endif public long? AmountAuthorized { get; set; } /// @@ -20,6 +26,9 @@ public class ChargePaymentMethodDetailsCardPresent : StripeEntityunknown. /// [JsonProperty("brand")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("brand")] +#endif public string Brand { get; set; } /// @@ -27,6 +36,9 @@ public class ChargePaymentMethodDetailsCardPresent : StripeEntity [JsonProperty("brand_product")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("brand_product")] +#endif public string BrandProduct { get; set; } /// @@ -35,6 +47,10 @@ public class ChargePaymentMethodDetailsCardPresent : StripeEntity [JsonProperty("capture_before")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("capture_before")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime CaptureBefore { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -46,6 +62,9 @@ public class ChargePaymentMethodDetailsCardPresent : StripeEntity [JsonProperty("cardholder_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cardholder_name")] +#endif public string CardholderName { get; set; } /// @@ -53,6 +72,9 @@ public class ChargePaymentMethodDetailsCardPresent : StripeEntity [JsonProperty("country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country")] +#endif public string Country { get; set; } /// @@ -60,24 +82,36 @@ public class ChargePaymentMethodDetailsCardPresent : StripeEntity [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// /// Authorization response cryptogram. /// [JsonProperty("emv_auth_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("emv_auth_data")] +#endif public string EmvAuthData { get; set; } /// /// Two-digit number representing the card's expiration month. /// [JsonProperty("exp_month")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("exp_month")] +#endif public long ExpMonth { get; set; } /// /// Four-digit number representing the card's expiration year. /// [JsonProperty("exp_year")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("exp_year")] +#endif public long ExpYear { get; set; } /// @@ -90,6 +124,9 @@ public class ChargePaymentMethodDetailsCardPresent : StripeEntity. /// [JsonProperty("fingerprint")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fingerprint")] +#endif public string Fingerprint { get; set; } /// @@ -97,6 +134,9 @@ public class ChargePaymentMethodDetailsCardPresent : StripeEntityunknown. /// [JsonProperty("funding")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("funding")] +#endif public string Funding { get; set; } /// @@ -105,6 +145,9 @@ public class ChargePaymentMethodDetailsCardPresent : StripeEntity [JsonProperty("generated_card")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("generated_card")] +#endif public string GeneratedCard { get; set; } /// @@ -112,6 +155,9 @@ public class ChargePaymentMethodDetailsCardPresent : StripeEntity [JsonProperty("iin")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("iin")] +#endif public string Iin { get; set; } /// @@ -120,6 +166,9 @@ public class ChargePaymentMethodDetailsCardPresent : StripeEntityrequest_incremental_authorization_support. /// [JsonProperty("incremental_authorization_supported")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("incremental_authorization_supported")] +#endif public bool IncrementalAuthorizationSupported { get; set; } /// @@ -127,12 +176,18 @@ public class ChargePaymentMethodDetailsCardPresent : StripeEntity [JsonProperty("issuer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("issuer")] +#endif public string Issuer { get; set; } /// /// The last four digits of the card. /// [JsonProperty("last4")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last4")] +#endif public string Last4 { get; set; } /// @@ -142,6 +197,9 @@ public class ChargePaymentMethodDetailsCardPresent : StripeEntityvisa, or unknown. /// [JsonProperty("network")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("network")] +#endif public string Network { get; set; } /// @@ -153,24 +211,36 @@ public class ChargePaymentMethodDetailsCardPresent : StripeEntity [JsonProperty("network_transaction_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("network_transaction_id")] +#endif public string NetworkTransactionId { get; set; } /// /// Details about payments collected offline. /// [JsonProperty("offline")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("offline")] +#endif public ChargePaymentMethodDetailsCardPresentOffline Offline { get; set; } /// /// Defines whether the authorized amount can be over-captured or not. /// [JsonProperty("overcapture_supported")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("overcapture_supported")] +#endif public bool OvercaptureSupported { get; set; } /// /// EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. /// [JsonProperty("preferred_locales")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preferred_locales")] +#endif public List PreferredLocales { get; set; } /// @@ -179,6 +249,9 @@ public class ChargePaymentMethodDetailsCardPresent : StripeEntitymagnetic_stripe_fallback, or magnetic_stripe_track2. /// [JsonProperty("read_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("read_method")] +#endif public string ReadMethod { get; set; } /// @@ -186,9 +259,15 @@ public class ChargePaymentMethodDetailsCardPresent : StripeEntity [JsonProperty("receipt")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("receipt")] +#endif public ChargePaymentMethodDetailsCardPresentReceipt Receipt { get; set; } [JsonProperty("wallet")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("wallet")] +#endif public ChargePaymentMethodDetailsCardPresentWallet Wallet { get; set; } } } diff --git a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsCardPresentOffline.cs b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsCardPresentOffline.cs index 6c96c0494c..936f834b2f 100644 --- a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsCardPresentOffline.cs +++ b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsCardPresentOffline.cs @@ -4,6 +4,9 @@ namespace Stripe using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ChargePaymentMethodDetailsCardPresentOffline : StripeEntity { @@ -12,12 +15,19 @@ public class ChargePaymentMethodDetailsCardPresentOffline : StripeEntity [JsonProperty("stored_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("stored_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? StoredAt { get; set; } /// /// The method used to process this payment method offline. Only deferred is allowed. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsCardPresentReceipt.cs b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsCardPresentReceipt.cs index d5bafb502b..b5bb79a6b0 100644 --- a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsCardPresentReceipt.cs +++ b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsCardPresentReceipt.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ChargePaymentMethodDetailsCardPresentReceipt : StripeEntity { @@ -10,30 +13,45 @@ public class ChargePaymentMethodDetailsCardPresentReceipt : StripeEntitychecking, credit, prepaid, or unknown. /// [JsonProperty("account_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_type")] +#endif public string AccountType { get; set; } /// /// EMV tag 9F26, cryptogram generated by the integrated circuit chip. /// [JsonProperty("application_cryptogram")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("application_cryptogram")] +#endif public string ApplicationCryptogram { get; set; } /// /// Mnenomic of the Application Identifier. /// [JsonProperty("application_preferred_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("application_preferred_name")] +#endif public string ApplicationPreferredName { get; set; } /// /// Identifier for this transaction. /// [JsonProperty("authorization_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("authorization_code")] +#endif public string AuthorizationCode { get; set; } /// /// EMV tag 8A. A code returned by the card issuer. /// [JsonProperty("authorization_response_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("authorization_response_code")] +#endif public string AuthorizationResponseCode { get; set; } /// @@ -42,24 +60,36 @@ public class ChargePaymentMethodDetailsCardPresentReceipt : StripeEntityoffline_pin_and_signature, online_pin, or signature. /// [JsonProperty("cardholder_verification_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cardholder_verification_method")] +#endif public string CardholderVerificationMethod { get; set; } /// /// EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. /// [JsonProperty("dedicated_file_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("dedicated_file_name")] +#endif public string DedicatedFileName { get; set; } /// /// The outcome of a series of EMV functions performed by the card reader. /// [JsonProperty("terminal_verification_results")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("terminal_verification_results")] +#endif public string TerminalVerificationResults { get; set; } /// /// An indication of various EMV functions performed during the transaction. /// [JsonProperty("transaction_status_information")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transaction_status_information")] +#endif public string TransactionStatusInformation { get; set; } } } diff --git a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsCardPresentWallet.cs b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsCardPresentWallet.cs index 95aba03037..42444dfd75 100644 --- a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsCardPresentWallet.cs +++ b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsCardPresentWallet.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ChargePaymentMethodDetailsCardPresentWallet : StripeEntity { @@ -11,6 +14,9 @@ public class ChargePaymentMethodDetailsCardPresentWallet : StripeEntityapple_pay, google_pay, samsung_pay, or unknown. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsCardThreeDSecure.cs b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsCardThreeDSecure.cs index 356bc51fdf..5dcafcb09c 100644 --- a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsCardThreeDSecure.cs +++ b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsCardThreeDSecure.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ChargePaymentMethodDetailsCardThreeDSecure : StripeEntity { @@ -10,6 +13,9 @@ public class ChargePaymentMethodDetailsCardThreeDSecure : StripeEntitychallenge, or frictionless. /// [JsonProperty("authentication_flow")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("authentication_flow")] +#endif public string AuthenticationFlow { get; set; } /// @@ -18,6 +24,9 @@ public class ChargePaymentMethodDetailsCardThreeDSecure : StripeEntity01, 02, 05, 06, or 07. /// [JsonProperty("electronic_commerce_indicator")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("electronic_commerce_indicator")] +#endif public string ElectronicCommerceIndicator { get; set; } /// @@ -25,6 +34,9 @@ public class ChargePaymentMethodDetailsCardThreeDSecure : StripeEntitylow_risk, or none. /// [JsonProperty("exemption_indicator")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("exemption_indicator")] +#endif public string ExemptionIndicator { get; set; } /// @@ -32,6 +44,9 @@ public class ChargePaymentMethodDetailsCardThreeDSecure : StripeEntity [JsonProperty("exemption_indicator_applied")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("exemption_indicator_applied")] +#endif public bool ExemptionIndicatorApplied { get; set; } /// @@ -40,6 +55,9 @@ public class ChargePaymentMethodDetailsCardThreeDSecure : StripeEntityfailed, not_supported, or processing_error. /// [JsonProperty("result")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("result")] +#endif public string Result { get; set; } /// @@ -49,6 +67,9 @@ public class ChargePaymentMethodDetailsCardThreeDSecure : StripeEntitynetwork_not_supported, protocol_error, or rejected. /// [JsonProperty("result_reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("result_reason")] +#endif public string ResultReason { get; set; } /// @@ -56,6 +77,9 @@ public class ChargePaymentMethodDetailsCardThreeDSecure : StripeEntity [JsonProperty("transaction_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transaction_id")] +#endif public string TransactionId { get; set; } /// @@ -63,6 +87,9 @@ public class ChargePaymentMethodDetailsCardThreeDSecure : StripeEntity1.0.2, 2.1.0, or 2.2.0. /// [JsonProperty("version")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("version")] +#endif public string Version { get; set; } } } diff --git a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsCardWallet.cs b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsCardWallet.cs index 531b362555..553620ecf9 100644 --- a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsCardWallet.cs +++ b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsCardWallet.cs @@ -2,31 +2,55 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ChargePaymentMethodDetailsCardWallet : StripeEntity { [JsonProperty("amex_express_checkout")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amex_express_checkout")] +#endif public ChargePaymentMethodDetailsCardWalletAmexExpressCheckout AmexExpressCheckout { get; set; } [JsonProperty("apple_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("apple_pay")] +#endif public ChargePaymentMethodDetailsCardWalletApplePay ApplePay { get; set; } /// /// (For tokenized numbers only.) The last four digits of the device account number. /// [JsonProperty("dynamic_last4")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("dynamic_last4")] +#endif public string DynamicLast4 { get; set; } [JsonProperty("google_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("google_pay")] +#endif public ChargePaymentMethodDetailsCardWalletGooglePay GooglePay { get; set; } [JsonProperty("link")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("link")] +#endif public ChargePaymentMethodDetailsCardWalletLink Link { get; set; } [JsonProperty("masterpass")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("masterpass")] +#endif public ChargePaymentMethodDetailsCardWalletMasterpass Masterpass { get; set; } [JsonProperty("samsung_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("samsung_pay")] +#endif public ChargePaymentMethodDetailsCardWalletSamsungPay SamsungPay { get; set; } /// @@ -38,9 +62,15 @@ public class ChargePaymentMethodDetailsCardWallet : StripeEntitymasterpass, samsung_pay, or visa_checkout. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } [JsonProperty("visa_checkout")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("visa_checkout")] +#endif public ChargePaymentMethodDetailsCardWalletVisaCheckout VisaCheckout { get; set; } } } diff --git a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsCardWalletMasterpass.cs b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsCardWalletMasterpass.cs index 36b97dc5ea..5dcae8e681 100644 --- a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsCardWalletMasterpass.cs +++ b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsCardWalletMasterpass.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ChargePaymentMethodDetailsCardWalletMasterpass : StripeEntity { @@ -11,6 +14,9 @@ public class ChargePaymentMethodDetailsCardWalletMasterpass : StripeEntity [JsonProperty("billing_address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_address")] +#endif public Address BillingAddress { get; set; } /// @@ -18,6 +24,9 @@ public class ChargePaymentMethodDetailsCardWalletMasterpass : StripeEntity [JsonProperty("email")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("email")] +#endif public string Email { get; set; } /// @@ -25,6 +34,9 @@ public class ChargePaymentMethodDetailsCardWalletMasterpass : StripeEntity [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } /// @@ -33,6 +45,9 @@ public class ChargePaymentMethodDetailsCardWalletMasterpass : StripeEntity [JsonProperty("shipping_address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping_address")] +#endif public Address ShippingAddress { get; set; } } } diff --git a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsCardWalletVisaCheckout.cs b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsCardWalletVisaCheckout.cs index b222cb545b..9e9b82f58b 100644 --- a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsCardWalletVisaCheckout.cs +++ b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsCardWalletVisaCheckout.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ChargePaymentMethodDetailsCardWalletVisaCheckout : StripeEntity { @@ -11,6 +14,9 @@ public class ChargePaymentMethodDetailsCardWalletVisaCheckout : StripeEntity [JsonProperty("billing_address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_address")] +#endif public Address BillingAddress { get; set; } /// @@ -18,6 +24,9 @@ public class ChargePaymentMethodDetailsCardWalletVisaCheckout : StripeEntity [JsonProperty("email")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("email")] +#endif public string Email { get; set; } /// @@ -25,6 +34,9 @@ public class ChargePaymentMethodDetailsCardWalletVisaCheckout : StripeEntity [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } /// @@ -33,6 +45,9 @@ public class ChargePaymentMethodDetailsCardWalletVisaCheckout : StripeEntity [JsonProperty("shipping_address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping_address")] +#endif public Address ShippingAddress { get; set; } } } diff --git a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsCashapp.cs b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsCashapp.cs index 993b52a452..9a8ee9fa28 100644 --- a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsCashapp.cs +++ b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsCashapp.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ChargePaymentMethodDetailsCashapp : StripeEntity { @@ -9,12 +12,18 @@ public class ChargePaymentMethodDetailsCashapp : StripeEntity [JsonProperty("buyer_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("buyer_id")] +#endif public string BuyerId { get; set; } /// /// A public identifier for buyers using Cash App. /// [JsonProperty("cashtag")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cashtag")] +#endif public string Cashtag { get; set; } } } diff --git a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsEps.cs b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsEps.cs index 8fb6193830..76accdf93c 100644 --- a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsEps.cs +++ b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsEps.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ChargePaymentMethodDetailsEps : StripeEntity { @@ -35,6 +38,9 @@ public class ChargePaymentMethodDetailsEps : StripeEntityvr_bank_braunau. /// [JsonProperty("bank")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank")] +#endif public string Bank { get; set; } /// @@ -43,6 +49,9 @@ public class ChargePaymentMethodDetailsEps : StripeEntity [JsonProperty("verified_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("verified_name")] +#endif public string VerifiedName { get; set; } } } diff --git a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsFpx.cs b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsFpx.cs index d91c18a7a6..7754064e15 100644 --- a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsFpx.cs +++ b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsFpx.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ChargePaymentMethodDetailsFpx : StripeEntity { @@ -10,6 +13,9 @@ public class ChargePaymentMethodDetailsFpx : StripeEntitycompany, or individual. /// [JsonProperty("account_holder_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_holder_type")] +#endif public string AccountHolderType { get; set; } /// @@ -26,12 +32,18 @@ public class ChargePaymentMethodDetailsFpx : StripeEntitypublic_bank, rhb, standard_chartered, or uob. /// [JsonProperty("bank")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank")] +#endif public string Bank { get; set; } /// /// Unique transaction id generated by FPX for every request from the merchant. /// [JsonProperty("transaction_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transaction_id")] +#endif public string TransactionId { get; set; } } } diff --git a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsGiropay.cs b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsGiropay.cs index 2f5ab950fd..540d5b6254 100644 --- a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsGiropay.cs +++ b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsGiropay.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ChargePaymentMethodDetailsGiropay : StripeEntity { @@ -9,18 +12,27 @@ public class ChargePaymentMethodDetailsGiropay : StripeEntity [JsonProperty("bank_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_code")] +#endif public string BankCode { get; set; } /// /// Name of the bank associated with the bank account. /// [JsonProperty("bank_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_name")] +#endif public string BankName { get; set; } /// /// Bank Identifier Code of the bank associated with the bank account. /// [JsonProperty("bic")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bic")] +#endif public string Bic { get; set; } /// @@ -29,6 +41,9 @@ public class ChargePaymentMethodDetailsGiropay : StripeEntity [JsonProperty("verified_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("verified_name")] +#endif public string VerifiedName { get; set; } } } diff --git a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsGrabpay.cs b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsGrabpay.cs index e16abb9af7..15c435bcdf 100644 --- a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsGrabpay.cs +++ b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsGrabpay.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ChargePaymentMethodDetailsGrabpay : StripeEntity { @@ -9,6 +12,9 @@ public class ChargePaymentMethodDetailsGrabpay : StripeEntity [JsonProperty("transaction_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transaction_id")] +#endif public string TransactionId { get; set; } } } diff --git a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsIdeal.cs b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsIdeal.cs index cd4d0767bf..82588fd5d5 100644 --- a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsIdeal.cs +++ b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsIdeal.cs @@ -3,7 +3,13 @@ namespace Stripe { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class ChargePaymentMethodDetailsIdeal : StripeEntity { /// @@ -17,6 +23,9 @@ public class ChargePaymentMethodDetailsIdeal : StripeEntityyoursafe. /// [JsonProperty("bank")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank")] +#endif public string Bank { get; set; } /// @@ -27,6 +36,9 @@ public class ChargePaymentMethodDetailsIdeal : StripeEntityREVOLT21, SNSBNL2A, or TRIONL2U. /// [JsonProperty("bic")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bic")] +#endif public string Bic { get; set; } #region Expandable GeneratedSepaDebit @@ -36,6 +48,9 @@ public class ChargePaymentMethodDetailsIdeal : StripeEntity [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string GeneratedSepaDebitId { get => this.InternalGeneratedSepaDebit?.Id; @@ -49,6 +64,9 @@ public string GeneratedSepaDebitId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public PaymentMethod GeneratedSepaDebit { get => this.InternalGeneratedSepaDebit?.ExpandedObject; @@ -57,6 +75,10 @@ public PaymentMethod GeneratedSepaDebit [JsonProperty("generated_sepa_debit")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("generated_sepa_debit")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalGeneratedSepaDebit { get; set; } #endregion @@ -67,6 +89,9 @@ public PaymentMethod GeneratedSepaDebit /// The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string GeneratedSepaDebitMandateId { get => this.InternalGeneratedSepaDebitMandate?.Id; @@ -80,6 +105,9 @@ public string GeneratedSepaDebitMandateId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Mandate GeneratedSepaDebitMandate { get => this.InternalGeneratedSepaDebitMandate?.ExpandedObject; @@ -88,6 +116,10 @@ public Mandate GeneratedSepaDebitMandate [JsonProperty("generated_sepa_debit_mandate")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("generated_sepa_debit_mandate")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalGeneratedSepaDebitMandate { get; set; } #endregion @@ -95,6 +127,9 @@ public Mandate GeneratedSepaDebitMandate /// Last four characters of the IBAN. /// [JsonProperty("iban_last4")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("iban_last4")] +#endif public string IbanLast4 { get; set; } /// @@ -102,6 +137,9 @@ public Mandate GeneratedSepaDebitMandate /// supported) at the time of authorization or settlement. They cannot be set or mutated. /// [JsonProperty("verified_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("verified_name")] +#endif public string VerifiedName { get; set; } } } diff --git a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsInteracPresent.cs b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsInteracPresent.cs index 5a0d58c86c..d49391d2f8 100644 --- a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsInteracPresent.cs +++ b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsInteracPresent.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ChargePaymentMethodDetailsInteracPresent : StripeEntity { @@ -10,6 +13,9 @@ public class ChargePaymentMethodDetailsInteracPresent : StripeEntityinterac, mastercard or visa. /// [JsonProperty("brand")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("brand")] +#endif public string Brand { get; set; } /// @@ -21,6 +27,9 @@ public class ChargePaymentMethodDetailsInteracPresent : StripeEntity [JsonProperty("cardholder_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cardholder_name")] +#endif public string CardholderName { get; set; } /// @@ -28,6 +37,9 @@ public class ChargePaymentMethodDetailsInteracPresent : StripeEntity [JsonProperty("country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country")] +#endif public string Country { get; set; } /// @@ -35,24 +47,36 @@ public class ChargePaymentMethodDetailsInteracPresent : StripeEntity [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// /// Authorization response cryptogram. /// [JsonProperty("emv_auth_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("emv_auth_data")] +#endif public string EmvAuthData { get; set; } /// /// Two-digit number representing the card's expiration month. /// [JsonProperty("exp_month")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("exp_month")] +#endif public long ExpMonth { get; set; } /// /// Four-digit number representing the card's expiration year. /// [JsonProperty("exp_year")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("exp_year")] +#endif public long ExpYear { get; set; } /// @@ -65,6 +89,9 @@ public class ChargePaymentMethodDetailsInteracPresent : StripeEntity. /// [JsonProperty("fingerprint")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fingerprint")] +#endif public string Fingerprint { get; set; } /// @@ -72,6 +99,9 @@ public class ChargePaymentMethodDetailsInteracPresent : StripeEntityunknown. /// [JsonProperty("funding")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("funding")] +#endif public string Funding { get; set; } /// @@ -80,6 +110,9 @@ public class ChargePaymentMethodDetailsInteracPresent : StripeEntity [JsonProperty("generated_card")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("generated_card")] +#endif public string GeneratedCard { get; set; } /// @@ -87,6 +120,9 @@ public class ChargePaymentMethodDetailsInteracPresent : StripeEntity [JsonProperty("iin")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("iin")] +#endif public string Iin { get; set; } /// @@ -94,12 +130,18 @@ public class ChargePaymentMethodDetailsInteracPresent : StripeEntity [JsonProperty("issuer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("issuer")] +#endif public string Issuer { get; set; } /// /// The last four digits of the card. /// [JsonProperty("last4")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last4")] +#endif public string Last4 { get; set; } /// @@ -109,6 +151,9 @@ public class ChargePaymentMethodDetailsInteracPresent : StripeEntityvisa, or unknown. /// [JsonProperty("network")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("network")] +#endif public string Network { get; set; } /// @@ -120,12 +165,18 @@ public class ChargePaymentMethodDetailsInteracPresent : StripeEntity [JsonProperty("network_transaction_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("network_transaction_id")] +#endif public string NetworkTransactionId { get; set; } /// /// EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. /// [JsonProperty("preferred_locales")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preferred_locales")] +#endif public List PreferredLocales { get; set; } /// @@ -134,6 +185,9 @@ public class ChargePaymentMethodDetailsInteracPresent : StripeEntitymagnetic_stripe_fallback, or magnetic_stripe_track2. /// [JsonProperty("read_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("read_method")] +#endif public string ReadMethod { get; set; } /// @@ -141,6 +195,9 @@ public class ChargePaymentMethodDetailsInteracPresent : StripeEntity [JsonProperty("receipt")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("receipt")] +#endif public ChargePaymentMethodDetailsInteracPresentReceipt Receipt { get; set; } } } diff --git a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsInteracPresentReceipt.cs b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsInteracPresentReceipt.cs index 490a7c5c6c..cc15ec157d 100644 --- a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsInteracPresentReceipt.cs +++ b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsInteracPresentReceipt.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ChargePaymentMethodDetailsInteracPresentReceipt : StripeEntity { @@ -10,30 +13,45 @@ public class ChargePaymentMethodDetailsInteracPresentReceipt : StripeEntitychecking, savings, or unknown. /// [JsonProperty("account_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_type")] +#endif public string AccountType { get; set; } /// /// EMV tag 9F26, cryptogram generated by the integrated circuit chip. /// [JsonProperty("application_cryptogram")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("application_cryptogram")] +#endif public string ApplicationCryptogram { get; set; } /// /// Mnenomic of the Application Identifier. /// [JsonProperty("application_preferred_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("application_preferred_name")] +#endif public string ApplicationPreferredName { get; set; } /// /// Identifier for this transaction. /// [JsonProperty("authorization_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("authorization_code")] +#endif public string AuthorizationCode { get; set; } /// /// EMV tag 8A. A code returned by the card issuer. /// [JsonProperty("authorization_response_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("authorization_response_code")] +#endif public string AuthorizationResponseCode { get; set; } /// @@ -42,24 +60,36 @@ public class ChargePaymentMethodDetailsInteracPresentReceipt : StripeEntityoffline_pin_and_signature, online_pin, or signature. /// [JsonProperty("cardholder_verification_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cardholder_verification_method")] +#endif public string CardholderVerificationMethod { get; set; } /// /// EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. /// [JsonProperty("dedicated_file_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("dedicated_file_name")] +#endif public string DedicatedFileName { get; set; } /// /// The outcome of a series of EMV functions performed by the card reader. /// [JsonProperty("terminal_verification_results")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("terminal_verification_results")] +#endif public string TerminalVerificationResults { get; set; } /// /// An indication of various EMV functions performed during the transaction. /// [JsonProperty("transaction_status_information")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transaction_status_information")] +#endif public string TransactionStatusInformation { get; set; } } } diff --git a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsKakaoPay.cs b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsKakaoPay.cs index df6972d1dc..fde5ed76b8 100644 --- a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsKakaoPay.cs +++ b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsKakaoPay.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ChargePaymentMethodDetailsKakaoPay : StripeEntity { @@ -9,6 +12,9 @@ public class ChargePaymentMethodDetailsKakaoPay : StripeEntity [JsonProperty("buyer_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("buyer_id")] +#endif public string BuyerId { get; set; } } } diff --git a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsKlarna.cs b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsKlarna.cs index 748326216c..41760a454e 100644 --- a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsKlarna.cs +++ b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsKlarna.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ChargePaymentMethodDetailsKlarna : StripeEntity { @@ -9,6 +12,9 @@ public class ChargePaymentMethodDetailsKlarna : StripeEntity [JsonProperty("payer_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payer_details")] +#endif public ChargePaymentMethodDetailsKlarnaPayerDetails PayerDetails { get; set; } /// @@ -16,6 +22,9 @@ public class ChargePaymentMethodDetailsKlarna : StripeEntitypay_now, pay_with_financing, or pay_in_installments. /// [JsonProperty("payment_method_category")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_category")] +#endif public string PaymentMethodCategory { get; set; } /// @@ -30,6 +39,9 @@ public class ChargePaymentMethodDetailsKlarna : StripeEntityen-PT, de-CH, fr-CH, it-CH, or en-CH. /// [JsonProperty("preferred_locale")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preferred_locale")] +#endif public string PreferredLocale { get; set; } } } diff --git a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsKlarnaPayerDetails.cs b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsKlarnaPayerDetails.cs index a6b1abbe06..8a1d032c2f 100644 --- a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsKlarnaPayerDetails.cs +++ b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsKlarnaPayerDetails.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ChargePaymentMethodDetailsKlarnaPayerDetails : StripeEntity { @@ -9,6 +12,9 @@ public class ChargePaymentMethodDetailsKlarnaPayerDetails : StripeEntity [JsonProperty("address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address")] +#endif public ChargePaymentMethodDetailsKlarnaPayerDetailsAddress Address { get; set; } } } diff --git a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsKlarnaPayerDetailsAddress.cs b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsKlarnaPayerDetailsAddress.cs index afafe0f2f1..bef78ade9a 100644 --- a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsKlarnaPayerDetailsAddress.cs +++ b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsKlarnaPayerDetailsAddress.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ChargePaymentMethodDetailsKlarnaPayerDetailsAddress : StripeEntity { @@ -9,6 +12,9 @@ public class ChargePaymentMethodDetailsKlarnaPayerDetailsAddress : StripeEntity< /// The payer address country. /// [JsonProperty("country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country")] +#endif public string Country { get; set; } } } diff --git a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsKonbini.cs b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsKonbini.cs index 0de181adb3..c0860f3304 100644 --- a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsKonbini.cs +++ b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsKonbini.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ChargePaymentMethodDetailsKonbini : StripeEntity { @@ -10,6 +13,9 @@ public class ChargePaymentMethodDetailsKonbini : StripeEntity [JsonProperty("store")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("store")] +#endif public ChargePaymentMethodDetailsKonbiniStore Store { get; set; } } } diff --git a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsKonbiniStore.cs b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsKonbiniStore.cs index fc637482f8..24a22315ee 100644 --- a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsKonbiniStore.cs +++ b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsKonbiniStore.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ChargePaymentMethodDetailsKonbiniStore : StripeEntity { @@ -10,6 +13,9 @@ public class ChargePaymentMethodDetailsKonbiniStore : StripeEntityfamilymart, lawson, ministop, or seicomart. /// [JsonProperty("chain")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("chain")] +#endif public string Chain { get; set; } } } diff --git a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsKrCard.cs b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsKrCard.cs index 65fdd1347b..2f2fcb044a 100644 --- a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsKrCard.cs +++ b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsKrCard.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ChargePaymentMethodDetailsKrCard : StripeEntity { @@ -14,18 +17,27 @@ public class ChargePaymentMethodDetailsKrCard : StripeEntitywoori. /// [JsonProperty("brand")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("brand")] +#endif public string Brand { get; set; } /// /// A unique identifier for the buyer as determined by the local payment processor. /// [JsonProperty("buyer_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("buyer_id")] +#endif public string BuyerId { get; set; } /// /// The last four digits of the card. This may not be present for American Express cards. /// [JsonProperty("last4")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last4")] +#endif public string Last4 { get; set; } } } diff --git a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsLink.cs b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsLink.cs index 99379fa260..bef1e9d7c1 100644 --- a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsLink.cs +++ b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsLink.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ChargePaymentMethodDetailsLink : StripeEntity { @@ -10,6 +13,9 @@ public class ChargePaymentMethodDetailsLink : StripeEntity [JsonProperty("country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country")] +#endif public string Country { get; set; } } } diff --git a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsMobilepay.cs b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsMobilepay.cs index 42b3262434..89bbd4c81d 100644 --- a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsMobilepay.cs +++ b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsMobilepay.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ChargePaymentMethodDetailsMobilepay : StripeEntity { @@ -9,6 +12,9 @@ public class ChargePaymentMethodDetailsMobilepay : StripeEntity [JsonProperty("card")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card")] +#endif public ChargePaymentMethodDetailsMobilepayCard Card { get; set; } } } diff --git a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsMobilepayCard.cs b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsMobilepayCard.cs index 1a55519639..1f5d87b21e 100644 --- a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsMobilepayCard.cs +++ b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsMobilepayCard.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ChargePaymentMethodDetailsMobilepayCard : StripeEntity { @@ -9,30 +12,45 @@ public class ChargePaymentMethodDetailsMobilepayCard : StripeEntity [JsonProperty("brand")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("brand")] +#endif public string Brand { get; set; } /// /// Two-letter ISO code representing the country of the card. /// [JsonProperty("country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country")] +#endif public string Country { get; set; } /// /// Two digit number representing the card's expiration month. /// [JsonProperty("exp_month")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("exp_month")] +#endif public long? ExpMonth { get; set; } /// /// Two digit number representing the card's expiration year. /// [JsonProperty("exp_year")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("exp_year")] +#endif public long? ExpYear { get; set; } /// /// The last 4 digits of the card. /// [JsonProperty("last4")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last4")] +#endif public string Last4 { get; set; } } } diff --git a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsMultibanco.cs b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsMultibanco.cs index 73f2e54dc9..2fb341d354 100644 --- a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsMultibanco.cs +++ b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsMultibanco.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ChargePaymentMethodDetailsMultibanco : StripeEntity { @@ -9,12 +12,18 @@ public class ChargePaymentMethodDetailsMultibanco : StripeEntity [JsonProperty("entity")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("entity")] +#endif public string Entity { get; set; } /// /// Reference number associated with this Multibanco payment. /// [JsonProperty("reference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reference")] +#endif public string Reference { get; set; } } } diff --git a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsNaverPay.cs b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsNaverPay.cs index a8348346dd..83b7f8372a 100644 --- a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsNaverPay.cs +++ b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsNaverPay.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ChargePaymentMethodDetailsNaverPay : StripeEntity { @@ -9,6 +12,9 @@ public class ChargePaymentMethodDetailsNaverPay : StripeEntity [JsonProperty("buyer_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("buyer_id")] +#endif public string BuyerId { get; set; } } } diff --git a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsOxxo.cs b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsOxxo.cs index 0b4072a1eb..aacba6d6db 100644 --- a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsOxxo.cs +++ b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsOxxo.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ChargePaymentMethodDetailsOxxo : StripeEntity { @@ -9,6 +12,9 @@ public class ChargePaymentMethodDetailsOxxo : StripeEntity [JsonProperty("number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("number")] +#endif public string Number { get; set; } } } diff --git a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsP24.cs b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsP24.cs index 6df5800fe3..c5298f2c9a 100644 --- a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsP24.cs +++ b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsP24.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ChargePaymentMethodDetailsP24 : StripeEntity { @@ -24,12 +27,18 @@ public class ChargePaymentMethodDetailsP24 : StripeEntityvolkswagen_bank. /// [JsonProperty("bank")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank")] +#endif public string Bank { get; set; } /// /// Unique reference for this Przelewy24 payment. /// [JsonProperty("reference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reference")] +#endif public string Reference { get; set; } /// @@ -38,6 +47,9 @@ public class ChargePaymentMethodDetailsP24 : StripeEntity [JsonProperty("verified_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("verified_name")] +#endif public string VerifiedName { get; set; } } } diff --git a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsPayco.cs b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsPayco.cs index d05f153bfc..e76f1c75e9 100644 --- a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsPayco.cs +++ b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsPayco.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ChargePaymentMethodDetailsPayco : StripeEntity { @@ -9,6 +12,9 @@ public class ChargePaymentMethodDetailsPayco : StripeEntity [JsonProperty("buyer_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("buyer_id")] +#endif public string BuyerId { get; set; } } } diff --git a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsPaynow.cs b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsPaynow.cs index 746d714b6c..74030d104f 100644 --- a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsPaynow.cs +++ b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsPaynow.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ChargePaymentMethodDetailsPaynow : StripeEntity { @@ -9,6 +12,9 @@ public class ChargePaymentMethodDetailsPaynow : StripeEntity [JsonProperty("reference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reference")] +#endif public string Reference { get; set; } } } diff --git a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsPaypal.cs b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsPaypal.cs index 0ce4f1047c..d176ae5999 100644 --- a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsPaypal.cs +++ b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsPaypal.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ChargePaymentMethodDetailsPaypal : StripeEntity { @@ -10,12 +13,18 @@ public class ChargePaymentMethodDetailsPaypal : StripeEntity [JsonProperty("payer_email")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payer_email")] +#endif public string PayerEmail { get; set; } /// /// PayPal account PayerID. This identifier uniquely identifies the PayPal customer. /// [JsonProperty("payer_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payer_id")] +#endif public string PayerId { get; set; } /// @@ -23,6 +32,9 @@ public class ChargePaymentMethodDetailsPaypal : StripeEntity [JsonProperty("payer_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payer_name")] +#endif public string PayerName { get; set; } /// @@ -30,12 +42,18 @@ public class ChargePaymentMethodDetailsPaypal : StripeEntity [JsonProperty("seller_protection")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("seller_protection")] +#endif public ChargePaymentMethodDetailsPaypalSellerProtection SellerProtection { get; set; } /// /// A unique ID generated by PayPal for this transaction. /// [JsonProperty("transaction_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transaction_id")] +#endif public string TransactionId { get; set; } } } diff --git a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsPaypalSellerProtection.cs b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsPaypalSellerProtection.cs index 370512a377..37dfd095e1 100644 --- a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsPaypalSellerProtection.cs +++ b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsPaypalSellerProtection.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ChargePaymentMethodDetailsPaypalSellerProtection : StripeEntity { @@ -11,6 +14,9 @@ public class ChargePaymentMethodDetailsPaypalSellerProtection : StripeEntityfraudulent, or product_not_received. /// [JsonProperty("dispute_categories")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("dispute_categories")] +#endif public List DisputeCategories { get; set; } /// @@ -18,6 +24,9 @@ public class ChargePaymentMethodDetailsPaypalSellerProtection : StripeEntityeligible, not_eligible, or partially_eligible. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } } } diff --git a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsPix.cs b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsPix.cs index 4c5fcc460b..c4d65461ed 100644 --- a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsPix.cs +++ b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsPix.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ChargePaymentMethodDetailsPix : StripeEntity { @@ -9,6 +12,9 @@ public class ChargePaymentMethodDetailsPix : StripeEntity [JsonProperty("bank_transaction_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_transaction_id")] +#endif public string BankTransactionId { get; set; } } } diff --git a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsPromptpay.cs b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsPromptpay.cs index 06d2d810b0..53706e3390 100644 --- a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsPromptpay.cs +++ b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsPromptpay.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ChargePaymentMethodDetailsPromptpay : StripeEntity { @@ -9,6 +12,9 @@ public class ChargePaymentMethodDetailsPromptpay : StripeEntity [JsonProperty("reference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reference")] +#endif public string Reference { get; set; } } } diff --git a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsSamsungPay.cs b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsSamsungPay.cs index 1c6821a5db..772423c996 100644 --- a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsSamsungPay.cs +++ b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsSamsungPay.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ChargePaymentMethodDetailsSamsungPay : StripeEntity { @@ -9,6 +12,9 @@ public class ChargePaymentMethodDetailsSamsungPay : StripeEntity [JsonProperty("buyer_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("buyer_id")] +#endif public string BuyerId { get; set; } } } diff --git a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsSepaDebit.cs b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsSepaDebit.cs index d8e9f1b8df..95c297a2db 100644 --- a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsSepaDebit.cs +++ b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsSepaDebit.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ChargePaymentMethodDetailsSepaDebit : StripeEntity { @@ -9,18 +12,27 @@ public class ChargePaymentMethodDetailsSepaDebit : StripeEntity [JsonProperty("bank_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_code")] +#endif public string BankCode { get; set; } /// /// Branch code of bank associated with the bank account. /// [JsonProperty("branch_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("branch_code")] +#endif public string BranchCode { get; set; } /// /// Two-letter ISO code representing the country the bank account is located in. /// [JsonProperty("country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country")] +#endif public string Country { get; set; } /// @@ -28,12 +40,18 @@ public class ChargePaymentMethodDetailsSepaDebit : StripeEntity [JsonProperty("fingerprint")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fingerprint")] +#endif public string Fingerprint { get; set; } /// /// Last four characters of the IBAN. /// [JsonProperty("last4")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last4")] +#endif public string Last4 { get; set; } /// @@ -43,6 +61,9 @@ public class ChargePaymentMethodDetailsSepaDebit : StripeEntityretrieve the Mandate. /// [JsonProperty("mandate")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mandate")] +#endif public string Mandate { get; set; } } } diff --git a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsSofort.cs b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsSofort.cs index 00686426ae..e9b69a972c 100644 --- a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsSofort.cs +++ b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsSofort.cs @@ -3,31 +3,49 @@ namespace Stripe { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class ChargePaymentMethodDetailsSofort : StripeEntity { /// /// Bank code of bank associated with the bank account. /// [JsonProperty("bank_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_code")] +#endif public string BankCode { get; set; } /// /// Name of the bank associated with the bank account. /// [JsonProperty("bank_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_name")] +#endif public string BankName { get; set; } /// /// Bank Identifier Code of the bank associated with the bank account. /// [JsonProperty("bic")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bic")] +#endif public string Bic { get; set; } /// /// Two-letter ISO code representing the country the bank account is located in. /// [JsonProperty("country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country")] +#endif public string Country { get; set; } #region Expandable GeneratedSepaDebit @@ -37,6 +55,9 @@ public class ChargePaymentMethodDetailsSofort : StripeEntity [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string GeneratedSepaDebitId { get => this.InternalGeneratedSepaDebit?.Id; @@ -50,6 +71,9 @@ public string GeneratedSepaDebitId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public PaymentMethod GeneratedSepaDebit { get => this.InternalGeneratedSepaDebit?.ExpandedObject; @@ -58,6 +82,10 @@ public PaymentMethod GeneratedSepaDebit [JsonProperty("generated_sepa_debit")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("generated_sepa_debit")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalGeneratedSepaDebit { get; set; } #endregion @@ -68,6 +96,9 @@ public PaymentMethod GeneratedSepaDebit /// The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string GeneratedSepaDebitMandateId { get => this.InternalGeneratedSepaDebitMandate?.Id; @@ -81,6 +112,9 @@ public string GeneratedSepaDebitMandateId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Mandate GeneratedSepaDebitMandate { get => this.InternalGeneratedSepaDebitMandate?.ExpandedObject; @@ -89,6 +123,10 @@ public Mandate GeneratedSepaDebitMandate [JsonProperty("generated_sepa_debit_mandate")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("generated_sepa_debit_mandate")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalGeneratedSepaDebitMandate { get; set; } #endregion @@ -96,6 +134,9 @@ public Mandate GeneratedSepaDebitMandate /// Last four characters of the IBAN. /// [JsonProperty("iban_last4")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("iban_last4")] +#endif public string IbanLast4 { get; set; } /// @@ -105,6 +146,9 @@ public Mandate GeneratedSepaDebitMandate /// One of: de, en, es, fr, it, nl, or pl. /// [JsonProperty("preferred_language")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preferred_language")] +#endif public string PreferredLanguage { get; set; } /// @@ -112,6 +156,9 @@ public Mandate GeneratedSepaDebitMandate /// supported) at the time of authorization or settlement. They cannot be set or mutated. /// [JsonProperty("verified_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("verified_name")] +#endif public string VerifiedName { get; set; } } } diff --git a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsSwish.cs b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsSwish.cs index 0175cd3703..e6438b6256 100644 --- a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsSwish.cs +++ b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsSwish.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ChargePaymentMethodDetailsSwish : StripeEntity { @@ -10,18 +13,27 @@ public class ChargePaymentMethodDetailsSwish : StripeEntity [JsonProperty("fingerprint")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fingerprint")] +#endif public string Fingerprint { get; set; } /// /// Payer bank reference number for the payment. /// [JsonProperty("payment_reference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_reference")] +#endif public string PaymentReference { get; set; } /// /// The last four digits of the Swish account phone number. /// [JsonProperty("verified_phone_last4")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("verified_phone_last4")] +#endif public string VerifiedPhoneLast4 { get; set; } } } diff --git a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsUsBankAccount.cs b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsUsBankAccount.cs index 9ba6f52817..d857020642 100644 --- a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsUsBankAccount.cs +++ b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsUsBankAccount.cs @@ -3,7 +3,13 @@ namespace Stripe { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class ChargePaymentMethodDetailsUsBankAccount : StripeEntity { /// @@ -11,6 +17,9 @@ public class ChargePaymentMethodDetailsUsBankAccount : StripeEntitycompany, or individual. /// [JsonProperty("account_holder_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_holder_type")] +#endif public string AccountHolderType { get; set; } /// @@ -18,12 +27,18 @@ public class ChargePaymentMethodDetailsUsBankAccount : StripeEntitychecking, or savings. /// [JsonProperty("account_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_type")] +#endif public string AccountType { get; set; } /// /// Name of the bank associated with the bank account. /// [JsonProperty("bank_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_name")] +#endif public string BankName { get; set; } /// @@ -31,12 +46,18 @@ public class ChargePaymentMethodDetailsUsBankAccount : StripeEntity [JsonProperty("fingerprint")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fingerprint")] +#endif public string Fingerprint { get; set; } /// /// Last four digits of the bank account number. /// [JsonProperty("last4")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last4")] +#endif public string Last4 { get; set; } #region Expandable Mandate @@ -46,6 +67,9 @@ public class ChargePaymentMethodDetailsUsBankAccount : StripeEntity [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string MandateId { get => this.InternalMandate?.Id; @@ -59,6 +83,9 @@ public string MandateId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Mandate Mandate { get => this.InternalMandate?.ExpandedObject; @@ -67,6 +94,10 @@ public Mandate Mandate [JsonProperty("mandate")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mandate")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalMandate { get; set; } #endregion @@ -74,12 +105,18 @@ public Mandate Mandate /// Reference number to locate ACH payments with customer's bank. /// [JsonProperty("payment_reference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_reference")] +#endif public string PaymentReference { get; set; } /// /// Routing number of the bank account. /// [JsonProperty("routing_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("routing_number")] +#endif public string RoutingNumber { get; set; } } } diff --git a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsWechatPay.cs b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsWechatPay.cs index ea60980c15..efa2b505fb 100644 --- a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsWechatPay.cs +++ b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsWechatPay.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ChargePaymentMethodDetailsWechatPay : StripeEntity { @@ -10,12 +13,18 @@ public class ChargePaymentMethodDetailsWechatPay : StripeEntity [JsonProperty("fingerprint")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fingerprint")] +#endif public string Fingerprint { get; set; } /// /// Transaction ID of this particular WeChat Pay transaction. /// [JsonProperty("transaction_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transaction_id")] +#endif public string TransactionId { get; set; } } } diff --git a/src/Stripe.net/Entities/Charges/ChargeRadarOptions.cs b/src/Stripe.net/Entities/Charges/ChargeRadarOptions.cs index 1a6142d95e..6daa628dc6 100644 --- a/src/Stripe.net/Entities/Charges/ChargeRadarOptions.cs +++ b/src/Stripe.net/Entities/Charges/ChargeRadarOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ChargeRadarOptions : StripeEntity { @@ -11,6 +14,9 @@ public class ChargeRadarOptions : StripeEntity /// predictions on your payments. /// [JsonProperty("session")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("session")] +#endif public string Session { get; set; } } } diff --git a/src/Stripe.net/Entities/Charges/ChargeTransferData.cs b/src/Stripe.net/Entities/Charges/ChargeTransferData.cs index 1865b433e7..4f989d84f8 100644 --- a/src/Stripe.net/Entities/Charges/ChargeTransferData.cs +++ b/src/Stripe.net/Entities/Charges/ChargeTransferData.cs @@ -3,7 +3,13 @@ namespace Stripe { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class ChargeTransferData : StripeEntity { /// @@ -11,6 +17,9 @@ public class ChargeTransferData : StripeEntity /// charge amount is transferred to the destination account. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long? Amount { get; set; } #region Expandable Destination @@ -21,6 +30,9 @@ public class ChargeTransferData : StripeEntity /// was specified in the charge request. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string DestinationId { get => this.InternalDestination?.Id; @@ -35,6 +47,9 @@ public string DestinationId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Account Destination { get => this.InternalDestination?.ExpandedObject; @@ -43,6 +58,10 @@ public Account Destination [JsonProperty("destination")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("destination")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalDestination { get; set; } #endregion } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/Session.cs b/src/Stripe.net/Entities/Checkout/Sessions/Session.cs index fdbbbc9c03..8a2d93d8e4 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/Session.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/Session.cs @@ -5,6 +5,9 @@ namespace Stripe.Checkout using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// A Checkout Session represents your customer's session as they pay for one-time purchases @@ -24,18 +27,27 @@ namespace Stripe.Checkout /// Related guide: Checkout /// quickstart. /// +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class Session : StripeEntity, IHasId, IHasMetadata, IHasObject { /// /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// @@ -43,33 +55,51 @@ public class Session : StripeEntity, IHasId, IHasMetadata, IHasObject /// href="https://docs.stripe.com/payments/checkout/adaptive-pricing">Adaptive Pricing. /// [JsonProperty("adaptive_pricing")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("adaptive_pricing")] +#endif public SessionAdaptivePricing AdaptivePricing { get; set; } /// /// When set, provides configuration for actions to take if this Checkout Session expires. /// [JsonProperty("after_expiration")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("after_expiration")] +#endif public SessionAfterExpiration AfterExpiration { get; set; } /// /// Enables user redeemable promotion codes. /// [JsonProperty("allow_promotion_codes")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("allow_promotion_codes")] +#endif public bool? AllowPromotionCodes { get; set; } /// /// Total of all items before discounts or taxes are applied. /// [JsonProperty("amount_subtotal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_subtotal")] +#endif public long? AmountSubtotal { get; set; } /// /// Total of all items after discounts and taxes are applied. /// [JsonProperty("amount_total")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_total")] +#endif public long? AmountTotal { get; set; } [JsonProperty("automatic_tax")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("automatic_tax")] +#endif public SessionAutomaticTax AutomaticTax { get; set; } /// @@ -78,6 +108,9 @@ public class Session : StripeEntity, IHasId, IHasMetadata, IHasObject /// One of: auto, or required. /// [JsonProperty("billing_address_collection")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_address_collection")] +#endif public string BillingAddressCollection { get; set; } /// @@ -85,6 +118,9 @@ public class Session : StripeEntity, IHasId, IHasMetadata, IHasObject /// they decide to cancel payment and return to your website. /// [JsonProperty("cancel_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cancel_url")] +#endif public string CancelUrl { get; set; } /// @@ -92,18 +128,27 @@ public class Session : StripeEntity, IHasId, IHasMetadata, IHasObject /// or similar, and can be used to reconcile the Session with your internal systems. /// [JsonProperty("client_reference_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("client_reference_id")] +#endif public string ClientReferenceId { get; set; } /// /// Client secret to be used when initializing Stripe.js embedded checkout. /// [JsonProperty("client_secret")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("client_secret")] +#endif public string ClientSecret { get; set; } /// /// Results of consent_collection for this session. /// [JsonProperty("consent")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("consent")] +#endif public SessionConsent Consent { get; set; } /// @@ -111,6 +156,9 @@ public class Session : StripeEntity, IHasId, IHasMetadata, IHasObject /// customers. /// [JsonProperty("consent_collection")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("consent_collection")] +#endif public SessionConsentCollection ConsentCollection { get; set; } /// @@ -118,6 +166,10 @@ public class Session : StripeEntity, IHasId, IHasMetadata, IHasObject /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -126,6 +178,9 @@ public class Session : StripeEntity, IHasId, IHasMetadata, IHasObject /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// @@ -134,6 +189,9 @@ public class Session : StripeEntity, IHasId, IHasMetadata, IHasObject /// sessions. /// [JsonProperty("currency_conversion")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency_conversion")] +#endif public SessionCurrencyConversion CurrencyConversion { get; set; } /// @@ -141,9 +199,15 @@ public class Session : StripeEntity, IHasId, IHasMetadata, IHasObject /// are supported. /// [JsonProperty("custom_fields")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("custom_fields")] +#endif public List CustomFields { get; set; } [JsonProperty("custom_text")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("custom_text")] +#endif public SessionCustomText CustomText { get; set; } #region Expandable Customer @@ -157,6 +221,9 @@ public class Session : StripeEntity, IHasId, IHasMetadata, IHasObject /// Session was created. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string CustomerId { get => this.InternalCustomer?.Id; @@ -174,6 +241,9 @@ public string CustomerId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Customer Customer { get => this.InternalCustomer?.ExpandedObject; @@ -182,6 +252,10 @@ public Customer Customer [JsonProperty("customer")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalCustomer { get; set; } #endregion @@ -191,6 +265,9 @@ public Customer Customer /// One of: always, or if_required. /// [JsonProperty("customer_creation")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_creation")] +#endif public string CustomerCreation { get; set; } /// @@ -198,6 +275,9 @@ public Customer Customer /// IDs. Customer's address details are not present on Sessions in setup mode. /// [JsonProperty("customer_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_details")] +#endif public SessionCustomerDetails CustomerDetails { get; set; } /// @@ -207,6 +287,9 @@ public Customer Customer /// the customer once the payment flow is complete, use the customer attribute. /// [JsonProperty("customer_email")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_email")] +#endif public string CustomerEmail { get; set; } /// @@ -214,6 +297,10 @@ public Customer Customer /// [JsonProperty("expires_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("expires_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime ExpiresAt { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; #region Expandable Invoice @@ -223,6 +310,9 @@ public Customer Customer /// ID of the invoice created by the Checkout Session, if it exists. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string InvoiceId { get => this.InternalInvoice?.Id; @@ -236,6 +326,9 @@ public string InvoiceId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Invoice Invoice { get => this.InternalInvoice?.ExpandedObject; @@ -244,6 +337,10 @@ public Invoice Invoice [JsonProperty("invoice")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("invoice")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalInvoice { get; set; } #endregion @@ -251,12 +348,18 @@ public Invoice Invoice /// Details on the state of invoice creation for the Checkout Session. /// [JsonProperty("invoice_creation")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("invoice_creation")] +#endif public SessionInvoiceCreation InvoiceCreation { get; set; } /// /// The line items purchased by the customer. /// [JsonProperty("line_items")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("line_items")] +#endif public StripeList LineItems { get; set; } /// @@ -264,6 +367,9 @@ public Invoice Invoice /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// @@ -277,6 +383,9 @@ public Invoice Invoice /// tr, vi, zh, zh-HK, or zh-TW. /// [JsonProperty("locale")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("locale")] +#endif public string Locale { get; set; } /// @@ -285,6 +394,9 @@ public Invoice Invoice /// object in a structured format. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -292,6 +404,9 @@ public Invoice Invoice /// One of: payment, setup, or subscription. /// [JsonProperty("mode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mode")] +#endif public string Mode { get; set; } #region Expandable PaymentIntent @@ -304,6 +419,9 @@ public Invoice Invoice /// Session instead. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string PaymentIntentId { get => this.InternalPaymentIntent?.Id; @@ -320,6 +438,9 @@ public string PaymentIntentId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public PaymentIntent PaymentIntent { get => this.InternalPaymentIntent?.ExpandedObject; @@ -328,6 +449,10 @@ public PaymentIntent PaymentIntent [JsonProperty("payment_intent")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_intent")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalPaymentIntent { get; set; } #endregion @@ -338,6 +463,9 @@ public PaymentIntent PaymentIntent /// The ID of the Payment Link that created this Session. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string PaymentLinkId { get => this.InternalPaymentLink?.Id; @@ -351,6 +479,9 @@ public string PaymentLinkId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public PaymentLink PaymentLink { get => this.InternalPaymentLink?.ExpandedObject; @@ -359,6 +490,10 @@ public PaymentLink PaymentLink [JsonProperty("payment_link")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_link")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalPaymentLink { get; set; } #endregion @@ -368,6 +503,9 @@ public PaymentLink PaymentLink /// One of: always, or if_required. /// [JsonProperty("payment_method_collection")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_collection")] +#endif public string PaymentMethodCollection { get; set; } /// @@ -375,6 +513,9 @@ public PaymentLink PaymentLink /// using dynamic payment methods. /// [JsonProperty("payment_method_configuration_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_configuration_details")] +#endif public SessionPaymentMethodConfigurationDetails PaymentMethodConfigurationDetails { get; set; } /// @@ -382,6 +523,9 @@ public PaymentLink PaymentLink /// CheckoutSession. /// [JsonProperty("payment_method_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_options")] +#endif public SessionPaymentMethodOptions PaymentMethodOptions { get; set; } /// @@ -389,6 +533,9 @@ public PaymentLink PaymentLink /// accept. /// [JsonProperty("payment_method_types")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_types")] +#endif public List PaymentMethodTypes { get; set; } /// @@ -398,15 +545,24 @@ public PaymentLink PaymentLink /// One of: no_payment_required, paid, or unpaid. /// [JsonProperty("payment_status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_status")] +#endif public string PaymentStatus { get; set; } [JsonProperty("phone_number_collection")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("phone_number_collection")] +#endif public SessionPhoneNumberCollection PhoneNumberCollection { get; set; } /// /// The ID of the original expired Checkout Session that triggered the recovery flow. /// [JsonProperty("recovered_from")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("recovered_from")] +#endif public string RecoveredFrom { get; set; } /// @@ -416,6 +572,9 @@ public PaymentLink PaymentLink /// One of: always, if_required, or never. /// [JsonProperty("redirect_on_completion")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("redirect_on_completion")] +#endif public string RedirectOnCompletion { get; set; } /// @@ -424,6 +583,9 @@ public PaymentLink PaymentLink /// app or site. /// [JsonProperty("return_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("return_url")] +#endif public string ReturnUrl { get; set; } /// @@ -431,6 +593,9 @@ public PaymentLink PaymentLink /// and subscription mode. /// [JsonProperty("saved_payment_method_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("saved_payment_method_options")] +#endif public SessionSavedPaymentMethodOptions SavedPaymentMethodOptions { get; set; } #region Expandable SetupIntent @@ -443,6 +608,9 @@ public PaymentLink PaymentLink /// Session instead. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string SetupIntentId { get => this.InternalSetupIntent?.Id; @@ -459,6 +627,9 @@ public string SetupIntentId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public SetupIntent SetupIntent { get => this.InternalSetupIntent?.ExpandedObject; @@ -467,6 +638,10 @@ public SetupIntent SetupIntent [JsonProperty("setup_intent")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_intent")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalSetupIntent { get; set; } #endregion @@ -475,6 +650,9 @@ public SetupIntent SetupIntent /// customer. /// [JsonProperty("shipping_address_collection")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping_address_collection")] +#endif public SessionShippingAddressCollection ShippingAddressCollection { get; set; } /// @@ -482,18 +660,27 @@ public SetupIntent SetupIntent /// ShippingRate. /// [JsonProperty("shipping_cost")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping_cost")] +#endif public SessionShippingCost ShippingCost { get; set; } /// /// Shipping information for this Checkout Session. /// [JsonProperty("shipping_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping_details")] +#endif public SessionShippingDetails ShippingDetails { get; set; } /// /// The shipping rate options applied to this Session. /// [JsonProperty("shipping_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping_options")] +#endif public List ShippingOptions { get; set; } /// @@ -502,6 +689,9 @@ public SetupIntent SetupIntent /// One of: complete, expired, or open. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } /// @@ -512,6 +702,9 @@ public SetupIntent SetupIntent /// One of: auto, book, donate, pay, or subscribe. /// [JsonProperty("submit_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("submit_type")] +#endif public string SubmitType { get; set; } #region Expandable Subscription @@ -521,6 +714,9 @@ public SetupIntent SetupIntent /// The ID of the subscription for Checkout Sessions in subscription mode. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string SubscriptionId { get => this.InternalSubscription?.Id; @@ -534,6 +730,9 @@ public string SubscriptionId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Subscription Subscription { get => this.InternalSubscription?.ExpandedObject; @@ -542,6 +741,10 @@ public Subscription Subscription [JsonProperty("subscription")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("subscription")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalSubscription { get; set; } #endregion @@ -550,15 +753,24 @@ public Subscription Subscription /// successful. /// [JsonProperty("success_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("success_url")] +#endif public string SuccessUrl { get; set; } [JsonProperty("tax_id_collection")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_id_collection")] +#endif public SessionTaxIdCollection TaxIdCollection { get; set; } /// /// Tax and discount details for the computed total amount. /// [JsonProperty("total_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("total_details")] +#endif public SessionTotalDetails TotalDetails { get; set; } /// @@ -566,6 +778,9 @@ public Subscription Subscription /// One of: embedded, or hosted. /// [JsonProperty("ui_mode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ui_mode")] +#endif public string UiMode { get; set; } /// @@ -576,6 +791,9 @@ public Subscription Subscription /// is only present when the session is active. /// [JsonProperty("url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("url")] +#endif public string Url { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionAdaptivePricing.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionAdaptivePricing.cs index f34f7cb346..99897344a0 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionAdaptivePricing.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionAdaptivePricing.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionAdaptivePricing : StripeEntity { @@ -9,6 +12,9 @@ public class SessionAdaptivePricing : StripeEntity /// Whether Adaptive Pricing is enabled. /// [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool Enabled { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionAfterExpiration.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionAfterExpiration.cs index fb6297f6e2..a0c9edce6a 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionAfterExpiration.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionAfterExpiration.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionAfterExpiration : StripeEntity { @@ -9,6 +12,9 @@ public class SessionAfterExpiration : StripeEntity /// When set, configuration used to recover the Checkout Session on expiry. /// [JsonProperty("recovery")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("recovery")] +#endif public SessionAfterExpirationRecovery Recovery { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionAfterExpirationRecovery.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionAfterExpirationRecovery.cs index 7f6eab328f..6a816eb9fe 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionAfterExpirationRecovery.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionAfterExpirationRecovery.cs @@ -4,6 +4,9 @@ namespace Stripe.Checkout using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionAfterExpirationRecovery : StripeEntity { @@ -12,6 +15,9 @@ public class SessionAfterExpirationRecovery : StripeEntityfalse. /// [JsonProperty("allow_promotion_codes")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("allow_promotion_codes")] +#endif public bool AllowPromotionCodes { get; set; } /// @@ -20,6 +26,9 @@ public class SessionAfterExpirationRecovery : StripeEntity [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool Enabled { get; set; } /// @@ -27,6 +36,10 @@ public class SessionAfterExpirationRecovery : StripeEntity [JsonProperty("expires_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("expires_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? ExpiresAt { get; set; } /// @@ -34,6 +47,9 @@ public class SessionAfterExpirationRecovery : StripeEntity [JsonProperty("url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("url")] +#endif public string Url { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionAutomaticTax.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionAutomaticTax.cs index 8222cd26f5..1be8203d03 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionAutomaticTax.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionAutomaticTax.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionAutomaticTax : StripeEntity { @@ -9,6 +12,9 @@ public class SessionAutomaticTax : StripeEntity /// Indicates whether automatic tax is enabled for the session. /// [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool Enabled { get; set; } /// @@ -17,6 +23,9 @@ public class SessionAutomaticTax : StripeEntity /// transaction is returned in the report of the connected account. /// [JsonProperty("liability")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("liability")] +#endif public SessionAutomaticTaxLiability Liability { get; set; } /// @@ -24,6 +33,9 @@ public class SessionAutomaticTax : StripeEntity /// One of: complete, failed, or requires_location_inputs. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionAutomaticTaxLiability.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionAutomaticTaxLiability.cs index 713c9c3a4b..f636ce1cc1 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionAutomaticTaxLiability.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionAutomaticTaxLiability.cs @@ -3,7 +3,13 @@ namespace Stripe.Checkout { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class SessionAutomaticTaxLiability : StripeEntity { #region Expandable Account @@ -13,6 +19,9 @@ public class SessionAutomaticTaxLiability : StripeEntitytype is account. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string AccountId { get => this.InternalAccount?.Id; @@ -26,6 +35,9 @@ public string AccountId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Account Account { get => this.InternalAccount?.ExpandedObject; @@ -34,6 +46,10 @@ public Account Account [JsonProperty("account")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalAccount { get; set; } #endregion @@ -42,6 +58,9 @@ public Account Account /// One of: account, or self. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionConsent.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionConsent.cs index 41f1c4d5e0..a58443dec7 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionConsent.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionConsent.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionConsent : StripeEntity { @@ -11,6 +14,9 @@ public class SessionConsent : StripeEntity /// One of: opt_in, or opt_out. /// [JsonProperty("promotions")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("promotions")] +#endif public string Promotions { get; set; } /// @@ -18,6 +24,9 @@ public class SessionConsent : StripeEntity /// terms of service. /// [JsonProperty("terms_of_service")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("terms_of_service")] +#endif public string TermsOfService { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionConsentCollection.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionConsentCollection.cs index 52ea3d78be..50d37c5d99 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionConsentCollection.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionConsentCollection.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionConsentCollection : StripeEntity { @@ -10,6 +13,9 @@ public class SessionConsentCollection : StripeEntity /// method. /// [JsonProperty("payment_method_reuse_agreement")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_reuse_agreement")] +#endif public SessionConsentCollectionPaymentMethodReuseAgreement PaymentMethodReuseAgreement { get; set; } /// @@ -20,6 +26,9 @@ public class SessionConsentCollection : StripeEntity /// One of: auto, or none. /// [JsonProperty("promotions")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("promotions")] +#endif public string Promotions { get; set; } /// @@ -28,6 +37,9 @@ public class SessionConsentCollection : StripeEntity /// One of: none, or required. /// [JsonProperty("terms_of_service")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("terms_of_service")] +#endif public string TermsOfService { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionConsentCollectionPaymentMethodReuseAgreement.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionConsentCollectionPaymentMethodReuseAgreement.cs index af3ee13d5c..b75ab04757 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionConsentCollectionPaymentMethodReuseAgreement.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionConsentCollectionPaymentMethodReuseAgreement.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionConsentCollectionPaymentMethodReuseAgreement : StripeEntity { @@ -14,6 +17,9 @@ public class SessionConsentCollectionPaymentMethodReuseAgreement : StripeEntity< /// One of: auto, or hidden. /// [JsonProperty("position")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("position")] +#endif public string Position { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionCurrencyConversion.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionCurrencyConversion.cs index ef717a8af9..4194573469 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionCurrencyConversion.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionCurrencyConversion.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionCurrencyConversion : StripeEntity { @@ -9,24 +12,36 @@ public class SessionCurrencyConversion : StripeEntity /// Total of all items in source currency before discounts or taxes are applied. /// [JsonProperty("amount_subtotal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_subtotal")] +#endif public long AmountSubtotal { get; set; } /// /// Total of all items in source currency after discounts and taxes are applied. /// [JsonProperty("amount_total")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_total")] +#endif public long AmountTotal { get; set; } /// /// Exchange rate used to convert source currency amounts to customer currency amounts. /// [JsonProperty("fx_rate")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fx_rate")] +#endif public decimal FxRate { get; set; } /// /// Creation currency of the CheckoutSession before localization. /// [JsonProperty("source_currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("source_currency")] +#endif public string SourceCurrency { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionCustomField.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionCustomField.cs index d7d7b1b249..fb13307743 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionCustomField.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionCustomField.cs @@ -2,10 +2,16 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionCustomField : StripeEntity { [JsonProperty("dropdown")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("dropdown")] +#endif public SessionCustomFieldDropdown Dropdown { get; set; } /// @@ -13,12 +19,21 @@ public class SessionCustomField : StripeEntity /// unique to this field, alphanumeric, and up to 200 characters. /// [JsonProperty("key")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("key")] +#endif public string Key { get; set; } [JsonProperty("label")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("label")] +#endif public SessionCustomFieldLabel Label { get; set; } [JsonProperty("numeric")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("numeric")] +#endif public SessionCustomFieldNumeric Numeric { get; set; } /// @@ -26,9 +41,15 @@ public class SessionCustomField : StripeEntity /// Session. Defaults to false. /// [JsonProperty("optional")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("optional")] +#endif public bool Optional { get; set; } [JsonProperty("text")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("text")] +#endif public SessionCustomFieldText Text { get; set; } /// @@ -36,6 +57,9 @@ public class SessionCustomField : StripeEntity /// One of: dropdown, numeric, or text. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionCustomFieldDropdown.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionCustomFieldDropdown.cs index ceec7f4bbc..dd48c60530 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionCustomFieldDropdown.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionCustomFieldDropdown.cs @@ -3,6 +3,9 @@ namespace Stripe.Checkout { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionCustomFieldDropdown : StripeEntity { @@ -10,18 +13,27 @@ public class SessionCustomFieldDropdown : StripeEntity [JsonProperty("default_value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("default_value")] +#endif public string DefaultValue { get; set; } /// /// The options available for the customer to select. Up to 200 options allowed. /// [JsonProperty("options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("options")] +#endif public List Options { get; set; } /// /// The option selected by the customer. This will be the value for the option. /// [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public string Value { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionCustomFieldDropdownOption.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionCustomFieldDropdownOption.cs index de82c2e2c5..0c2d5b510f 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionCustomFieldDropdownOption.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionCustomFieldDropdownOption.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionCustomFieldDropdownOption : StripeEntity { @@ -9,6 +12,9 @@ public class SessionCustomFieldDropdownOption : StripeEntity [JsonProperty("label")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("label")] +#endif public string Label { get; set; } /// @@ -17,6 +23,9 @@ public class SessionCustomFieldDropdownOption : StripeEntity [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public string Value { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionCustomFieldLabel.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionCustomFieldLabel.cs index 78dc2cd4f2..39b434ab46 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionCustomFieldLabel.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionCustomFieldLabel.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionCustomFieldLabel : StripeEntity { @@ -9,12 +12,18 @@ public class SessionCustomFieldLabel : StripeEntity /// Custom text for the label, displayed to the customer. Up to 50 characters. /// [JsonProperty("custom")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("custom")] +#endif public string Custom { get; set; } /// /// The type of the label. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionCustomFieldNumeric.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionCustomFieldNumeric.cs index 2e11f0de13..53efe5fb7e 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionCustomFieldNumeric.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionCustomFieldNumeric.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionCustomFieldNumeric : StripeEntity { @@ -9,24 +12,36 @@ public class SessionCustomFieldNumeric : StripeEntity /// The value that will pre-fill the field on the payment page. /// [JsonProperty("default_value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("default_value")] +#endif public string DefaultValue { get; set; } /// /// The maximum character length constraint for the customer's input. /// [JsonProperty("maximum_length")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("maximum_length")] +#endif public long? MaximumLength { get; set; } /// /// The minimum character length requirement for the customer's input. /// [JsonProperty("minimum_length")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("minimum_length")] +#endif public long? MinimumLength { get; set; } /// /// The value entered by the customer, containing only digits. /// [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public string Value { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionCustomFieldText.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionCustomFieldText.cs index 897588cd71..5be884376a 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionCustomFieldText.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionCustomFieldText.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionCustomFieldText : StripeEntity { @@ -9,24 +12,36 @@ public class SessionCustomFieldText : StripeEntity /// The value that will pre-fill the field on the payment page. /// [JsonProperty("default_value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("default_value")] +#endif public string DefaultValue { get; set; } /// /// The maximum character length constraint for the customer's input. /// [JsonProperty("maximum_length")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("maximum_length")] +#endif public long? MaximumLength { get; set; } /// /// The minimum character length requirement for the customer's input. /// [JsonProperty("minimum_length")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("minimum_length")] +#endif public long? MinimumLength { get; set; } /// /// The value entered by the customer. /// [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public string Value { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionCustomText.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionCustomText.cs index d4dfc7a0d8..8328ddd1c8 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionCustomText.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionCustomText.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionCustomText : StripeEntity { @@ -9,18 +12,27 @@ public class SessionCustomText : StripeEntity /// Custom text that should be displayed after the payment confirmation button. /// [JsonProperty("after_submit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("after_submit")] +#endif public SessionCustomTextAfterSubmit AfterSubmit { get; set; } /// /// Custom text that should be displayed alongside shipping address collection. /// [JsonProperty("shipping_address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping_address")] +#endif public SessionCustomTextShippingAddress ShippingAddress { get; set; } /// /// Custom text that should be displayed alongside the payment confirmation button. /// [JsonProperty("submit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("submit")] +#endif public SessionCustomTextSubmit Submit { get; set; } /// @@ -28,6 +40,9 @@ public class SessionCustomText : StripeEntity /// text. /// [JsonProperty("terms_of_service_acceptance")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("terms_of_service_acceptance")] +#endif public SessionCustomTextTermsOfServiceAcceptance TermsOfServiceAcceptance { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionCustomTextAfterSubmit.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionCustomTextAfterSubmit.cs index 26e3abaef6..e7dc857efe 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionCustomTextAfterSubmit.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionCustomTextAfterSubmit.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionCustomTextAfterSubmit : StripeEntity { @@ -9,6 +12,9 @@ public class SessionCustomTextAfterSubmit : StripeEntity [JsonProperty("message")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("message")] +#endif public string Message { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionCustomTextShippingAddress.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionCustomTextShippingAddress.cs index d8c95e0d3a..3b6e9881b5 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionCustomTextShippingAddress.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionCustomTextShippingAddress.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionCustomTextShippingAddress : StripeEntity { @@ -9,6 +12,9 @@ public class SessionCustomTextShippingAddress : StripeEntity [JsonProperty("message")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("message")] +#endif public string Message { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionCustomTextSubmit.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionCustomTextSubmit.cs index f21515bf7a..ad7d29bce2 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionCustomTextSubmit.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionCustomTextSubmit.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionCustomTextSubmit : StripeEntity { @@ -9,6 +12,9 @@ public class SessionCustomTextSubmit : StripeEntity /// Text may be up to 1200 characters in length. /// [JsonProperty("message")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("message")] +#endif public string Message { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionCustomTextTermsOfServiceAcceptance.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionCustomTextTermsOfServiceAcceptance.cs index a0e483a00a..d17dd8a829 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionCustomTextTermsOfServiceAcceptance.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionCustomTextTermsOfServiceAcceptance.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionCustomTextTermsOfServiceAcceptance : StripeEntity { @@ -9,6 +12,9 @@ public class SessionCustomTextTermsOfServiceAcceptance : StripeEntity [JsonProperty("message")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("message")] +#endif public string Message { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionCustomerDetails.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionCustomerDetails.cs index cb86f4b1dc..14d5bd6596 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionCustomerDetails.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionCustomerDetails.cs @@ -3,6 +3,9 @@ namespace Stripe.Checkout { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionCustomerDetails : StripeEntity { @@ -11,6 +14,9 @@ public class SessionCustomerDetails : StripeEntity /// populated only for sessions on or after March 30, 2022. /// [JsonProperty("address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address")] +#endif public Address Address { get; set; } /// @@ -20,6 +26,9 @@ public class SessionCustomerDetails : StripeEntity /// the customer on the Checkout form. /// [JsonProperty("email")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("email")] +#endif public string Email { get; set; } /// @@ -27,12 +36,18 @@ public class SessionCustomerDetails : StripeEntity /// only for sessions on or after March 30, 2022. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } /// /// The customer's phone number after a completed Checkout Session. /// [JsonProperty("phone")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("phone")] +#endif public string Phone { get; set; } /// @@ -40,12 +55,18 @@ public class SessionCustomerDetails : StripeEntity /// One of: exempt, none, or reverse. /// [JsonProperty("tax_exempt")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_exempt")] +#endif public string TaxExempt { get; set; } /// /// The customer’s tax IDs after a completed Checkout Session. /// [JsonProperty("tax_ids")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_ids")] +#endif public List TaxIds { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionCustomerDetailsTaxId.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionCustomerDetailsTaxId.cs index be40c993a0..a56ddda716 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionCustomerDetailsTaxId.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionCustomerDetailsTaxId.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionCustomerDetailsTaxId : StripeEntity { @@ -42,12 +45,18 @@ public class SessionCustomerDetailsTaxId : StripeEntityza_vat. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } /// /// The value of the tax ID. /// [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public string Value { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionInvoiceCreation.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionInvoiceCreation.cs index 9804c3b9c6..4a375da329 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionInvoiceCreation.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionInvoiceCreation.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionInvoiceCreation : StripeEntity { @@ -9,9 +12,15 @@ public class SessionInvoiceCreation : StripeEntity /// Indicates whether invoice creation is enabled for the Checkout Session. /// [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool Enabled { get; set; } [JsonProperty("invoice_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("invoice_data")] +#endif public SessionInvoiceCreationInvoiceData InvoiceData { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionInvoiceCreationInvoiceData.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionInvoiceCreationInvoiceData.cs index f1cc6ce469..ba2d9888de 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionInvoiceCreationInvoiceData.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionInvoiceCreationInvoiceData.cs @@ -5,7 +5,13 @@ namespace Stripe.Checkout using System.Linq; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class SessionInvoiceCreationInvoiceData : StripeEntity, IHasMetadata { #region Expandable AccountTaxIds @@ -15,6 +21,9 @@ public class SessionInvoiceCreationInvoiceData : StripeEntity [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public List AccountTaxIdIds { get => this.InternalAccountTaxIds?.Select((x) => x.Id).ToList(); @@ -28,6 +37,9 @@ public List AccountTaxIdIds /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public List AccountTaxIds { get => this.InternalAccountTaxIds?.Select((x) => x.ExpandedObject).ToList(); @@ -35,6 +47,9 @@ public List AccountTaxIds } [JsonProperty("account_tax_ids", ItemConverterType = typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_tax_ids")] +#endif internal List> InternalAccountTaxIds { get; set; } #endregion @@ -42,18 +57,27 @@ public List AccountTaxIds /// Custom fields displayed on the invoice. /// [JsonProperty("custom_fields")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("custom_fields")] +#endif public List CustomFields { get; set; } /// /// An arbitrary string attached to the object. Often useful for displaying to users. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// /// Footer displayed on the invoice. /// [JsonProperty("footer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("footer")] +#endif public string Footer { get; set; } /// @@ -61,6 +85,9 @@ public List AccountTaxIds /// branding and support information of the specified account. /// [JsonProperty("issuer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("issuer")] +#endif public SessionInvoiceCreationInvoiceDataIssuer Issuer { get; set; } /// @@ -69,12 +96,18 @@ public List AccountTaxIds /// object in a structured format. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// Options for invoice PDF rendering. /// [JsonProperty("rendering_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("rendering_options")] +#endif public SessionInvoiceCreationInvoiceDataRenderingOptions RenderingOptions { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionInvoiceCreationInvoiceDataCustomField.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionInvoiceCreationInvoiceDataCustomField.cs index d33a5f5d62..25b63f12a9 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionInvoiceCreationInvoiceDataCustomField.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionInvoiceCreationInvoiceDataCustomField.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionInvoiceCreationInvoiceDataCustomField : StripeEntity { @@ -9,12 +12,18 @@ public class SessionInvoiceCreationInvoiceDataCustomField : StripeEntity [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } /// /// The value of the custom field. /// [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public string Value { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionInvoiceCreationInvoiceDataIssuer.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionInvoiceCreationInvoiceDataIssuer.cs index 3adf789fdc..ce619be79b 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionInvoiceCreationInvoiceDataIssuer.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionInvoiceCreationInvoiceDataIssuer.cs @@ -3,7 +3,13 @@ namespace Stripe.Checkout { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class SessionInvoiceCreationInvoiceDataIssuer : StripeEntity { #region Expandable Account @@ -13,6 +19,9 @@ public class SessionInvoiceCreationInvoiceDataIssuer : StripeEntitytype is account. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string AccountId { get => this.InternalAccount?.Id; @@ -26,6 +35,9 @@ public string AccountId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Account Account { get => this.InternalAccount?.ExpandedObject; @@ -34,6 +46,10 @@ public Account Account [JsonProperty("account")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalAccount { get; set; } #endregion @@ -42,6 +58,9 @@ public Account Account /// One of: account, or self. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionInvoiceCreationInvoiceDataRenderingOptions.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionInvoiceCreationInvoiceDataRenderingOptions.cs index fad08a9035..8c00f9bf83 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionInvoiceCreationInvoiceDataRenderingOptions.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionInvoiceCreationInvoiceDataRenderingOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionInvoiceCreationInvoiceDataRenderingOptions : StripeEntity { @@ -9,6 +12,9 @@ public class SessionInvoiceCreationInvoiceDataRenderingOptions : StripeEntity [JsonProperty("amount_tax_display")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_tax_display")] +#endif public string AmountTaxDisplay { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodConfigurationDetails.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodConfigurationDetails.cs index 62ffcde796..3a08e99934 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodConfigurationDetails.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodConfigurationDetails.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodConfigurationDetails : StripeEntity, IHasId { @@ -9,12 +12,18 @@ public class SessionPaymentMethodConfigurationDetails : StripeEntity [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// ID of the parent payment method configuration used. /// [JsonProperty("parent")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("parent")] +#endif public string Parent { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptions.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptions.cs index cd0a8c3cde..9b23cd94f1 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptions.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptions.cs @@ -2,118 +2,232 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptions : StripeEntity { [JsonProperty("acss_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("acss_debit")] +#endif public SessionPaymentMethodOptionsAcssDebit AcssDebit { get; set; } [JsonProperty("affirm")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("affirm")] +#endif public SessionPaymentMethodOptionsAffirm Affirm { get; set; } [JsonProperty("afterpay_clearpay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("afterpay_clearpay")] +#endif public SessionPaymentMethodOptionsAfterpayClearpay AfterpayClearpay { get; set; } [JsonProperty("alipay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("alipay")] +#endif public SessionPaymentMethodOptionsAlipay Alipay { get; set; } [JsonProperty("amazon_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amazon_pay")] +#endif public SessionPaymentMethodOptionsAmazonPay AmazonPay { get; set; } [JsonProperty("au_becs_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("au_becs_debit")] +#endif public SessionPaymentMethodOptionsAuBecsDebit AuBecsDebit { get; set; } [JsonProperty("bacs_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bacs_debit")] +#endif public SessionPaymentMethodOptionsBacsDebit BacsDebit { get; set; } [JsonProperty("bancontact")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bancontact")] +#endif public SessionPaymentMethodOptionsBancontact Bancontact { get; set; } [JsonProperty("boleto")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("boleto")] +#endif public SessionPaymentMethodOptionsBoleto Boleto { get; set; } [JsonProperty("card")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card")] +#endif public SessionPaymentMethodOptionsCard Card { get; set; } [JsonProperty("cashapp")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cashapp")] +#endif public SessionPaymentMethodOptionsCashapp Cashapp { get; set; } [JsonProperty("customer_balance")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_balance")] +#endif public SessionPaymentMethodOptionsCustomerBalance CustomerBalance { get; set; } [JsonProperty("eps")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("eps")] +#endif public SessionPaymentMethodOptionsEps Eps { get; set; } [JsonProperty("fpx")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fpx")] +#endif public SessionPaymentMethodOptionsFpx Fpx { get; set; } [JsonProperty("giropay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("giropay")] +#endif public SessionPaymentMethodOptionsGiropay Giropay { get; set; } [JsonProperty("grabpay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("grabpay")] +#endif public SessionPaymentMethodOptionsGrabpay Grabpay { get; set; } [JsonProperty("ideal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ideal")] +#endif public SessionPaymentMethodOptionsIdeal Ideal { get; set; } [JsonProperty("kakao_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("kakao_pay")] +#endif public SessionPaymentMethodOptionsKakaoPay KakaoPay { get; set; } [JsonProperty("klarna")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("klarna")] +#endif public SessionPaymentMethodOptionsKlarna Klarna { get; set; } [JsonProperty("konbini")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("konbini")] +#endif public SessionPaymentMethodOptionsKonbini Konbini { get; set; } [JsonProperty("kr_card")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("kr_card")] +#endif public SessionPaymentMethodOptionsKrCard KrCard { get; set; } [JsonProperty("link")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("link")] +#endif public SessionPaymentMethodOptionsLink Link { get; set; } [JsonProperty("mobilepay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mobilepay")] +#endif public SessionPaymentMethodOptionsMobilepay Mobilepay { get; set; } [JsonProperty("multibanco")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("multibanco")] +#endif public SessionPaymentMethodOptionsMultibanco Multibanco { get; set; } [JsonProperty("naver_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("naver_pay")] +#endif public SessionPaymentMethodOptionsNaverPay NaverPay { get; set; } [JsonProperty("oxxo")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("oxxo")] +#endif public SessionPaymentMethodOptionsOxxo Oxxo { get; set; } [JsonProperty("p24")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("p24")] +#endif public SessionPaymentMethodOptionsP24 P24 { get; set; } [JsonProperty("payco")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payco")] +#endif public SessionPaymentMethodOptionsPayco Payco { get; set; } [JsonProperty("paynow")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("paynow")] +#endif public SessionPaymentMethodOptionsPaynow Paynow { get; set; } [JsonProperty("paypal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("paypal")] +#endif public SessionPaymentMethodOptionsPaypal Paypal { get; set; } [JsonProperty("pix")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("pix")] +#endif public SessionPaymentMethodOptionsPix Pix { get; set; } [JsonProperty("revolut_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("revolut_pay")] +#endif public SessionPaymentMethodOptionsRevolutPay RevolutPay { get; set; } [JsonProperty("samsung_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("samsung_pay")] +#endif public SessionPaymentMethodOptionsSamsungPay SamsungPay { get; set; } [JsonProperty("sepa_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sepa_debit")] +#endif public SessionPaymentMethodOptionsSepaDebit SepaDebit { get; set; } [JsonProperty("sofort")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sofort")] +#endif public SessionPaymentMethodOptionsSofort Sofort { get; set; } [JsonProperty("swish")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("swish")] +#endif public SessionPaymentMethodOptionsSwish Swish { get; set; } [JsonProperty("us_bank_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("us_bank_account")] +#endif public SessionPaymentMethodOptionsUsBankAccount UsBankAccount { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsAcssDebit.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsAcssDebit.cs index 2aa9385476..905c65f764 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsAcssDebit.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsAcssDebit.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsAcssDebit : StripeEntity { @@ -11,9 +14,15 @@ public class SessionPaymentMethodOptionsAcssDebit : StripeEntitycad, or usd. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } [JsonProperty("mandate_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mandate_options")] +#endif public SessionPaymentMethodOptionsAcssDebitMandateOptions MandateOptions { get; set; } /// @@ -38,6 +47,9 @@ public class SessionPaymentMethodOptionsAcssDebit : StripeEntitynone, off_session, or on_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } /// @@ -45,6 +57,9 @@ public class SessionPaymentMethodOptionsAcssDebit : StripeEntityautomatic, instant, or microdeposits. /// [JsonProperty("verification_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("verification_method")] +#endif public string VerificationMethod { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsAcssDebitMandateOptions.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsAcssDebitMandateOptions.cs index 0ead8fc61c..dcf3295d6a 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsAcssDebitMandateOptions.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsAcssDebitMandateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.Checkout { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsAcssDebitMandateOptions : StripeEntity { @@ -10,6 +13,9 @@ public class SessionPaymentMethodOptionsAcssDebitMandateOptions : StripeEntity [JsonProperty("custom_mandate_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("custom_mandate_url")] +#endif public string CustomMandateUrl { get; set; } /// @@ -18,6 +24,9 @@ public class SessionPaymentMethodOptionsAcssDebitMandateOptions : StripeEntityinvoice, or subscription. /// [JsonProperty("default_for")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("default_for")] +#endif public List DefaultFor { get; set; } /// @@ -25,6 +34,9 @@ public class SessionPaymentMethodOptionsAcssDebitMandateOptions : StripeEntity [JsonProperty("interval_description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interval_description")] +#endif public string IntervalDescription { get; set; } /// @@ -32,6 +44,9 @@ public class SessionPaymentMethodOptionsAcssDebitMandateOptions : StripeEntitycombined, interval, or sporadic. /// [JsonProperty("payment_schedule")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_schedule")] +#endif public string PaymentSchedule { get; set; } /// @@ -39,6 +54,9 @@ public class SessionPaymentMethodOptionsAcssDebitMandateOptions : StripeEntitybusiness, or personal. /// [JsonProperty("transaction_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transaction_type")] +#endif public string TransactionType { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsAffirm.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsAffirm.cs index 36368ed53a..efde7441c7 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsAffirm.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsAffirm.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsAffirm : StripeEntity { @@ -26,6 +29,9 @@ public class SessionPaymentMethodOptionsAffirm : StripeEntitySCA. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsAfterpayClearpay.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsAfterpayClearpay.cs index 8efc5f6ea8..6b81837e9b 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsAfterpayClearpay.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsAfterpayClearpay.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsAfterpayClearpay : StripeEntity { @@ -26,6 +29,9 @@ public class SessionPaymentMethodOptionsAfterpayClearpay : StripeEntitySCA. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsAlipay.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsAlipay.cs index 591f03ed78..cb3d2b4f43 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsAlipay.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsAlipay.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsAlipay : StripeEntity { @@ -26,6 +29,9 @@ public class SessionPaymentMethodOptionsAlipay : StripeEntitySCA. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsAmazonPay.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsAmazonPay.cs index 1526d8dcd5..a2cb3986ba 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsAmazonPay.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsAmazonPay.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsAmazonPay : StripeEntity { @@ -27,6 +30,9 @@ public class SessionPaymentMethodOptionsAmazonPay : StripeEntitynone, or off_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsAuBecsDebit.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsAuBecsDebit.cs index 94fc8dc229..4f3826fd1c 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsAuBecsDebit.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsAuBecsDebit.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsAuBecsDebit : StripeEntity { @@ -26,6 +29,9 @@ public class SessionPaymentMethodOptionsAuBecsDebit : StripeEntitySCA. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsBacsDebit.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsBacsDebit.cs index 2aee84f61c..173d1a4d14 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsBacsDebit.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsBacsDebit.cs @@ -2,10 +2,16 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsBacsDebit : StripeEntity { [JsonProperty("mandate_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mandate_options")] +#endif public SessionPaymentMethodOptionsBacsDebitMandateOptions MandateOptions { get; set; } /// @@ -30,6 +36,9 @@ public class SessionPaymentMethodOptionsBacsDebit : StripeEntitynone, off_session, or on_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsBancontact.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsBancontact.cs index 017fb4572c..7a90a181d4 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsBancontact.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsBancontact.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsBancontact : StripeEntity { @@ -26,6 +29,9 @@ public class SessionPaymentMethodOptionsBancontact : StripeEntitySCA. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsBoleto.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsBoleto.cs index fa0ec0ef52..9657f99e94 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsBoleto.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsBoleto.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsBoleto : StripeEntity { @@ -11,6 +14,9 @@ public class SessionPaymentMethodOptionsBoleto : StripeEntity [JsonProperty("expires_after_days")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("expires_after_days")] +#endif public long ExpiresAfterDays { get; set; } /// @@ -35,6 +41,9 @@ public class SessionPaymentMethodOptionsBoleto : StripeEntitynone, off_session, or on_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsCard.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsCard.cs index 9f87dc7523..5fe988308c 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsCard.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsCard.cs @@ -2,10 +2,16 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsCard : StripeEntity { [JsonProperty("installments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("installments")] +#endif public SessionPaymentMethodOptionsCardInstallments Installments { get; set; } /// @@ -14,6 +20,9 @@ public class SessionPaymentMethodOptionsCard : StripeEntityif_available, or never. /// [JsonProperty("request_extended_authorization")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("request_extended_authorization")] +#endif public string RequestExtendedAuthorization { get; set; } /// @@ -23,6 +32,9 @@ public class SessionPaymentMethodOptionsCard : StripeEntityif_available, or never. /// [JsonProperty("request_incremental_authorization")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("request_incremental_authorization")] +#endif public string RequestIncrementalAuthorization { get; set; } /// @@ -31,6 +43,9 @@ public class SessionPaymentMethodOptionsCard : StripeEntityif_available, or never. /// [JsonProperty("request_multicapture")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("request_multicapture")] +#endif public string RequestMulticapture { get; set; } /// @@ -39,6 +54,9 @@ public class SessionPaymentMethodOptionsCard : StripeEntityif_available, or never. /// [JsonProperty("request_overcapture")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("request_overcapture")] +#endif public string RequestOvercapture { get; set; } /// @@ -54,6 +72,9 @@ public class SessionPaymentMethodOptionsCard : StripeEntityany, automatic, or challenge. /// [JsonProperty("request_three_d_secure")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("request_three_d_secure")] +#endif public string RequestThreeDSecure { get; set; } /// @@ -78,6 +99,9 @@ public class SessionPaymentMethodOptionsCard : StripeEntitynone, off_session, or on_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } /// @@ -88,6 +112,9 @@ public class SessionPaymentMethodOptionsCard : StripeEntity [JsonProperty("statement_descriptor_suffix_kana")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("statement_descriptor_suffix_kana")] +#endif public string StatementDescriptorSuffixKana { get; set; } /// @@ -98,6 +125,9 @@ public class SessionPaymentMethodOptionsCard : StripeEntity [JsonProperty("statement_descriptor_suffix_kanji")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("statement_descriptor_suffix_kanji")] +#endif public string StatementDescriptorSuffixKanji { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsCardInstallments.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsCardInstallments.cs index 231e368135..98b1c22a49 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsCardInstallments.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsCardInstallments.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsCardInstallments : StripeEntity { @@ -9,6 +12,9 @@ public class SessionPaymentMethodOptionsCardInstallments : StripeEntity [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool Enabled { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsCashapp.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsCashapp.cs index 8021b89cf0..9f5829444f 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsCashapp.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsCashapp.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsCashapp : StripeEntity { @@ -26,6 +29,9 @@ public class SessionPaymentMethodOptionsCashapp : StripeEntitySCA. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsCustomerBalance.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsCustomerBalance.cs index d2198c2703..4d6e267377 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsCustomerBalance.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsCustomerBalance.cs @@ -2,10 +2,16 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsCustomerBalance : StripeEntity { [JsonProperty("bank_transfer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_transfer")] +#endif public SessionPaymentMethodOptionsCustomerBalanceBankTransfer BankTransfer { get; set; } /// @@ -13,6 +19,9 @@ public class SessionPaymentMethodOptionsCustomerBalance : StripeEntitybank_transfer. /// [JsonProperty("funding_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("funding_type")] +#endif public string FundingType { get; set; } /// @@ -36,6 +45,9 @@ public class SessionPaymentMethodOptionsCustomerBalance : StripeEntitySCA. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsCustomerBalanceBankTransfer.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsCustomerBalanceBankTransfer.cs index 110045ec43..d95862a13b 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsCustomerBalanceBankTransfer.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsCustomerBalanceBankTransfer.cs @@ -3,10 +3,16 @@ namespace Stripe.Checkout { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsCustomerBalanceBankTransfer : StripeEntity { [JsonProperty("eu_bank_transfer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("eu_bank_transfer")] +#endif public SessionPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer EuBankTransfer { get; set; } /// @@ -18,6 +24,9 @@ public class SessionPaymentMethodOptionsCustomerBalanceBankTransfer : StripeEnti /// swift, or zengin. /// [JsonProperty("requested_address_types")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested_address_types")] +#endif public List RequestedAddressTypes { get; set; } /// @@ -28,6 +37,9 @@ public class SessionPaymentMethodOptionsCustomerBalanceBankTransfer : StripeEnti /// mx_bank_transfer, or us_bank_transfer. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer.cs index 0a0a42ede4..e7c9f4f372 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer : StripeEntity { @@ -11,6 +14,9 @@ public class SessionPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfe /// One of: BE, DE, ES, FR, IE, or NL. /// [JsonProperty("country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country")] +#endif public string Country { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsEps.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsEps.cs index 812ef90672..1787e0db85 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsEps.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsEps.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsEps : StripeEntity { @@ -26,6 +29,9 @@ public class SessionPaymentMethodOptionsEps : StripeEntitySCA. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsFpx.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsFpx.cs index f721d52f1e..a99bfea91e 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsFpx.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsFpx.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsFpx : StripeEntity { @@ -26,6 +29,9 @@ public class SessionPaymentMethodOptionsFpx : StripeEntitySCA. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsGiropay.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsGiropay.cs index e2604f2a53..81e898899c 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsGiropay.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsGiropay.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsGiropay : StripeEntity { @@ -26,6 +29,9 @@ public class SessionPaymentMethodOptionsGiropay : StripeEntitySCA. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsGrabpay.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsGrabpay.cs index 83f6114a8c..926fe23276 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsGrabpay.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsGrabpay.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsGrabpay : StripeEntity { @@ -26,6 +29,9 @@ public class SessionPaymentMethodOptionsGrabpay : StripeEntitySCA. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsIdeal.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsIdeal.cs index d998e95dac..0cb7e86c1a 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsIdeal.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsIdeal.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsIdeal : StripeEntity { @@ -26,6 +29,9 @@ public class SessionPaymentMethodOptionsIdeal : StripeEntitySCA. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsKakaoPay.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsKakaoPay.cs index 3e2c3e87c4..77e7e97af1 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsKakaoPay.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsKakaoPay.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsKakaoPay : StripeEntity { @@ -9,6 +12,9 @@ public class SessionPaymentMethodOptionsKakaoPay : StripeEntity [JsonProperty("capture_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("capture_method")] +#endif public string CaptureMethod { get; set; } /// @@ -33,6 +39,9 @@ public class SessionPaymentMethodOptionsKakaoPay : StripeEntitynone, or off_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsKlarna.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsKlarna.cs index aed83fdc6b..6cfa6210fb 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsKlarna.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsKlarna.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsKlarna : StripeEntity { @@ -27,6 +30,9 @@ public class SessionPaymentMethodOptionsKlarna : StripeEntitynone, off_session, or on_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsKonbini.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsKonbini.cs index 0af392279f..0bd42d970b 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsKonbini.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsKonbini.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsKonbini : StripeEntity { @@ -12,6 +15,9 @@ public class SessionPaymentMethodOptionsKonbini : StripeEntity [JsonProperty("expires_after_days")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("expires_after_days")] +#endif public long? ExpiresAfterDays { get; set; } /// @@ -35,6 +41,9 @@ public class SessionPaymentMethodOptionsKonbini : StripeEntitySCA. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsKrCard.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsKrCard.cs index 0d4607da73..7aad11f1a5 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsKrCard.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsKrCard.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsKrCard : StripeEntity { @@ -9,6 +12,9 @@ public class SessionPaymentMethodOptionsKrCard : StripeEntity [JsonProperty("capture_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("capture_method")] +#endif public string CaptureMethod { get; set; } /// @@ -33,6 +39,9 @@ public class SessionPaymentMethodOptionsKrCard : StripeEntitynone, or off_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsLink.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsLink.cs index 54807a865f..6eadc4b822 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsLink.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsLink.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsLink : StripeEntity { @@ -27,6 +30,9 @@ public class SessionPaymentMethodOptionsLink : StripeEntitynone, or off_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsMobilepay.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsMobilepay.cs index f0bb317ed5..6b464884ed 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsMobilepay.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsMobilepay.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsMobilepay : StripeEntity { @@ -26,6 +29,9 @@ public class SessionPaymentMethodOptionsMobilepay : StripeEntitySCA. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsMultibanco.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsMultibanco.cs index 1dd3250e84..1cfb107f2f 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsMultibanco.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsMultibanco.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsMultibanco : StripeEntity { @@ -26,6 +29,9 @@ public class SessionPaymentMethodOptionsMultibanco : StripeEntitySCA. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsNaverPay.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsNaverPay.cs index af4c6d43a1..6ab99a48b0 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsNaverPay.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsNaverPay.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsNaverPay : StripeEntity { @@ -9,6 +12,9 @@ public class SessionPaymentMethodOptionsNaverPay : StripeEntity [JsonProperty("capture_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("capture_method")] +#endif public string CaptureMethod { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsOxxo.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsOxxo.cs index 46694e35f9..597bf7abbe 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsOxxo.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsOxxo.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsOxxo : StripeEntity { @@ -11,6 +14,9 @@ public class SessionPaymentMethodOptionsOxxo : StripeEntity [JsonProperty("expires_after_days")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("expires_after_days")] +#endif public long ExpiresAfterDays { get; set; } /// @@ -34,6 +40,9 @@ public class SessionPaymentMethodOptionsOxxo : StripeEntitySCA. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsP24.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsP24.cs index 711de56dda..c2bc8eb680 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsP24.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsP24.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsP24 : StripeEntity { @@ -26,6 +29,9 @@ public class SessionPaymentMethodOptionsP24 : StripeEntitySCA. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsPayco.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsPayco.cs index 5bb296f884..aa6068624c 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsPayco.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsPayco.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsPayco : StripeEntity { @@ -9,6 +12,9 @@ public class SessionPaymentMethodOptionsPayco : StripeEntity [JsonProperty("capture_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("capture_method")] +#endif public string CaptureMethod { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsPaynow.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsPaynow.cs index eea7137b80..5d8f08111b 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsPaynow.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsPaynow.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsPaynow : StripeEntity { @@ -26,6 +29,9 @@ public class SessionPaymentMethodOptionsPaynow : StripeEntitySCA. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsPaypal.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsPaypal.cs index d49b4fd1b2..f616470d0a 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsPaypal.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsPaypal.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsPaypal : StripeEntity { @@ -9,12 +12,18 @@ public class SessionPaymentMethodOptionsPaypal : StripeEntity [JsonProperty("capture_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("capture_method")] +#endif public string CaptureMethod { get; set; } /// /// Preferred locale of the PayPal checkout page that the customer is redirected to. /// [JsonProperty("preferred_locale")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preferred_locale")] +#endif public string PreferredLocale { get; set; } /// @@ -23,6 +32,9 @@ public class SessionPaymentMethodOptionsPaypal : StripeEntity [JsonProperty("reference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reference")] +#endif public string Reference { get; set; } /// @@ -47,6 +59,9 @@ public class SessionPaymentMethodOptionsPaypal : StripeEntitynone, or off_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsPix.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsPix.cs index dbee317157..1b40d4f683 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsPix.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsPix.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsPix : StripeEntity { @@ -9,6 +12,9 @@ public class SessionPaymentMethodOptionsPix : StripeEntity [JsonProperty("expires_after_seconds")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("expires_after_seconds")] +#endif public long? ExpiresAfterSeconds { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsRevolutPay.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsRevolutPay.cs index 1b195b61bf..49dd4569b2 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsRevolutPay.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsRevolutPay.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsRevolutPay : StripeEntity { @@ -27,6 +30,9 @@ public class SessionPaymentMethodOptionsRevolutPay : StripeEntitynone, or off_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsSamsungPay.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsSamsungPay.cs index 769de024dd..8ed4fd79ff 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsSamsungPay.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsSamsungPay.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsSamsungPay : StripeEntity { @@ -9,6 +12,9 @@ public class SessionPaymentMethodOptionsSamsungPay : StripeEntity [JsonProperty("capture_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("capture_method")] +#endif public string CaptureMethod { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsSepaDebit.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsSepaDebit.cs index 35915d8b1b..ddc2eae400 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsSepaDebit.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsSepaDebit.cs @@ -2,10 +2,16 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsSepaDebit : StripeEntity { [JsonProperty("mandate_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mandate_options")] +#endif public SessionPaymentMethodOptionsSepaDebitMandateOptions MandateOptions { get; set; } /// @@ -30,6 +36,9 @@ public class SessionPaymentMethodOptionsSepaDebit : StripeEntitynone, off_session, or on_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsSofort.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsSofort.cs index 7f9092b7c8..8e62969eae 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsSofort.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsSofort.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsSofort : StripeEntity { @@ -26,6 +29,9 @@ public class SessionPaymentMethodOptionsSofort : StripeEntitySCA. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsSwish.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsSwish.cs index 6c4a809454..cb23b3a4d4 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsSwish.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsSwish.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsSwish : StripeEntity { @@ -10,6 +13,9 @@ public class SessionPaymentMethodOptionsSwish : StripeEntityid of the Payment Intent. /// [JsonProperty("reference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reference")] +#endif public string Reference { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsUsBankAccount.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsUsBankAccount.cs index c2cefc41a5..43c9ebd63b 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsUsBankAccount.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsUsBankAccount.cs @@ -2,10 +2,16 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsUsBankAccount : StripeEntity { [JsonProperty("financial_connections")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("financial_connections")] +#endif public SessionPaymentMethodOptionsUsBankAccountFinancialConnections FinancialConnections { get; set; } /// @@ -30,6 +36,9 @@ public class SessionPaymentMethodOptionsUsBankAccount : StripeEntitynone, off_session, or on_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } /// @@ -37,6 +46,9 @@ public class SessionPaymentMethodOptionsUsBankAccount : StripeEntityautomatic, or instant. /// [JsonProperty("verification_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("verification_method")] +#endif public string VerificationMethod { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsUsBankAccountFinancialConnections.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsUsBankAccountFinancialConnections.cs index 802f9f3b37..2749d9daa5 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsUsBankAccountFinancialConnections.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsUsBankAccountFinancialConnections.cs @@ -3,10 +3,16 @@ namespace Stripe.Checkout { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsUsBankAccountFinancialConnections : StripeEntity { [JsonProperty("filters")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("filters")] +#endif public SessionPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters Filters { get; set; } /// @@ -16,6 +22,9 @@ public class SessionPaymentMethodOptionsUsBankAccountFinancialConnections : Stri /// transactions. /// [JsonProperty("permissions")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("permissions")] +#endif public List Permissions { get; set; } /// @@ -23,6 +32,9 @@ public class SessionPaymentMethodOptionsUsBankAccountFinancialConnections : Stri /// One of: balances, ownership, or transactions. /// [JsonProperty("prefetch")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("prefetch")] +#endif public List Prefetch { get; set; } /// @@ -30,6 +42,9 @@ public class SessionPaymentMethodOptionsUsBankAccountFinancialConnections : Stri /// user will be redirected to this URL to return to your app. /// [JsonProperty("return_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("return_url")] +#endif public string ReturnUrl { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters.cs index e72ff3cad5..9b10964f4a 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters.cs @@ -3,6 +3,9 @@ namespace Stripe.Checkout { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters : StripeEntity { @@ -12,6 +15,9 @@ public class SessionPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters /// One of: checking, or savings. /// [JsonProperty("account_subcategories")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_subcategories")] +#endif public List AccountSubcategories { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionPhoneNumberCollection.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionPhoneNumberCollection.cs index 2862b7d80c..27535233ac 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionPhoneNumberCollection.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionPhoneNumberCollection.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPhoneNumberCollection : StripeEntity { @@ -9,6 +12,9 @@ public class SessionPhoneNumberCollection : StripeEntity [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool Enabled { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionSavedPaymentMethodOptions.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionSavedPaymentMethodOptions.cs index b1f9572d2b..08f0fd27e1 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionSavedPaymentMethodOptions.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionSavedPaymentMethodOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.Checkout { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionSavedPaymentMethodOptions : StripeEntity { @@ -13,6 +16,9 @@ public class SessionSavedPaymentMethodOptions : StripeEntityalways, limited, or unspecified. /// [JsonProperty("allow_redisplay_filters")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("allow_redisplay_filters")] +#endif public List AllowRedisplayFilters { get; set; } /// @@ -21,6 +27,9 @@ public class SessionSavedPaymentMethodOptions : StripeEntitydisabled, or enabled. /// [JsonProperty("payment_method_remove")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_remove")] +#endif public string PaymentMethodRemove { get; set; } /// @@ -29,6 +38,9 @@ public class SessionSavedPaymentMethodOptions : StripeEntitydisabled, or enabled. /// [JsonProperty("payment_method_save")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_save")] +#endif public string PaymentMethodSave { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionShippingAddressCollection.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionShippingAddressCollection.cs index 0a19fa9f1a..9be5c7dabd 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionShippingAddressCollection.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionShippingAddressCollection.cs @@ -3,6 +3,9 @@ namespace Stripe.Checkout { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionShippingAddressCollection : StripeEntity { @@ -42,6 +45,9 @@ public class SessionShippingAddressCollection : StripeEntityYE, YT, ZA, ZM, ZW, or ZZ. /// [JsonProperty("allowed_countries")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("allowed_countries")] +#endif public List AllowedCountries { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionShippingCost.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionShippingCost.cs index 8dd6052218..7811ae854b 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionShippingCost.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionShippingCost.cs @@ -4,25 +4,40 @@ namespace Stripe.Checkout using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class SessionShippingCost : StripeEntity { /// /// Total shipping cost before any discounts or taxes are applied. /// [JsonProperty("amount_subtotal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_subtotal")] +#endif public long AmountSubtotal { get; set; } /// /// Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0. /// [JsonProperty("amount_tax")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_tax")] +#endif public long AmountTax { get; set; } /// /// Total shipping cost after discounts and taxes are applied. /// [JsonProperty("amount_total")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_total")] +#endif public long AmountTotal { get; set; } #region Expandable ShippingRate @@ -32,6 +47,9 @@ public class SessionShippingCost : StripeEntity /// The ID of the ShippingRate for this order. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string ShippingRateId { get => this.InternalShippingRate?.Id; @@ -45,6 +63,9 @@ public string ShippingRateId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public ShippingRate ShippingRate { get => this.InternalShippingRate?.ExpandedObject; @@ -53,6 +74,10 @@ public ShippingRate ShippingRate [JsonProperty("shipping_rate")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping_rate")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalShippingRate { get; set; } #endregion @@ -60,6 +85,9 @@ public ShippingRate ShippingRate /// The taxes applied to the shipping rate. /// [JsonProperty("taxes")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("taxes")] +#endif public List Taxes { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionShippingCostTax.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionShippingCostTax.cs index 8e1540eda2..0618d97c1f 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionShippingCostTax.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionShippingCostTax.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionShippingCostTax : StripeEntity { @@ -9,6 +12,9 @@ public class SessionShippingCostTax : StripeEntity /// Amount of tax applied for this rate. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long Amount { get; set; } /// @@ -21,6 +27,9 @@ public class SessionShippingCostTax : StripeEntity /// Related guide: Tax rates. /// [JsonProperty("rate")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("rate")] +#endif public TaxRate Rate { get; set; } /// @@ -33,12 +42,18 @@ public class SessionShippingCostTax : StripeEntity /// standard_rated, taxable_basis_reduced, or zero_rated. /// [JsonProperty("taxability_reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("taxability_reason")] +#endif public string TaxabilityReason { get; set; } /// /// The amount on which tax is calculated, in cents (or local equivalent). /// [JsonProperty("taxable_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("taxable_amount")] +#endif public long? TaxableAmount { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionShippingDetails.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionShippingDetails.cs index 92de52b277..e5ff79c90f 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionShippingDetails.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionShippingDetails.cs @@ -2,28 +2,43 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionShippingDetails : StripeEntity { [JsonProperty("address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address")] +#endif public Address Address { get; set; } /// /// The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. /// [JsonProperty("carrier")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("carrier")] +#endif public string Carrier { get; set; } /// /// Recipient name. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } /// /// Recipient phone (including extension). /// [JsonProperty("phone")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("phone")] +#endif public string Phone { get; set; } /// @@ -32,6 +47,9 @@ public class SessionShippingDetails : StripeEntity /// commas. /// [JsonProperty("tracking_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tracking_number")] +#endif public string TrackingNumber { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionShippingOption.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionShippingOption.cs index 5d63d2157e..ae62397f59 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionShippingOption.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionShippingOption.cs @@ -3,13 +3,22 @@ namespace Stripe.Checkout { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class SessionShippingOption : StripeEntity { /// /// A non-negative integer in cents representing how much to charge. /// [JsonProperty("shipping_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping_amount")] +#endif public long ShippingAmount { get; set; } #region Expandable ShippingRate @@ -19,6 +28,9 @@ public class SessionShippingOption : StripeEntity /// The shipping rate. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string ShippingRateId { get => this.InternalShippingRate?.Id; @@ -32,6 +44,9 @@ public string ShippingRateId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public ShippingRate ShippingRate { get => this.InternalShippingRate?.ExpandedObject; @@ -40,6 +55,10 @@ public ShippingRate ShippingRate [JsonProperty("shipping_rate")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping_rate")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalShippingRate { get; set; } #endregion } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionTaxIdCollection.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionTaxIdCollection.cs index 08c29380c3..71a24cb7d7 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionTaxIdCollection.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionTaxIdCollection.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionTaxIdCollection : StripeEntity { @@ -9,6 +12,9 @@ public class SessionTaxIdCollection : StripeEntity /// Indicates whether tax ID collection is enabled for the session. /// [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool Enabled { get; set; } /// @@ -16,6 +22,9 @@ public class SessionTaxIdCollection : StripeEntity /// One of: if_supported, or never. /// [JsonProperty("required")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("required")] +#endif public string Required { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionTotalDetails.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionTotalDetails.cs index eb672b7764..06709c348a 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionTotalDetails.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionTotalDetails.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionTotalDetails : StripeEntity { @@ -9,21 +12,33 @@ public class SessionTotalDetails : StripeEntity /// This is the sum of all the discounts. /// [JsonProperty("amount_discount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_discount")] +#endif public long AmountDiscount { get; set; } /// /// This is the sum of all the shipping amounts. /// [JsonProperty("amount_shipping")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_shipping")] +#endif public long? AmountShipping { get; set; } /// /// This is the sum of all the tax amounts. /// [JsonProperty("amount_tax")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_tax")] +#endif public long AmountTax { get; set; } [JsonProperty("breakdown")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("breakdown")] +#endif public SessionTotalDetailsBreakdown Breakdown { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionTotalDetailsBreakdown.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionTotalDetailsBreakdown.cs index 9b41407510..4c05e3f61d 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionTotalDetailsBreakdown.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionTotalDetailsBreakdown.cs @@ -3,6 +3,9 @@ namespace Stripe.Checkout { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionTotalDetailsBreakdown : StripeEntity { @@ -10,12 +13,18 @@ public class SessionTotalDetailsBreakdown : StripeEntity [JsonProperty("discounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discounts")] +#endif public List Discounts { get; set; } /// /// The aggregated tax amounts by rate. /// [JsonProperty("taxes")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("taxes")] +#endif public List Taxes { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionTotalDetailsBreakdownDiscount.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionTotalDetailsBreakdownDiscount.cs index 861fc3aa85..37401dd67b 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionTotalDetailsBreakdownDiscount.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionTotalDetailsBreakdownDiscount.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionTotalDetailsBreakdownDiscount : StripeEntity { @@ -9,6 +12,9 @@ public class SessionTotalDetailsBreakdownDiscount : StripeEntity [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long Amount { get; set; } /// @@ -22,6 +28,9 @@ public class SessionTotalDetailsBreakdownDiscount : StripeEntity. /// [JsonProperty("discount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discount")] +#endif public Discount Discount { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionTotalDetailsBreakdownTax.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionTotalDetailsBreakdownTax.cs index 37e77707ca..a6386c613b 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionTotalDetailsBreakdownTax.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionTotalDetailsBreakdownTax.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionTotalDetailsBreakdownTax : StripeEntity { @@ -9,6 +12,9 @@ public class SessionTotalDetailsBreakdownTax : StripeEntity [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long Amount { get; set; } /// @@ -21,6 +27,9 @@ public class SessionTotalDetailsBreakdownTax : StripeEntityTax rates. /// [JsonProperty("rate")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("rate")] +#endif public TaxRate Rate { get; set; } /// @@ -33,12 +42,18 @@ public class SessionTotalDetailsBreakdownTax : StripeEntitystandard_rated, taxable_basis_reduced, or zero_rated. /// [JsonProperty("taxability_reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("taxability_reason")] +#endif public string TaxabilityReason { get; set; } /// /// The amount on which tax is calculated, in cents (or local equivalent). /// [JsonProperty("taxable_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("taxable_amount")] +#endif public long? TaxableAmount { get; set; } } } diff --git a/src/Stripe.net/Entities/Climate/Orders/Order.cs b/src/Stripe.net/Entities/Climate/Orders/Order.cs index 3d15acaf39..624b4b068c 100644 --- a/src/Stripe.net/Entities/Climate/Orders/Order.cs +++ b/src/Stripe.net/Entities/Climate/Orders/Order.cs @@ -5,23 +5,35 @@ namespace Stripe.Climate using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// Orders represent your intent to purchase a particular Climate product. When you create /// an order, the payment is deducted from your merchant balance. /// +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class Order : StripeEntity, IHasId, IHasMetadata, IHasObject { /// /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// @@ -29,21 +41,33 @@ public class Order : StripeEntity, IHasId, IHasMetadata, IHasObject /// the currency's smallest unit. /// [JsonProperty("amount_fees")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_fees")] +#endif public long AmountFees { get; set; } /// /// Total amount of the carbon removal in the currency's smallest unit. /// [JsonProperty("amount_subtotal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_subtotal")] +#endif public long AmountSubtotal { get; set; } /// /// Total amount of the order including fees in the currency's smallest unit. /// [JsonProperty("amount_total")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_total")] +#endif public long AmountTotal { get; set; } [JsonProperty("beneficiary")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("beneficiary")] +#endif public OrderBeneficiary Beneficiary { get; set; } /// @@ -51,6 +75,10 @@ public class Order : StripeEntity, IHasId, IHasMetadata, IHasObject /// [JsonProperty("canceled_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("canceled_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? CanceledAt { get; set; } /// @@ -58,12 +86,18 @@ public class Order : StripeEntity, IHasId, IHasMetadata, IHasObject /// One of: expired, product_unavailable, or requested. /// [JsonProperty("cancellation_reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cancellation_reason")] +#endif public string CancellationReason { get; set; } /// /// For delivered orders, a URL to a delivery certificate for the order. /// [JsonProperty("certificate")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("certificate")] +#endif public string Certificate { get; set; } /// @@ -71,6 +105,10 @@ public class Order : StripeEntity, IHasId, IHasMetadata, IHasObject /// [JsonProperty("confirmed_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("confirmed_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? ConfirmedAt { get; set; } /// @@ -78,6 +116,10 @@ public class Order : StripeEntity, IHasId, IHasMetadata, IHasObject /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -85,6 +127,9 @@ public class Order : StripeEntity, IHasId, IHasMetadata, IHasObject /// code, in lowercase, representing the currency for this order. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// @@ -93,6 +138,10 @@ public class Order : StripeEntity, IHasId, IHasMetadata, IHasObject /// [JsonProperty("delayed_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("delayed_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? DelayedAt { get; set; } /// @@ -100,18 +149,28 @@ public class Order : StripeEntity, IHasId, IHasMetadata, IHasObject /// [JsonProperty("delivered_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("delivered_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? DeliveredAt { get; set; } /// /// Details about the delivery of carbon removal for this order. /// [JsonProperty("delivery_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("delivery_details")] +#endif public List DeliveryDetails { get; set; } /// /// The year this order is expected to be delivered. /// [JsonProperty("expected_delivery_year")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("expected_delivery_year")] +#endif public long ExpectedDeliveryYear { get; set; } /// @@ -119,6 +178,9 @@ public class Order : StripeEntity, IHasId, IHasMetadata, IHasObject /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// @@ -127,12 +189,18 @@ public class Order : StripeEntity, IHasId, IHasMetadata, IHasObject /// object in a structured format. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// Quantity of carbon removal that is included in this order. /// [JsonProperty("metric_tons")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metric_tons")] +#endif public decimal MetricTons { get; set; } #region Expandable Product @@ -142,6 +210,9 @@ public class Order : StripeEntity, IHasId, IHasMetadata, IHasObject /// Unique ID for the Climate Product this order is purchasing. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string ProductId { get => this.InternalProduct?.Id; @@ -155,6 +226,9 @@ public string ProductId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Product Product { get => this.InternalProduct?.ExpandedObject; @@ -163,6 +237,10 @@ public Product Product [JsonProperty("product")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("product")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalProduct { get; set; } #endregion @@ -172,6 +250,10 @@ public Product Product /// [JsonProperty("product_substituted_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("product_substituted_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? ProductSubstitutedAt { get; set; } /// @@ -180,6 +262,9 @@ public Product Product /// open. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } } } diff --git a/src/Stripe.net/Entities/Climate/Orders/OrderBeneficiary.cs b/src/Stripe.net/Entities/Climate/Orders/OrderBeneficiary.cs index 72a9cf6573..05920d99db 100644 --- a/src/Stripe.net/Entities/Climate/Orders/OrderBeneficiary.cs +++ b/src/Stripe.net/Entities/Climate/Orders/OrderBeneficiary.cs @@ -2,6 +2,9 @@ namespace Stripe.Climate { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class OrderBeneficiary : StripeEntity { @@ -9,6 +12,9 @@ public class OrderBeneficiary : StripeEntity /// Publicly displayable name for the end beneficiary of carbon removal. /// [JsonProperty("public_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("public_name")] +#endif public string PublicName { get; set; } } } diff --git a/src/Stripe.net/Entities/Climate/Orders/OrderDeliveryDetail.cs b/src/Stripe.net/Entities/Climate/Orders/OrderDeliveryDetail.cs index ef371a5822..83e5ca5e68 100644 --- a/src/Stripe.net/Entities/Climate/Orders/OrderDeliveryDetail.cs +++ b/src/Stripe.net/Entities/Climate/Orders/OrderDeliveryDetail.cs @@ -4,6 +4,9 @@ namespace Stripe.Climate using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class OrderDeliveryDetail : StripeEntity { @@ -12,30 +15,46 @@ public class OrderDeliveryDetail : StripeEntity /// [JsonProperty("delivered_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("delivered_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime DeliveredAt { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// /// Specific location of this delivery. /// [JsonProperty("location")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("location")] +#endif public OrderDeliveryDetailLocation Location { get; set; } /// /// Quantity of carbon removal supplied by this delivery. /// [JsonProperty("metric_tons")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metric_tons")] +#endif public string MetricTons { get; set; } /// /// Once retired, a URL to the registry entry for the tons from this delivery. /// [JsonProperty("registry_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("registry_url")] +#endif public string RegistryUrl { get; set; } /// /// A supplier of carbon removal. /// [JsonProperty("supplier")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("supplier")] +#endif public Supplier Supplier { get; set; } } } diff --git a/src/Stripe.net/Entities/Climate/Orders/OrderDeliveryDetailLocation.cs b/src/Stripe.net/Entities/Climate/Orders/OrderDeliveryDetailLocation.cs index c94ede0be0..1756ceb92d 100644 --- a/src/Stripe.net/Entities/Climate/Orders/OrderDeliveryDetailLocation.cs +++ b/src/Stripe.net/Entities/Climate/Orders/OrderDeliveryDetailLocation.cs @@ -2,6 +2,9 @@ namespace Stripe.Climate { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class OrderDeliveryDetailLocation : StripeEntity { @@ -9,30 +12,45 @@ public class OrderDeliveryDetailLocation : StripeEntity [JsonProperty("city")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("city")] +#endif public string City { get; set; } /// /// Two-letter ISO code representing the country where the supplier is located. /// [JsonProperty("country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country")] +#endif public string Country { get; set; } /// /// The geographic latitude where the supplier is located. /// [JsonProperty("latitude")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("latitude")] +#endif public decimal? Latitude { get; set; } /// /// The geographic longitude where the supplier is located. /// [JsonProperty("longitude")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("longitude")] +#endif public decimal? Longitude { get; set; } /// /// The state/county/province/region where the supplier is located. /// [JsonProperty("region")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("region")] +#endif public string Region { get; set; } } } diff --git a/src/Stripe.net/Entities/Climate/Products/Product.cs b/src/Stripe.net/Entities/Climate/Products/Product.cs index 01a05ce9eb..3c0d044f9a 100644 --- a/src/Stripe.net/Entities/Climate/Products/Product.cs +++ b/src/Stripe.net/Entities/Climate/Products/Product.cs @@ -5,6 +5,9 @@ namespace Stripe.Climate using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// A Climate product represents a type of carbon removal unit available for reservation. @@ -19,12 +22,18 @@ public class Product : StripeEntity, IHasId, IHasObject /// inventory for a list of available carbon removal products. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// @@ -32,18 +41,28 @@ public class Product : StripeEntity, IHasId, IHasObject /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// /// Current prices for a metric ton of carbon removal in a currency's smallest unit. /// [JsonProperty("current_prices_per_metric_ton")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("current_prices_per_metric_ton")] +#endif public Dictionary CurrentPricesPerMetricTon { get; set; } /// /// The year in which the carbon removal is expected to be delivered. /// [JsonProperty("delivery_year")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("delivery_year")] +#endif public long? DeliveryYear { get; set; } /// @@ -51,24 +70,36 @@ public class Product : StripeEntity, IHasId, IHasObject /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// /// The quantity of metric tons available for reservation. /// [JsonProperty("metric_tons_available")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metric_tons_available")] +#endif public decimal MetricTonsAvailable { get; set; } /// /// The Climate product's name. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } /// /// The carbon removal suppliers that fulfill orders for this Climate product. /// [JsonProperty("suppliers")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("suppliers")] +#endif public List Suppliers { get; set; } } } diff --git a/src/Stripe.net/Entities/Climate/Products/ProductCurrentPricesPerMetricTon.cs b/src/Stripe.net/Entities/Climate/Products/ProductCurrentPricesPerMetricTon.cs index 29cbde6eb2..d296cda7ba 100644 --- a/src/Stripe.net/Entities/Climate/Products/ProductCurrentPricesPerMetricTon.cs +++ b/src/Stripe.net/Entities/Climate/Products/ProductCurrentPricesPerMetricTon.cs @@ -2,6 +2,9 @@ namespace Stripe.Climate { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ProductCurrentPricesPerMetricTon : StripeEntity { @@ -9,6 +12,9 @@ public class ProductCurrentPricesPerMetricTon : StripeEntity [JsonProperty("amount_fees")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_fees")] +#endif public long AmountFees { get; set; } /// @@ -16,6 +22,9 @@ public class ProductCurrentPricesPerMetricTon : StripeEntity [JsonProperty("amount_subtotal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_subtotal")] +#endif public long AmountSubtotal { get; set; } /// @@ -23,6 +32,9 @@ public class ProductCurrentPricesPerMetricTon : StripeEntity [JsonProperty("amount_total")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_total")] +#endif public long AmountTotal { get; set; } } } diff --git a/src/Stripe.net/Entities/Climate/Suppliers/Supplier.cs b/src/Stripe.net/Entities/Climate/Suppliers/Supplier.cs index e28c08aab4..f6e41c23f0 100644 --- a/src/Stripe.net/Entities/Climate/Suppliers/Supplier.cs +++ b/src/Stripe.net/Entities/Climate/Suppliers/Supplier.cs @@ -3,6 +3,9 @@ namespace Stripe.Climate { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// A supplier of carbon removal. @@ -13,18 +16,27 @@ public class Supplier : StripeEntity, IHasId, IHasObject /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object’s type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// /// Link to a webpage to learn more about the supplier. /// [JsonProperty("info_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("info_url")] +#endif public string InfoUrl { get; set; } /// @@ -32,18 +44,27 @@ public class Supplier : StripeEntity, IHasId, IHasObject /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// /// The locations in which this supplier operates. /// [JsonProperty("locations")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("locations")] +#endif public List Locations { get; set; } /// /// Name of this carbon removal supplier. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } /// @@ -52,6 +73,9 @@ public class Supplier : StripeEntity, IHasId, IHasObject /// enhanced_weathering. /// [JsonProperty("removal_pathway")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("removal_pathway")] +#endif public string RemovalPathway { get; set; } } } diff --git a/src/Stripe.net/Entities/Climate/Suppliers/SupplierLocation.cs b/src/Stripe.net/Entities/Climate/Suppliers/SupplierLocation.cs index 244985b13f..1595c7f336 100644 --- a/src/Stripe.net/Entities/Climate/Suppliers/SupplierLocation.cs +++ b/src/Stripe.net/Entities/Climate/Suppliers/SupplierLocation.cs @@ -2,6 +2,9 @@ namespace Stripe.Climate { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SupplierLocation : StripeEntity { @@ -9,30 +12,45 @@ public class SupplierLocation : StripeEntity /// The city where the supplier is located. /// [JsonProperty("city")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("city")] +#endif public string City { get; set; } /// /// Two-letter ISO code representing the country where the supplier is located. /// [JsonProperty("country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country")] +#endif public string Country { get; set; } /// /// The geographic latitude where the supplier is located. /// [JsonProperty("latitude")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("latitude")] +#endif public decimal? Latitude { get; set; } /// /// The geographic longitude where the supplier is located. /// [JsonProperty("longitude")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("longitude")] +#endif public decimal? Longitude { get; set; } /// /// The state/county/province/region where the supplier is located. /// [JsonProperty("region")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("region")] +#endif public string Region { get; set; } } } diff --git a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationToken.cs b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationToken.cs index bcc9c977c7..2885b4ee88 100644 --- a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationToken.cs +++ b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationToken.cs @@ -4,6 +4,9 @@ namespace Stripe using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// ConfirmationTokens help transport client side data collected by Stripe JS over to your @@ -22,12 +25,18 @@ public class ConfirmationToken : StripeEntity, IHasId, IHasOb /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// @@ -35,6 +44,10 @@ public class ConfirmationToken : StripeEntity, IHasId, IHasOb /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -43,6 +56,10 @@ public class ConfirmationToken : StripeEntity, IHasId, IHasOb /// [JsonProperty("expires_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("expires_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? ExpiresAt { get; set; } /// @@ -50,12 +67,18 @@ public class ConfirmationToken : StripeEntity, IHasId, IHasOb /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// /// Data used for generating a Mandate. /// [JsonProperty("mandate_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mandate_data")] +#endif public ConfirmationTokenMandateData MandateData { get; set; } /// @@ -63,12 +86,18 @@ public class ConfirmationToken : StripeEntity, IHasId, IHasOb /// ConfirmationToken has not yet been used. /// [JsonProperty("payment_intent")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_intent")] +#endif public string PaymentIntent { get; set; } /// /// Payment-method-specific configuration for this ConfirmationToken. /// [JsonProperty("payment_method_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_options")] +#endif public ConfirmationTokenPaymentMethodOptions PaymentMethodOptions { get; set; } /// @@ -76,12 +105,18 @@ public class ConfirmationToken : StripeEntity, IHasId, IHasOb /// PaymentIntent or SetupIntent is confirmed with this ConfirmationToken. /// [JsonProperty("payment_method_preview")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_preview")] +#endif public ConfirmationTokenPaymentMethodPreview PaymentMethodPreview { get; set; } /// /// Return URL used to confirm the Intent. /// [JsonProperty("return_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("return_url")] +#endif public string ReturnUrl { get; set; } /// @@ -95,6 +130,9 @@ public class ConfirmationToken : StripeEntity, IHasId, IHasOb /// One of: off_session, or on_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } /// @@ -102,12 +140,18 @@ public class ConfirmationToken : StripeEntity, IHasId, IHasOb /// ConfirmationToken has not yet been used. /// [JsonProperty("setup_intent")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_intent")] +#endif public string SetupIntent { get; set; } /// /// Shipping information collected on this ConfirmationToken. /// [JsonProperty("shipping")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping")] +#endif public ConfirmationTokenShipping Shipping { get; set; } /// @@ -115,6 +159,9 @@ public class ConfirmationToken : StripeEntity, IHasId, IHasOb /// true on ConfirmationToken. /// [JsonProperty("use_stripe_sdk")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("use_stripe_sdk")] +#endif public bool UseStripeSdk { get; set; } } } diff --git a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenMandateData.cs b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenMandateData.cs index 711b952aa4..31b6d898dc 100644 --- a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenMandateData.cs +++ b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenMandateData.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfirmationTokenMandateData : StripeEntity { @@ -9,6 +12,9 @@ public class ConfirmationTokenMandateData : StripeEntity [JsonProperty("customer_acceptance")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_acceptance")] +#endif public ConfirmationTokenMandateDataCustomerAcceptance CustomerAcceptance { get; set; } } } diff --git a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenMandateDataCustomerAcceptance.cs b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenMandateDataCustomerAcceptance.cs index 7b17f7e8b0..16b26548cd 100644 --- a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenMandateDataCustomerAcceptance.cs +++ b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenMandateDataCustomerAcceptance.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfirmationTokenMandateDataCustomerAcceptance : StripeEntity { @@ -10,12 +13,18 @@ public class ConfirmationTokenMandateDataCustomerAcceptance : StripeEntity [JsonProperty("online")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("online")] +#endif public ConfirmationTokenMandateDataCustomerAcceptanceOnline Online { get; set; } /// /// The type of customer acceptance information included with the Mandate. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenMandateDataCustomerAcceptanceOnline.cs b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenMandateDataCustomerAcceptanceOnline.cs index c477bfe39f..091d754cf4 100644 --- a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenMandateDataCustomerAcceptanceOnline.cs +++ b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenMandateDataCustomerAcceptanceOnline.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfirmationTokenMandateDataCustomerAcceptanceOnline : StripeEntity { @@ -9,12 +12,18 @@ public class ConfirmationTokenMandateDataCustomerAcceptanceOnline : StripeEntity /// The IP address from which the Mandate was accepted by the customer. /// [JsonProperty("ip_address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ip_address")] +#endif public string IpAddress { get; set; } /// /// The user agent of the browser from which the Mandate was accepted by the customer. /// [JsonProperty("user_agent")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("user_agent")] +#endif public string UserAgent { get; set; } } } diff --git a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodOptions.cs b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodOptions.cs index 1c0dd1cfc3..428473fc1b 100644 --- a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodOptions.cs +++ b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfirmationTokenPaymentMethodOptions : StripeEntity { @@ -9,6 +12,9 @@ public class ConfirmationTokenPaymentMethodOptions : StripeEntity [JsonProperty("card")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card")] +#endif public ConfirmationTokenPaymentMethodOptionsCard Card { get; set; } } } diff --git a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodOptionsCard.cs b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodOptionsCard.cs index 9430c861de..b87f8ea371 100644 --- a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodOptionsCard.cs +++ b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodOptionsCard.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfirmationTokenPaymentMethodOptionsCard : StripeEntity { @@ -9,6 +12,9 @@ public class ConfirmationTokenPaymentMethodOptionsCard : StripeEntitycvc_update Token collected from the Payment Element. /// [JsonProperty("cvc_token")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cvc_token")] +#endif public string CvcToken { get; set; } } } diff --git a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreview.cs b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreview.cs index db3574254a..7b7df09670 100644 --- a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreview.cs +++ b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreview.cs @@ -3,19 +3,37 @@ namespace Stripe { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class ConfirmationTokenPaymentMethodPreview : StripeEntity { [JsonProperty("acss_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("acss_debit")] +#endif public ConfirmationTokenPaymentMethodPreviewAcssDebit AcssDebit { get; set; } [JsonProperty("affirm")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("affirm")] +#endif public ConfirmationTokenPaymentMethodPreviewAffirm Affirm { get; set; } [JsonProperty("afterpay_clearpay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("afterpay_clearpay")] +#endif public ConfirmationTokenPaymentMethodPreviewAfterpayClearpay AfterpayClearpay { get; set; } [JsonProperty("alipay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("alipay")] +#endif public ConfirmationTokenPaymentMethodPreviewAlipay Alipay { get; set; } /// @@ -26,39 +44,75 @@ public class ConfirmationTokenPaymentMethodPreview : StripeEntityalways, limited, or unspecified. /// [JsonProperty("allow_redisplay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("allow_redisplay")] +#endif public string AllowRedisplay { get; set; } [JsonProperty("alma")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("alma")] +#endif public ConfirmationTokenPaymentMethodPreviewAlma Alma { get; set; } [JsonProperty("amazon_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amazon_pay")] +#endif public ConfirmationTokenPaymentMethodPreviewAmazonPay AmazonPay { get; set; } [JsonProperty("au_becs_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("au_becs_debit")] +#endif public ConfirmationTokenPaymentMethodPreviewAuBecsDebit AuBecsDebit { get; set; } [JsonProperty("bacs_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bacs_debit")] +#endif public ConfirmationTokenPaymentMethodPreviewBacsDebit BacsDebit { get; set; } [JsonProperty("bancontact")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bancontact")] +#endif public ConfirmationTokenPaymentMethodPreviewBancontact Bancontact { get; set; } [JsonProperty("billing_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_details")] +#endif public ConfirmationTokenPaymentMethodPreviewBillingDetails BillingDetails { get; set; } [JsonProperty("blik")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("blik")] +#endif public ConfirmationTokenPaymentMethodPreviewBlik Blik { get; set; } [JsonProperty("boleto")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("boleto")] +#endif public ConfirmationTokenPaymentMethodPreviewBoleto Boleto { get; set; } [JsonProperty("card")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card")] +#endif public ConfirmationTokenPaymentMethodPreviewCard Card { get; set; } [JsonProperty("card_present")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card_present")] +#endif public ConfirmationTokenPaymentMethodPreviewCardPresent CardPresent { get; set; } [JsonProperty("cashapp")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cashapp")] +#endif public ConfirmationTokenPaymentMethodPreviewCashapp Cashapp { get; set; } #region Expandable Customer @@ -69,6 +123,9 @@ public class ConfirmationTokenPaymentMethodPreview : StripeEntity [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string CustomerId { get => this.InternalCustomer?.Id; @@ -83,6 +140,9 @@ public string CustomerId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Customer Customer { get => this.InternalCustomer?.ExpandedObject; @@ -91,91 +151,179 @@ public Customer Customer [JsonProperty("customer")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalCustomer { get; set; } #endregion [JsonProperty("customer_balance")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_balance")] +#endif public ConfirmationTokenPaymentMethodPreviewCustomerBalance CustomerBalance { get; set; } [JsonProperty("eps")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("eps")] +#endif public ConfirmationTokenPaymentMethodPreviewEps Eps { get; set; } [JsonProperty("fpx")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fpx")] +#endif public ConfirmationTokenPaymentMethodPreviewFpx Fpx { get; set; } [JsonProperty("giropay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("giropay")] +#endif public ConfirmationTokenPaymentMethodPreviewGiropay Giropay { get; set; } [JsonProperty("grabpay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("grabpay")] +#endif public ConfirmationTokenPaymentMethodPreviewGrabpay Grabpay { get; set; } [JsonProperty("ideal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ideal")] +#endif public ConfirmationTokenPaymentMethodPreviewIdeal Ideal { get; set; } [JsonProperty("interac_present")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interac_present")] +#endif public ConfirmationTokenPaymentMethodPreviewInteracPresent InteracPresent { get; set; } [JsonProperty("kakao_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("kakao_pay")] +#endif public ConfirmationTokenPaymentMethodPreviewKakaoPay KakaoPay { get; set; } [JsonProperty("klarna")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("klarna")] +#endif public ConfirmationTokenPaymentMethodPreviewKlarna Klarna { get; set; } [JsonProperty("konbini")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("konbini")] +#endif public ConfirmationTokenPaymentMethodPreviewKonbini Konbini { get; set; } [JsonProperty("kr_card")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("kr_card")] +#endif public ConfirmationTokenPaymentMethodPreviewKrCard KrCard { get; set; } [JsonProperty("link")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("link")] +#endif public ConfirmationTokenPaymentMethodPreviewLink Link { get; set; } [JsonProperty("mobilepay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mobilepay")] +#endif public ConfirmationTokenPaymentMethodPreviewMobilepay Mobilepay { get; set; } [JsonProperty("multibanco")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("multibanco")] +#endif public ConfirmationTokenPaymentMethodPreviewMultibanco Multibanco { get; set; } [JsonProperty("naver_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("naver_pay")] +#endif public ConfirmationTokenPaymentMethodPreviewNaverPay NaverPay { get; set; } [JsonProperty("oxxo")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("oxxo")] +#endif public ConfirmationTokenPaymentMethodPreviewOxxo Oxxo { get; set; } [JsonProperty("p24")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("p24")] +#endif public ConfirmationTokenPaymentMethodPreviewP24 P24 { get; set; } [JsonProperty("payco")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payco")] +#endif public ConfirmationTokenPaymentMethodPreviewPayco Payco { get; set; } [JsonProperty("paynow")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("paynow")] +#endif public ConfirmationTokenPaymentMethodPreviewPaynow Paynow { get; set; } [JsonProperty("paypal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("paypal")] +#endif public ConfirmationTokenPaymentMethodPreviewPaypal Paypal { get; set; } [JsonProperty("pix")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("pix")] +#endif public ConfirmationTokenPaymentMethodPreviewPix Pix { get; set; } [JsonProperty("promptpay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("promptpay")] +#endif public ConfirmationTokenPaymentMethodPreviewPromptpay Promptpay { get; set; } [JsonProperty("revolut_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("revolut_pay")] +#endif public ConfirmationTokenPaymentMethodPreviewRevolutPay RevolutPay { get; set; } [JsonProperty("samsung_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("samsung_pay")] +#endif public ConfirmationTokenPaymentMethodPreviewSamsungPay SamsungPay { get; set; } [JsonProperty("sepa_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sepa_debit")] +#endif public ConfirmationTokenPaymentMethodPreviewSepaDebit SepaDebit { get; set; } [JsonProperty("sofort")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sofort")] +#endif public ConfirmationTokenPaymentMethodPreviewSofort Sofort { get; set; } [JsonProperty("swish")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("swish")] +#endif public ConfirmationTokenPaymentMethodPreviewSwish Swish { get; set; } [JsonProperty("twint")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("twint")] +#endif public ConfirmationTokenPaymentMethodPreviewTwint Twint { get; set; } /// @@ -194,15 +342,27 @@ public Customer Customer /// zip. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } [JsonProperty("us_bank_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("us_bank_account")] +#endif public ConfirmationTokenPaymentMethodPreviewUsBankAccount UsBankAccount { get; set; } [JsonProperty("wechat_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("wechat_pay")] +#endif public ConfirmationTokenPaymentMethodPreviewWechatPay WechatPay { get; set; } [JsonProperty("zip")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("zip")] +#endif public ConfirmationTokenPaymentMethodPreviewZip Zip { get; set; } } } diff --git a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewAcssDebit.cs b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewAcssDebit.cs index a57067c6a1..a8eed08147 100644 --- a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewAcssDebit.cs +++ b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewAcssDebit.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfirmationTokenPaymentMethodPreviewAcssDebit : StripeEntity { @@ -9,6 +12,9 @@ public class ConfirmationTokenPaymentMethodPreviewAcssDebit : StripeEntity [JsonProperty("bank_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_name")] +#endif public string BankName { get; set; } /// @@ -16,24 +22,36 @@ public class ConfirmationTokenPaymentMethodPreviewAcssDebit : StripeEntity [JsonProperty("fingerprint")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fingerprint")] +#endif public string Fingerprint { get; set; } /// /// Institution number of the bank account. /// [JsonProperty("institution_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("institution_number")] +#endif public string InstitutionNumber { get; set; } /// /// Last four digits of the bank account number. /// [JsonProperty("last4")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last4")] +#endif public string Last4 { get; set; } /// /// Transit number of the bank account. /// [JsonProperty("transit_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transit_number")] +#endif public string TransitNumber { get; set; } } } diff --git a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewAuBecsDebit.cs b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewAuBecsDebit.cs index 6030cf3ba2..15446c20da 100644 --- a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewAuBecsDebit.cs +++ b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewAuBecsDebit.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfirmationTokenPaymentMethodPreviewAuBecsDebit : StripeEntity { @@ -9,6 +12,9 @@ public class ConfirmationTokenPaymentMethodPreviewAuBecsDebit : StripeEntity [JsonProperty("bsb_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bsb_number")] +#endif public string BsbNumber { get; set; } /// @@ -16,12 +22,18 @@ public class ConfirmationTokenPaymentMethodPreviewAuBecsDebit : StripeEntity [JsonProperty("fingerprint")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fingerprint")] +#endif public string Fingerprint { get; set; } /// /// Last four digits of the bank account number. /// [JsonProperty("last4")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last4")] +#endif public string Last4 { get; set; } } } diff --git a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewBacsDebit.cs b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewBacsDebit.cs index 3da704f0e0..5dafe13349 100644 --- a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewBacsDebit.cs +++ b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewBacsDebit.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfirmationTokenPaymentMethodPreviewBacsDebit : StripeEntity { @@ -10,18 +13,27 @@ public class ConfirmationTokenPaymentMethodPreviewBacsDebit : StripeEntity [JsonProperty("fingerprint")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fingerprint")] +#endif public string Fingerprint { get; set; } /// /// Last four digits of the bank account number. /// [JsonProperty("last4")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last4")] +#endif public string Last4 { get; set; } /// /// Sort code of the bank account. (e.g., 10-20-30). /// [JsonProperty("sort_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sort_code")] +#endif public string SortCode { get; set; } } } diff --git a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewBillingDetails.cs b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewBillingDetails.cs index 87bffd0879..3e3120c920 100644 --- a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewBillingDetails.cs +++ b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewBillingDetails.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfirmationTokenPaymentMethodPreviewBillingDetails : StripeEntity { @@ -9,24 +12,36 @@ public class ConfirmationTokenPaymentMethodPreviewBillingDetails : StripeEntity< /// Billing address. /// [JsonProperty("address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address")] +#endif public Address Address { get; set; } /// /// Email address. /// [JsonProperty("email")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("email")] +#endif public string Email { get; set; } /// /// Full name. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } /// /// Billing phone number (including extension). /// [JsonProperty("phone")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("phone")] +#endif public string Phone { get; set; } } } diff --git a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewBoleto.cs b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewBoleto.cs index 8945dd0ff0..55007e6b49 100644 --- a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewBoleto.cs +++ b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewBoleto.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfirmationTokenPaymentMethodPreviewBoleto : StripeEntity { @@ -9,6 +12,9 @@ public class ConfirmationTokenPaymentMethodPreviewBoleto : StripeEntity [JsonProperty("tax_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_id")] +#endif public string TaxId { get; set; } } } diff --git a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewCard.cs b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewCard.cs index 370ad70702..9b03439909 100644 --- a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewCard.cs +++ b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewCard.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfirmationTokenPaymentMethodPreviewCard : StripeEntity { @@ -11,12 +14,18 @@ public class ConfirmationTokenPaymentMethodPreviewCard : StripeEntityunknown. /// [JsonProperty("brand")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("brand")] +#endif public string Brand { get; set; } /// /// Checks on Card address and CVC if provided. /// [JsonProperty("checks")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("checks")] +#endif public ConfirmationTokenPaymentMethodPreviewCardChecks Checks { get; set; } /// @@ -24,6 +33,9 @@ public class ConfirmationTokenPaymentMethodPreviewCard : StripeEntity [JsonProperty("country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country")] +#endif public string Country { get; set; } /// @@ -31,6 +43,9 @@ public class ConfirmationTokenPaymentMethodPreviewCard : StripeEntity [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// @@ -41,18 +56,27 @@ public class ConfirmationTokenPaymentMethodPreviewCard : StripeEntity [JsonProperty("display_brand")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_brand")] +#endif public string DisplayBrand { get; set; } /// /// Two-digit number representing the card's expiration month. /// [JsonProperty("exp_month")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("exp_month")] +#endif public long ExpMonth { get; set; } /// /// Four-digit number representing the card's expiration year. /// [JsonProperty("exp_year")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("exp_year")] +#endif public long ExpYear { get; set; } /// @@ -65,6 +89,9 @@ public class ConfirmationTokenPaymentMethodPreviewCard : StripeEntity. /// [JsonProperty("fingerprint")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fingerprint")] +#endif public string Fingerprint { get; set; } /// @@ -72,12 +99,18 @@ public class ConfirmationTokenPaymentMethodPreviewCard : StripeEntityunknown. /// [JsonProperty("funding")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("funding")] +#endif public string Funding { get; set; } /// /// Details of the original PaymentMethod that created this object. /// [JsonProperty("generated_from")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("generated_from")] +#endif public ConfirmationTokenPaymentMethodPreviewCardGeneratedFrom GeneratedFrom { get; set; } /// @@ -85,6 +118,9 @@ public class ConfirmationTokenPaymentMethodPreviewCard : StripeEntity [JsonProperty("iin")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("iin")] +#endif public string Iin { get; set; } /// @@ -92,30 +128,45 @@ public class ConfirmationTokenPaymentMethodPreviewCard : StripeEntity [JsonProperty("issuer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("issuer")] +#endif public string Issuer { get; set; } /// /// The last four digits of the card. /// [JsonProperty("last4")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last4")] +#endif public string Last4 { get; set; } /// /// Contains information about card networks that can be used to process the payment. /// [JsonProperty("networks")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("networks")] +#endif public ConfirmationTokenPaymentMethodPreviewCardNetworks Networks { get; set; } /// /// Contains details on how this Card may be used for 3D Secure authentication. /// [JsonProperty("three_d_secure_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("three_d_secure_usage")] +#endif public ConfirmationTokenPaymentMethodPreviewCardThreeDSecureUsage ThreeDSecureUsage { get; set; } /// /// If this Card is part of a card wallet, this contains the details of the card wallet. /// [JsonProperty("wallet")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("wallet")] +#endif public ConfirmationTokenPaymentMethodPreviewCardWallet Wallet { get; set; } } } diff --git a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewCardChecks.cs b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewCardChecks.cs index 37265edffa..1da1e57a16 100644 --- a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewCardChecks.cs +++ b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewCardChecks.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfirmationTokenPaymentMethodPreviewCardChecks : StripeEntity { @@ -10,6 +13,9 @@ public class ConfirmationTokenPaymentMethodPreviewCardChecks : StripeEntityunavailable, or unchecked. /// [JsonProperty("address_line1_check")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_line1_check")] +#endif public string AddressLine1Check { get; set; } /// @@ -17,6 +23,9 @@ public class ConfirmationTokenPaymentMethodPreviewCardChecks : StripeEntityfail, unavailable, or unchecked. /// [JsonProperty("address_postal_code_check")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_postal_code_check")] +#endif public string AddressPostalCodeCheck { get; set; } /// @@ -24,6 +33,9 @@ public class ConfirmationTokenPaymentMethodPreviewCardChecks : StripeEntityunavailable, or unchecked. /// [JsonProperty("cvc_check")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cvc_check")] +#endif public string CvcCheck { get; set; } } } diff --git a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewCardGeneratedFrom.cs b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewCardGeneratedFrom.cs index ec5b08e51a..cc8de432b6 100644 --- a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewCardGeneratedFrom.cs +++ b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewCardGeneratedFrom.cs @@ -3,19 +3,31 @@ namespace Stripe { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class ConfirmationTokenPaymentMethodPreviewCardGeneratedFrom : StripeEntity { /// /// The charge that created this object. /// [JsonProperty("charge")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("charge")] +#endif public string Charge { get; set; } /// /// Transaction-specific details of the payment method used in the payment. /// [JsonProperty("payment_method_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_details")] +#endif public ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetails PaymentMethodDetails { get; set; } #region Expandable SetupAttempt @@ -25,6 +37,9 @@ public class ConfirmationTokenPaymentMethodPreviewCardGeneratedFrom : StripeEnti /// The ID of the SetupAttempt that generated this PaymentMethod, if any. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string SetupAttemptId { get => this.InternalSetupAttempt?.Id; @@ -38,6 +53,9 @@ public string SetupAttemptId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public SetupAttempt SetupAttempt { get => this.InternalSetupAttempt?.ExpandedObject; @@ -46,6 +64,10 @@ public SetupAttempt SetupAttempt [JsonProperty("setup_attempt")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_attempt")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalSetupAttempt { get; set; } #endregion } diff --git a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetails.cs b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetails.cs index 14c5581ded..97e76cecd0 100644 --- a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetails.cs +++ b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetails.cs @@ -2,10 +2,16 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetails : StripeEntity { [JsonProperty("card_present")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card_present")] +#endif public ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresent CardPresent { get; set; } /// @@ -13,6 +19,9 @@ public class ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethod /// generated this card payment method. Always card_present. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresent.cs b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresent.cs index d312e2c52a..164022342e 100644 --- a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresent.cs +++ b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresent.cs @@ -5,6 +5,9 @@ namespace Stripe using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresent : StripeEntity { @@ -12,6 +15,9 @@ public class ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethod /// The authorized amount. /// [JsonProperty("amount_authorized")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_authorized")] +#endif public long? AmountAuthorized { get; set; } /// @@ -20,6 +26,9 @@ public class ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethod /// unknown. /// [JsonProperty("brand")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("brand")] +#endif public string Brand { get; set; } /// @@ -27,6 +36,9 @@ public class ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethod /// identifies the specific program or product associated with a card. /// [JsonProperty("brand_product")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("brand_product")] +#endif public string BrandProduct { get; set; } /// @@ -35,6 +47,10 @@ public class ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethod /// [JsonProperty("capture_before")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("capture_before")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime CaptureBefore { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -46,6 +62,9 @@ public class ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethod /// payments, such as those made with Apple Pay and Google Pay. /// [JsonProperty("cardholder_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cardholder_name")] +#endif public string CardholderName { get; set; } /// @@ -53,6 +72,9 @@ public class ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethod /// to get a sense of the international breakdown of cards you've collected. /// [JsonProperty("country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country")] +#endif public string Country { get; set; } /// @@ -60,24 +82,36 @@ public class ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethod /// only and not typically available in standard API requests.). /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// /// Authorization response cryptogram. /// [JsonProperty("emv_auth_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("emv_auth_data")] +#endif public string EmvAuthData { get; set; } /// /// Two-digit number representing the card's expiration month. /// [JsonProperty("exp_month")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("exp_month")] +#endif public long ExpMonth { get; set; } /// /// Four-digit number representing the card's expiration year. /// [JsonProperty("exp_year")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("exp_year")] +#endif public long ExpYear { get; set; } /// @@ -90,6 +124,9 @@ public class ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethod /// fingerprints for the same card---one for India and one for the rest of the world.. /// [JsonProperty("fingerprint")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fingerprint")] +#endif public string Fingerprint { get; set; } /// @@ -97,6 +134,9 @@ public class ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethod /// unknown. /// [JsonProperty("funding")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("funding")] +#endif public string Funding { get; set; } /// @@ -105,6 +145,9 @@ public class ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethod /// generate a card PaymentMethod. /// [JsonProperty("generated_card")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("generated_card")] +#endif public string GeneratedCard { get; set; } /// @@ -112,6 +155,9 @@ public class ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethod /// available in standard API requests.). /// [JsonProperty("iin")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("iin")] +#endif public string Iin { get; set; } /// @@ -120,6 +166,9 @@ public class ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethod /// href="https://stripe.com/docs/api/payment_intents/create#create_payment_intent-payment_method_options-card_present-request_incremental_authorization_support">request_incremental_authorization_support. /// [JsonProperty("incremental_authorization_supported")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("incremental_authorization_supported")] +#endif public bool IncrementalAuthorizationSupported { get; set; } /// @@ -127,12 +176,18 @@ public class ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethod /// in standard API requests.). /// [JsonProperty("issuer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("issuer")] +#endif public string Issuer { get; set; } /// /// The last four digits of the card. /// [JsonProperty("last4")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last4")] +#endif public string Last4 { get; set; } /// @@ -142,6 +197,9 @@ public class ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethod /// visa, or unknown. /// [JsonProperty("network")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("network")] +#endif public string Network { get; set; } /// @@ -153,24 +211,36 @@ public class ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethod /// American Express transactions and always null for other card brands. /// [JsonProperty("network_transaction_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("network_transaction_id")] +#endif public string NetworkTransactionId { get; set; } /// /// Details about payments collected offline. /// [JsonProperty("offline")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("offline")] +#endif public ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresentOffline Offline { get; set; } /// /// Defines whether the authorized amount can be over-captured or not. /// [JsonProperty("overcapture_supported")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("overcapture_supported")] +#endif public bool OvercaptureSupported { get; set; } /// /// EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. /// [JsonProperty("preferred_locales")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preferred_locales")] +#endif public List PreferredLocales { get; set; } /// @@ -179,6 +249,9 @@ public class ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethod /// magnetic_stripe_fallback, or magnetic_stripe_track2. /// [JsonProperty("read_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("read_method")] +#endif public string ReadMethod { get; set; } /// @@ -186,9 +259,15 @@ public class ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethod /// transactions. /// [JsonProperty("receipt")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("receipt")] +#endif public ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresentReceipt Receipt { get; set; } [JsonProperty("wallet")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("wallet")] +#endif public ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresentWallet Wallet { get; set; } } } diff --git a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresentOffline.cs b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresentOffline.cs index 1e2be67194..baf7455f78 100644 --- a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresentOffline.cs +++ b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresentOffline.cs @@ -4,6 +4,9 @@ namespace Stripe using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresentOffline : StripeEntity { @@ -12,12 +15,19 @@ public class ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethod /// [JsonProperty("stored_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("stored_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? StoredAt { get; set; } /// /// The method used to process this payment method offline. Only deferred is allowed. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresentReceipt.cs b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresentReceipt.cs index 13d5a8be43..e74c5c7118 100644 --- a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresentReceipt.cs +++ b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresentReceipt.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresentReceipt : StripeEntity { @@ -10,30 +13,45 @@ public class ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethod /// One of: checking, credit, prepaid, or unknown. /// [JsonProperty("account_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_type")] +#endif public string AccountType { get; set; } /// /// EMV tag 9F26, cryptogram generated by the integrated circuit chip. /// [JsonProperty("application_cryptogram")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("application_cryptogram")] +#endif public string ApplicationCryptogram { get; set; } /// /// Mnenomic of the Application Identifier. /// [JsonProperty("application_preferred_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("application_preferred_name")] +#endif public string ApplicationPreferredName { get; set; } /// /// Identifier for this transaction. /// [JsonProperty("authorization_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("authorization_code")] +#endif public string AuthorizationCode { get; set; } /// /// EMV tag 8A. A code returned by the card issuer. /// [JsonProperty("authorization_response_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("authorization_response_code")] +#endif public string AuthorizationResponseCode { get; set; } /// @@ -42,24 +60,36 @@ public class ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethod /// offline_pin_and_signature, online_pin, or signature. /// [JsonProperty("cardholder_verification_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cardholder_verification_method")] +#endif public string CardholderVerificationMethod { get; set; } /// /// EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. /// [JsonProperty("dedicated_file_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("dedicated_file_name")] +#endif public string DedicatedFileName { get; set; } /// /// The outcome of a series of EMV functions performed by the card reader. /// [JsonProperty("terminal_verification_results")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("terminal_verification_results")] +#endif public string TerminalVerificationResults { get; set; } /// /// An indication of various EMV functions performed during the transaction. /// [JsonProperty("transaction_status_information")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transaction_status_information")] +#endif public string TransactionStatusInformation { get; set; } } } diff --git a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresentWallet.cs b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresentWallet.cs index 5ac2c77595..57f8964be6 100644 --- a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresentWallet.cs +++ b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresentWallet.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresentWallet : StripeEntity { @@ -11,6 +14,9 @@ public class ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethod /// One of: apple_pay, google_pay, samsung_pay, or unknown. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewCardNetworks.cs b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewCardNetworks.cs index 6afa331a4a..19399c264d 100644 --- a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewCardNetworks.cs +++ b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewCardNetworks.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfirmationTokenPaymentMethodPreviewCardNetworks : StripeEntity { @@ -10,6 +13,9 @@ public class ConfirmationTokenPaymentMethodPreviewCardNetworks : StripeEntity [JsonProperty("available")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("available")] +#endif public List Available { get; set; } /// @@ -18,6 +24,9 @@ public class ConfirmationTokenPaymentMethodPreviewCardNetworks : StripeEntity [JsonProperty("preferred")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preferred")] +#endif public string Preferred { get; set; } } } diff --git a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewCardPresent.cs b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewCardPresent.cs index 764bb9f049..158665d3e6 100644 --- a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewCardPresent.cs +++ b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewCardPresent.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfirmationTokenPaymentMethodPreviewCardPresent : StripeEntity { @@ -12,6 +15,9 @@ public class ConfirmationTokenPaymentMethodPreviewCardPresent : StripeEntityunknown. /// [JsonProperty("brand")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("brand")] +#endif public string Brand { get; set; } /// @@ -19,6 +25,9 @@ public class ConfirmationTokenPaymentMethodPreviewCardPresent : StripeEntity [JsonProperty("brand_product")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("brand_product")] +#endif public string BrandProduct { get; set; } /// @@ -30,6 +39,9 @@ public class ConfirmationTokenPaymentMethodPreviewCardPresent : StripeEntity [JsonProperty("cardholder_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cardholder_name")] +#endif public string CardholderName { get; set; } /// @@ -37,6 +49,9 @@ public class ConfirmationTokenPaymentMethodPreviewCardPresent : StripeEntity [JsonProperty("country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country")] +#endif public string Country { get; set; } /// @@ -44,18 +59,27 @@ public class ConfirmationTokenPaymentMethodPreviewCardPresent : StripeEntity [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// /// Two-digit number representing the card's expiration month. /// [JsonProperty("exp_month")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("exp_month")] +#endif public long ExpMonth { get; set; } /// /// Four-digit number representing the card's expiration year. /// [JsonProperty("exp_year")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("exp_year")] +#endif public long ExpYear { get; set; } /// @@ -68,6 +92,9 @@ public class ConfirmationTokenPaymentMethodPreviewCardPresent : StripeEntity. /// [JsonProperty("fingerprint")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fingerprint")] +#endif public string Fingerprint { get; set; } /// @@ -75,6 +102,9 @@ public class ConfirmationTokenPaymentMethodPreviewCardPresent : StripeEntityunknown. /// [JsonProperty("funding")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("funding")] +#endif public string Funding { get; set; } /// @@ -82,6 +112,9 @@ public class ConfirmationTokenPaymentMethodPreviewCardPresent : StripeEntity [JsonProperty("iin")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("iin")] +#endif public string Iin { get; set; } /// @@ -89,30 +122,45 @@ public class ConfirmationTokenPaymentMethodPreviewCardPresent : StripeEntity [JsonProperty("issuer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("issuer")] +#endif public string Issuer { get; set; } /// /// The last four digits of the card. /// [JsonProperty("last4")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last4")] +#endif public string Last4 { get; set; } /// /// Contains information about card networks that can be used to process the payment. /// [JsonProperty("networks")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("networks")] +#endif public ConfirmationTokenPaymentMethodPreviewCardPresentNetworks Networks { get; set; } /// /// Details about payment methods collected offline. /// [JsonProperty("offline")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("offline")] +#endif public ConfirmationTokenPaymentMethodPreviewCardPresentOffline Offline { get; set; } /// /// EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. /// [JsonProperty("preferred_locales")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preferred_locales")] +#endif public List PreferredLocales { get; set; } /// @@ -121,9 +169,15 @@ public class ConfirmationTokenPaymentMethodPreviewCardPresent : StripeEntitymagnetic_stripe_fallback, or magnetic_stripe_track2. /// [JsonProperty("read_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("read_method")] +#endif public string ReadMethod { get; set; } [JsonProperty("wallet")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("wallet")] +#endif public ConfirmationTokenPaymentMethodPreviewCardPresentWallet Wallet { get; set; } } } diff --git a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewCardPresentNetworks.cs b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewCardPresentNetworks.cs index 695e2be340..ebec265ba9 100644 --- a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewCardPresentNetworks.cs +++ b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewCardPresentNetworks.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfirmationTokenPaymentMethodPreviewCardPresentNetworks : StripeEntity { @@ -10,12 +13,18 @@ public class ConfirmationTokenPaymentMethodPreviewCardPresentNetworks : StripeEn /// All available networks for the card. /// [JsonProperty("available")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("available")] +#endif public List Available { get; set; } /// /// The preferred network for the card. /// [JsonProperty("preferred")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preferred")] +#endif public string Preferred { get; set; } } } diff --git a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewCardPresentOffline.cs b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewCardPresentOffline.cs index 564841897d..06944d9937 100644 --- a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewCardPresentOffline.cs +++ b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewCardPresentOffline.cs @@ -4,6 +4,9 @@ namespace Stripe using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfirmationTokenPaymentMethodPreviewCardPresentOffline : StripeEntity { @@ -12,12 +15,19 @@ public class ConfirmationTokenPaymentMethodPreviewCardPresentOffline : StripeEnt /// [JsonProperty("stored_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("stored_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? StoredAt { get; set; } /// /// The method used to process this payment method offline. Only deferred is allowed. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewCardPresentWallet.cs b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewCardPresentWallet.cs index b791697246..b2f74e7cd0 100644 --- a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewCardPresentWallet.cs +++ b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewCardPresentWallet.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfirmationTokenPaymentMethodPreviewCardPresentWallet : StripeEntity { @@ -11,6 +14,9 @@ public class ConfirmationTokenPaymentMethodPreviewCardPresentWallet : StripeEnti /// One of: apple_pay, google_pay, samsung_pay, or unknown. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewCardThreeDSecureUsage.cs b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewCardThreeDSecureUsage.cs index 54155842ef..02481c5bf0 100644 --- a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewCardThreeDSecureUsage.cs +++ b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewCardThreeDSecureUsage.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfirmationTokenPaymentMethodPreviewCardThreeDSecureUsage : StripeEntity { @@ -9,6 +12,9 @@ public class ConfirmationTokenPaymentMethodPreviewCardThreeDSecureUsage : Stripe /// Whether 3D Secure is supported on this card. /// [JsonProperty("supported")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("supported")] +#endif public bool Supported { get; set; } } } diff --git a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewCardWallet.cs b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewCardWallet.cs index 5f71664801..c6356587b2 100644 --- a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewCardWallet.cs +++ b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewCardWallet.cs @@ -2,31 +2,55 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfirmationTokenPaymentMethodPreviewCardWallet : StripeEntity { [JsonProperty("amex_express_checkout")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amex_express_checkout")] +#endif public ConfirmationTokenPaymentMethodPreviewCardWalletAmexExpressCheckout AmexExpressCheckout { get; set; } [JsonProperty("apple_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("apple_pay")] +#endif public ConfirmationTokenPaymentMethodPreviewCardWalletApplePay ApplePay { get; set; } /// /// (For tokenized numbers only.) The last four digits of the device account number. /// [JsonProperty("dynamic_last4")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("dynamic_last4")] +#endif public string DynamicLast4 { get; set; } [JsonProperty("google_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("google_pay")] +#endif public ConfirmationTokenPaymentMethodPreviewCardWalletGooglePay GooglePay { get; set; } [JsonProperty("link")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("link")] +#endif public ConfirmationTokenPaymentMethodPreviewCardWalletLink Link { get; set; } [JsonProperty("masterpass")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("masterpass")] +#endif public ConfirmationTokenPaymentMethodPreviewCardWalletMasterpass Masterpass { get; set; } [JsonProperty("samsung_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("samsung_pay")] +#endif public ConfirmationTokenPaymentMethodPreviewCardWalletSamsungPay SamsungPay { get; set; } /// @@ -38,9 +62,15 @@ public class ConfirmationTokenPaymentMethodPreviewCardWallet : StripeEntitymasterpass, samsung_pay, or visa_checkout. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } [JsonProperty("visa_checkout")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("visa_checkout")] +#endif public ConfirmationTokenPaymentMethodPreviewCardWalletVisaCheckout VisaCheckout { get; set; } } } diff --git a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewCardWalletMasterpass.cs b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewCardWalletMasterpass.cs index bb69049ebe..f88cd50a16 100644 --- a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewCardWalletMasterpass.cs +++ b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewCardWalletMasterpass.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfirmationTokenPaymentMethodPreviewCardWalletMasterpass : StripeEntity { @@ -11,6 +14,9 @@ public class ConfirmationTokenPaymentMethodPreviewCardWalletMasterpass : StripeE /// mutated. /// [JsonProperty("billing_address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_address")] +#endif public Address BillingAddress { get; set; } /// @@ -18,6 +24,9 @@ public class ConfirmationTokenPaymentMethodPreviewCardWalletMasterpass : StripeE /// supported) at the time of authorization or settlement. They cannot be set or mutated. /// [JsonProperty("email")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("email")] +#endif public string Email { get; set; } /// @@ -25,6 +34,9 @@ public class ConfirmationTokenPaymentMethodPreviewCardWalletMasterpass : StripeE /// supported) at the time of authorization or settlement. They cannot be set or mutated. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } /// @@ -33,6 +45,9 @@ public class ConfirmationTokenPaymentMethodPreviewCardWalletMasterpass : StripeE /// or mutated. /// [JsonProperty("shipping_address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping_address")] +#endif public Address ShippingAddress { get; set; } } } diff --git a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewCardWalletVisaCheckout.cs b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewCardWalletVisaCheckout.cs index be06248ac6..8d981df5b4 100644 --- a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewCardWalletVisaCheckout.cs +++ b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewCardWalletVisaCheckout.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfirmationTokenPaymentMethodPreviewCardWalletVisaCheckout : StripeEntity { @@ -11,6 +14,9 @@ public class ConfirmationTokenPaymentMethodPreviewCardWalletVisaCheckout : Strip /// mutated. /// [JsonProperty("billing_address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_address")] +#endif public Address BillingAddress { get; set; } /// @@ -18,6 +24,9 @@ public class ConfirmationTokenPaymentMethodPreviewCardWalletVisaCheckout : Strip /// supported) at the time of authorization or settlement. They cannot be set or mutated. /// [JsonProperty("email")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("email")] +#endif public string Email { get; set; } /// @@ -25,6 +34,9 @@ public class ConfirmationTokenPaymentMethodPreviewCardWalletVisaCheckout : Strip /// supported) at the time of authorization or settlement. They cannot be set or mutated. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } /// @@ -33,6 +45,9 @@ public class ConfirmationTokenPaymentMethodPreviewCardWalletVisaCheckout : Strip /// or mutated. /// [JsonProperty("shipping_address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping_address")] +#endif public Address ShippingAddress { get; set; } } } diff --git a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewCashapp.cs b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewCashapp.cs index 356062573f..c46ed8b87b 100644 --- a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewCashapp.cs +++ b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewCashapp.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfirmationTokenPaymentMethodPreviewCashapp : StripeEntity { @@ -9,12 +12,18 @@ public class ConfirmationTokenPaymentMethodPreviewCashapp : StripeEntity [JsonProperty("buyer_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("buyer_id")] +#endif public string BuyerId { get; set; } /// /// A public identifier for buyers using Cash App. /// [JsonProperty("cashtag")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cashtag")] +#endif public string Cashtag { get; set; } } } diff --git a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewEps.cs b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewEps.cs index 0fa77fe93f..1835f971a3 100644 --- a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewEps.cs +++ b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewEps.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfirmationTokenPaymentMethodPreviewEps : StripeEntity { @@ -35,6 +38,9 @@ public class ConfirmationTokenPaymentMethodPreviewEps : StripeEntityvr_bank_braunau. /// [JsonProperty("bank")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank")] +#endif public string Bank { get; set; } } } diff --git a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewFpx.cs b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewFpx.cs index 3975cb7436..dc4b547832 100644 --- a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewFpx.cs +++ b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewFpx.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfirmationTokenPaymentMethodPreviewFpx : StripeEntity { @@ -10,6 +13,9 @@ public class ConfirmationTokenPaymentMethodPreviewFpx : StripeEntitycompany, or individual. /// [JsonProperty("account_holder_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_holder_type")] +#endif public string AccountHolderType { get; set; } /// @@ -26,6 +32,9 @@ public class ConfirmationTokenPaymentMethodPreviewFpx : StripeEntitypublic_bank, rhb, standard_chartered, or uob. /// [JsonProperty("bank")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank")] +#endif public string Bank { get; set; } } } diff --git a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewIdeal.cs b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewIdeal.cs index f4094be4ef..127834fe58 100644 --- a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewIdeal.cs +++ b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewIdeal.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfirmationTokenPaymentMethodPreviewIdeal : StripeEntity { @@ -16,6 +19,9 @@ public class ConfirmationTokenPaymentMethodPreviewIdeal : StripeEntityyoursafe. /// [JsonProperty("bank")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank")] +#endif public string Bank { get; set; } /// @@ -26,6 +32,9 @@ public class ConfirmationTokenPaymentMethodPreviewIdeal : StripeEntityREVOLT21, SNSBNL2A, or TRIONL2U. /// [JsonProperty("bic")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bic")] +#endif public string Bic { get; set; } } } diff --git a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewInteracPresent.cs b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewInteracPresent.cs index 2adc1fba04..4e8ebb572b 100644 --- a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewInteracPresent.cs +++ b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewInteracPresent.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfirmationTokenPaymentMethodPreviewInteracPresent : StripeEntity { @@ -10,6 +13,9 @@ public class ConfirmationTokenPaymentMethodPreviewInteracPresent : StripeEntity< /// Card brand. Can be interac, mastercard or visa. /// [JsonProperty("brand")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("brand")] +#endif public string Brand { get; set; } /// @@ -21,6 +27,9 @@ public class ConfirmationTokenPaymentMethodPreviewInteracPresent : StripeEntity< /// payments, such as those made with Apple Pay and Google Pay. /// [JsonProperty("cardholder_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cardholder_name")] +#endif public string CardholderName { get; set; } /// @@ -28,6 +37,9 @@ public class ConfirmationTokenPaymentMethodPreviewInteracPresent : StripeEntity< /// to get a sense of the international breakdown of cards you've collected. /// [JsonProperty("country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country")] +#endif public string Country { get; set; } /// @@ -35,18 +47,27 @@ public class ConfirmationTokenPaymentMethodPreviewInteracPresent : StripeEntity< /// only and not typically available in standard API requests.). /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// /// Two-digit number representing the card's expiration month. /// [JsonProperty("exp_month")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("exp_month")] +#endif public long ExpMonth { get; set; } /// /// Four-digit number representing the card's expiration year. /// [JsonProperty("exp_year")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("exp_year")] +#endif public long ExpYear { get; set; } /// @@ -59,6 +80,9 @@ public class ConfirmationTokenPaymentMethodPreviewInteracPresent : StripeEntity< /// fingerprints for the same card---one for India and one for the rest of the world.. /// [JsonProperty("fingerprint")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fingerprint")] +#endif public string Fingerprint { get; set; } /// @@ -66,6 +90,9 @@ public class ConfirmationTokenPaymentMethodPreviewInteracPresent : StripeEntity< /// unknown. /// [JsonProperty("funding")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("funding")] +#endif public string Funding { get; set; } /// @@ -73,6 +100,9 @@ public class ConfirmationTokenPaymentMethodPreviewInteracPresent : StripeEntity< /// available in standard API requests.). /// [JsonProperty("iin")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("iin")] +#endif public string Iin { get; set; } /// @@ -80,24 +110,36 @@ public class ConfirmationTokenPaymentMethodPreviewInteracPresent : StripeEntity< /// in standard API requests.). /// [JsonProperty("issuer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("issuer")] +#endif public string Issuer { get; set; } /// /// The last four digits of the card. /// [JsonProperty("last4")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last4")] +#endif public string Last4 { get; set; } /// /// Contains information about card networks that can be used to process the payment. /// [JsonProperty("networks")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("networks")] +#endif public ConfirmationTokenPaymentMethodPreviewInteracPresentNetworks Networks { get; set; } /// /// EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. /// [JsonProperty("preferred_locales")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preferred_locales")] +#endif public List PreferredLocales { get; set; } /// @@ -106,6 +148,9 @@ public class ConfirmationTokenPaymentMethodPreviewInteracPresent : StripeEntity< /// magnetic_stripe_fallback, or magnetic_stripe_track2. /// [JsonProperty("read_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("read_method")] +#endif public string ReadMethod { get; set; } } } diff --git a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewInteracPresentNetworks.cs b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewInteracPresentNetworks.cs index 52e869d173..42bd06e1aa 100644 --- a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewInteracPresentNetworks.cs +++ b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewInteracPresentNetworks.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfirmationTokenPaymentMethodPreviewInteracPresentNetworks : StripeEntity { @@ -10,12 +13,18 @@ public class ConfirmationTokenPaymentMethodPreviewInteracPresentNetworks : Strip /// All available networks for the card. /// [JsonProperty("available")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("available")] +#endif public List Available { get; set; } /// /// The preferred network for the card. /// [JsonProperty("preferred")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preferred")] +#endif public string Preferred { get; set; } } } diff --git a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewKlarna.cs b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewKlarna.cs index 532708ed1a..e347e78fdc 100644 --- a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewKlarna.cs +++ b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewKlarna.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfirmationTokenPaymentMethodPreviewKlarna : StripeEntity { @@ -9,6 +12,9 @@ public class ConfirmationTokenPaymentMethodPreviewKlarna : StripeEntity [JsonProperty("dob")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("dob")] +#endif public ConfirmationTokenPaymentMethodPreviewKlarnaDob Dob { get; set; } } } diff --git a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewKlarnaDob.cs b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewKlarnaDob.cs index fc9bd9d1e4..e720e78235 100644 --- a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewKlarnaDob.cs +++ b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewKlarnaDob.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfirmationTokenPaymentMethodPreviewKlarnaDob : StripeEntity { @@ -9,18 +12,27 @@ public class ConfirmationTokenPaymentMethodPreviewKlarnaDob : StripeEntity [JsonProperty("day")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("day")] +#endif public long? Day { get; set; } /// /// The month of birth, between 1 and 12. /// [JsonProperty("month")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("month")] +#endif public long? Month { get; set; } /// /// The four-digit year of birth. /// [JsonProperty("year")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("year")] +#endif public long? Year { get; set; } } } diff --git a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewKrCard.cs b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewKrCard.cs index bc365972b0..5957f4881f 100644 --- a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewKrCard.cs +++ b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewKrCard.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfirmationTokenPaymentMethodPreviewKrCard : StripeEntity { @@ -14,12 +17,18 @@ public class ConfirmationTokenPaymentMethodPreviewKrCard : StripeEntitywoori. /// [JsonProperty("brand")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("brand")] +#endif public string Brand { get; set; } /// /// The last four digits of the card. This may not be present for American Express cards. /// [JsonProperty("last4")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last4")] +#endif public string Last4 { get; set; } } } diff --git a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewLink.cs b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewLink.cs index 0dd6a560b7..8ddd95bebe 100644 --- a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewLink.cs +++ b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewLink.cs @@ -3,6 +3,9 @@ namespace Stripe { using System; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfirmationTokenPaymentMethodPreviewLink : StripeEntity { @@ -10,6 +13,9 @@ public class ConfirmationTokenPaymentMethodPreviewLink : StripeEntity [JsonProperty("email")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("email")] +#endif public string Email { get; set; } /// @@ -17,6 +23,9 @@ public class ConfirmationTokenPaymentMethodPreviewLink : StripeEntity [Obsolete("This property is deprecated, please refer to the description for details.")] [JsonProperty("persistent_token")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("persistent_token")] +#endif public string PersistentToken { get; set; } } } diff --git a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewNaverPay.cs b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewNaverPay.cs index 7472c06a85..646907b6fb 100644 --- a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewNaverPay.cs +++ b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewNaverPay.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfirmationTokenPaymentMethodPreviewNaverPay : StripeEntity { @@ -10,6 +13,9 @@ public class ConfirmationTokenPaymentMethodPreviewNaverPay : StripeEntitycard, or points. /// [JsonProperty("funding")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("funding")] +#endif public string Funding { get; set; } } } diff --git a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewP24.cs b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewP24.cs index 004605d9f8..c5cdf65eff 100644 --- a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewP24.cs +++ b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewP24.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfirmationTokenPaymentMethodPreviewP24 : StripeEntity { @@ -17,6 +20,9 @@ public class ConfirmationTokenPaymentMethodPreviewP24 : StripeEntityvolkswagen_bank. /// [JsonProperty("bank")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank")] +#endif public string Bank { get; set; } } } diff --git a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewPaypal.cs b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewPaypal.cs index 9211135b46..5eacda8045 100644 --- a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewPaypal.cs +++ b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewPaypal.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfirmationTokenPaymentMethodPreviewPaypal : StripeEntity { @@ -10,12 +13,18 @@ public class ConfirmationTokenPaymentMethodPreviewPaypal : StripeEntity [JsonProperty("payer_email")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payer_email")] +#endif public string PayerEmail { get; set; } /// /// PayPal account PayerID. This identifier uniquely identifies the PayPal customer. /// [JsonProperty("payer_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payer_id")] +#endif public string PayerId { get; set; } } } diff --git a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewSepaDebit.cs b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewSepaDebit.cs index 307fcce5d6..3027cdf247 100644 --- a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewSepaDebit.cs +++ b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewSepaDebit.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfirmationTokenPaymentMethodPreviewSepaDebit : StripeEntity { @@ -9,18 +12,27 @@ public class ConfirmationTokenPaymentMethodPreviewSepaDebit : StripeEntity [JsonProperty("bank_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_code")] +#endif public string BankCode { get; set; } /// /// Branch code of bank associated with the bank account. /// [JsonProperty("branch_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("branch_code")] +#endif public string BranchCode { get; set; } /// /// Two-letter ISO code representing the country the bank account is located in. /// [JsonProperty("country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country")] +#endif public string Country { get; set; } /// @@ -28,18 +40,27 @@ public class ConfirmationTokenPaymentMethodPreviewSepaDebit : StripeEntity [JsonProperty("fingerprint")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fingerprint")] +#endif public string Fingerprint { get; set; } /// /// Information about the object that generated this PaymentMethod. /// [JsonProperty("generated_from")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("generated_from")] +#endif public ConfirmationTokenPaymentMethodPreviewSepaDebitGeneratedFrom GeneratedFrom { get; set; } /// /// Last four characters of the IBAN. /// [JsonProperty("last4")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last4")] +#endif public string Last4 { get; set; } } } diff --git a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewSepaDebitGeneratedFrom.cs b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewSepaDebitGeneratedFrom.cs index 65d556a38d..df9c0d8acc 100644 --- a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewSepaDebitGeneratedFrom.cs +++ b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewSepaDebitGeneratedFrom.cs @@ -3,7 +3,13 @@ namespace Stripe { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class ConfirmationTokenPaymentMethodPreviewSepaDebitGeneratedFrom : StripeEntity { #region Expandable Charge @@ -13,6 +19,9 @@ public class ConfirmationTokenPaymentMethodPreviewSepaDebitGeneratedFrom : Strip /// The ID of the Charge that generated this PaymentMethod, if any. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string ChargeId { get => this.InternalCharge?.Id; @@ -26,6 +35,9 @@ public string ChargeId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Charge Charge { get => this.InternalCharge?.ExpandedObject; @@ -34,6 +46,10 @@ public Charge Charge [JsonProperty("charge")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("charge")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalCharge { get; set; } #endregion @@ -44,6 +60,9 @@ public Charge Charge /// The ID of the SetupAttempt that generated this PaymentMethod, if any. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string SetupAttemptId { get => this.InternalSetupAttempt?.Id; @@ -57,6 +76,9 @@ public string SetupAttemptId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public SetupAttempt SetupAttempt { get => this.InternalSetupAttempt?.ExpandedObject; @@ -65,6 +87,10 @@ public SetupAttempt SetupAttempt [JsonProperty("setup_attempt")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_attempt")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalSetupAttempt { get; set; } #endregion } diff --git a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewSofort.cs b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewSofort.cs index 02a6375f27..e6584370b4 100644 --- a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewSofort.cs +++ b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewSofort.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfirmationTokenPaymentMethodPreviewSofort : StripeEntity { @@ -9,6 +12,9 @@ public class ConfirmationTokenPaymentMethodPreviewSofort : StripeEntity [JsonProperty("country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country")] +#endif public string Country { get; set; } } } diff --git a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewUsBankAccount.cs b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewUsBankAccount.cs index 99ec848645..b7fe214a1d 100644 --- a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewUsBankAccount.cs +++ b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewUsBankAccount.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfirmationTokenPaymentMethodPreviewUsBankAccount : StripeEntity { @@ -10,6 +13,9 @@ public class ConfirmationTokenPaymentMethodPreviewUsBankAccount : StripeEntitycompany, or individual. /// [JsonProperty("account_holder_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_holder_type")] +#endif public string AccountHolderType { get; set; } /// @@ -17,18 +23,27 @@ public class ConfirmationTokenPaymentMethodPreviewUsBankAccount : StripeEntitychecking, or savings. /// [JsonProperty("account_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_type")] +#endif public string AccountType { get; set; } /// /// The name of the bank. /// [JsonProperty("bank_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_name")] +#endif public string BankName { get; set; } /// /// The ID of the Financial Connections Account used to create the payment method. /// [JsonProperty("financial_connections_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("financial_connections_account")] +#endif public string FinancialConnectionsAccount { get; set; } /// @@ -36,30 +51,45 @@ public class ConfirmationTokenPaymentMethodPreviewUsBankAccount : StripeEntity [JsonProperty("fingerprint")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fingerprint")] +#endif public string Fingerprint { get; set; } /// /// Last four digits of the bank account number. /// [JsonProperty("last4")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last4")] +#endif public string Last4 { get; set; } /// /// Contains information about US bank account networks that can be used. /// [JsonProperty("networks")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("networks")] +#endif public ConfirmationTokenPaymentMethodPreviewUsBankAccountNetworks Networks { get; set; } /// /// Routing number of the bank account. /// [JsonProperty("routing_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("routing_number")] +#endif public string RoutingNumber { get; set; } /// /// Contains information about the future reusability of this PaymentMethod. /// [JsonProperty("status_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status_details")] +#endif public ConfirmationTokenPaymentMethodPreviewUsBankAccountStatusDetails StatusDetails { get; set; } } } diff --git a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewUsBankAccountNetworks.cs b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewUsBankAccountNetworks.cs index 11925281d0..375c56cea2 100644 --- a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewUsBankAccountNetworks.cs +++ b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewUsBankAccountNetworks.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfirmationTokenPaymentMethodPreviewUsBankAccountNetworks : StripeEntity { @@ -10,6 +13,9 @@ public class ConfirmationTokenPaymentMethodPreviewUsBankAccountNetworks : Stripe /// The preferred network. /// [JsonProperty("preferred")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preferred")] +#endif public string Preferred { get; set; } /// @@ -17,6 +23,9 @@ public class ConfirmationTokenPaymentMethodPreviewUsBankAccountNetworks : Stripe /// One of: ach, or us_domestic_wire. /// [JsonProperty("supported")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("supported")] +#endif public List Supported { get; set; } } } diff --git a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewUsBankAccountStatusDetails.cs b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewUsBankAccountStatusDetails.cs index c1162e1fbc..6ec5dd582b 100644 --- a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewUsBankAccountStatusDetails.cs +++ b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewUsBankAccountStatusDetails.cs @@ -2,10 +2,16 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfirmationTokenPaymentMethodPreviewUsBankAccountStatusDetails : StripeEntity { [JsonProperty("blocked")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("blocked")] +#endif public ConfirmationTokenPaymentMethodPreviewUsBankAccountStatusDetailsBlocked Blocked { get; set; } } } diff --git a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewUsBankAccountStatusDetailsBlocked.cs b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewUsBankAccountStatusDetailsBlocked.cs index 808b488fe0..59e33cfa27 100644 --- a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewUsBankAccountStatusDetailsBlocked.cs +++ b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewUsBankAccountStatusDetailsBlocked.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfirmationTokenPaymentMethodPreviewUsBankAccountStatusDetailsBlocked : StripeEntity { @@ -11,6 +14,9 @@ public class ConfirmationTokenPaymentMethodPreviewUsBankAccountStatusDetailsBloc /// R10, R11, R16, R20, R29, or R31. /// [JsonProperty("network_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("network_code")] +#endif public string NetworkCode { get; set; } /// @@ -20,6 +26,9 @@ public class ConfirmationTokenPaymentMethodPreviewUsBankAccountStatusDetailsBloc /// bank_account_unusable, or debit_not_authorized. /// [JsonProperty("reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reason")] +#endif public string Reason { get; set; } } } diff --git a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenShipping.cs b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenShipping.cs index d113383b95..298eedb11f 100644 --- a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenShipping.cs +++ b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenShipping.cs @@ -2,22 +2,34 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfirmationTokenShipping : StripeEntity { [JsonProperty("address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address")] +#endif public Address Address { get; set; } /// /// Recipient name. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } /// /// Recipient phone (including extension). /// [JsonProperty("phone")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("phone")] +#endif public string Phone { get; set; } } } diff --git a/src/Stripe.net/Entities/ConnectCollectionTransfers/ConnectCollectionTransfer.cs b/src/Stripe.net/Entities/ConnectCollectionTransfers/ConnectCollectionTransfer.cs index 07d6e0e820..ecfe8d2b9d 100644 --- a/src/Stripe.net/Entities/ConnectCollectionTransfers/ConnectCollectionTransfer.cs +++ b/src/Stripe.net/Entities/ConnectCollectionTransfers/ConnectCollectionTransfer.cs @@ -3,25 +3,40 @@ namespace Stripe { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class ConnectCollectionTransfer : StripeEntity, IHasId, IHasObject, IBalanceTransactionSource { /// /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// /// Amount transferred, in cents (or local equivalent). /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long Amount { get; set; } /// @@ -30,6 +45,9 @@ public class ConnectCollectionTransfer : StripeEntity /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } #region Expandable Destination @@ -39,6 +57,9 @@ public class ConnectCollectionTransfer : StripeEntity /// ID of the account that funds are being collected for. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string DestinationId { get => this.InternalDestination?.Id; @@ -52,6 +73,9 @@ public string DestinationId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Account Destination { get => this.InternalDestination?.ExpandedObject; @@ -60,6 +84,10 @@ public Account Destination [JsonProperty("destination")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("destination")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalDestination { get; set; } #endregion @@ -68,6 +96,9 @@ public Account Destination /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } } } diff --git a/src/Stripe.net/Entities/CountrySpecs/CountrySpec.cs b/src/Stripe.net/Entities/CountrySpecs/CountrySpec.cs index b6e8137c37..bc5251c7f4 100644 --- a/src/Stripe.net/Entities/CountrySpecs/CountrySpec.cs +++ b/src/Stripe.net/Entities/CountrySpecs/CountrySpec.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// Stripe needs to collect certain pieces of information about each account created. These @@ -19,12 +22,18 @@ public class CountrySpec : StripeEntity, IHasId, IHasObject /// Unique identifier for the object. Represented as the ISO country code for this country. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// @@ -32,18 +41,27 @@ public class CountrySpec : StripeEntity, IHasId, IHasObject /// accounts. /// [JsonProperty("default_currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("default_currency")] +#endif public string DefaultCurrency { get; set; } /// /// Currencies that can be accepted in the specific country (for transfers). /// [JsonProperty("supported_bank_account_currencies")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("supported_bank_account_currencies")] +#endif public Dictionary> SupportedBankAccountCurrencies { get; set; } /// /// Currencies that can be accepted in the specified country (for payments). /// [JsonProperty("supported_payment_currencies")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("supported_payment_currencies")] +#endif public List SupportedPaymentCurrencies { get; set; } /// @@ -54,15 +72,24 @@ public class CountrySpec : StripeEntity, IHasId, IHasObject /// platform. /// [JsonProperty("supported_payment_methods")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("supported_payment_methods")] +#endif public List SupportedPaymentMethods { get; set; } /// /// Countries that can accept transfers from the specified country. /// [JsonProperty("supported_transfer_countries")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("supported_transfer_countries")] +#endif public List SupportedTransferCountries { get; set; } [JsonProperty("verification_fields")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("verification_fields")] +#endif public Dictionary>> VerificationFields { get; set; } } } diff --git a/src/Stripe.net/Entities/Coupons/Coupon.cs b/src/Stripe.net/Entities/Coupons/Coupon.cs index 1445211a06..18ffdd61b9 100644 --- a/src/Stripe.net/Entities/Coupons/Coupon.cs +++ b/src/Stripe.net/Entities/Coupons/Coupon.cs @@ -5,6 +5,9 @@ namespace Stripe using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// A coupon contains information about a percent-off or amount-off discount you might want @@ -22,12 +25,18 @@ public class Coupon : StripeEntity, IHasId, IHasMetadata, IHasObject /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// @@ -35,9 +44,15 @@ public class Coupon : StripeEntity, IHasId, IHasMetadata, IHasObject /// invoices for this customer. /// [JsonProperty("amount_off")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_off")] +#endif public long? AmountOff { get; set; } [JsonProperty("applies_to")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("applies_to")] +#endif public CouponAppliesTo AppliesTo { get; set; } /// @@ -45,6 +60,10 @@ public class Coupon : StripeEntity, IHasId, IHasMetadata, IHasObject /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -53,6 +72,9 @@ public class Coupon : StripeEntity, IHasId, IHasMetadata, IHasObject /// take off. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// @@ -61,12 +83,19 @@ public class Coupon : StripeEntity, IHasId, IHasMetadata, IHasObject /// href="https://stripe.com/docs/currencies">supported currency. /// [JsonProperty("currency_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency_options")] +#endif public Dictionary CurrencyOptions { get; set; } /// /// Whether this object is deleted or not. /// [JsonProperty("deleted", NullValueHandling = NullValueHandling.Ignore)] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("deleted")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] +#endif public bool? Deleted { get; set; } /// @@ -75,6 +104,9 @@ public class Coupon : StripeEntity, IHasId, IHasMetadata, IHasObject /// One of: forever, once, or repeating. /// [JsonProperty("duration")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("duration")] +#endif public string Duration { get; set; } /// @@ -82,6 +114,9 @@ public class Coupon : StripeEntity, IHasId, IHasMetadata, IHasObject /// coupon duration is forever or once. /// [JsonProperty("duration_in_months")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("duration_in_months")] +#endif public long? DurationInMonths { get; set; } /// @@ -89,6 +124,9 @@ public class Coupon : StripeEntity, IHasId, IHasMetadata, IHasObject /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// @@ -96,6 +134,9 @@ public class Coupon : StripeEntity, IHasId, IHasMetadata, IHasObject /// before it is no longer valid. /// [JsonProperty("max_redemptions")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("max_redemptions")] +#endif public long? MaxRedemptions { get; set; } /// @@ -104,12 +145,18 @@ public class Coupon : StripeEntity, IHasId, IHasMetadata, IHasObject /// object in a structured format. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// Name of the coupon displayed to customers on for instance invoices or receipts. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } /// @@ -118,6 +165,9 @@ public class Coupon : StripeEntity, IHasId, IHasMetadata, IHasObject /// local equivalent)100 invoice $ (or local equivalent)50 instead. /// [JsonProperty("percent_off")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("percent_off")] +#endif public decimal? PercentOff { get; set; } /// @@ -125,12 +175,19 @@ public class Coupon : StripeEntity, IHasId, IHasMetadata, IHasObject /// [JsonProperty("redeem_by")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("redeem_by")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? RedeemBy { get; set; } /// /// Number of times this coupon has been applied to a customer. /// [JsonProperty("times_redeemed")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("times_redeemed")] +#endif public long TimesRedeemed { get; set; } /// @@ -138,6 +195,9 @@ public class Coupon : StripeEntity, IHasId, IHasMetadata, IHasObject /// customer. /// [JsonProperty("valid")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("valid")] +#endif public bool Valid { get; set; } } } diff --git a/src/Stripe.net/Entities/Coupons/CouponAppliesTo.cs b/src/Stripe.net/Entities/Coupons/CouponAppliesTo.cs index 6f45866e5a..a7b853f363 100644 --- a/src/Stripe.net/Entities/Coupons/CouponAppliesTo.cs +++ b/src/Stripe.net/Entities/Coupons/CouponAppliesTo.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CouponAppliesTo : StripeEntity { @@ -10,6 +13,9 @@ public class CouponAppliesTo : StripeEntity /// A list of product IDs this coupon applies to. /// [JsonProperty("products")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("products")] +#endif public List Products { get; set; } } } diff --git a/src/Stripe.net/Entities/Coupons/CouponCurrencyOptions.cs b/src/Stripe.net/Entities/Coupons/CouponCurrencyOptions.cs index 009cd6d4e4..5bd42f473f 100644 --- a/src/Stripe.net/Entities/Coupons/CouponCurrencyOptions.cs +++ b/src/Stripe.net/Entities/Coupons/CouponCurrencyOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CouponCurrencyOptions : StripeEntity { @@ -10,6 +13,9 @@ public class CouponCurrencyOptions : StripeEntity /// invoices for this customer. /// [JsonProperty("amount_off")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_off")] +#endif public long AmountOff { get; set; } } } diff --git a/src/Stripe.net/Entities/CreditNoteLineItems/CreditNoteLineItem.cs b/src/Stripe.net/Entities/CreditNoteLineItems/CreditNoteLineItem.cs index 87ee59cd3f..85127767dc 100644 --- a/src/Stripe.net/Entities/CreditNoteLineItems/CreditNoteLineItem.cs +++ b/src/Stripe.net/Entities/CreditNoteLineItems/CreditNoteLineItem.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// The credit note line item object. @@ -13,12 +16,18 @@ public class CreditNoteLineItem : StripeEntity, IHasId, IHas /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// @@ -26,6 +35,9 @@ public class CreditNoteLineItem : StripeEntity, IHasId, IHas /// credited for this line item, excluding (exclusive) tax and discounts. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long Amount { get; set; } /// @@ -33,12 +45,18 @@ public class CreditNoteLineItem : StripeEntity, IHasId, IHas /// for this line item, excluding all tax and discounts. /// [JsonProperty("amount_excluding_tax")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_excluding_tax")] +#endif public long? AmountExcludingTax { get; set; } /// /// Description of the item being credited. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// @@ -46,18 +64,27 @@ public class CreditNoteLineItem : StripeEntity, IHasId, IHas /// credited for this line item. /// [JsonProperty("discount_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discount_amount")] +#endif public long DiscountAmount { get; set; } /// /// The amount of discount calculated per discount for this line item. /// [JsonProperty("discount_amounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discount_amounts")] +#endif public List DiscountAmounts { get; set; } /// /// ID of the invoice line item being credited. /// [JsonProperty("invoice_line_item")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("invoice_line_item")] +#endif public string InvoiceLineItem { get; set; } /// @@ -65,30 +92,45 @@ public class CreditNoteLineItem : StripeEntity, IHasId, IHas /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// /// The pretax credit amounts (ex: discount, credit grants, etc) for this line item. /// [JsonProperty("pretax_credit_amounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("pretax_credit_amounts")] +#endif public List PretaxCreditAmounts { get; set; } /// /// The number of units of product being credited. /// [JsonProperty("quantity")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("quantity")] +#endif public long? Quantity { get; set; } /// /// The amount of tax calculated per tax rate for this line item. /// [JsonProperty("tax_amounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_amounts")] +#endif public List TaxAmounts { get; set; } /// /// The tax rates which apply to the line item. /// [JsonProperty("tax_rates")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_rates")] +#endif public List TaxRates { get; set; } /// @@ -99,18 +141,27 @@ public class CreditNoteLineItem : StripeEntity, IHasId, IHas /// One of: custom_line_item, or invoice_line_item. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } /// /// The cost of each unit of product being credited. /// [JsonProperty("unit_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_amount")] +#endif public long? UnitAmount { get; set; } /// /// Same as unit_amount, but contains a decimal value with at most 12 decimal places. /// [JsonProperty("unit_amount_decimal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_amount_decimal")] +#endif public decimal? UnitAmountDecimal { get; set; } /// @@ -118,6 +169,9 @@ public class CreditNoteLineItem : StripeEntity, IHasId, IHas /// for this line item, excluding all tax and discounts. /// [JsonProperty("unit_amount_excluding_tax")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_amount_excluding_tax")] +#endif public decimal? UnitAmountExcludingTax { get; set; } } } diff --git a/src/Stripe.net/Entities/CreditNoteLineItems/CreditNoteLineItemDiscountAmount.cs b/src/Stripe.net/Entities/CreditNoteLineItems/CreditNoteLineItemDiscountAmount.cs index ce93720bd1..974dc637d2 100644 --- a/src/Stripe.net/Entities/CreditNoteLineItems/CreditNoteLineItemDiscountAmount.cs +++ b/src/Stripe.net/Entities/CreditNoteLineItems/CreditNoteLineItemDiscountAmount.cs @@ -3,13 +3,22 @@ namespace Stripe { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class CreditNoteLineItemDiscountAmount : StripeEntity { /// /// The amount, in cents (or local equivalent), of the discount. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long Amount { get; set; } #region Expandable Discount @@ -19,6 +28,9 @@ public class CreditNoteLineItemDiscountAmount : StripeEntity [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string DiscountId { get => this.InternalDiscount?.Id; @@ -32,6 +44,9 @@ public string DiscountId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Discount Discount { get => this.InternalDiscount?.ExpandedObject; @@ -40,6 +55,10 @@ public Discount Discount [JsonProperty("discount")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discount")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalDiscount { get; set; } #endregion } diff --git a/src/Stripe.net/Entities/CreditNoteLineItems/CreditNoteLineItemPretaxCreditAmount.cs b/src/Stripe.net/Entities/CreditNoteLineItems/CreditNoteLineItemPretaxCreditAmount.cs index b47d145797..a9ff410abb 100644 --- a/src/Stripe.net/Entities/CreditNoteLineItems/CreditNoteLineItemPretaxCreditAmount.cs +++ b/src/Stripe.net/Entities/CreditNoteLineItems/CreditNoteLineItemPretaxCreditAmount.cs @@ -3,13 +3,22 @@ namespace Stripe { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class CreditNoteLineItemPretaxCreditAmount : StripeEntity { /// /// The amount, in cents (or local equivalent), of the pretax credit amount. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long Amount { get; set; } #region Expandable CreditBalanceTransaction @@ -19,6 +28,9 @@ public class CreditNoteLineItemPretaxCreditAmount : StripeEntity [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string CreditBalanceTransactionId { get => this.InternalCreditBalanceTransaction?.Id; @@ -32,6 +44,9 @@ public string CreditBalanceTransactionId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Billing.CreditBalanceTransaction CreditBalanceTransaction { get => this.InternalCreditBalanceTransaction?.ExpandedObject; @@ -40,6 +55,10 @@ public Billing.CreditBalanceTransaction CreditBalanceTransaction [JsonProperty("credit_balance_transaction")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("credit_balance_transaction")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalCreditBalanceTransaction { get; set; } #endregion @@ -50,6 +69,9 @@ public Billing.CreditBalanceTransaction CreditBalanceTransaction /// The discount that was applied to get this pretax credit amount. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string DiscountId { get => this.InternalDiscount?.Id; @@ -63,6 +85,9 @@ public string DiscountId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Discount Discount { get => this.InternalDiscount?.ExpandedObject; @@ -71,6 +96,10 @@ public Discount Discount [JsonProperty("discount")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discount")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalDiscount { get; set; } #endregion @@ -79,6 +108,9 @@ public Discount Discount /// One of: credit_balance_transaction, or discount. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/CreditNotes/CreditNote.cs b/src/Stripe.net/Entities/CreditNotes/CreditNote.cs index 18ca72a3a1..bfb1cf15c8 100644 --- a/src/Stripe.net/Entities/CreditNotes/CreditNote.cs +++ b/src/Stripe.net/Entities/CreditNotes/CreditNote.cs @@ -5,6 +5,9 @@ namespace Stripe using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// Issue a credit note to adjust an invoice's amount after the invoice is finalized. @@ -12,18 +15,27 @@ namespace Stripe /// Related guide: Credit /// notes. /// +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class CreditNote : StripeEntity, IHasId, IHasMetadata, IHasObject { /// /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// @@ -31,12 +43,18 @@ public class CreditNote : StripeEntity, IHasId, IHasMetadata, IHasOb /// credit note, including tax. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long Amount { get; set; } /// /// This is the sum of all the shipping amounts. /// [JsonProperty("amount_shipping")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_shipping")] +#endif public long AmountShipping { get; set; } /// @@ -44,6 +62,10 @@ public class CreditNote : StripeEntity, IHasId, IHasMetadata, IHasOb /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -52,6 +74,9 @@ public class CreditNote : StripeEntity, IHasId, IHasMetadata, IHasOb /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } #region Expandable Customer @@ -61,6 +86,9 @@ public class CreditNote : StripeEntity, IHasId, IHasMetadata, IHasOb /// ID of the customer. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string CustomerId { get => this.InternalCustomer?.Id; @@ -74,6 +102,9 @@ public string CustomerId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Customer Customer { get => this.InternalCustomer?.ExpandedObject; @@ -82,6 +113,10 @@ public Customer Customer [JsonProperty("customer")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalCustomer { get; set; } #endregion @@ -92,6 +127,9 @@ public Customer Customer /// Customer balance transaction related to this credit note. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string CustomerBalanceTransactionId { get => this.InternalCustomerBalanceTransaction?.Id; @@ -105,6 +143,9 @@ public string CustomerBalanceTransactionId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public CustomerBalanceTransaction CustomerBalanceTransaction { get => this.InternalCustomerBalanceTransaction?.ExpandedObject; @@ -113,6 +154,10 @@ public CustomerBalanceTransaction CustomerBalanceTransaction [JsonProperty("customer_balance_transaction")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_balance_transaction")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalCustomerBalanceTransaction { get; set; } #endregion @@ -121,12 +166,18 @@ public CustomerBalanceTransaction CustomerBalanceTransaction /// discount that was credited. /// [JsonProperty("discount_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discount_amount")] +#endif public long DiscountAmount { get; set; } /// /// The aggregate amounts calculated per discount for all line items. /// [JsonProperty("discount_amounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discount_amounts")] +#endif public List DiscountAmounts { get; set; } /// @@ -136,6 +187,10 @@ public CustomerBalanceTransaction CustomerBalanceTransaction /// [JsonProperty("effective_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("effective_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? EffectiveAt { get; set; } #region Expandable Invoice @@ -145,6 +200,9 @@ public CustomerBalanceTransaction CustomerBalanceTransaction /// ID of the invoice. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string InvoiceId { get => this.InternalInvoice?.Id; @@ -158,6 +216,9 @@ public string InvoiceId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Invoice Invoice { get => this.InternalInvoice?.ExpandedObject; @@ -166,6 +227,10 @@ public Invoice Invoice [JsonProperty("invoice")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("invoice")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalInvoice { get; set; } #endregion @@ -173,6 +238,9 @@ public Invoice Invoice /// Line items that make up the credit note. /// [JsonProperty("lines")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("lines")] +#endif public StripeList Lines { get; set; } /// @@ -180,12 +248,18 @@ public Invoice Invoice /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// /// Customer-facing text that appears on the credit note PDF. /// [JsonProperty("memo")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("memo")] +#endif public string Memo { get; set; } /// @@ -194,6 +268,9 @@ public Invoice Invoice /// object in a structured format. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -201,24 +278,36 @@ public Invoice Invoice /// the credit note and its associated invoice. /// [JsonProperty("number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("number")] +#endif public string Number { get; set; } /// /// Amount that was credited outside of Stripe. /// [JsonProperty("out_of_band_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("out_of_band_amount")] +#endif public long? OutOfBandAmount { get; set; } /// /// The link to download the PDF of the credit note. /// [JsonProperty("pdf")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("pdf")] +#endif public string Pdf { get; set; } /// /// The pretax credit amounts (ex: discount, credit grants, etc) for all line items. /// [JsonProperty("pretax_credit_amounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("pretax_credit_amounts")] +#endif public List PretaxCreditAmounts { get; set; } /// @@ -228,6 +317,9 @@ public Invoice Invoice /// product_unsatisfactory. /// [JsonProperty("reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reason")] +#endif public string Reason { get; set; } #region Expandable Refund @@ -237,6 +329,9 @@ public Invoice Invoice /// Refund related to this credit note. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string RefundId { get => this.InternalRefund?.Id; @@ -250,6 +345,9 @@ public string RefundId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Refund Refund { get => this.InternalRefund?.ExpandedObject; @@ -258,6 +356,10 @@ public Refund Refund [JsonProperty("refund")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("refund")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalRefund { get; set; } #endregion @@ -265,6 +367,9 @@ public Refund Refund /// The details of the cost of shipping, including the ShippingRate applied to the invoice. /// [JsonProperty("shipping_cost")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping_cost")] +#endif public CreditNoteShippingCost ShippingCost { get; set; } /// @@ -274,6 +379,9 @@ public Refund Refund /// One of: issued, or void. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } /// @@ -281,6 +389,9 @@ public Refund Refund /// note, excluding exclusive tax and invoice level discounts. /// [JsonProperty("subtotal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("subtotal")] +#endif public long Subtotal { get; set; } /// @@ -288,12 +399,18 @@ public Refund Refund /// note, excluding all tax and invoice level discounts. /// [JsonProperty("subtotal_excluding_tax")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("subtotal_excluding_tax")] +#endif public long? SubtotalExcludingTax { get; set; } /// /// The aggregate amounts calculated per tax rate for all line items. /// [JsonProperty("tax_amounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_amounts")] +#endif public List TaxAmounts { get; set; } /// @@ -301,6 +418,9 @@ public Refund Refund /// credit note, including tax and all discount. /// [JsonProperty("total")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("total")] +#endif public long Total { get; set; } /// @@ -308,6 +428,9 @@ public Refund Refund /// credit note, excluding tax, but including discounts. /// [JsonProperty("total_excluding_tax")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("total_excluding_tax")] +#endif public long? TotalExcludingTax { get; set; } /// @@ -317,6 +440,9 @@ public Refund Refund /// One of: post_payment, or pre_payment. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } /// @@ -324,6 +450,10 @@ public Refund Refund /// [JsonProperty("voided_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("voided_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? VoidedAt { get; set; } } } diff --git a/src/Stripe.net/Entities/CreditNotes/CreditNoteDiscountAmount.cs b/src/Stripe.net/Entities/CreditNotes/CreditNoteDiscountAmount.cs index 26caad612c..c496f73128 100644 --- a/src/Stripe.net/Entities/CreditNotes/CreditNoteDiscountAmount.cs +++ b/src/Stripe.net/Entities/CreditNotes/CreditNoteDiscountAmount.cs @@ -3,13 +3,22 @@ namespace Stripe { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class CreditNoteDiscountAmount : StripeEntity { /// /// The amount, in cents (or local equivalent), of the discount. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long Amount { get; set; } #region Expandable Discount @@ -19,6 +28,9 @@ public class CreditNoteDiscountAmount : StripeEntity /// The discount that was applied to get this discount amount. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string DiscountId { get => this.InternalDiscount?.Id; @@ -32,6 +44,9 @@ public string DiscountId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Discount Discount { get => this.InternalDiscount?.ExpandedObject; @@ -40,6 +55,10 @@ public Discount Discount [JsonProperty("discount")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discount")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalDiscount { get; set; } #endregion } diff --git a/src/Stripe.net/Entities/CreditNotes/CreditNotePretaxCreditAmount.cs b/src/Stripe.net/Entities/CreditNotes/CreditNotePretaxCreditAmount.cs index 720acdadc5..9940eb91c0 100644 --- a/src/Stripe.net/Entities/CreditNotes/CreditNotePretaxCreditAmount.cs +++ b/src/Stripe.net/Entities/CreditNotes/CreditNotePretaxCreditAmount.cs @@ -3,13 +3,22 @@ namespace Stripe { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class CreditNotePretaxCreditAmount : StripeEntity { /// /// The amount, in cents (or local equivalent), of the pretax credit amount. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long Amount { get; set; } #region Expandable CreditBalanceTransaction @@ -19,6 +28,9 @@ public class CreditNotePretaxCreditAmount : StripeEntity [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string CreditBalanceTransactionId { get => this.InternalCreditBalanceTransaction?.Id; @@ -32,6 +44,9 @@ public string CreditBalanceTransactionId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Billing.CreditBalanceTransaction CreditBalanceTransaction { get => this.InternalCreditBalanceTransaction?.ExpandedObject; @@ -40,6 +55,10 @@ public Billing.CreditBalanceTransaction CreditBalanceTransaction [JsonProperty("credit_balance_transaction")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("credit_balance_transaction")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalCreditBalanceTransaction { get; set; } #endregion @@ -50,6 +69,9 @@ public Billing.CreditBalanceTransaction CreditBalanceTransaction /// The discount that was applied to get this pretax credit amount. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string DiscountId { get => this.InternalDiscount?.Id; @@ -63,6 +85,9 @@ public string DiscountId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Discount Discount { get => this.InternalDiscount?.ExpandedObject; @@ -71,6 +96,10 @@ public Discount Discount [JsonProperty("discount")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discount")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalDiscount { get; set; } #endregion @@ -79,6 +108,9 @@ public Discount Discount /// One of: credit_balance_transaction, or discount. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/CreditNotes/CreditNoteShippingCost.cs b/src/Stripe.net/Entities/CreditNotes/CreditNoteShippingCost.cs index a516f4eb45..273d10dd83 100644 --- a/src/Stripe.net/Entities/CreditNotes/CreditNoteShippingCost.cs +++ b/src/Stripe.net/Entities/CreditNotes/CreditNoteShippingCost.cs @@ -4,25 +4,40 @@ namespace Stripe using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class CreditNoteShippingCost : StripeEntity { /// /// Total shipping cost before any taxes are applied. /// [JsonProperty("amount_subtotal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_subtotal")] +#endif public long AmountSubtotal { get; set; } /// /// Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0. /// [JsonProperty("amount_tax")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_tax")] +#endif public long AmountTax { get; set; } /// /// Total shipping cost after taxes are applied. /// [JsonProperty("amount_total")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_total")] +#endif public long AmountTotal { get; set; } #region Expandable ShippingRate @@ -32,6 +47,9 @@ public class CreditNoteShippingCost : StripeEntity /// The ID of the ShippingRate for this invoice. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string ShippingRateId { get => this.InternalShippingRate?.Id; @@ -45,6 +63,9 @@ public string ShippingRateId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public ShippingRate ShippingRate { get => this.InternalShippingRate?.ExpandedObject; @@ -53,6 +74,10 @@ public ShippingRate ShippingRate [JsonProperty("shipping_rate")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping_rate")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalShippingRate { get; set; } #endregion @@ -60,6 +85,9 @@ public ShippingRate ShippingRate /// The taxes applied to the shipping rate. /// [JsonProperty("taxes")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("taxes")] +#endif public List Taxes { get; set; } } } diff --git a/src/Stripe.net/Entities/CreditNotes/CreditNoteShippingCostTax.cs b/src/Stripe.net/Entities/CreditNotes/CreditNoteShippingCostTax.cs index dcd0031fd1..ec424055dd 100644 --- a/src/Stripe.net/Entities/CreditNotes/CreditNoteShippingCostTax.cs +++ b/src/Stripe.net/Entities/CreditNotes/CreditNoteShippingCostTax.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CreditNoteShippingCostTax : StripeEntity { @@ -9,6 +12,9 @@ public class CreditNoteShippingCostTax : StripeEntity /// Amount of tax applied for this rate. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long Amount { get; set; } /// @@ -21,6 +27,9 @@ public class CreditNoteShippingCostTax : StripeEntity /// Related guide: Tax rates. /// [JsonProperty("rate")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("rate")] +#endif public TaxRate Rate { get; set; } /// @@ -33,12 +42,18 @@ public class CreditNoteShippingCostTax : StripeEntity /// standard_rated, taxable_basis_reduced, or zero_rated. /// [JsonProperty("taxability_reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("taxability_reason")] +#endif public string TaxabilityReason { get; set; } /// /// The amount on which tax is calculated, in cents (or local equivalent). /// [JsonProperty("taxable_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("taxable_amount")] +#endif public long? TaxableAmount { get; set; } } } diff --git a/src/Stripe.net/Entities/CreditNotes/CreditNoteTaxAmount.cs b/src/Stripe.net/Entities/CreditNotes/CreditNoteTaxAmount.cs index e5a47b6b4c..d6944cad90 100644 --- a/src/Stripe.net/Entities/CreditNotes/CreditNoteTaxAmount.cs +++ b/src/Stripe.net/Entities/CreditNotes/CreditNoteTaxAmount.cs @@ -3,19 +3,31 @@ namespace Stripe { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class CreditNoteTaxAmount : StripeEntity { /// /// The amount, in cents (or local equivalent), of the tax. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long Amount { get; set; } /// /// Whether this tax amount is inclusive or exclusive. /// [JsonProperty("inclusive")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("inclusive")] +#endif public bool Inclusive { get; set; } #region Expandable TaxRate @@ -25,6 +37,9 @@ public class CreditNoteTaxAmount : StripeEntity /// The tax rate that was applied to get this tax amount. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string TaxRateId { get => this.InternalTaxRate?.Id; @@ -38,6 +53,9 @@ public string TaxRateId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public TaxRate TaxRate { get => this.InternalTaxRate?.ExpandedObject; @@ -46,6 +64,10 @@ public TaxRate TaxRate [JsonProperty("tax_rate")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_rate")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalTaxRate { get; set; } #endregion @@ -59,12 +81,18 @@ public TaxRate TaxRate /// standard_rated, taxable_basis_reduced, or zero_rated. /// [JsonProperty("taxability_reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("taxability_reason")] +#endif public string TaxabilityReason { get; set; } /// /// The amount on which tax is calculated, in cents (or local equivalent). /// [JsonProperty("taxable_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("taxable_amount")] +#endif public long? TaxableAmount { get; set; } } } diff --git a/src/Stripe.net/Entities/CustomerBalanceTransactions/CustomerBalanceTransaction.cs b/src/Stripe.net/Entities/CustomerBalanceTransactions/CustomerBalanceTransaction.cs index 02f63d202c..71a7bed11c 100644 --- a/src/Stripe.net/Entities/CustomerBalanceTransactions/CustomerBalanceTransaction.cs +++ b/src/Stripe.net/Entities/CustomerBalanceTransactions/CustomerBalanceTransaction.cs @@ -5,6 +5,9 @@ namespace Stripe using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// Each customer has a Customer /// balance. /// +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class CustomerBalanceTransaction : StripeEntity, IHasId, IHasMetadata, IHasObject { /// /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// @@ -37,6 +49,9 @@ public class CustomerBalanceTransaction : StripeEntitybalance. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long Amount { get; set; } /// @@ -44,6 +59,10 @@ public class CustomerBalanceTransaction : StripeEntity [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; #region Expandable CreditNote @@ -53,6 +72,9 @@ public class CustomerBalanceTransaction : StripeEntity [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string CreditNoteId { get => this.InternalCreditNote?.Id; @@ -66,6 +88,9 @@ public string CreditNoteId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public CreditNote CreditNote { get => this.InternalCreditNote?.ExpandedObject; @@ -74,6 +99,10 @@ public CreditNote CreditNote [JsonProperty("credit_note")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("credit_note")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalCreditNote { get; set; } #endregion @@ -83,6 +112,9 @@ public CreditNote CreditNote /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } #region Expandable Customer @@ -92,6 +124,9 @@ public CreditNote CreditNote /// The ID of the customer the transaction belongs to. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string CustomerId { get => this.InternalCustomer?.Id; @@ -105,6 +140,9 @@ public string CustomerId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Customer Customer { get => this.InternalCustomer?.ExpandedObject; @@ -113,6 +151,10 @@ public Customer Customer [JsonProperty("customer")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalCustomer { get; set; } #endregion @@ -120,6 +162,9 @@ public Customer Customer /// An arbitrary string attached to the object. Often useful for displaying to users. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// @@ -128,6 +173,9 @@ public Customer Customer /// amount due on the customer's next invoice. /// [JsonProperty("ending_balance")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ending_balance")] +#endif public long EndingBalance { get; set; } #region Expandable Invoice @@ -137,6 +185,9 @@ public Customer Customer /// The ID of the invoice (if any) related to the transaction. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string InvoiceId { get => this.InternalInvoice?.Id; @@ -150,6 +201,9 @@ public string InvoiceId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Invoice Invoice { get => this.InternalInvoice?.ExpandedObject; @@ -158,6 +212,10 @@ public Invoice Invoice [JsonProperty("invoice")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("invoice")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalInvoice { get; set; } #endregion @@ -166,6 +224,9 @@ public Invoice Invoice /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// @@ -174,6 +235,9 @@ public Invoice Invoice /// object in a structured format. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -189,6 +253,9 @@ public Invoice Invoice /// unspent_receiver_credit. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/CustomerCashBalanceTransactions/CustomerCashBalanceTransaction.cs b/src/Stripe.net/Entities/CustomerCashBalanceTransactions/CustomerCashBalanceTransaction.cs index 9637c5ec32..23f6956900 100644 --- a/src/Stripe.net/Entities/CustomerCashBalanceTransactions/CustomerCashBalanceTransaction.cs +++ b/src/Stripe.net/Entities/CustomerCashBalanceTransactions/CustomerCashBalanceTransaction.cs @@ -4,6 +4,9 @@ namespace Stripe using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// Customers with certain payments enabled have a cash balance, representing funds that @@ -12,24 +15,39 @@ namespace Stripe /// This includes funding by the customer, allocation to payments, and refunds to the /// customer. /// +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class CustomerCashBalanceTransaction : StripeEntity, IHasId, IHasObject, IBalanceTransactionSource { /// /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } [JsonProperty("adjusted_for_overdraft")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("adjusted_for_overdraft")] +#endif public CustomerCashBalanceTransactionAdjustedForOverdraft AdjustedForOverdraft { get; set; } [JsonProperty("applied_to_payment")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("applied_to_payment")] +#endif public CustomerCashBalanceTransactionAppliedToPayment AppliedToPayment { get; set; } /// @@ -37,6 +55,10 @@ public class CustomerCashBalanceTransaction : StripeEntity [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -45,6 +67,9 @@ public class CustomerCashBalanceTransaction : StripeEntity. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } #region Expandable Customer @@ -54,6 +79,9 @@ public class CustomerCashBalanceTransaction : StripeEntity [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string CustomerId { get => this.InternalCustomer?.Id; @@ -67,6 +95,9 @@ public string CustomerId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Customer Customer { get => this.InternalCustomer?.ExpandedObject; @@ -75,6 +106,10 @@ public Customer Customer [JsonProperty("customer")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalCustomer { get; set; } #endregion @@ -84,9 +119,15 @@ public Customer Customer /// href="https://stripe.com/docs/currencies#zero-decimal">smallest currency unit. /// [JsonProperty("ending_balance")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ending_balance")] +#endif public long EndingBalance { get; set; } [JsonProperty("funded")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("funded")] +#endif public CustomerCashBalanceTransactionFunded Funded { get; set; } /// @@ -94,6 +135,9 @@ public Customer Customer /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// @@ -103,12 +147,21 @@ public Customer Customer /// represents funds being removed from the cash balance. /// [JsonProperty("net_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("net_amount")] +#endif public long NetAmount { get; set; } [JsonProperty("refunded_from_payment")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("refunded_from_payment")] +#endif public CustomerCashBalanceTransactionRefundedFromPayment RefundedFromPayment { get; set; } [JsonProperty("transferred_to_balance")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transferred_to_balance")] +#endif public CustomerCashBalanceTransactionTransferredToBalance TransferredToBalance { get; set; } /// @@ -121,9 +174,15 @@ public Customer Customer /// unapplied_from_payment. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } [JsonProperty("unapplied_from_payment")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unapplied_from_payment")] +#endif public CustomerCashBalanceTransactionUnappliedFromPayment UnappliedFromPayment { get; set; } } } diff --git a/src/Stripe.net/Entities/CustomerCashBalanceTransactions/CustomerCashBalanceTransactionAdjustedForOverdraft.cs b/src/Stripe.net/Entities/CustomerCashBalanceTransactions/CustomerCashBalanceTransactionAdjustedForOverdraft.cs index 7e8f130ec6..4a1bde8356 100644 --- a/src/Stripe.net/Entities/CustomerCashBalanceTransactions/CustomerCashBalanceTransactionAdjustedForOverdraft.cs +++ b/src/Stripe.net/Entities/CustomerCashBalanceTransactions/CustomerCashBalanceTransactionAdjustedForOverdraft.cs @@ -3,7 +3,13 @@ namespace Stripe { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class CustomerCashBalanceTransactionAdjustedForOverdraft : StripeEntity { #region Expandable BalanceTransaction @@ -14,6 +20,9 @@ public class CustomerCashBalanceTransactionAdjustedForOverdraft : StripeEntity that corresponds to funds taken out of your Stripe balance. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string BalanceTransactionId { get => this.InternalBalanceTransaction?.Id; @@ -28,6 +37,9 @@ public string BalanceTransactionId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public BalanceTransaction BalanceTransaction { get => this.InternalBalanceTransaction?.ExpandedObject; @@ -36,6 +48,10 @@ public BalanceTransaction BalanceTransaction [JsonProperty("balance_transaction")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("balance_transaction")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalBalanceTransaction { get; set; } #endregion @@ -48,6 +64,9 @@ public BalanceTransaction BalanceTransaction /// funds. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string LinkedTransactionId { get => this.InternalLinkedTransaction?.Id; @@ -63,6 +82,9 @@ public string LinkedTransactionId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public CustomerCashBalanceTransaction LinkedTransaction { get => this.InternalLinkedTransaction?.ExpandedObject; @@ -71,6 +93,10 @@ public CustomerCashBalanceTransaction LinkedTransaction [JsonProperty("linked_transaction")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("linked_transaction")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalLinkedTransaction { get; set; } #endregion } diff --git a/src/Stripe.net/Entities/CustomerCashBalanceTransactions/CustomerCashBalanceTransactionAppliedToPayment.cs b/src/Stripe.net/Entities/CustomerCashBalanceTransactions/CustomerCashBalanceTransactionAppliedToPayment.cs index a1cddc04fe..eb8dbec8cc 100644 --- a/src/Stripe.net/Entities/CustomerCashBalanceTransactions/CustomerCashBalanceTransactionAppliedToPayment.cs +++ b/src/Stripe.net/Entities/CustomerCashBalanceTransactions/CustomerCashBalanceTransactionAppliedToPayment.cs @@ -3,7 +3,13 @@ namespace Stripe { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class CustomerCashBalanceTransactionAppliedToPayment : StripeEntity { #region Expandable PaymentIntent @@ -14,6 +20,9 @@ public class CustomerCashBalanceTransactionAppliedToPayment : StripeEntity [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string PaymentIntentId { get => this.InternalPaymentIntent?.Id; @@ -28,6 +37,9 @@ public string PaymentIntentId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public PaymentIntent PaymentIntent { get => this.InternalPaymentIntent?.ExpandedObject; @@ -36,6 +48,10 @@ public PaymentIntent PaymentIntent [JsonProperty("payment_intent")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_intent")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalPaymentIntent { get; set; } #endregion } diff --git a/src/Stripe.net/Entities/CustomerCashBalanceTransactions/CustomerCashBalanceTransactionFunded.cs b/src/Stripe.net/Entities/CustomerCashBalanceTransactions/CustomerCashBalanceTransactionFunded.cs index 7f265d4d6d..de10cf44d4 100644 --- a/src/Stripe.net/Entities/CustomerCashBalanceTransactions/CustomerCashBalanceTransactionFunded.cs +++ b/src/Stripe.net/Entities/CustomerCashBalanceTransactions/CustomerCashBalanceTransactionFunded.cs @@ -2,10 +2,16 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CustomerCashBalanceTransactionFunded : StripeEntity { [JsonProperty("bank_transfer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_transfer")] +#endif public CustomerCashBalanceTransactionFundedBankTransfer BankTransfer { get; set; } } } diff --git a/src/Stripe.net/Entities/CustomerCashBalanceTransactions/CustomerCashBalanceTransactionFundedBankTransfer.cs b/src/Stripe.net/Entities/CustomerCashBalanceTransactions/CustomerCashBalanceTransactionFundedBankTransfer.cs index 3988b3e49b..2a608453c6 100644 --- a/src/Stripe.net/Entities/CustomerCashBalanceTransactions/CustomerCashBalanceTransactionFundedBankTransfer.cs +++ b/src/Stripe.net/Entities/CustomerCashBalanceTransactions/CustomerCashBalanceTransactionFundedBankTransfer.cs @@ -2,22 +2,37 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CustomerCashBalanceTransactionFundedBankTransfer : StripeEntity { [JsonProperty("eu_bank_transfer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("eu_bank_transfer")] +#endif public CustomerCashBalanceTransactionFundedBankTransferEuBankTransfer EuBankTransfer { get; set; } [JsonProperty("gb_bank_transfer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("gb_bank_transfer")] +#endif public CustomerCashBalanceTransactionFundedBankTransferGbBankTransfer GbBankTransfer { get; set; } [JsonProperty("jp_bank_transfer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("jp_bank_transfer")] +#endif public CustomerCashBalanceTransactionFundedBankTransferJpBankTransfer JpBankTransfer { get; set; } /// /// The user-supplied reference field on the bank transfer. /// [JsonProperty("reference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reference")] +#endif public string Reference { get; set; } /// @@ -28,9 +43,15 @@ public class CustomerCashBalanceTransactionFundedBankTransfer : StripeEntitymx_bank_transfer, or us_bank_transfer. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } [JsonProperty("us_bank_transfer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("us_bank_transfer")] +#endif public CustomerCashBalanceTransactionFundedBankTransferUsBankTransfer UsBankTransfer { get; set; } } } diff --git a/src/Stripe.net/Entities/CustomerCashBalanceTransactions/CustomerCashBalanceTransactionFundedBankTransferEuBankTransfer.cs b/src/Stripe.net/Entities/CustomerCashBalanceTransactions/CustomerCashBalanceTransactionFundedBankTransferEuBankTransfer.cs index 979d197768..b9d969e970 100644 --- a/src/Stripe.net/Entities/CustomerCashBalanceTransactions/CustomerCashBalanceTransactionFundedBankTransferEuBankTransfer.cs +++ b/src/Stripe.net/Entities/CustomerCashBalanceTransactions/CustomerCashBalanceTransactionFundedBankTransferEuBankTransfer.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CustomerCashBalanceTransactionFundedBankTransferEuBankTransfer : StripeEntity { @@ -9,18 +12,27 @@ public class CustomerCashBalanceTransactionFundedBankTransferEuBankTransfer : St /// The BIC of the bank of the sender of the funding. /// [JsonProperty("bic")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bic")] +#endif public string Bic { get; set; } /// /// The last 4 digits of the IBAN of the sender of the funding. /// [JsonProperty("iban_last4")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("iban_last4")] +#endif public string IbanLast4 { get; set; } /// /// The full name of the sender, as supplied by the sending bank. /// [JsonProperty("sender_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sender_name")] +#endif public string SenderName { get; set; } } } diff --git a/src/Stripe.net/Entities/CustomerCashBalanceTransactions/CustomerCashBalanceTransactionFundedBankTransferGbBankTransfer.cs b/src/Stripe.net/Entities/CustomerCashBalanceTransactions/CustomerCashBalanceTransactionFundedBankTransferGbBankTransfer.cs index 7754f1973d..93a2f36a2b 100644 --- a/src/Stripe.net/Entities/CustomerCashBalanceTransactions/CustomerCashBalanceTransactionFundedBankTransferGbBankTransfer.cs +++ b/src/Stripe.net/Entities/CustomerCashBalanceTransactions/CustomerCashBalanceTransactionFundedBankTransferGbBankTransfer.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CustomerCashBalanceTransactionFundedBankTransferGbBankTransfer : StripeEntity { @@ -9,18 +12,27 @@ public class CustomerCashBalanceTransactionFundedBankTransferGbBankTransfer : St /// The last 4 digits of the account number of the sender of the funding. /// [JsonProperty("account_number_last4")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_number_last4")] +#endif public string AccountNumberLast4 { get; set; } /// /// The full name of the sender, as supplied by the sending bank. /// [JsonProperty("sender_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sender_name")] +#endif public string SenderName { get; set; } /// /// The sort code of the bank of the sender of the funding. /// [JsonProperty("sort_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sort_code")] +#endif public string SortCode { get; set; } } } diff --git a/src/Stripe.net/Entities/CustomerCashBalanceTransactions/CustomerCashBalanceTransactionFundedBankTransferJpBankTransfer.cs b/src/Stripe.net/Entities/CustomerCashBalanceTransactions/CustomerCashBalanceTransactionFundedBankTransferJpBankTransfer.cs index 9315392911..5922dd0292 100644 --- a/src/Stripe.net/Entities/CustomerCashBalanceTransactions/CustomerCashBalanceTransactionFundedBankTransferJpBankTransfer.cs +++ b/src/Stripe.net/Entities/CustomerCashBalanceTransactions/CustomerCashBalanceTransactionFundedBankTransferJpBankTransfer.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CustomerCashBalanceTransactionFundedBankTransferJpBankTransfer : StripeEntity { @@ -9,18 +12,27 @@ public class CustomerCashBalanceTransactionFundedBankTransferJpBankTransfer : St /// The name of the bank of the sender of the funding. /// [JsonProperty("sender_bank")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sender_bank")] +#endif public string SenderBank { get; set; } /// /// The name of the bank branch of the sender of the funding. /// [JsonProperty("sender_branch")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sender_branch")] +#endif public string SenderBranch { get; set; } /// /// The full name of the sender, as supplied by the sending bank. /// [JsonProperty("sender_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sender_name")] +#endif public string SenderName { get; set; } } } diff --git a/src/Stripe.net/Entities/CustomerCashBalanceTransactions/CustomerCashBalanceTransactionFundedBankTransferUsBankTransfer.cs b/src/Stripe.net/Entities/CustomerCashBalanceTransactions/CustomerCashBalanceTransactionFundedBankTransferUsBankTransfer.cs index 14fccd4666..3c0566a2bb 100644 --- a/src/Stripe.net/Entities/CustomerCashBalanceTransactions/CustomerCashBalanceTransactionFundedBankTransferUsBankTransfer.cs +++ b/src/Stripe.net/Entities/CustomerCashBalanceTransactions/CustomerCashBalanceTransactionFundedBankTransferUsBankTransfer.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CustomerCashBalanceTransactionFundedBankTransferUsBankTransfer : StripeEntity { @@ -10,12 +13,18 @@ public class CustomerCashBalanceTransactionFundedBankTransferUsBankTransfer : St /// One of: ach, domestic_wire_us, or swift. /// [JsonProperty("network")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("network")] +#endif public string Network { get; set; } /// /// The full name of the sender, as supplied by the sending bank. /// [JsonProperty("sender_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sender_name")] +#endif public string SenderName { get; set; } } } diff --git a/src/Stripe.net/Entities/CustomerCashBalanceTransactions/CustomerCashBalanceTransactionRefundedFromPayment.cs b/src/Stripe.net/Entities/CustomerCashBalanceTransactions/CustomerCashBalanceTransactionRefundedFromPayment.cs index 42a80bc899..ae8851bd7f 100644 --- a/src/Stripe.net/Entities/CustomerCashBalanceTransactions/CustomerCashBalanceTransactionRefundedFromPayment.cs +++ b/src/Stripe.net/Entities/CustomerCashBalanceTransactions/CustomerCashBalanceTransactionRefundedFromPayment.cs @@ -3,7 +3,13 @@ namespace Stripe { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class CustomerCashBalanceTransactionRefundedFromPayment : StripeEntity { #region Expandable Refund @@ -14,6 +20,9 @@ public class CustomerCashBalanceTransactionRefundedFromPayment : StripeEntity [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string RefundId { get => this.InternalRefund?.Id; @@ -28,6 +37,9 @@ public string RefundId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Refund Refund { get => this.InternalRefund?.ExpandedObject; @@ -36,6 +48,10 @@ public Refund Refund [JsonProperty("refund")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("refund")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalRefund { get; set; } #endregion } diff --git a/src/Stripe.net/Entities/CustomerCashBalanceTransactions/CustomerCashBalanceTransactionTransferredToBalance.cs b/src/Stripe.net/Entities/CustomerCashBalanceTransactions/CustomerCashBalanceTransactionTransferredToBalance.cs index 5244dd2438..8b1f22bf00 100644 --- a/src/Stripe.net/Entities/CustomerCashBalanceTransactions/CustomerCashBalanceTransactionTransferredToBalance.cs +++ b/src/Stripe.net/Entities/CustomerCashBalanceTransactions/CustomerCashBalanceTransactionTransferredToBalance.cs @@ -3,7 +3,13 @@ namespace Stripe { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class CustomerCashBalanceTransactionTransferredToBalance : StripeEntity { #region Expandable BalanceTransaction @@ -14,6 +20,9 @@ public class CustomerCashBalanceTransactionTransferredToBalance : StripeEntity that corresponds to funds transferred to your Stripe balance. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string BalanceTransactionId { get => this.InternalBalanceTransaction?.Id; @@ -28,6 +37,9 @@ public string BalanceTransactionId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public BalanceTransaction BalanceTransaction { get => this.InternalBalanceTransaction?.ExpandedObject; @@ -36,6 +48,10 @@ public BalanceTransaction BalanceTransaction [JsonProperty("balance_transaction")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("balance_transaction")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalBalanceTransaction { get; set; } #endregion } diff --git a/src/Stripe.net/Entities/CustomerCashBalanceTransactions/CustomerCashBalanceTransactionUnappliedFromPayment.cs b/src/Stripe.net/Entities/CustomerCashBalanceTransactions/CustomerCashBalanceTransactionUnappliedFromPayment.cs index cc30632d72..2110e897ec 100644 --- a/src/Stripe.net/Entities/CustomerCashBalanceTransactions/CustomerCashBalanceTransactionUnappliedFromPayment.cs +++ b/src/Stripe.net/Entities/CustomerCashBalanceTransactions/CustomerCashBalanceTransactionUnappliedFromPayment.cs @@ -3,7 +3,13 @@ namespace Stripe { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class CustomerCashBalanceTransactionUnappliedFromPayment : StripeEntity { #region Expandable PaymentIntent @@ -14,6 +20,9 @@ public class CustomerCashBalanceTransactionUnappliedFromPayment : StripeEntity [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string PaymentIntentId { get => this.InternalPaymentIntent?.Id; @@ -28,6 +37,9 @@ public string PaymentIntentId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public PaymentIntent PaymentIntent { get => this.InternalPaymentIntent?.ExpandedObject; @@ -36,6 +48,10 @@ public PaymentIntent PaymentIntent [JsonProperty("payment_intent")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_intent")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalPaymentIntent { get; set; } #endregion } diff --git a/src/Stripe.net/Entities/CustomerSessions/CustomerSession.cs b/src/Stripe.net/Entities/CustomerSessions/CustomerSession.cs index 2272b8d30e..e9d8efd9c7 100644 --- a/src/Stripe.net/Entities/CustomerSessions/CustomerSession.cs +++ b/src/Stripe.net/Entities/CustomerSessions/CustomerSession.cs @@ -4,6 +4,9 @@ namespace Stripe using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// A Customer Session allows you to grant Stripe's frontend SDKs (like Stripe.js) @@ -17,12 +20,18 @@ namespace Stripe /// href="https://stripe.com/payment-links/buy-button#pass-an-existing-customer">Customer /// Session with the Buy Button. /// +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class CustomerSession : StripeEntity, IHasObject { /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// @@ -34,12 +43,18 @@ public class CustomerSession : StripeEntity, IHasObject /// Make sure that you have TLS enabled on any page that includes the client secret. /// [JsonProperty("client_secret")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("client_secret")] +#endif public string ClientSecret { get; set; } /// /// Configuration for the components supported by this Customer Session. /// [JsonProperty("components")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("components")] +#endif public CustomerSessionComponents Components { get; set; } /// @@ -47,6 +62,10 @@ public class CustomerSession : StripeEntity, IHasObject /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; #region Expandable Customer @@ -56,6 +75,9 @@ public class CustomerSession : StripeEntity, IHasObject /// The Customer the Customer Session was created for. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string CustomerId { get => this.InternalCustomer?.Id; @@ -69,6 +91,9 @@ public string CustomerId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Customer Customer { get => this.InternalCustomer?.ExpandedObject; @@ -77,6 +102,10 @@ public Customer Customer [JsonProperty("customer")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalCustomer { get; set; } #endregion @@ -85,6 +114,10 @@ public Customer Customer /// [JsonProperty("expires_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("expires_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime ExpiresAt { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -92,6 +125,9 @@ public Customer Customer /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } } } diff --git a/src/Stripe.net/Entities/CustomerSessions/CustomerSessionComponents.cs b/src/Stripe.net/Entities/CustomerSessions/CustomerSessionComponents.cs index df583fcfd6..6192c24efb 100644 --- a/src/Stripe.net/Entities/CustomerSessions/CustomerSessionComponents.cs +++ b/src/Stripe.net/Entities/CustomerSessions/CustomerSessionComponents.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CustomerSessionComponents : StripeEntity { @@ -9,18 +12,27 @@ public class CustomerSessionComponents : StripeEntity /// This hash contains whether the buy button is enabled. /// [JsonProperty("buy_button")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("buy_button")] +#endif public CustomerSessionComponentsBuyButton BuyButton { get; set; } /// /// This hash contains whether the Payment Element is enabled and the features it supports. /// [JsonProperty("payment_element")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_element")] +#endif public CustomerSessionComponentsPaymentElement PaymentElement { get; set; } /// /// This hash contains whether the pricing table is enabled. /// [JsonProperty("pricing_table")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("pricing_table")] +#endif public CustomerSessionComponentsPricingTable PricingTable { get; set; } } } diff --git a/src/Stripe.net/Entities/CustomerSessions/CustomerSessionComponentsBuyButton.cs b/src/Stripe.net/Entities/CustomerSessions/CustomerSessionComponentsBuyButton.cs index 5eaac587fb..d2538a261f 100644 --- a/src/Stripe.net/Entities/CustomerSessions/CustomerSessionComponentsBuyButton.cs +++ b/src/Stripe.net/Entities/CustomerSessions/CustomerSessionComponentsBuyButton.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CustomerSessionComponentsBuyButton : StripeEntity { @@ -9,6 +12,9 @@ public class CustomerSessionComponentsBuyButton : StripeEntity [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool Enabled { get; set; } } } diff --git a/src/Stripe.net/Entities/CustomerSessions/CustomerSessionComponentsPaymentElement.cs b/src/Stripe.net/Entities/CustomerSessions/CustomerSessionComponentsPaymentElement.cs index 5af436fcc2..70e1248286 100644 --- a/src/Stripe.net/Entities/CustomerSessions/CustomerSessionComponentsPaymentElement.cs +++ b/src/Stripe.net/Entities/CustomerSessions/CustomerSessionComponentsPaymentElement.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CustomerSessionComponentsPaymentElement : StripeEntity { @@ -9,12 +12,18 @@ public class CustomerSessionComponentsPaymentElement : StripeEntity [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool Enabled { get; set; } /// /// This hash defines whether the Payment Element supports certain features. /// [JsonProperty("features")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("features")] +#endif public CustomerSessionComponentsPaymentElementFeatures Features { get; set; } } } diff --git a/src/Stripe.net/Entities/CustomerSessions/CustomerSessionComponentsPaymentElementFeatures.cs b/src/Stripe.net/Entities/CustomerSessions/CustomerSessionComponentsPaymentElementFeatures.cs index c860bb944f..6368e3ad9c 100644 --- a/src/Stripe.net/Entities/CustomerSessions/CustomerSessionComponentsPaymentElementFeatures.cs +++ b/src/Stripe.net/Entities/CustomerSessions/CustomerSessionComponentsPaymentElementFeatures.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CustomerSessionComponentsPaymentElementFeatures : StripeEntity { @@ -18,6 +21,9 @@ public class CustomerSessionComponentsPaymentElementFeatures : StripeEntityalways, limited, or unspecified. /// [JsonProperty("payment_method_allow_redisplay_filters")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_allow_redisplay_filters")] +#endif public List PaymentMethodAllowRedisplayFilters { get; set; } /// @@ -26,6 +32,9 @@ public class CustomerSessionComponentsPaymentElementFeatures : StripeEntitydisabled, or enabled. /// [JsonProperty("payment_method_redisplay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_redisplay")] +#endif public string PaymentMethodRedisplay { get; set; } /// @@ -33,6 +42,9 @@ public class CustomerSessionComponentsPaymentElementFeatures : StripeEntity3. /// [JsonProperty("payment_method_redisplay_limit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_redisplay_limit")] +#endif public long? PaymentMethodRedisplayLimit { get; set; } /// @@ -47,6 +59,9 @@ public class CustomerSessionComponentsPaymentElementFeatures : StripeEntitydisabled, or enabled. /// [JsonProperty("payment_method_remove")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_remove")] +#endif public string PaymentMethodRemove { get; set; } /// @@ -62,6 +77,9 @@ public class CustomerSessionComponentsPaymentElementFeatures : StripeEntitydisabled, or enabled. /// [JsonProperty("payment_method_save")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_save")] +#endif public string PaymentMethodSave { get; set; } /// @@ -76,6 +94,9 @@ public class CustomerSessionComponentsPaymentElementFeatures : StripeEntityoff_session, or on_session. /// [JsonProperty("payment_method_save_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_save_usage")] +#endif public string PaymentMethodSaveUsage { get; set; } } } diff --git a/src/Stripe.net/Entities/CustomerSessions/CustomerSessionComponentsPricingTable.cs b/src/Stripe.net/Entities/CustomerSessions/CustomerSessionComponentsPricingTable.cs index 7ec8b017ac..c08a87682f 100644 --- a/src/Stripe.net/Entities/CustomerSessions/CustomerSessionComponentsPricingTable.cs +++ b/src/Stripe.net/Entities/CustomerSessions/CustomerSessionComponentsPricingTable.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CustomerSessionComponentsPricingTable : StripeEntity { @@ -9,6 +12,9 @@ public class CustomerSessionComponentsPricingTable : StripeEntity [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool Enabled { get; set; } } } diff --git a/src/Stripe.net/Entities/Customers/Customer.cs b/src/Stripe.net/Entities/Customers/Customer.cs index 18eec55004..67c9fda97c 100644 --- a/src/Stripe.net/Entities/Customers/Customer.cs +++ b/src/Stripe.net/Entities/Customers/Customer.cs @@ -5,6 +5,9 @@ namespace Stripe using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// This object represents a customer of your business. Use it to save payment and contact /// information, and track payments that belong to the same customer. /// +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class Customer : StripeEntity, IHasId, IHasMetadata, IHasObject { /// /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// /// The customer's address. /// [JsonProperty("address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address")] +#endif public Address Address { get; set; } /// @@ -40,6 +55,9 @@ public class Customer : StripeEntity, IHasId, IHasMetadata, IHasObject /// balance is only taken into account after invoices finalize. /// [JsonProperty("balance")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("balance")] +#endif public long Balance { get; set; } /// @@ -49,6 +67,9 @@ public class Customer : StripeEntity, IHasId, IHasMetadata, IHasObject /// payment intents manually or automatically. /// [JsonProperty("cash_balance")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cash_balance")] +#endif public CashBalance CashBalance { get; set; } /// @@ -56,6 +77,10 @@ public class Customer : StripeEntity, IHasId, IHasMetadata, IHasObject /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -63,6 +88,9 @@ public class Customer : StripeEntity, IHasId, IHasMetadata, IHasObject /// the customer can be charged in for recurring billing purposes. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } #region Expandable DefaultSource @@ -76,6 +104,9 @@ public class Customer : StripeEntity, IHasId, IHasMetadata, IHasObject /// field instead. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string DefaultSourceId { get => this.InternalDefaultSource?.Id; @@ -93,6 +124,9 @@ public string DefaultSourceId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public IPaymentSource DefaultSource { get => this.InternalDefaultSource?.ExpandedObject; @@ -101,6 +135,10 @@ public IPaymentSource DefaultSource [JsonProperty("default_source")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("default_source")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalDefaultSource { get; set; } #endregion @@ -108,6 +146,10 @@ public IPaymentSource DefaultSource /// Whether this object is deleted or not. /// [JsonProperty("deleted", NullValueHandling = NullValueHandling.Ignore)] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("deleted")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] +#endif public bool? Deleted { get; set; } /// @@ -126,24 +168,36 @@ public IPaymentSource DefaultSource /// field to false. /// [JsonProperty("delinquent")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("delinquent")] +#endif public bool? Delinquent { get; set; } /// /// An arbitrary string attached to the object. Often useful for displaying to users. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// /// Describes the current discount active on the customer, if there is one. /// [JsonProperty("discount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discount")] +#endif public Discount Discount { get; set; } /// /// The customer's email address. /// [JsonProperty("email")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("email")] +#endif public string Email { get; set; } /// @@ -156,15 +210,24 @@ public IPaymentSource DefaultSource /// in the same currency) finalizes. /// [JsonProperty("invoice_credit_balance")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("invoice_credit_balance")] +#endif public Dictionary InvoiceCreditBalance { get; set; } /// /// The prefix for the customer used to generate unique invoice numbers. /// [JsonProperty("invoice_prefix")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("invoice_prefix")] +#endif public string InvoicePrefix { get; set; } [JsonProperty("invoice_settings")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("invoice_settings")] +#endif public CustomerInvoiceSettings InvoiceSettings { get; set; } /// @@ -172,6 +235,9 @@ public IPaymentSource DefaultSource /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// @@ -180,12 +246,18 @@ public IPaymentSource DefaultSource /// object in a structured format. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// The customer's full name or business name. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } /// @@ -194,18 +266,27 @@ public IPaymentSource DefaultSource /// omitted in API responses. /// [JsonProperty("next_invoice_sequence")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("next_invoice_sequence")] +#endif public long NextInvoiceSequence { get; set; } /// /// The customer's phone number. /// [JsonProperty("phone")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("phone")] +#endif public string Phone { get; set; } /// /// The customer's preferred locales (languages), ordered by preference. /// [JsonProperty("preferred_locales")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preferred_locales")] +#endif public List PreferredLocales { get; set; } /// @@ -213,21 +294,33 @@ public IPaymentSource DefaultSource /// customer. /// [JsonProperty("shipping")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping")] +#endif public Shipping Shipping { get; set; } /// /// The customer's payment sources, if any. /// [JsonProperty("sources")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sources")] +#endif public StripeList Sources { get; set; } /// /// The customer's current subscriptions, if any. /// [JsonProperty("subscriptions")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("subscriptions")] +#endif public StripeList Subscriptions { get; set; } [JsonProperty("tax")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax")] +#endif public CustomerTax Tax { get; set; } /// @@ -237,12 +330,18 @@ public IPaymentSource DefaultSource /// One of: exempt, none, or reverse. /// [JsonProperty("tax_exempt")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_exempt")] +#endif public string TaxExempt { get; set; } /// /// The customer's tax IDs. /// [JsonProperty("tax_ids")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_ids")] +#endif public StripeList TaxIds { get; set; } #region Expandable TestClock @@ -252,6 +351,9 @@ public IPaymentSource DefaultSource /// ID of the test clock that this customer belongs to. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string TestClockId { get => this.InternalTestClock?.Id; @@ -265,6 +367,9 @@ public string TestClockId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public TestHelpers.TestClock TestClock { get => this.InternalTestClock?.ExpandedObject; @@ -273,6 +378,10 @@ public TestHelpers.TestClock TestClock [JsonProperty("test_clock")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("test_clock")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalTestClock { get; set; } #endregion } diff --git a/src/Stripe.net/Entities/Customers/CustomerInvoiceSettings.cs b/src/Stripe.net/Entities/Customers/CustomerInvoiceSettings.cs index c8088a56fc..6bd8deacae 100644 --- a/src/Stripe.net/Entities/Customers/CustomerInvoiceSettings.cs +++ b/src/Stripe.net/Entities/Customers/CustomerInvoiceSettings.cs @@ -4,13 +4,22 @@ namespace Stripe using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class CustomerInvoiceSettings : StripeEntity { /// /// Default custom fields to be displayed on invoices for this customer. /// [JsonProperty("custom_fields")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("custom_fields")] +#endif public List CustomFields { get; set; } #region Expandable DefaultPaymentMethod @@ -21,6 +30,9 @@ public class CustomerInvoiceSettings : StripeEntity /// default payment method for subscriptions and invoices. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string DefaultPaymentMethodId { get => this.InternalDefaultPaymentMethod?.Id; @@ -35,6 +47,9 @@ public string DefaultPaymentMethodId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public PaymentMethod DefaultPaymentMethod { get => this.InternalDefaultPaymentMethod?.ExpandedObject; @@ -43,6 +58,10 @@ public PaymentMethod DefaultPaymentMethod [JsonProperty("default_payment_method")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("default_payment_method")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalDefaultPaymentMethod { get; set; } #endregion @@ -50,12 +69,18 @@ public PaymentMethod DefaultPaymentMethod /// Default footer to be displayed on invoices for this customer. /// [JsonProperty("footer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("footer")] +#endif public string Footer { get; set; } /// /// Default options for invoice PDF rendering for this customer. /// [JsonProperty("rendering_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("rendering_options")] +#endif public CustomerInvoiceSettingsRenderingOptions RenderingOptions { get; set; } } } diff --git a/src/Stripe.net/Entities/Customers/CustomerInvoiceSettingsCustomField.cs b/src/Stripe.net/Entities/Customers/CustomerInvoiceSettingsCustomField.cs index cbb80f457f..1b29d6d192 100644 --- a/src/Stripe.net/Entities/Customers/CustomerInvoiceSettingsCustomField.cs +++ b/src/Stripe.net/Entities/Customers/CustomerInvoiceSettingsCustomField.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CustomerInvoiceSettingsCustomField : StripeEntity { @@ -9,12 +12,18 @@ public class CustomerInvoiceSettingsCustomField : StripeEntity [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } /// /// The value of the custom field. /// [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public string Value { get; set; } } } diff --git a/src/Stripe.net/Entities/Customers/CustomerInvoiceSettingsRenderingOptions.cs b/src/Stripe.net/Entities/Customers/CustomerInvoiceSettingsRenderingOptions.cs index 87a9a42483..aa126e2bcd 100644 --- a/src/Stripe.net/Entities/Customers/CustomerInvoiceSettingsRenderingOptions.cs +++ b/src/Stripe.net/Entities/Customers/CustomerInvoiceSettingsRenderingOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CustomerInvoiceSettingsRenderingOptions : StripeEntity { @@ -9,6 +12,9 @@ public class CustomerInvoiceSettingsRenderingOptions : StripeEntity [JsonProperty("amount_tax_display")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_tax_display")] +#endif public string AmountTaxDisplay { get; set; } /// @@ -17,6 +23,9 @@ public class CustomerInvoiceSettingsRenderingOptions : StripeEntity [JsonProperty("template")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("template")] +#endif public string Template { get; set; } } } diff --git a/src/Stripe.net/Entities/Customers/CustomerTax.cs b/src/Stripe.net/Entities/Customers/CustomerTax.cs index 135fe61a4c..af1c2d8073 100644 --- a/src/Stripe.net/Entities/Customers/CustomerTax.cs +++ b/src/Stripe.net/Entities/Customers/CustomerTax.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CustomerTax : StripeEntity { @@ -12,18 +15,27 @@ public class CustomerTax : StripeEntity /// unrecognized_location. /// [JsonProperty("automatic_tax")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("automatic_tax")] +#endif public string AutomaticTax { get; set; } /// /// A recent IP address of the customer used for tax reporting and tax location inference. /// [JsonProperty("ip_address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ip_address")] +#endif public string IpAddress { get; set; } /// /// The customer's location as identified by Stripe Tax. /// [JsonProperty("location")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("location")] +#endif public CustomerTaxLocation Location { get; set; } } } diff --git a/src/Stripe.net/Entities/Customers/CustomerTaxLocation.cs b/src/Stripe.net/Entities/Customers/CustomerTaxLocation.cs index 108585c35c..d181d3ed15 100644 --- a/src/Stripe.net/Entities/Customers/CustomerTaxLocation.cs +++ b/src/Stripe.net/Entities/Customers/CustomerTaxLocation.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CustomerTaxLocation : StripeEntity { @@ -9,6 +12,9 @@ public class CustomerTaxLocation : StripeEntity /// The customer's country as identified by Stripe Tax. /// [JsonProperty("country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country")] +#endif public string Country { get; set; } /// @@ -17,12 +23,18 @@ public class CustomerTaxLocation : StripeEntity /// shipping_destination. /// [JsonProperty("source")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("source")] +#endif public string Source { get; set; } /// /// The customer's state, county, province, or region as identified by Stripe Tax. /// [JsonProperty("state")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("state")] +#endif public string State { get; set; } } } diff --git a/src/Stripe.net/Entities/Discounts/Discount.cs b/src/Stripe.net/Entities/Discounts/Discount.cs index 64fea7e110..1644d02ac0 100644 --- a/src/Stripe.net/Entities/Discounts/Discount.cs +++ b/src/Stripe.net/Entities/Discounts/Discount.cs @@ -4,6 +4,9 @@ namespace Stripe using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// A discount represents the actual application of a Applying discounts to /// subscriptions. /// +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class Discount : StripeEntity, IHasId, IHasObject { /// @@ -22,12 +28,18 @@ public class Discount : StripeEntity, IHasId, IHasObject /// expand[]=discounts in API calls to expand discount IDs in an array. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// @@ -35,6 +47,9 @@ public class Discount : StripeEntity, IHasId, IHasObject /// session in payment mode. Will not be present for subscription mode. /// [JsonProperty("checkout_session")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("checkout_session")] +#endif public string CheckoutSession { get; set; } /// @@ -48,6 +63,9 @@ public class Discount : StripeEntity, IHasId, IHasObject /// payment intents. /// [JsonProperty("coupon")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("coupon")] +#endif public Coupon Coupon { get; set; } #region Expandable Customer @@ -57,6 +75,9 @@ public class Discount : StripeEntity, IHasId, IHasObject /// The ID of the customer associated with this discount. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string CustomerId { get => this.InternalCustomer?.Id; @@ -70,6 +91,9 @@ public string CustomerId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Customer Customer { get => this.InternalCustomer?.ExpandedObject; @@ -78,6 +102,10 @@ public Customer Customer [JsonProperty("customer")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalCustomer { get; set; } #endregion @@ -85,6 +113,10 @@ public Customer Customer /// Whether this object is deleted or not. /// [JsonProperty("deleted", NullValueHandling = NullValueHandling.Ignore)] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("deleted")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] +#endif public bool? Deleted { get; set; } /// @@ -94,6 +126,10 @@ public Customer Customer /// [JsonProperty("end")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("end")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? End { get; set; } /// @@ -101,6 +137,9 @@ public Customer Customer /// particular invoice. /// [JsonProperty("invoice")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("invoice")] +#endif public string Invoice { get; set; } /// @@ -109,6 +148,9 @@ public Customer Customer /// directly to a particular invoice item or invoice line item. /// [JsonProperty("invoice_item")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("invoice_item")] +#endif public string InvoiceItem { get; set; } #region Expandable PromotionCode @@ -118,6 +160,9 @@ public Customer Customer /// The promotion code applied to create this discount. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string PromotionCodeId { get => this.InternalPromotionCode?.Id; @@ -131,6 +176,9 @@ public string PromotionCodeId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public PromotionCode PromotionCode { get => this.InternalPromotionCode?.ExpandedObject; @@ -139,6 +187,10 @@ public PromotionCode PromotionCode [JsonProperty("promotion_code")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("promotion_code")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalPromotionCode { get; set; } #endregion @@ -147,6 +199,10 @@ public PromotionCode PromotionCode /// [JsonProperty("start")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("start")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Start { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -154,6 +210,9 @@ public PromotionCode PromotionCode /// subscription. /// [JsonProperty("subscription")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("subscription")] +#endif public string Subscription { get; set; } /// @@ -161,6 +220,9 @@ public PromotionCode PromotionCode /// subscription item. /// [JsonProperty("subscription_item")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("subscription_item")] +#endif public string SubscriptionItem { get; set; } } } diff --git a/src/Stripe.net/Entities/Disputes/Dispute.cs b/src/Stripe.net/Entities/Disputes/Dispute.cs index 24735c78c4..7d025a3db0 100644 --- a/src/Stripe.net/Entities/Disputes/Dispute.cs +++ b/src/Stripe.net/Entities/Disputes/Dispute.cs @@ -5,6 +5,9 @@ namespace Stripe using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// A dispute occurs when a customer questions your charge with their card issuer. When this @@ -13,18 +16,27 @@ namespace Stripe /// /// Related guide: Disputes and fraud. /// +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class Dispute : StripeEntity, IHasId, IHasMetadata, IHasObject, IBalanceTransactionSource { /// /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// @@ -32,6 +44,9 @@ public class Dispute : StripeEntity, IHasId, IHasMetadata, IHasObject, /// currency fluctuation or because only part of the order is disputed). /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long Amount { get; set; } /// @@ -39,6 +54,9 @@ public class Dispute : StripeEntity, IHasId, IHasMetadata, IHasObject, /// to your Stripe account as a result of this dispute. /// [JsonProperty("balance_transactions")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("balance_transactions")] +#endif public List BalanceTransactions { get; set; } #region Expandable Charge @@ -48,6 +66,9 @@ public class Dispute : StripeEntity, IHasId, IHasMetadata, IHasObject, /// ID of the charge that's disputed. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string ChargeId { get => this.InternalCharge?.Id; @@ -61,6 +82,9 @@ public string ChargeId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Charge Charge { get => this.InternalCharge?.ExpandedObject; @@ -69,6 +93,10 @@ public Charge Charge [JsonProperty("charge")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("charge")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalCharge { get; set; } #endregion @@ -77,6 +105,10 @@ public Charge Charge /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -85,18 +117,30 @@ public Charge Charge /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// /// List of eligibility types that are included in enhanced_evidence. /// [JsonProperty("enhanced_eligibility_types")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enhanced_eligibility_types")] +#endif public List EnhancedEligibilityTypes { get; set; } [JsonProperty("evidence")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("evidence")] +#endif public DisputeEvidence Evidence { get; set; } [JsonProperty("evidence_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("evidence_details")] +#endif public DisputeEvidenceDetails EvidenceDetails { get; set; } /// @@ -105,6 +149,9 @@ public Charge Charge /// this dispute. /// [JsonProperty("is_charge_refundable")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("is_charge_refundable")] +#endif public bool IsChargeRefundable { get; set; } /// @@ -112,6 +159,9 @@ public Charge Charge /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// @@ -120,12 +170,18 @@ public Charge Charge /// object in a structured format. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// Network-dependent reason code for the dispute. /// [JsonProperty("network_reason_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("network_reason_code")] +#endif public string NetworkReasonCode { get; set; } #region Expandable PaymentIntent @@ -135,6 +191,9 @@ public Charge Charge /// ID of the PaymentIntent that's disputed. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string PaymentIntentId { get => this.InternalPaymentIntent?.Id; @@ -148,6 +207,9 @@ public string PaymentIntentId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public PaymentIntent PaymentIntent { get => this.InternalPaymentIntent?.ExpandedObject; @@ -156,10 +218,17 @@ public PaymentIntent PaymentIntent [JsonProperty("payment_intent")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_intent")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalPaymentIntent { get; set; } #endregion [JsonProperty("payment_method_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_details")] +#endif public DisputePaymentMethodDetails PaymentMethodDetails { get; set; } /// @@ -172,6 +241,9 @@ public PaymentIntent PaymentIntent /// href="https://stripe.com/docs/disputes/categories">dispute reasons. /// [JsonProperty("reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reason")] +#endif public string Reason { get; set; } /// @@ -182,6 +254,9 @@ public PaymentIntent PaymentIntent /// warning_needs_response, warning_under_review, or won. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } } } diff --git a/src/Stripe.net/Entities/Disputes/DisputeEvidence.cs b/src/Stripe.net/Entities/Disputes/DisputeEvidence.cs index 4905e95649..ca5dbdf7eb 100644 --- a/src/Stripe.net/Entities/Disputes/DisputeEvidence.cs +++ b/src/Stripe.net/Entities/Disputes/DisputeEvidence.cs @@ -3,7 +3,13 @@ namespace Stripe { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class DisputeEvidence : StripeEntity { /// @@ -12,12 +18,18 @@ public class DisputeEvidence : StripeEntity /// timestamps, and any detailed recorded activity. /// [JsonProperty("access_activity_log")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("access_activity_log")] +#endif public string AccessActivityLog { get; set; } /// /// The billing address provided by the customer. /// [JsonProperty("billing_address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_address")] +#endif public string BillingAddress { get; set; } #region Expandable CancellationPolicy @@ -28,6 +40,9 @@ public class DisputeEvidence : StripeEntity /// subscription cancellation policy, as shown to the customer. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string CancellationPolicyId { get => this.InternalCancellationPolicy?.Id; @@ -42,6 +57,9 @@ public string CancellationPolicyId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public File CancellationPolicy { get => this.InternalCancellationPolicy?.ExpandedObject; @@ -50,6 +68,10 @@ public File CancellationPolicy [JsonProperty("cancellation_policy")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cancellation_policy")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalCancellationPolicy { get; set; } #endregion @@ -58,12 +80,18 @@ public File CancellationPolicy /// purchase. /// [JsonProperty("cancellation_policy_disclosure")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cancellation_policy_disclosure")] +#endif public string CancellationPolicyDisclosure { get; set; } /// /// A justification for why the customer's subscription was not canceled. /// [JsonProperty("cancellation_rebuttal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cancellation_rebuttal")] +#endif public string CancellationRebuttal { get; set; } #region Expandable CustomerCommunication @@ -76,6 +104,9 @@ public File CancellationPolicy /// use of or satisfaction with the product or service. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string CustomerCommunicationId { get => this.InternalCustomerCommunication?.Id; @@ -92,6 +123,9 @@ public string CustomerCommunicationId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public File CustomerCommunication { get => this.InternalCustomerCommunication?.ExpandedObject; @@ -100,6 +134,10 @@ public File CustomerCommunication [JsonProperty("customer_communication")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_communication")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalCustomerCommunication { get; set; } #endregion @@ -107,18 +145,27 @@ public File CustomerCommunication /// The email address of the customer. /// [JsonProperty("customer_email_address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_email_address")] +#endif public string CustomerEmailAddress { get; set; } /// /// The name of the customer. /// [JsonProperty("customer_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_name")] +#endif public string CustomerName { get; set; } /// /// The IP address that the customer used when making the purchase. /// [JsonProperty("customer_purchase_ip")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_purchase_ip")] +#endif public string CustomerPurchaseIp { get; set; } #region Expandable CustomerSignature @@ -129,6 +176,9 @@ public File CustomerCommunication /// relevant document or contract showing the customer's signature. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string CustomerSignatureId { get => this.InternalCustomerSignature?.Id; @@ -143,6 +193,9 @@ public string CustomerSignatureId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public File CustomerSignature { get => this.InternalCustomerSignature?.ExpandedObject; @@ -151,6 +204,10 @@ public File CustomerSignature [JsonProperty("customer_signature")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_signature")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalCustomerSignature { get; set; } #endregion @@ -164,6 +221,9 @@ public File CustomerSignature /// document from the disputed payment that proves the two payments are separate. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string DuplicateChargeDocumentationId { get => this.InternalDuplicateChargeDocumentation?.Id; @@ -180,6 +240,9 @@ public string DuplicateChargeDocumentationId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public File DuplicateChargeDocumentation { get => this.InternalDuplicateChargeDocumentation?.ExpandedObject; @@ -188,6 +251,10 @@ public File DuplicateChargeDocumentation [JsonProperty("duplicate_charge_documentation")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("duplicate_charge_documentation")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalDuplicateChargeDocumentation { get; set; } #endregion @@ -196,6 +263,9 @@ public File DuplicateChargeDocumentation /// that appears to be a duplicate. /// [JsonProperty("duplicate_charge_explanation")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("duplicate_charge_explanation")] +#endif public string DuplicateChargeExplanation { get; set; } /// @@ -203,15 +273,24 @@ public File DuplicateChargeDocumentation /// charge. /// [JsonProperty("duplicate_charge_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("duplicate_charge_id")] +#endif public string DuplicateChargeId { get; set; } [JsonProperty("enhanced_evidence")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enhanced_evidence")] +#endif public DisputeEvidenceEnhancedEvidence EnhancedEvidence { get; set; } /// /// A description of the product or service that was sold. /// [JsonProperty("product_description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("product_description")] +#endif public string ProductDescription { get; set; } #region Expandable Receipt @@ -222,6 +301,9 @@ public File DuplicateChargeDocumentation /// receipt or message sent to the customer notifying them of the charge. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string ReceiptId { get => this.InternalReceipt?.Id; @@ -236,6 +318,9 @@ public string ReceiptId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public File Receipt { get => this.InternalReceipt?.ExpandedObject; @@ -244,6 +329,10 @@ public File Receipt [JsonProperty("receipt")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("receipt")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalReceipt { get; set; } #endregion @@ -255,6 +344,9 @@ public File Receipt /// refund policy, as shown to the customer. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string RefundPolicyId { get => this.InternalRefundPolicy?.Id; @@ -269,6 +361,9 @@ public string RefundPolicyId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public File RefundPolicy { get => this.InternalRefundPolicy?.ExpandedObject; @@ -277,6 +372,10 @@ public File RefundPolicy [JsonProperty("refund_policy")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("refund_policy")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalRefundPolicy { get; set; } #endregion @@ -285,12 +384,18 @@ public File RefundPolicy /// purchase. /// [JsonProperty("refund_policy_disclosure")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("refund_policy_disclosure")] +#endif public string RefundPolicyDisclosure { get; set; } /// /// A justification for why the customer is not entitled to a refund. /// [JsonProperty("refund_refusal_explanation")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("refund_refusal_explanation")] +#endif public string RefundRefusalExplanation { get; set; } /// @@ -298,6 +403,9 @@ public File RefundPolicy /// clear human-readable format. /// [JsonProperty("service_date")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("service_date")] +#endif public string ServiceDate { get; set; } #region Expandable ServiceDocumentation @@ -309,6 +417,9 @@ public File RefundPolicy /// include a copy of a signed contract, work order, or other form of written agreement. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string ServiceDocumentationId { get => this.InternalServiceDocumentation?.Id; @@ -324,6 +435,9 @@ public string ServiceDocumentationId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public File ServiceDocumentation { get => this.InternalServiceDocumentation?.ExpandedObject; @@ -332,6 +446,10 @@ public File ServiceDocumentation [JsonProperty("service_documentation")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("service_documentation")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalServiceDocumentation { get; set; } #endregion @@ -340,6 +458,9 @@ public File ServiceDocumentation /// complete address information as possible. /// [JsonProperty("shipping_address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping_address")] +#endif public string ShippingAddress { get; set; } /// @@ -347,6 +468,9 @@ public File ServiceDocumentation /// multiple carriers were used for this purchase, please separate them with commas. /// [JsonProperty("shipping_carrier")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping_carrier")] +#endif public string ShippingCarrier { get; set; } /// @@ -354,6 +478,9 @@ public File ServiceDocumentation /// human-readable format. /// [JsonProperty("shipping_date")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping_date")] +#endif public string ShippingDate { get; set; } #region Expandable ShippingDocumentation @@ -366,6 +493,9 @@ public File ServiceDocumentation /// shipping label, etc. It should show the customer's full shipping address, if possible. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string ShippingDocumentationId { get => this.InternalShippingDocumentation?.Id; @@ -382,6 +512,9 @@ public string ShippingDocumentationId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public File ShippingDocumentation { get => this.InternalShippingDocumentation?.ExpandedObject; @@ -390,6 +523,10 @@ public File ShippingDocumentation [JsonProperty("shipping_documentation")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping_documentation")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalShippingDocumentation { get; set; } #endregion @@ -399,6 +536,9 @@ public File ShippingDocumentation /// commas. /// [JsonProperty("shipping_tracking_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping_tracking_number")] +#endif public string ShippingTrackingNumber { get; set; } #region Expandable UncategorizedFile @@ -409,6 +549,9 @@ public File ShippingDocumentation /// additional evidence or statements. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string UncategorizedFileId { get => this.InternalUncategorizedFile?.Id; @@ -423,6 +566,9 @@ public string UncategorizedFileId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public File UncategorizedFile { get => this.InternalUncategorizedFile?.ExpandedObject; @@ -431,6 +577,10 @@ public File UncategorizedFile [JsonProperty("uncategorized_file")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("uncategorized_file")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalUncategorizedFile { get; set; } #endregion @@ -438,6 +588,9 @@ public File UncategorizedFile /// Any additional evidence or statements. /// [JsonProperty("uncategorized_text")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("uncategorized_text")] +#endif public string UncategorizedText { get; set; } } } diff --git a/src/Stripe.net/Entities/Disputes/DisputeEvidenceDetails.cs b/src/Stripe.net/Entities/Disputes/DisputeEvidenceDetails.cs index bbb4af4bb5..17fd76f96c 100644 --- a/src/Stripe.net/Entities/Disputes/DisputeEvidenceDetails.cs +++ b/src/Stripe.net/Entities/Disputes/DisputeEvidenceDetails.cs @@ -4,6 +4,9 @@ namespace Stripe using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class DisputeEvidenceDetails : StripeEntity { @@ -14,15 +17,25 @@ public class DisputeEvidenceDetails : StripeEntity /// [JsonProperty("due_by")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("due_by")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? DueBy { get; set; } [JsonProperty("enhanced_eligibility")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enhanced_eligibility")] +#endif public DisputeEvidenceDetailsEnhancedEligibility EnhancedEligibility { get; set; } /// /// Whether evidence has been staged for this dispute. /// [JsonProperty("has_evidence")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("has_evidence")] +#endif public bool HasEvidence { get; set; } /// @@ -31,6 +44,9 @@ public class DisputeEvidenceDetails : StripeEntity /// the latest evidence is not guaranteed. /// [JsonProperty("past_due")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("past_due")] +#endif public bool PastDue { get; set; } /// @@ -38,6 +54,9 @@ public class DisputeEvidenceDetails : StripeEntity /// once. /// [JsonProperty("submission_count")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("submission_count")] +#endif public long SubmissionCount { get; set; } } } diff --git a/src/Stripe.net/Entities/Disputes/DisputeEvidenceDetailsEnhancedEligibility.cs b/src/Stripe.net/Entities/Disputes/DisputeEvidenceDetailsEnhancedEligibility.cs index 3bfc24316b..20207e41cb 100644 --- a/src/Stripe.net/Entities/Disputes/DisputeEvidenceDetailsEnhancedEligibility.cs +++ b/src/Stripe.net/Entities/Disputes/DisputeEvidenceDetailsEnhancedEligibility.cs @@ -2,10 +2,16 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class DisputeEvidenceDetailsEnhancedEligibility : StripeEntity { [JsonProperty("visa_compelling_evidence_3")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("visa_compelling_evidence_3")] +#endif public DisputeEvidenceDetailsEnhancedEligibilityVisaCompellingEvidence3 VisaCompellingEvidence3 { get; set; } } } diff --git a/src/Stripe.net/Entities/Disputes/DisputeEvidenceDetailsEnhancedEligibilityVisaCompellingEvidence3.cs b/src/Stripe.net/Entities/Disputes/DisputeEvidenceDetailsEnhancedEligibilityVisaCompellingEvidence3.cs index 4a24211d32..e745535829 100644 --- a/src/Stripe.net/Entities/Disputes/DisputeEvidenceDetailsEnhancedEligibilityVisaCompellingEvidence3.cs +++ b/src/Stripe.net/Entities/Disputes/DisputeEvidenceDetailsEnhancedEligibilityVisaCompellingEvidence3.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class DisputeEvidenceDetailsEnhancedEligibilityVisaCompellingEvidence3 : StripeEntity { @@ -15,6 +18,9 @@ public class DisputeEvidenceDetailsEnhancedEligibilityVisaCompellingEvidence3 : /// missing_prior_undisputed_transactions. /// [JsonProperty("required_actions")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("required_actions")] +#endif public List RequiredActions { get; set; } /// @@ -22,6 +28,9 @@ public class DisputeEvidenceDetailsEnhancedEligibilityVisaCompellingEvidence3 : /// One of: not_qualified, qualified, or requires_action. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } } } diff --git a/src/Stripe.net/Entities/Disputes/DisputeEvidenceEnhancedEvidence.cs b/src/Stripe.net/Entities/Disputes/DisputeEvidenceEnhancedEvidence.cs index 08abb032d7..aebecbf585 100644 --- a/src/Stripe.net/Entities/Disputes/DisputeEvidenceEnhancedEvidence.cs +++ b/src/Stripe.net/Entities/Disputes/DisputeEvidenceEnhancedEvidence.cs @@ -2,10 +2,16 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class DisputeEvidenceEnhancedEvidence : StripeEntity { [JsonProperty("visa_compelling_evidence_3")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("visa_compelling_evidence_3")] +#endif public DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3 VisaCompellingEvidence3 { get; set; } } } diff --git a/src/Stripe.net/Entities/Disputes/DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3.cs b/src/Stripe.net/Entities/Disputes/DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3.cs index fc7e5e6de5..8a1a967e1d 100644 --- a/src/Stripe.net/Entities/Disputes/DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3.cs +++ b/src/Stripe.net/Entities/Disputes/DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3 : StripeEntity { @@ -10,6 +13,9 @@ public class DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3 : StripeEnti /// Disputed transaction details for Visa Compelling Evidence 3.0 evidence submission. /// [JsonProperty("disputed_transaction")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("disputed_transaction")] +#endif public DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransaction DisputedTransaction { get; set; } /// @@ -17,6 +23,9 @@ public class DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3 : StripeEnti /// 3.0 evidence submission. /// [JsonProperty("prior_undisputed_transactions")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("prior_undisputed_transactions")] +#endif public List PriorUndisputedTransactions { get; set; } } } diff --git a/src/Stripe.net/Entities/Disputes/DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransaction.cs b/src/Stripe.net/Entities/Disputes/DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransaction.cs index f9fba90085..1c9c856c0f 100644 --- a/src/Stripe.net/Entities/Disputes/DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransaction.cs +++ b/src/Stripe.net/Entities/Disputes/DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransaction.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransaction : StripeEntity { @@ -9,6 +12,9 @@ public class DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTrans /// User Account ID used to log into business platform. Must be recognizable by the user. /// [JsonProperty("customer_account_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_account_id")] +#endif public string CustomerAccountId { get; set; } /// @@ -16,6 +22,9 @@ public class DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTrans /// hardware and software attributes. Must be at least 20 characters. /// [JsonProperty("customer_device_fingerprint")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_device_fingerprint")] +#endif public string CustomerDeviceFingerprint { get; set; } /// @@ -23,18 +32,27 @@ public class DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTrans /// International Mobile Equipment Identity [IMEI]). Must be at least 15 characters. /// [JsonProperty("customer_device_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_device_id")] +#endif public string CustomerDeviceId { get; set; } /// /// The email address of the customer. /// [JsonProperty("customer_email_address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_email_address")] +#endif public string CustomerEmailAddress { get; set; } /// /// The IP address that the customer used when making the purchase. /// [JsonProperty("customer_purchase_ip")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_purchase_ip")] +#endif public string CustomerPurchaseIp { get; set; } /// @@ -42,12 +60,18 @@ public class DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTrans /// One of: merchandise, or services. /// [JsonProperty("merchandise_or_services")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("merchandise_or_services")] +#endif public string MerchandiseOrServices { get; set; } /// /// A description of the product or service that was sold. /// [JsonProperty("product_description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("product_description")] +#endif public string ProductDescription { get; set; } /// @@ -55,6 +79,9 @@ public class DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTrans /// Compelling Evidence 3.0 evidence submission. /// [JsonProperty("shipping_address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping_address")] +#endif public DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransactionShippingAddress ShippingAddress { get; set; } } } diff --git a/src/Stripe.net/Entities/Disputes/DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransactionShippingAddress.cs b/src/Stripe.net/Entities/Disputes/DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransactionShippingAddress.cs index 96f922ac57..c4633f9962 100644 --- a/src/Stripe.net/Entities/Disputes/DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransactionShippingAddress.cs +++ b/src/Stripe.net/Entities/Disputes/DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransactionShippingAddress.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransactionShippingAddress : StripeEntity { @@ -9,6 +12,9 @@ public class DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTrans /// City, district, suburb, town, or village. /// [JsonProperty("city")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("city")] +#endif public string City { get; set; } /// @@ -16,30 +22,45 @@ public class DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTrans /// 3166-1 alpha-2). /// [JsonProperty("country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country")] +#endif public string Country { get; set; } /// /// Address line 1 (e.g., street, PO Box, or company name). /// [JsonProperty("line1")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("line1")] +#endif public string Line1 { get; set; } /// /// Address line 2 (e.g., apartment, suite, unit, or building). /// [JsonProperty("line2")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("line2")] +#endif public string Line2 { get; set; } /// /// ZIP or postal code. /// [JsonProperty("postal_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("postal_code")] +#endif public string PostalCode { get; set; } /// /// State, county, province, or region. /// [JsonProperty("state")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("state")] +#endif public string State { get; set; } } } diff --git a/src/Stripe.net/Entities/Disputes/DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3PriorUndisputedTransaction.cs b/src/Stripe.net/Entities/Disputes/DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3PriorUndisputedTransaction.cs index 755e51e170..f641df99bb 100644 --- a/src/Stripe.net/Entities/Disputes/DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3PriorUndisputedTransaction.cs +++ b/src/Stripe.net/Entities/Disputes/DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3PriorUndisputedTransaction.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3PriorUndisputedTransaction : StripeEntity { @@ -9,12 +12,18 @@ public class DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3PriorUndisput /// Stripe charge ID for the Visa Compelling Evidence 3.0 eligible prior charge. /// [JsonProperty("charge")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("charge")] +#endif public string Charge { get; set; } /// /// User Account ID used to log into business platform. Must be recognizable by the user. /// [JsonProperty("customer_account_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_account_id")] +#endif public string CustomerAccountId { get; set; } /// @@ -22,6 +31,9 @@ public class DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3PriorUndisput /// hardware and software attributes. Must be at least 20 characters. /// [JsonProperty("customer_device_fingerprint")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_device_fingerprint")] +#endif public string CustomerDeviceFingerprint { get; set; } /// @@ -29,24 +41,36 @@ public class DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3PriorUndisput /// International Mobile Equipment Identity [IMEI]). Must be at least 15 characters. /// [JsonProperty("customer_device_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_device_id")] +#endif public string CustomerDeviceId { get; set; } /// /// The email address of the customer. /// [JsonProperty("customer_email_address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_email_address")] +#endif public string CustomerEmailAddress { get; set; } /// /// The IP address that the customer used when making the purchase. /// [JsonProperty("customer_purchase_ip")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_purchase_ip")] +#endif public string CustomerPurchaseIp { get; set; } /// /// A description of the product or service that was sold. /// [JsonProperty("product_description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("product_description")] +#endif public string ProductDescription { get; set; } /// @@ -54,6 +78,9 @@ public class DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3PriorUndisput /// Compelling Evidence 3.0 evidence submission. /// [JsonProperty("shipping_address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping_address")] +#endif public DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3PriorUndisputedTransactionShippingAddress ShippingAddress { get; set; } } } diff --git a/src/Stripe.net/Entities/Disputes/DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3PriorUndisputedTransactionShippingAddress.cs b/src/Stripe.net/Entities/Disputes/DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3PriorUndisputedTransactionShippingAddress.cs index 773979bca9..8ac8f2cb1a 100644 --- a/src/Stripe.net/Entities/Disputes/DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3PriorUndisputedTransactionShippingAddress.cs +++ b/src/Stripe.net/Entities/Disputes/DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3PriorUndisputedTransactionShippingAddress.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3PriorUndisputedTransactionShippingAddress : StripeEntity { @@ -9,6 +12,9 @@ public class DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3PriorUndisput /// City, district, suburb, town, or village. /// [JsonProperty("city")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("city")] +#endif public string City { get; set; } /// @@ -16,30 +22,45 @@ public class DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3PriorUndisput /// 3166-1 alpha-2). /// [JsonProperty("country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country")] +#endif public string Country { get; set; } /// /// Address line 1 (e.g., street, PO Box, or company name). /// [JsonProperty("line1")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("line1")] +#endif public string Line1 { get; set; } /// /// Address line 2 (e.g., apartment, suite, unit, or building). /// [JsonProperty("line2")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("line2")] +#endif public string Line2 { get; set; } /// /// ZIP or postal code. /// [JsonProperty("postal_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("postal_code")] +#endif public string PostalCode { get; set; } /// /// State, county, province, or region. /// [JsonProperty("state")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("state")] +#endif public string State { get; set; } } } diff --git a/src/Stripe.net/Entities/Disputes/DisputePaymentMethodDetails.cs b/src/Stripe.net/Entities/Disputes/DisputePaymentMethodDetails.cs index 4836645e34..9c590c8315 100644 --- a/src/Stripe.net/Entities/Disputes/DisputePaymentMethodDetails.cs +++ b/src/Stripe.net/Entities/Disputes/DisputePaymentMethodDetails.cs @@ -2,19 +2,34 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class DisputePaymentMethodDetails : StripeEntity { [JsonProperty("amazon_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amazon_pay")] +#endif public DisputePaymentMethodDetailsAmazonPay AmazonPay { get; set; } [JsonProperty("card")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card")] +#endif public DisputePaymentMethodDetailsCard Card { get; set; } [JsonProperty("klarna")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("klarna")] +#endif public DisputePaymentMethodDetailsKlarna Klarna { get; set; } [JsonProperty("paypal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("paypal")] +#endif public DisputePaymentMethodDetailsPaypal Paypal { get; set; } /// @@ -22,6 +37,9 @@ public class DisputePaymentMethodDetails : StripeEntityamazon_pay, card, klarna, or paypal. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Disputes/DisputePaymentMethodDetailsAmazonPay.cs b/src/Stripe.net/Entities/Disputes/DisputePaymentMethodDetailsAmazonPay.cs index 97f8580c98..a91f95efa8 100644 --- a/src/Stripe.net/Entities/Disputes/DisputePaymentMethodDetailsAmazonPay.cs +++ b/src/Stripe.net/Entities/Disputes/DisputePaymentMethodDetailsAmazonPay.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class DisputePaymentMethodDetailsAmazonPay : StripeEntity { @@ -10,6 +13,9 @@ public class DisputePaymentMethodDetailsAmazonPay : StripeEntitychargeback, or claim. /// [JsonProperty("dispute_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("dispute_type")] +#endif public string DisputeType { get; set; } } } diff --git a/src/Stripe.net/Entities/Disputes/DisputePaymentMethodDetailsCard.cs b/src/Stripe.net/Entities/Disputes/DisputePaymentMethodDetailsCard.cs index 13c1f28f8d..23b3d655ae 100644 --- a/src/Stripe.net/Entities/Disputes/DisputePaymentMethodDetailsCard.cs +++ b/src/Stripe.net/Entities/Disputes/DisputePaymentMethodDetailsCard.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class DisputePaymentMethodDetailsCard : StripeEntity { @@ -11,6 +14,9 @@ public class DisputePaymentMethodDetailsCard : StripeEntityunknown. /// [JsonProperty("brand")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("brand")] +#endif public string Brand { get; set; } /// @@ -19,6 +25,9 @@ public class DisputePaymentMethodDetailsCard : StripeEntitychargeback, or inquiry. /// [JsonProperty("case_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("case_type")] +#endif public string CaseType { get; set; } /// @@ -28,6 +37,9 @@ public class DisputePaymentMethodDetailsCard : StripeEntity [JsonProperty("network_reason_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("network_reason_code")] +#endif public string NetworkReasonCode { get; set; } } } diff --git a/src/Stripe.net/Entities/Disputes/DisputePaymentMethodDetailsKlarna.cs b/src/Stripe.net/Entities/Disputes/DisputePaymentMethodDetailsKlarna.cs index ae8af4011f..29a38abf0f 100644 --- a/src/Stripe.net/Entities/Disputes/DisputePaymentMethodDetailsKlarna.cs +++ b/src/Stripe.net/Entities/Disputes/DisputePaymentMethodDetailsKlarna.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class DisputePaymentMethodDetailsKlarna : StripeEntity { @@ -9,6 +12,9 @@ public class DisputePaymentMethodDetailsKlarna : StripeEntity [JsonProperty("reason_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reason_code")] +#endif public string ReasonCode { get; set; } } } diff --git a/src/Stripe.net/Entities/Disputes/DisputePaymentMethodDetailsPaypal.cs b/src/Stripe.net/Entities/Disputes/DisputePaymentMethodDetailsPaypal.cs index 112b773c5f..d266cb153b 100644 --- a/src/Stripe.net/Entities/Disputes/DisputePaymentMethodDetailsPaypal.cs +++ b/src/Stripe.net/Entities/Disputes/DisputePaymentMethodDetailsPaypal.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class DisputePaymentMethodDetailsPaypal : StripeEntity { @@ -9,12 +12,18 @@ public class DisputePaymentMethodDetailsPaypal : StripeEntity [JsonProperty("case_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("case_id")] +#endif public string CaseId { get; set; } /// /// The reason for the dispute as defined by PayPal. /// [JsonProperty("reason_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reason_code")] +#endif public string ReasonCode { get; set; } } } diff --git a/src/Stripe.net/Entities/Entitlements/ActiveEntitlementSummaries/ActiveEntitlementSummary.cs b/src/Stripe.net/Entities/Entitlements/ActiveEntitlementSummaries/ActiveEntitlementSummary.cs index fb81c0e0af..2e0341a897 100644 --- a/src/Stripe.net/Entities/Entitlements/ActiveEntitlementSummaries/ActiveEntitlementSummary.cs +++ b/src/Stripe.net/Entities/Entitlements/ActiveEntitlementSummaries/ActiveEntitlementSummary.cs @@ -2,6 +2,9 @@ namespace Stripe.Entitlements { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// A summary of a customer's active entitlements. @@ -12,18 +15,27 @@ public class ActiveEntitlementSummary : StripeEntity, /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// /// The customer that is entitled to this feature. /// [JsonProperty("customer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] +#endif public string Customer { get; set; } /// /// The list of entitlements this customer has. /// [JsonProperty("entitlements")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("entitlements")] +#endif public StripeList Entitlements { get; set; } /// @@ -31,6 +43,9 @@ public class ActiveEntitlementSummary : StripeEntity, /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } } } diff --git a/src/Stripe.net/Entities/Entitlements/ActiveEntitlements/ActiveEntitlement.cs b/src/Stripe.net/Entities/Entitlements/ActiveEntitlements/ActiveEntitlement.cs index 062052f0e4..9c91921ceb 100644 --- a/src/Stripe.net/Entities/Entitlements/ActiveEntitlements/ActiveEntitlement.cs +++ b/src/Stripe.net/Entities/Entitlements/ActiveEntitlements/ActiveEntitlement.cs @@ -3,22 +3,34 @@ namespace Stripe.Entitlements { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// An active entitlement describes access to a feature for a customer. /// +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class ActiveEntitlement : StripeEntity, IHasId, IHasObject { /// /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } #region Expandable Feature @@ -29,6 +41,9 @@ public class ActiveEntitlement : StripeEntity, IHasId, IHasOb /// customer is entitled to. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string FeatureId { get => this.InternalFeature?.Id; @@ -43,6 +58,9 @@ public string FeatureId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Feature Feature { get => this.InternalFeature?.ExpandedObject; @@ -51,6 +69,10 @@ public Feature Feature [JsonProperty("feature")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("feature")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalFeature { get; set; } #endregion @@ -59,12 +81,18 @@ public Feature Feature /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// /// A unique key you provide as your own system identifier. This may be up to 80 characters. /// [JsonProperty("lookup_key")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("lookup_key")] +#endif public string LookupKey { get; set; } } } diff --git a/src/Stripe.net/Entities/Entitlements/Features/Feature.cs b/src/Stripe.net/Entities/Entitlements/Features/Feature.cs index 742c3b5942..05b21e826f 100644 --- a/src/Stripe.net/Entities/Entitlements/Features/Feature.cs +++ b/src/Stripe.net/Entities/Entitlements/Features/Feature.cs @@ -3,6 +3,9 @@ namespace Stripe.Entitlements { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// A feature represents a monetizable ability or functionality in your system. Features can @@ -15,12 +18,18 @@ public class Feature : StripeEntity, IHasId, IHasMetadata, IHasObject /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// @@ -28,6 +37,9 @@ public class Feature : StripeEntity, IHasId, IHasMetadata, IHasObject /// features list endpoint. /// [JsonProperty("active")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("active")] +#endif public bool Active { get; set; } /// @@ -35,12 +47,18 @@ public class Feature : StripeEntity, IHasId, IHasMetadata, IHasObject /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// /// A unique key you provide as your own system identifier. This may be up to 80 characters. /// [JsonProperty("lookup_key")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("lookup_key")] +#endif public string LookupKey { get; set; } /// @@ -48,12 +66,18 @@ public class Feature : StripeEntity, IHasId, IHasMetadata, IHasObject /// additional information about the object in a structured format. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// The feature's name, for your own purpose, not meant to be displayable to the customer. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } } } diff --git a/src/Stripe.net/Entities/EphemeralKeys/EphemeralKey.cs b/src/Stripe.net/Entities/EphemeralKeys/EphemeralKey.cs index 0b85412b1f..bdf5a9534a 100644 --- a/src/Stripe.net/Entities/EphemeralKeys/EphemeralKey.cs +++ b/src/Stripe.net/Entities/EphemeralKeys/EphemeralKey.cs @@ -4,6 +4,9 @@ namespace Stripe using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class EphemeralKey : StripeEntity, IHasId, IHasObject { @@ -11,12 +14,18 @@ public class EphemeralKey : StripeEntity, IHasId, IHasObject /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// @@ -24,12 +33,20 @@ public class EphemeralKey : StripeEntity, IHasId, IHasObject /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// /// Whether this object is deleted or not. /// [JsonProperty("deleted", NullValueHandling = NullValueHandling.Ignore)] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("deleted")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] +#endif public bool? Deleted { get; set; } /// @@ -37,6 +54,10 @@ public class EphemeralKey : StripeEntity, IHasId, IHasObject /// [JsonProperty("expires")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("expires")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Expires { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -44,15 +65,24 @@ public class EphemeralKey : StripeEntity, IHasId, IHasObject /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// /// The key's secret. You can use this value to make authorized requests to the Stripe API. /// [JsonProperty("secret")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("secret")] +#endif public string Secret { get; set; } [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string RawJson => this.StripeResponse?.Content; } } diff --git a/src/Stripe.net/Entities/Events/Event.cs b/src/Stripe.net/Entities/Events/Event.cs index c9219cde7d..9c3aadb86b 100644 --- a/src/Stripe.net/Entities/Events/Event.cs +++ b/src/Stripe.net/Entities/Events/Event.cs @@ -4,6 +4,9 @@ namespace Stripe using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// Events are our way of letting you know when something interesting happens in your @@ -36,24 +39,36 @@ namespace Stripe /// href="https://stripe.com/docs/api#retrieve_event">Retrieve Event API for 30 days. /// [JsonConverter(typeof(EventConverter))] +#if NET6_0_OR_GREATER + [NoSystemTextJsonAttributesNeeded("Converter is only needed for deserialization")] +#endif public class Event : StripeEntity, IHasId, IHasObject { /// /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// /// The connected account that originates the event. /// [JsonProperty("account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account")] +#endif public string Account { get; set; } /// @@ -61,6 +76,9 @@ public class Event : StripeEntity, IHasId, IHasObject /// events on or after October 31, 2014. /// [JsonProperty("api_version")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("api_version")] +#endif public string ApiVersion { get; set; } /// @@ -68,9 +86,16 @@ public class Event : StripeEntity, IHasId, IHasObject /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; [JsonProperty("data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("data")] +#endif public EventData Data { get; set; } /// @@ -78,6 +103,9 @@ public class Event : StripeEntity, IHasId, IHasObject /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// @@ -85,12 +113,18 @@ public class Event : StripeEntity, IHasId, IHasObject /// 20x response) to the URLs you specify. /// [JsonProperty("pending_webhooks")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("pending_webhooks")] +#endif public long PendingWebhooks { get; set; } /// /// Information on the API request that triggers the event. /// [JsonProperty("request")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("request")] +#endif public EventRequest Request { get; set; } /// @@ -219,6 +253,9 @@ public class Event : StripeEntity, IHasId, IHasObject /// ping. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Events/EventRequest.cs b/src/Stripe.net/Entities/Events/EventRequest.cs index f8a7011d8d..e056ce104a 100644 --- a/src/Stripe.net/Entities/Events/EventRequest.cs +++ b/src/Stripe.net/Entities/Events/EventRequest.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class EventRequest : StripeEntity, IHasId { @@ -11,6 +14,9 @@ public class EventRequest : StripeEntity, IHasId /// href="https://dashboard.stripe.com/logs">dashboard, but currently not in the API. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// @@ -18,6 +24,9 @@ public class EventRequest : StripeEntity, IHasId /// populated only for events on or after May 23, 2017. /// [JsonProperty("idempotency_key")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("idempotency_key")] +#endif public string IdempotencyKey { get; set; } } } diff --git a/src/Stripe.net/Entities/FileLinks/FileLink.cs b/src/Stripe.net/Entities/FileLinks/FileLink.cs index 1f8449b85b..c5e5178a31 100644 --- a/src/Stripe.net/Entities/FileLinks/FileLink.cs +++ b/src/Stripe.net/Entities/FileLinks/FileLink.cs @@ -5,24 +5,36 @@ namespace Stripe using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// To share the contents of a File object with non-Stripe users, you can create a /// FileLink. FileLinks contain a URL that you can use to retrieve the /// contents of the file without authentication. /// +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class FileLink : StripeEntity, IHasId, IHasMetadata, IHasObject { /// /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// @@ -30,12 +42,19 @@ public class FileLink : StripeEntity, IHasId, IHasMetadata, IHasObject /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// /// Returns if the link is already expired. /// [JsonProperty("expired")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("expired")] +#endif public bool Expired { get; set; } /// @@ -43,6 +62,10 @@ public class FileLink : StripeEntity, IHasId, IHasMetadata, IHasObject /// [JsonProperty("expires_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("expires_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? ExpiresAt { get; set; } #region Expandable File @@ -52,6 +75,9 @@ public class FileLink : StripeEntity, IHasId, IHasMetadata, IHasObject /// The file object this link points to. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string FileId { get => this.InternalFile?.Id; @@ -65,6 +91,9 @@ public string FileId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public File File { get => this.InternalFile?.ExpandedObject; @@ -73,6 +102,10 @@ public File File [JsonProperty("file")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("file")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalFile { get; set; } #endregion @@ -81,6 +114,9 @@ public File File /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// @@ -89,12 +125,18 @@ public File File /// object in a structured format. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// The publicly accessible URL to download the file. /// [JsonProperty("url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("url")] +#endif public string Url { get; set; } } } diff --git a/src/Stripe.net/Entities/Files/File.cs b/src/Stripe.net/Entities/Files/File.cs index 2b95419aaf..55f81c6ff7 100644 --- a/src/Stripe.net/Entities/Files/File.cs +++ b/src/Stripe.net/Entities/Files/File.cs @@ -4,6 +4,9 @@ namespace Stripe using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// This object represents files hosted on Stripe's servers. You can upload files with the @@ -20,12 +23,18 @@ public class File : StripeEntity, IHasId, IHasObject /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// @@ -33,6 +42,10 @@ public class File : StripeEntity, IHasId, IHasObject /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -40,12 +53,19 @@ public class File : StripeEntity, IHasId, IHasObject /// [JsonProperty("expires_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("expires_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? ExpiresAt { get; set; } /// /// The suitable name for saving the file to a filesystem. /// [JsonProperty("filename")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("filename")] +#endif public string Filename { get; set; } /// @@ -53,6 +73,9 @@ public class File : StripeEntity, IHasId, IHasObject /// this file. /// [JsonProperty("links")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("links")] +#endif public StripeList Links { get; set; } /// @@ -67,30 +90,45 @@ public class File : StripeEntity, IHasId, IHasObject /// tax_document_user_upload, or terminal_reader_splashscreen. /// [JsonProperty("purpose")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("purpose")] +#endif public string Purpose { get; set; } /// /// The size of the file object in bytes. /// [JsonProperty("size")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("size")] +#endif public long Size { get; set; } /// /// A suitable title for the document. /// [JsonProperty("title")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("title")] +#endif public string Title { get; set; } /// /// The returned file type (for example, csv, pdf, jpg, or png). /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } /// /// Use your live secret API key to download the file from this URL. /// [JsonProperty("url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("url")] +#endif public string Url { get; set; } } } diff --git a/src/Stripe.net/Entities/FinancialConnections/AccountOwners/AccountOwner.cs b/src/Stripe.net/Entities/FinancialConnections/AccountOwners/AccountOwner.cs index 7a831e575b..e9494a55c4 100644 --- a/src/Stripe.net/Entities/FinancialConnections/AccountOwners/AccountOwner.cs +++ b/src/Stripe.net/Entities/FinancialConnections/AccountOwners/AccountOwner.cs @@ -4,6 +4,9 @@ namespace Stripe.FinancialConnections using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// Describes an owner of an account. @@ -14,42 +17,63 @@ public class AccountOwner : StripeEntity, IHasId, IHasObject /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// /// The email address of the owner. /// [JsonProperty("email")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("email")] +#endif public string Email { get; set; } /// /// The full name of the owner. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } /// /// The ownership object that this owner belongs to. /// [JsonProperty("ownership")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ownership")] +#endif public string Ownership { get; set; } /// /// The raw phone number of the owner. /// [JsonProperty("phone")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("phone")] +#endif public string Phone { get; set; } /// /// The raw physical address of the owner. /// [JsonProperty("raw_address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("raw_address")] +#endif public string RawAddress { get; set; } /// @@ -57,6 +81,10 @@ public class AccountOwner : StripeEntity, IHasId, IHasObject /// [JsonProperty("refreshed_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("refreshed_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? RefreshedAt { get; set; } } } diff --git a/src/Stripe.net/Entities/FinancialConnections/AccountOwnerships/AccountOwnership.cs b/src/Stripe.net/Entities/FinancialConnections/AccountOwnerships/AccountOwnership.cs index 6c0506f9c9..de6bbea691 100644 --- a/src/Stripe.net/Entities/FinancialConnections/AccountOwnerships/AccountOwnership.cs +++ b/src/Stripe.net/Entities/FinancialConnections/AccountOwnerships/AccountOwnership.cs @@ -4,6 +4,9 @@ namespace Stripe.FinancialConnections using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// Describes a snapshot of the owners of an account at a particular point in time. @@ -14,12 +17,18 @@ public class AccountOwnership : StripeEntity, IHasId, IHasObje /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// @@ -27,12 +36,19 @@ public class AccountOwnership : StripeEntity, IHasId, IHasObje /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// /// A paginated list of owners for this account. /// [JsonProperty("owners")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("owners")] +#endif public StripeList Owners { get; set; } } } diff --git a/src/Stripe.net/Entities/FinancialConnections/Accounts/Account.cs b/src/Stripe.net/Entities/FinancialConnections/Accounts/Account.cs index a60587dcfc..591ddc6366 100644 --- a/src/Stripe.net/Entities/FinancialConnections/Accounts/Account.cs +++ b/src/Stripe.net/Entities/FinancialConnections/Accounts/Account.cs @@ -5,41 +5,62 @@ namespace Stripe.FinancialConnections using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// A Financial Connections Account represents an account that exists outside of Stripe, to /// which you have been granted some degree of access. /// +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class Account : StripeEntity, IHasId, IHasObject { /// /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// /// The account holder that this account belongs to. /// [JsonProperty("account_holder")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_holder")] +#endif public AccountAccountHolder AccountHolder { get; set; } /// /// The most recent information about the account's balance. /// [JsonProperty("balance")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("balance")] +#endif public AccountBalance Balance { get; set; } /// /// The state of the most recent attempt to refresh the account balance. /// [JsonProperty("balance_refresh")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("balance_refresh")] +#endif public AccountBalanceRefresh BalanceRefresh { get; set; } /// @@ -47,6 +68,9 @@ public class Account : StripeEntity, IHasId, IHasObject /// One of: cash, credit, investment, or other. /// [JsonProperty("category")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("category")] +#endif public string Category { get; set; } /// @@ -54,6 +78,10 @@ public class Account : StripeEntity, IHasId, IHasObject /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -61,18 +89,27 @@ public class Account : StripeEntity, IHasId, IHasObject /// holder or by the institution. /// [JsonProperty("display_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_name")] +#endif public string DisplayName { get; set; } /// /// The name of the institution that holds this account. /// [JsonProperty("institution_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("institution_name")] +#endif public string InstitutionName { get; set; } /// /// The last 4 digits of the account number. If present, this will be 4 numeric characters. /// [JsonProperty("last4")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last4")] +#endif public string Last4 { get; set; } /// @@ -80,6 +117,9 @@ public class Account : StripeEntity, IHasId, IHasObject /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } #region Expandable Ownership @@ -89,6 +129,9 @@ public class Account : StripeEntity, IHasId, IHasObject /// The most recent information about the account's owners. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string OwnershipId { get => this.InternalOwnership?.Id; @@ -102,6 +145,9 @@ public string OwnershipId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public AccountOwnership Ownership { get => this.InternalOwnership?.ExpandedObject; @@ -110,6 +156,10 @@ public AccountOwnership Ownership [JsonProperty("ownership")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ownership")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalOwnership { get; set; } #endregion @@ -117,6 +167,9 @@ public AccountOwnership Ownership /// The state of the most recent attempt to refresh the account owners. /// [JsonProperty("ownership_refresh")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ownership_refresh")] +#endif public AccountOwnershipRefresh OwnershipRefresh { get; set; } /// @@ -125,6 +178,9 @@ public AccountOwnership Ownership /// transactions. /// [JsonProperty("permissions")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("permissions")] +#endif public List Permissions { get; set; } /// @@ -132,6 +188,9 @@ public AccountOwnership Ownership /// One of: active, disconnected, or inactive. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } /// @@ -148,12 +207,18 @@ public AccountOwnership Ownership /// other, or savings. /// [JsonProperty("subcategory")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("subcategory")] +#endif public string Subcategory { get; set; } /// /// The list of data refresh subscriptions requested on this account. /// [JsonProperty("subscriptions")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("subscriptions")] +#endif public List Subscriptions { get; set; } /// @@ -163,12 +228,18 @@ public AccountOwnership Ownership /// One of: link, or us_bank_account. /// [JsonProperty("supported_payment_method_types")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("supported_payment_method_types")] +#endif public List SupportedPaymentMethodTypes { get; set; } /// /// The state of the most recent attempt to refresh the account transactions. /// [JsonProperty("transaction_refresh")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transaction_refresh")] +#endif public AccountTransactionRefresh TransactionRefresh { get; set; } } } diff --git a/src/Stripe.net/Entities/FinancialConnections/Accounts/AccountAccountHolder.cs b/src/Stripe.net/Entities/FinancialConnections/Accounts/AccountAccountHolder.cs index f2fdce6ec5..8862b6d4ed 100644 --- a/src/Stripe.net/Entities/FinancialConnections/Accounts/AccountAccountHolder.cs +++ b/src/Stripe.net/Entities/FinancialConnections/Accounts/AccountAccountHolder.cs @@ -3,7 +3,13 @@ namespace Stripe.FinancialConnections { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class AccountAccountHolder : StripeEntity { #region Expandable Account @@ -14,6 +20,9 @@ public class AccountAccountHolder : StripeEntity /// account_holder.type is account. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string AccountId { get => this.InternalAccount?.Id; @@ -28,6 +37,9 @@ public string AccountId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Account Account { get => this.InternalAccount?.ExpandedObject; @@ -36,6 +48,10 @@ public Account Account [JsonProperty("account")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalAccount { get; set; } #endregion @@ -47,6 +63,9 @@ public Account Account /// account_holder.type is customer. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string CustomerId { get => this.InternalCustomer?.Id; @@ -61,6 +80,9 @@ public string CustomerId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Customer Customer { get => this.InternalCustomer?.ExpandedObject; @@ -69,6 +91,10 @@ public Customer Customer [JsonProperty("customer")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalCustomer { get; set; } #endregion @@ -77,6 +103,9 @@ public Customer Customer /// One of: account, or customer. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/FinancialConnections/Accounts/AccountBalance.cs b/src/Stripe.net/Entities/FinancialConnections/Accounts/AccountBalance.cs index 54ada31427..b27a6e60f7 100644 --- a/src/Stripe.net/Entities/FinancialConnections/Accounts/AccountBalance.cs +++ b/src/Stripe.net/Entities/FinancialConnections/Accounts/AccountBalance.cs @@ -5,6 +5,9 @@ namespace Stripe.FinancialConnections using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountBalance : StripeEntity { @@ -14,12 +17,22 @@ public class AccountBalance : StripeEntity /// [JsonProperty("as_of")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("as_of")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime AsOf { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; [JsonProperty("cash")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cash")] +#endif public AccountBalanceCash Cash { get; set; } [JsonProperty("credit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("credit")] +#endif public AccountBalanceCredit Credit { get; set; } /// @@ -34,6 +47,9 @@ public class AccountBalance : StripeEntity /// holder. A negative amount indicates money owed by the account holder. /// [JsonProperty("current")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("current")] +#endif public Dictionary Current { get; set; } /// @@ -42,6 +58,9 @@ public class AccountBalance : StripeEntity /// One of: cash, or credit. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/FinancialConnections/Accounts/AccountBalanceCash.cs b/src/Stripe.net/Entities/FinancialConnections/Accounts/AccountBalanceCash.cs index c5d378dcbb..d34e908e09 100644 --- a/src/Stripe.net/Entities/FinancialConnections/Accounts/AccountBalanceCash.cs +++ b/src/Stripe.net/Entities/FinancialConnections/Accounts/AccountBalanceCash.cs @@ -3,6 +3,9 @@ namespace Stripe.FinancialConnections { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountBalanceCash : StripeEntity { @@ -19,6 +22,9 @@ public class AccountBalanceCash : StripeEntity /// holder. A negative amount indicates money owed by the account holder. /// [JsonProperty("available")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("available")] +#endif public Dictionary Available { get; set; } } } diff --git a/src/Stripe.net/Entities/FinancialConnections/Accounts/AccountBalanceCredit.cs b/src/Stripe.net/Entities/FinancialConnections/Accounts/AccountBalanceCredit.cs index 5fed450505..4cc5c34493 100644 --- a/src/Stripe.net/Entities/FinancialConnections/Accounts/AccountBalanceCredit.cs +++ b/src/Stripe.net/Entities/FinancialConnections/Accounts/AccountBalanceCredit.cs @@ -3,6 +3,9 @@ namespace Stripe.FinancialConnections { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountBalanceCredit : StripeEntity { @@ -17,6 +20,9 @@ public class AccountBalanceCredit : StripeEntity /// holder. A negative amount indicates money owed by the account holder. /// [JsonProperty("used")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("used")] +#endif public Dictionary Used { get; set; } } } diff --git a/src/Stripe.net/Entities/FinancialConnections/Accounts/AccountBalanceRefresh.cs b/src/Stripe.net/Entities/FinancialConnections/Accounts/AccountBalanceRefresh.cs index 5553fc6b64..26f2e6f6f4 100644 --- a/src/Stripe.net/Entities/FinancialConnections/Accounts/AccountBalanceRefresh.cs +++ b/src/Stripe.net/Entities/FinancialConnections/Accounts/AccountBalanceRefresh.cs @@ -4,6 +4,9 @@ namespace Stripe.FinancialConnections using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountBalanceRefresh : StripeEntity { @@ -13,6 +16,10 @@ public class AccountBalanceRefresh : StripeEntity /// [JsonProperty("last_attempted_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last_attempted_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime LastAttemptedAt { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -21,6 +28,10 @@ public class AccountBalanceRefresh : StripeEntity /// [JsonProperty("next_refresh_available_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("next_refresh_available_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? NextRefreshAvailableAt { get; set; } /// @@ -28,6 +39,9 @@ public class AccountBalanceRefresh : StripeEntity /// One of: failed, pending, or succeeded. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } } } diff --git a/src/Stripe.net/Entities/FinancialConnections/Accounts/AccountOwnershipRefresh.cs b/src/Stripe.net/Entities/FinancialConnections/Accounts/AccountOwnershipRefresh.cs index 0b2637360b..63c11ef590 100644 --- a/src/Stripe.net/Entities/FinancialConnections/Accounts/AccountOwnershipRefresh.cs +++ b/src/Stripe.net/Entities/FinancialConnections/Accounts/AccountOwnershipRefresh.cs @@ -4,6 +4,9 @@ namespace Stripe.FinancialConnections using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountOwnershipRefresh : StripeEntity { @@ -13,6 +16,10 @@ public class AccountOwnershipRefresh : StripeEntity /// [JsonProperty("last_attempted_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last_attempted_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime LastAttemptedAt { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -22,6 +29,10 @@ public class AccountOwnershipRefresh : StripeEntity /// [JsonProperty("next_refresh_available_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("next_refresh_available_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? NextRefreshAvailableAt { get; set; } /// @@ -29,6 +40,9 @@ public class AccountOwnershipRefresh : StripeEntity /// One of: failed, pending, or succeeded. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } } } diff --git a/src/Stripe.net/Entities/FinancialConnections/Accounts/AccountTransactionRefresh.cs b/src/Stripe.net/Entities/FinancialConnections/Accounts/AccountTransactionRefresh.cs index c95f63517d..4f95d30a6b 100644 --- a/src/Stripe.net/Entities/FinancialConnections/Accounts/AccountTransactionRefresh.cs +++ b/src/Stripe.net/Entities/FinancialConnections/Accounts/AccountTransactionRefresh.cs @@ -4,6 +4,9 @@ namespace Stripe.FinancialConnections using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountTransactionRefresh : StripeEntity, IHasId { @@ -11,6 +14,9 @@ public class AccountTransactionRefresh : StripeEntity /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// @@ -19,6 +25,10 @@ public class AccountTransactionRefresh : StripeEntity /// [JsonProperty("last_attempted_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last_attempted_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime LastAttemptedAt { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -28,6 +38,10 @@ public class AccountTransactionRefresh : StripeEntity /// [JsonProperty("next_refresh_available_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("next_refresh_available_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? NextRefreshAvailableAt { get; set; } /// @@ -35,6 +49,9 @@ public class AccountTransactionRefresh : StripeEntity /// One of: failed, pending, or succeeded. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } } } diff --git a/src/Stripe.net/Entities/FinancialConnections/Sessions/Session.cs b/src/Stripe.net/Entities/FinancialConnections/Sessions/Session.cs index d9e3068c64..76b7b115c9 100644 --- a/src/Stripe.net/Entities/FinancialConnections/Sessions/Session.cs +++ b/src/Stripe.net/Entities/FinancialConnections/Sessions/Session.cs @@ -3,6 +3,9 @@ namespace Stripe.FinancialConnections { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// A Financial Connections Session is the secure way to programmatically launch the @@ -14,33 +17,51 @@ public class Session : StripeEntity, IHasId, IHasObject /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// /// The account holder for whom accounts are collected in this session. /// [JsonProperty("account_holder")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_holder")] +#endif public SessionAccountHolder AccountHolder { get; set; } /// /// The accounts that were collected as part of this Session. /// [JsonProperty("accounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("accounts")] +#endif public StripeList Accounts { get; set; } /// /// A value that will be passed to the client to launch the authentication flow. /// [JsonProperty("client_secret")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("client_secret")] +#endif public string ClientSecret { get; set; } [JsonProperty("filters")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("filters")] +#endif public SessionFilters Filters { get; set; } /// @@ -48,6 +69,9 @@ public class Session : StripeEntity, IHasId, IHasObject /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// @@ -56,6 +80,9 @@ public class Session : StripeEntity, IHasId, IHasObject /// transactions. /// [JsonProperty("permissions")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("permissions")] +#endif public List Permissions { get; set; } /// @@ -63,6 +90,9 @@ public class Session : StripeEntity, IHasId, IHasObject /// One of: balances, ownership, or transactions. /// [JsonProperty("prefetch")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("prefetch")] +#endif public List Prefetch { get; set; } /// @@ -70,6 +100,9 @@ public class Session : StripeEntity, IHasId, IHasObject /// user will be redirected to this URL to return to your app. /// [JsonProperty("return_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("return_url")] +#endif public string ReturnUrl { get; set; } } } diff --git a/src/Stripe.net/Entities/FinancialConnections/Sessions/SessionAccountHolder.cs b/src/Stripe.net/Entities/FinancialConnections/Sessions/SessionAccountHolder.cs index 41aca04147..5cca3f80bc 100644 --- a/src/Stripe.net/Entities/FinancialConnections/Sessions/SessionAccountHolder.cs +++ b/src/Stripe.net/Entities/FinancialConnections/Sessions/SessionAccountHolder.cs @@ -3,7 +3,13 @@ namespace Stripe.FinancialConnections { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class SessionAccountHolder : StripeEntity { #region Expandable Account @@ -14,6 +20,9 @@ public class SessionAccountHolder : StripeEntity /// account_holder.type is account. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string AccountId { get => this.InternalAccount?.Id; @@ -28,6 +37,9 @@ public string AccountId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Account Account { get => this.InternalAccount?.ExpandedObject; @@ -36,6 +48,10 @@ public Account Account [JsonProperty("account")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalAccount { get; set; } #endregion @@ -47,6 +63,9 @@ public Account Account /// account_holder.type is customer. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string CustomerId { get => this.InternalCustomer?.Id; @@ -61,6 +80,9 @@ public string CustomerId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Customer Customer { get => this.InternalCustomer?.ExpandedObject; @@ -69,6 +91,10 @@ public Customer Customer [JsonProperty("customer")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalCustomer { get; set; } #endregion @@ -77,6 +103,9 @@ public Customer Customer /// One of: account, or customer. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/FinancialConnections/Sessions/SessionFilters.cs b/src/Stripe.net/Entities/FinancialConnections/Sessions/SessionFilters.cs index bfd4594c60..afbe730797 100644 --- a/src/Stripe.net/Entities/FinancialConnections/Sessions/SessionFilters.cs +++ b/src/Stripe.net/Entities/FinancialConnections/Sessions/SessionFilters.cs @@ -3,6 +3,9 @@ namespace Stripe.FinancialConnections { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionFilters : StripeEntity { @@ -14,12 +17,18 @@ public class SessionFilters : StripeEntity /// savings. /// [JsonProperty("account_subcategories")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_subcategories")] +#endif public List AccountSubcategories { get; set; } /// /// List of countries from which to filter accounts. /// [JsonProperty("countries")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("countries")] +#endif public List Countries { get; set; } } } diff --git a/src/Stripe.net/Entities/FinancialConnections/Transactions/Transaction.cs b/src/Stripe.net/Entities/FinancialConnections/Transactions/Transaction.cs index 8d71602435..4f6d398c8b 100644 --- a/src/Stripe.net/Entities/FinancialConnections/Transactions/Transaction.cs +++ b/src/Stripe.net/Entities/FinancialConnections/Transactions/Transaction.cs @@ -4,6 +4,9 @@ namespace Stripe.FinancialConnections using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// A Transaction represents a real transaction that affects a Financial Connections Account @@ -15,24 +18,36 @@ public class Transaction : StripeEntity, IHasId, IHasObject /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// /// The ID of the Financial Connections Account this transaction belongs to. /// [JsonProperty("account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account")] +#endif public string Account { get; set; } /// /// The amount of this transaction, in cents (or local equivalent). /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long Amount { get; set; } /// @@ -41,12 +56,18 @@ public class Transaction : StripeEntity, IHasId, IHasObject /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// /// The description of this transaction. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// @@ -54,6 +75,9 @@ public class Transaction : StripeEntity, IHasId, IHasObject /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// @@ -61,9 +85,15 @@ public class Transaction : StripeEntity, IHasId, IHasObject /// One of: pending, posted, or void. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } [JsonProperty("status_transitions")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status_transitions")] +#endif public TransactionStatusTransitions StatusTransitions { get; set; } /// @@ -71,12 +101,19 @@ public class Transaction : StripeEntity, IHasId, IHasObject /// [JsonProperty("transacted_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transacted_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime TransactedAt { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// /// The token of the transaction refresh that last updated or created this transaction. /// [JsonProperty("transaction_refresh")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transaction_refresh")] +#endif public string TransactionRefresh { get; set; } /// @@ -84,6 +121,10 @@ public class Transaction : StripeEntity, IHasId, IHasObject /// [JsonProperty("updated")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("updated")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Updated { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; } } diff --git a/src/Stripe.net/Entities/FinancialConnections/Transactions/TransactionStatusTransitions.cs b/src/Stripe.net/Entities/FinancialConnections/Transactions/TransactionStatusTransitions.cs index fc13979075..e1009c5832 100644 --- a/src/Stripe.net/Entities/FinancialConnections/Transactions/TransactionStatusTransitions.cs +++ b/src/Stripe.net/Entities/FinancialConnections/Transactions/TransactionStatusTransitions.cs @@ -4,6 +4,9 @@ namespace Stripe.FinancialConnections using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TransactionStatusTransitions : StripeEntity { @@ -12,6 +15,10 @@ public class TransactionStatusTransitions : StripeEntity [JsonProperty("posted_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("posted_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? PostedAt { get; set; } /// @@ -19,6 +26,10 @@ public class TransactionStatusTransitions : StripeEntity [JsonProperty("void_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("void_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? VoidAt { get; set; } } } diff --git a/src/Stripe.net/Entities/Forwarding/Requests/Request.cs b/src/Stripe.net/Entities/Forwarding/Requests/Request.cs index f6536c2b8b..9f9427a622 100644 --- a/src/Stripe.net/Entities/Forwarding/Requests/Request.cs +++ b/src/Stripe.net/Entities/Forwarding/Requests/Request.cs @@ -5,6 +5,9 @@ namespace Stripe.Forwarding using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// Instructs Stripe to make a request on your behalf using the destination URL. The @@ -33,12 +36,18 @@ public class Request : StripeEntity, IHasId, IHasMetadata, IHasObject /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// @@ -46,6 +55,10 @@ public class Request : StripeEntity, IHasId, IHasMetadata, IHasObject /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -53,6 +66,9 @@ public class Request : StripeEntity, IHasId, IHasMetadata, IHasObject /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// @@ -61,6 +77,9 @@ public class Request : StripeEntity, IHasId, IHasMetadata, IHasObject /// object in a structured format. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -68,6 +87,9 @@ public class Request : StripeEntity, IHasId, IHasMetadata, IHasObject /// PaymentMethods is allowed. /// [JsonProperty("payment_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method")] +#endif public string PaymentMethod { get; set; } /// @@ -76,18 +98,27 @@ public class Request : StripeEntity, IHasId, IHasMetadata, IHasObject /// cardholder_name. /// [JsonProperty("replacements")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("replacements")] +#endif public List Replacements { get; set; } /// /// Context about the request from Stripe's servers to the destination endpoint. /// [JsonProperty("request_context")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("request_context")] +#endif public RequestRequestContext RequestContext { get; set; } /// /// The request that was sent to the destination endpoint. We redact any sensitive fields. /// [JsonProperty("request_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("request_details")] +#endif public RequestRequestDetails RequestDetails { get; set; } /// @@ -95,12 +126,18 @@ public class Request : StripeEntity, IHasId, IHasMetadata, IHasObject /// fields. /// [JsonProperty("response_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("response_details")] +#endif public RequestResponseDetails ResponseDetails { get; set; } /// /// The destination URL for the forwarded request. Must be supported by the config. /// [JsonProperty("url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("url")] +#endif public string Url { get; set; } } } diff --git a/src/Stripe.net/Entities/Forwarding/Requests/RequestRequestContext.cs b/src/Stripe.net/Entities/Forwarding/Requests/RequestRequestContext.cs index 3299c9355d..69400b6f52 100644 --- a/src/Stripe.net/Entities/Forwarding/Requests/RequestRequestContext.cs +++ b/src/Stripe.net/Entities/Forwarding/Requests/RequestRequestContext.cs @@ -2,6 +2,9 @@ namespace Stripe.Forwarding { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RequestRequestContext : StripeEntity { @@ -9,12 +12,18 @@ public class RequestRequestContext : StripeEntity /// The time it took in milliseconds for the destination endpoint to respond. /// [JsonProperty("destination_duration")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("destination_duration")] +#endif public long DestinationDuration { get; set; } /// /// The IP address of the destination. /// [JsonProperty("destination_ip_address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("destination_ip_address")] +#endif public string DestinationIpAddress { get; set; } } } diff --git a/src/Stripe.net/Entities/Forwarding/Requests/RequestRequestDetails.cs b/src/Stripe.net/Entities/Forwarding/Requests/RequestRequestDetails.cs index 4539e28e74..3307314718 100644 --- a/src/Stripe.net/Entities/Forwarding/Requests/RequestRequestDetails.cs +++ b/src/Stripe.net/Entities/Forwarding/Requests/RequestRequestDetails.cs @@ -3,6 +3,9 @@ namespace Stripe.Forwarding { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RequestRequestDetails : StripeEntity { @@ -10,6 +13,9 @@ public class RequestRequestDetails : StripeEntity /// The body payload to send to the destination endpoint. /// [JsonProperty("body")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("body")] +#endif public string Body { get; set; } /// @@ -17,12 +23,18 @@ public class RequestRequestDetails : StripeEntity /// (excluding Stripe-generated ones such as the Content-Type header) should be included. /// [JsonProperty("headers")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("headers")] +#endif public List Headers { get; set; } /// /// The HTTP method used to call the destination endpoint. /// [JsonProperty("http_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("http_method")] +#endif public string HttpMethod { get; set; } } } diff --git a/src/Stripe.net/Entities/Forwarding/Requests/RequestRequestDetailsHeader.cs b/src/Stripe.net/Entities/Forwarding/Requests/RequestRequestDetailsHeader.cs index f2e37ee628..40d908f019 100644 --- a/src/Stripe.net/Entities/Forwarding/Requests/RequestRequestDetailsHeader.cs +++ b/src/Stripe.net/Entities/Forwarding/Requests/RequestRequestDetailsHeader.cs @@ -2,6 +2,9 @@ namespace Stripe.Forwarding { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RequestRequestDetailsHeader : StripeEntity { @@ -9,12 +12,18 @@ public class RequestRequestDetailsHeader : StripeEntity [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } /// /// The header value. /// [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public string Value { get; set; } } } diff --git a/src/Stripe.net/Entities/Forwarding/Requests/RequestResponseDetails.cs b/src/Stripe.net/Entities/Forwarding/Requests/RequestResponseDetails.cs index d2e20700b5..0ce5b6d270 100644 --- a/src/Stripe.net/Entities/Forwarding/Requests/RequestResponseDetails.cs +++ b/src/Stripe.net/Entities/Forwarding/Requests/RequestResponseDetails.cs @@ -3,6 +3,9 @@ namespace Stripe.Forwarding { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RequestResponseDetails : StripeEntity { @@ -10,18 +13,27 @@ public class RequestResponseDetails : StripeEntity /// The response body from the destination endpoint to Stripe. /// [JsonProperty("body")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("body")] +#endif public string Body { get; set; } /// /// HTTP headers that the destination endpoint returned. /// [JsonProperty("headers")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("headers")] +#endif public List Headers { get; set; } /// /// The HTTP status code that the destination endpoint returned. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public long Status { get; set; } } } diff --git a/src/Stripe.net/Entities/Forwarding/Requests/RequestResponseDetailsHeader.cs b/src/Stripe.net/Entities/Forwarding/Requests/RequestResponseDetailsHeader.cs index 86ae448fd1..f886e04c0a 100644 --- a/src/Stripe.net/Entities/Forwarding/Requests/RequestResponseDetailsHeader.cs +++ b/src/Stripe.net/Entities/Forwarding/Requests/RequestResponseDetailsHeader.cs @@ -2,6 +2,9 @@ namespace Stripe.Forwarding { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RequestResponseDetailsHeader : StripeEntity { @@ -9,12 +12,18 @@ public class RequestResponseDetailsHeader : StripeEntity [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } /// /// The header value. /// [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public string Value { get; set; } } } diff --git a/src/Stripe.net/Entities/FundingInstructions/FundingInstructions.cs b/src/Stripe.net/Entities/FundingInstructions/FundingInstructions.cs index a9dba40a7d..a7304f39e6 100644 --- a/src/Stripe.net/Entities/FundingInstructions/FundingInstructions.cs +++ b/src/Stripe.net/Entities/FundingInstructions/FundingInstructions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// Each customer has a , IHasObject /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } [JsonProperty("bank_transfer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_transfer")] +#endif public FundingInstructionsBankTransfer BankTransfer { get; set; } /// @@ -29,12 +38,18 @@ public class FundingInstructions : StripeEntity, IHasObject /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// /// The funding_type of the returned instructions. /// [JsonProperty("funding_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("funding_type")] +#endif public string FundingType { get; set; } /// @@ -42,6 +57,9 @@ public class FundingInstructions : StripeEntity, IHasObject /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } } } diff --git a/src/Stripe.net/Entities/FundingInstructions/FundingInstructionsBankTransfer.cs b/src/Stripe.net/Entities/FundingInstructions/FundingInstructionsBankTransfer.cs index 60f584d0df..d8fe40f490 100644 --- a/src/Stripe.net/Entities/FundingInstructions/FundingInstructionsBankTransfer.cs +++ b/src/Stripe.net/Entities/FundingInstructions/FundingInstructionsBankTransfer.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class FundingInstructionsBankTransfer : StripeEntity { @@ -10,12 +13,18 @@ public class FundingInstructionsBankTransfer : StripeEntity [JsonProperty("country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country")] +#endif public string Country { get; set; } /// /// A list of financial addresses that can be used to fund a particular balance. /// [JsonProperty("financial_addresses")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("financial_addresses")] +#endif public List FinancialAddresses { get; set; } /// @@ -23,6 +32,9 @@ public class FundingInstructionsBankTransfer : StripeEntityeu_bank_transfer, or jp_bank_transfer. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/FundingInstructions/FundingInstructionsBankTransferFinancialAddress.cs b/src/Stripe.net/Entities/FundingInstructions/FundingInstructionsBankTransferFinancialAddress.cs index fae18bdde7..41329d019d 100644 --- a/src/Stripe.net/Entities/FundingInstructions/FundingInstructionsBankTransferFinancialAddress.cs +++ b/src/Stripe.net/Entities/FundingInstructions/FundingInstructionsBankTransferFinancialAddress.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class FundingInstructionsBankTransferFinancialAddress : StripeEntity { @@ -10,24 +13,36 @@ public class FundingInstructionsBankTransferFinancialAddress : StripeEntity [JsonProperty("aba")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("aba")] +#endif public FundingInstructionsBankTransferFinancialAddressAba Aba { get; set; } /// /// Iban Records contain E.U. bank account details per the SEPA format. /// [JsonProperty("iban")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("iban")] +#endif public FundingInstructionsBankTransferFinancialAddressIban Iban { get; set; } /// /// Sort Code Records contain U.K. bank account details per the sort code format. /// [JsonProperty("sort_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sort_code")] +#endif public FundingInstructionsBankTransferFinancialAddressSortCode SortCode { get; set; } /// /// SPEI Records contain Mexico bank account details per the SPEI format. /// [JsonProperty("spei")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("spei")] +#endif public FundingInstructionsBankTransferFinancialAddressSpei Spei { get; set; } /// @@ -36,12 +51,18 @@ public class FundingInstructionsBankTransferFinancialAddress : StripeEntityspei, swift, or zengin. /// [JsonProperty("supported_networks")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("supported_networks")] +#endif public List SupportedNetworks { get; set; } /// /// SWIFT Records contain U.S. bank account details per the SWIFT format. /// [JsonProperty("swift")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("swift")] +#endif public FundingInstructionsBankTransferFinancialAddressSwift Swift { get; set; } /// @@ -50,12 +71,18 @@ public class FundingInstructionsBankTransferFinancialAddress : StripeEntityzengin. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } /// /// Zengin Records contain Japan bank account details per the Zengin format. /// [JsonProperty("zengin")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("zengin")] +#endif public FundingInstructionsBankTransferFinancialAddressZengin Zengin { get; set; } } } diff --git a/src/Stripe.net/Entities/FundingInstructions/FundingInstructionsBankTransferFinancialAddressAba.cs b/src/Stripe.net/Entities/FundingInstructions/FundingInstructionsBankTransferFinancialAddressAba.cs index c76eeb8253..bae87380fb 100644 --- a/src/Stripe.net/Entities/FundingInstructions/FundingInstructionsBankTransferFinancialAddressAba.cs +++ b/src/Stripe.net/Entities/FundingInstructions/FundingInstructionsBankTransferFinancialAddressAba.cs @@ -2,43 +2,67 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class FundingInstructionsBankTransferFinancialAddressAba : StripeEntity { [JsonProperty("account_holder_address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_holder_address")] +#endif public Address AccountHolderAddress { get; set; } /// /// The account holder name. /// [JsonProperty("account_holder_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_holder_name")] +#endif public string AccountHolderName { get; set; } /// /// The ABA account number. /// [JsonProperty("account_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_number")] +#endif public string AccountNumber { get; set; } /// /// The account type. /// [JsonProperty("account_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_type")] +#endif public string AccountType { get; set; } [JsonProperty("bank_address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_address")] +#endif public Address BankAddress { get; set; } /// /// The bank name. /// [JsonProperty("bank_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_name")] +#endif public string BankName { get; set; } /// /// The ABA routing number. /// [JsonProperty("routing_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("routing_number")] +#endif public string RoutingNumber { get; set; } } } diff --git a/src/Stripe.net/Entities/FundingInstructions/FundingInstructionsBankTransferFinancialAddressIban.cs b/src/Stripe.net/Entities/FundingInstructions/FundingInstructionsBankTransferFinancialAddressIban.cs index 632e54c968..01650021e5 100644 --- a/src/Stripe.net/Entities/FundingInstructions/FundingInstructionsBankTransferFinancialAddressIban.cs +++ b/src/Stripe.net/Entities/FundingInstructions/FundingInstructionsBankTransferFinancialAddressIban.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class FundingInstructionsBankTransferFinancialAddressIban : StripeEntity { @@ -9,12 +12,18 @@ public class FundingInstructionsBankTransferFinancialAddressIban : StripeEntity< /// The name of the person or business that owns the bank account. /// [JsonProperty("account_holder_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_holder_name")] +#endif public string AccountHolderName { get; set; } /// /// The BIC/SWIFT code of the account. /// [JsonProperty("bic")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bic")] +#endif public string Bic { get; set; } /// @@ -22,12 +31,18 @@ public class FundingInstructionsBankTransferFinancialAddressIban : StripeEntity< /// 3166-1 alpha-2). /// [JsonProperty("country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country")] +#endif public string Country { get; set; } /// /// The IBAN of the account. /// [JsonProperty("iban")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("iban")] +#endif public string Iban { get; set; } } } diff --git a/src/Stripe.net/Entities/FundingInstructions/FundingInstructionsBankTransferFinancialAddressSortCode.cs b/src/Stripe.net/Entities/FundingInstructions/FundingInstructionsBankTransferFinancialAddressSortCode.cs index f46312c7e3..84ab97ba12 100644 --- a/src/Stripe.net/Entities/FundingInstructions/FundingInstructionsBankTransferFinancialAddressSortCode.cs +++ b/src/Stripe.net/Entities/FundingInstructions/FundingInstructionsBankTransferFinancialAddressSortCode.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class FundingInstructionsBankTransferFinancialAddressSortCode : StripeEntity { @@ -9,18 +12,27 @@ public class FundingInstructionsBankTransferFinancialAddressSortCode : StripeEnt /// The name of the person or business that owns the bank account. /// [JsonProperty("account_holder_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_holder_name")] +#endif public string AccountHolderName { get; set; } /// /// The account number. /// [JsonProperty("account_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_number")] +#endif public string AccountNumber { get; set; } /// /// The six-digit sort code. /// [JsonProperty("sort_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sort_code")] +#endif public string SortCode { get; set; } } } diff --git a/src/Stripe.net/Entities/FundingInstructions/FundingInstructionsBankTransferFinancialAddressSpei.cs b/src/Stripe.net/Entities/FundingInstructions/FundingInstructionsBankTransferFinancialAddressSpei.cs index 3c5de13b2e..a21d01379a 100644 --- a/src/Stripe.net/Entities/FundingInstructions/FundingInstructionsBankTransferFinancialAddressSpei.cs +++ b/src/Stripe.net/Entities/FundingInstructions/FundingInstructionsBankTransferFinancialAddressSpei.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class FundingInstructionsBankTransferFinancialAddressSpei : StripeEntity { @@ -9,18 +12,27 @@ public class FundingInstructionsBankTransferFinancialAddressSpei : StripeEntity< /// The three-digit bank code. /// [JsonProperty("bank_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_code")] +#endif public string BankCode { get; set; } /// /// The short banking institution name. /// [JsonProperty("bank_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_name")] +#endif public string BankName { get; set; } /// /// The CLABE number. /// [JsonProperty("clabe")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("clabe")] +#endif public string Clabe { get; set; } } } diff --git a/src/Stripe.net/Entities/FundingInstructions/FundingInstructionsBankTransferFinancialAddressSwift.cs b/src/Stripe.net/Entities/FundingInstructions/FundingInstructionsBankTransferFinancialAddressSwift.cs index d2006eda34..f8c4c7819a 100644 --- a/src/Stripe.net/Entities/FundingInstructions/FundingInstructionsBankTransferFinancialAddressSwift.cs +++ b/src/Stripe.net/Entities/FundingInstructions/FundingInstructionsBankTransferFinancialAddressSwift.cs @@ -2,43 +2,67 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class FundingInstructionsBankTransferFinancialAddressSwift : StripeEntity { [JsonProperty("account_holder_address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_holder_address")] +#endif public Address AccountHolderAddress { get; set; } /// /// The account holder name. /// [JsonProperty("account_holder_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_holder_name")] +#endif public string AccountHolderName { get; set; } /// /// The account number. /// [JsonProperty("account_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_number")] +#endif public string AccountNumber { get; set; } /// /// The account type. /// [JsonProperty("account_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_type")] +#endif public string AccountType { get; set; } [JsonProperty("bank_address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_address")] +#endif public Address BankAddress { get; set; } /// /// The bank name. /// [JsonProperty("bank_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_name")] +#endif public string BankName { get; set; } /// /// The SWIFT code. /// [JsonProperty("swift_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("swift_code")] +#endif public string SwiftCode { get; set; } } } diff --git a/src/Stripe.net/Entities/FundingInstructions/FundingInstructionsBankTransferFinancialAddressZengin.cs b/src/Stripe.net/Entities/FundingInstructions/FundingInstructionsBankTransferFinancialAddressZengin.cs index 5b1c778375..0e4a131038 100644 --- a/src/Stripe.net/Entities/FundingInstructions/FundingInstructionsBankTransferFinancialAddressZengin.cs +++ b/src/Stripe.net/Entities/FundingInstructions/FundingInstructionsBankTransferFinancialAddressZengin.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class FundingInstructionsBankTransferFinancialAddressZengin : StripeEntity { @@ -9,42 +12,63 @@ public class FundingInstructionsBankTransferFinancialAddressZengin : StripeEntit /// The account holder name. /// [JsonProperty("account_holder_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_holder_name")] +#endif public string AccountHolderName { get; set; } /// /// The account number. /// [JsonProperty("account_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_number")] +#endif public string AccountNumber { get; set; } /// /// The bank account type. In Japan, this can only be futsu or toza. /// [JsonProperty("account_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_type")] +#endif public string AccountType { get; set; } /// /// The bank code of the account. /// [JsonProperty("bank_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_code")] +#endif public string BankCode { get; set; } /// /// The bank name of the account. /// [JsonProperty("bank_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_name")] +#endif public string BankName { get; set; } /// /// The branch code of the account. /// [JsonProperty("branch_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("branch_code")] +#endif public string BranchCode { get; set; } /// /// The branch name of the account. /// [JsonProperty("branch_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("branch_name")] +#endif public string BranchName { get; set; } } } diff --git a/src/Stripe.net/Entities/Identity/VerificationReports/VerificationReport.cs b/src/Stripe.net/Entities/Identity/VerificationReports/VerificationReport.cs index 44ef2c2f28..c0e0cae7c6 100644 --- a/src/Stripe.net/Entities/Identity/VerificationReports/VerificationReport.cs +++ b/src/Stripe.net/Entities/Identity/VerificationReports/VerificationReport.cs @@ -4,6 +4,9 @@ namespace Stripe.Identity using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// A VerificationReport is the result of an attempt to collect and verify data from a user. @@ -29,12 +32,18 @@ public class VerificationReport : StripeEntity, IHasId, IHas /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// @@ -42,6 +51,9 @@ public class VerificationReport : StripeEntity, IHasId, IHas /// and can be used to reconcile this verification with your internal systems. /// [JsonProperty("client_reference_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("client_reference_id")] +#endif public string ClientReferenceId { get; set; } /// @@ -49,24 +61,37 @@ public class VerificationReport : StripeEntity, IHasId, IHas /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// /// Result from a document check. /// [JsonProperty("document")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("document")] +#endif public VerificationReportDocument Document { get; set; } /// /// Result from a email check. /// [JsonProperty("email")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("email")] +#endif public VerificationReportEmail Email { get; set; } /// /// Result from an id_number check. /// [JsonProperty("id_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id_number")] +#endif public VerificationReportIdNumber IdNumber { get; set; } /// @@ -74,21 +99,33 @@ public class VerificationReport : StripeEntity, IHasId, IHas /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } [JsonProperty("options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("options")] +#endif public VerificationReportOptions Options { get; set; } /// /// Result from a phone check. /// [JsonProperty("phone")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("phone")] +#endif public VerificationReportPhone Phone { get; set; } /// /// Result from a selfie check. /// [JsonProperty("selfie")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("selfie")] +#endif public VerificationReportSelfie Selfie { get; set; } /// @@ -96,18 +133,27 @@ public class VerificationReport : StripeEntity, IHasId, IHas /// One of: document, id_number, or verification_flow. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } /// /// The configuration token of a verification flow from the dashboard. /// [JsonProperty("verification_flow")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("verification_flow")] +#endif public string VerificationFlow { get; set; } /// /// ID of the VerificationSession that created this report. /// [JsonProperty("verification_session")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("verification_session")] +#endif public string VerificationSession { get; set; } } } diff --git a/src/Stripe.net/Entities/Identity/VerificationReports/VerificationReportDocument.cs b/src/Stripe.net/Entities/Identity/VerificationReports/VerificationReportDocument.cs index 965cbdcf1c..70def1394a 100644 --- a/src/Stripe.net/Entities/Identity/VerificationReports/VerificationReportDocument.cs +++ b/src/Stripe.net/Entities/Identity/VerificationReports/VerificationReportDocument.cs @@ -3,6 +3,9 @@ namespace Stripe.Identity { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class VerificationReportDocument : StripeEntity { @@ -10,24 +13,36 @@ public class VerificationReportDocument : StripeEntity [JsonProperty("address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address")] +#endif public Address Address { get; set; } /// /// Date of birth as it appears in the document. /// [JsonProperty("dob")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("dob")] +#endif public VerificationReportDocumentDob Dob { get; set; } /// /// Details on the verification error. Present when status is unverified. /// [JsonProperty("error")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("error")] +#endif public VerificationReportDocumentError Error { get; set; } /// /// Expiration date of the document. /// [JsonProperty("expiration_date")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("expiration_date")] +#endif public VerificationReportDocumentExpirationDate ExpirationDate { get; set; } /// @@ -35,36 +50,54 @@ public class VerificationReportDocument : StripeEntity [JsonProperty("files")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("files")] +#endif public List Files { get; set; } /// /// First name as it appears in the document. /// [JsonProperty("first_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("first_name")] +#endif public string FirstName { get; set; } /// /// Issued date of the document. /// [JsonProperty("issued_date")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("issued_date")] +#endif public VerificationReportDocumentIssuedDate IssuedDate { get; set; } /// /// Issuing country of the document. /// [JsonProperty("issuing_country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("issuing_country")] +#endif public string IssuingCountry { get; set; } /// /// Last name as it appears in the document. /// [JsonProperty("last_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last_name")] +#endif public string LastName { get; set; } /// /// Document ID number. /// [JsonProperty("number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("number")] +#endif public string Number { get; set; } /// @@ -72,6 +105,9 @@ public class VerificationReportDocument : StripeEntityunverified, or verified. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } /// @@ -79,6 +115,9 @@ public class VerificationReportDocument : StripeEntitydriving_license, id_card, or passport. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Identity/VerificationReports/VerificationReportDocumentDob.cs b/src/Stripe.net/Entities/Identity/VerificationReports/VerificationReportDocumentDob.cs index 7c225abb82..5da700210d 100644 --- a/src/Stripe.net/Entities/Identity/VerificationReports/VerificationReportDocumentDob.cs +++ b/src/Stripe.net/Entities/Identity/VerificationReports/VerificationReportDocumentDob.cs @@ -2,6 +2,9 @@ namespace Stripe.Identity { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class VerificationReportDocumentDob : StripeEntity { @@ -9,18 +12,27 @@ public class VerificationReportDocumentDob : StripeEntity [JsonProperty("day")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("day")] +#endif public long? Day { get; set; } /// /// Numerical month between 1 and 12. /// [JsonProperty("month")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("month")] +#endif public long? Month { get; set; } /// /// The four-digit year. /// [JsonProperty("year")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("year")] +#endif public long? Year { get; set; } } } diff --git a/src/Stripe.net/Entities/Identity/VerificationReports/VerificationReportDocumentError.cs b/src/Stripe.net/Entities/Identity/VerificationReports/VerificationReportDocumentError.cs index a96ad137a7..54763ad56b 100644 --- a/src/Stripe.net/Entities/Identity/VerificationReports/VerificationReportDocumentError.cs +++ b/src/Stripe.net/Entities/Identity/VerificationReports/VerificationReportDocumentError.cs @@ -2,6 +2,9 @@ namespace Stripe.Identity { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class VerificationReportDocumentError : StripeEntity { @@ -11,6 +14,9 @@ public class VerificationReportDocumentError : StripeEntitydocument_unverified_other. /// [JsonProperty("code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("code")] +#endif public string Code { get; set; } /// @@ -18,6 +24,9 @@ public class VerificationReportDocumentError : StripeEntity [JsonProperty("reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reason")] +#endif public string Reason { get; set; } } } diff --git a/src/Stripe.net/Entities/Identity/VerificationReports/VerificationReportDocumentExpirationDate.cs b/src/Stripe.net/Entities/Identity/VerificationReports/VerificationReportDocumentExpirationDate.cs index 835ce6897e..796fbcfd89 100644 --- a/src/Stripe.net/Entities/Identity/VerificationReports/VerificationReportDocumentExpirationDate.cs +++ b/src/Stripe.net/Entities/Identity/VerificationReports/VerificationReportDocumentExpirationDate.cs @@ -2,6 +2,9 @@ namespace Stripe.Identity { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class VerificationReportDocumentExpirationDate : StripeEntity { @@ -9,18 +12,27 @@ public class VerificationReportDocumentExpirationDate : StripeEntity [JsonProperty("day")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("day")] +#endif public long? Day { get; set; } /// /// Numerical month between 1 and 12. /// [JsonProperty("month")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("month")] +#endif public long? Month { get; set; } /// /// The four-digit year. /// [JsonProperty("year")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("year")] +#endif public long? Year { get; set; } } } diff --git a/src/Stripe.net/Entities/Identity/VerificationReports/VerificationReportDocumentIssuedDate.cs b/src/Stripe.net/Entities/Identity/VerificationReports/VerificationReportDocumentIssuedDate.cs index 99fcc21a3d..f7c5355543 100644 --- a/src/Stripe.net/Entities/Identity/VerificationReports/VerificationReportDocumentIssuedDate.cs +++ b/src/Stripe.net/Entities/Identity/VerificationReports/VerificationReportDocumentIssuedDate.cs @@ -2,6 +2,9 @@ namespace Stripe.Identity { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class VerificationReportDocumentIssuedDate : StripeEntity { @@ -9,18 +12,27 @@ public class VerificationReportDocumentIssuedDate : StripeEntity [JsonProperty("day")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("day")] +#endif public long? Day { get; set; } /// /// Numerical month between 1 and 12. /// [JsonProperty("month")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("month")] +#endif public long? Month { get; set; } /// /// The four-digit year. /// [JsonProperty("year")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("year")] +#endif public long? Year { get; set; } } } diff --git a/src/Stripe.net/Entities/Identity/VerificationReports/VerificationReportEmail.cs b/src/Stripe.net/Entities/Identity/VerificationReports/VerificationReportEmail.cs index 2ea8ea3bb5..a90ecc05f6 100644 --- a/src/Stripe.net/Entities/Identity/VerificationReports/VerificationReportEmail.cs +++ b/src/Stripe.net/Entities/Identity/VerificationReports/VerificationReportEmail.cs @@ -2,6 +2,9 @@ namespace Stripe.Identity { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class VerificationReportEmail : StripeEntity { @@ -9,12 +12,18 @@ public class VerificationReportEmail : StripeEntity /// Email to be verified. /// [JsonProperty("email")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("email")] +#endif public string Email { get; set; } /// /// Details on the verification error. Present when status is unverified. /// [JsonProperty("error")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("error")] +#endif public VerificationReportEmailError Error { get; set; } /// @@ -22,6 +31,9 @@ public class VerificationReportEmail : StripeEntity /// One of: unverified, or verified. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } } } diff --git a/src/Stripe.net/Entities/Identity/VerificationReports/VerificationReportEmailError.cs b/src/Stripe.net/Entities/Identity/VerificationReports/VerificationReportEmailError.cs index 74ad000138..6614149207 100644 --- a/src/Stripe.net/Entities/Identity/VerificationReports/VerificationReportEmailError.cs +++ b/src/Stripe.net/Entities/Identity/VerificationReports/VerificationReportEmailError.cs @@ -2,6 +2,9 @@ namespace Stripe.Identity { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class VerificationReportEmailError : StripeEntity { @@ -10,6 +13,9 @@ public class VerificationReportEmailError : StripeEntityemail_unverified_other, or email_verification_declined. /// [JsonProperty("code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("code")] +#endif public string Code { get; set; } /// @@ -17,6 +23,9 @@ public class VerificationReportEmailError : StripeEntity [JsonProperty("reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reason")] +#endif public string Reason { get; set; } } } diff --git a/src/Stripe.net/Entities/Identity/VerificationReports/VerificationReportIdNumber.cs b/src/Stripe.net/Entities/Identity/VerificationReports/VerificationReportIdNumber.cs index e359ef79c2..a684640a37 100644 --- a/src/Stripe.net/Entities/Identity/VerificationReports/VerificationReportIdNumber.cs +++ b/src/Stripe.net/Entities/Identity/VerificationReports/VerificationReportIdNumber.cs @@ -2,6 +2,9 @@ namespace Stripe.Identity { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class VerificationReportIdNumber : StripeEntity { @@ -9,18 +12,27 @@ public class VerificationReportIdNumber : StripeEntity [JsonProperty("dob")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("dob")] +#endif public VerificationReportIdNumberDob Dob { get; set; } /// /// Details on the verification error. Present when status is unverified. /// [JsonProperty("error")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("error")] +#endif public VerificationReportIdNumberError Error { get; set; } /// /// First name. /// [JsonProperty("first_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("first_name")] +#endif public string FirstName { get; set; } /// @@ -28,6 +40,9 @@ public class VerificationReportIdNumber : StripeEntity [JsonProperty("id_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id_number")] +#endif public string IdNumber { get; set; } /// @@ -35,12 +50,18 @@ public class VerificationReportIdNumber : StripeEntitybr_cpf, sg_nric, or us_ssn. /// [JsonProperty("id_number_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id_number_type")] +#endif public string IdNumberType { get; set; } /// /// Last name. /// [JsonProperty("last_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last_name")] +#endif public string LastName { get; set; } /// @@ -48,6 +69,9 @@ public class VerificationReportIdNumber : StripeEntityunverified, or verified. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } } } diff --git a/src/Stripe.net/Entities/Identity/VerificationReports/VerificationReportIdNumberDob.cs b/src/Stripe.net/Entities/Identity/VerificationReports/VerificationReportIdNumberDob.cs index fcf6d8d613..6240666b7a 100644 --- a/src/Stripe.net/Entities/Identity/VerificationReports/VerificationReportIdNumberDob.cs +++ b/src/Stripe.net/Entities/Identity/VerificationReports/VerificationReportIdNumberDob.cs @@ -2,6 +2,9 @@ namespace Stripe.Identity { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class VerificationReportIdNumberDob : StripeEntity { @@ -9,18 +12,27 @@ public class VerificationReportIdNumberDob : StripeEntity [JsonProperty("day")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("day")] +#endif public long? Day { get; set; } /// /// Numerical month between 1 and 12. /// [JsonProperty("month")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("month")] +#endif public long? Month { get; set; } /// /// The four-digit year. /// [JsonProperty("year")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("year")] +#endif public long? Year { get; set; } } } diff --git a/src/Stripe.net/Entities/Identity/VerificationReports/VerificationReportIdNumberError.cs b/src/Stripe.net/Entities/Identity/VerificationReports/VerificationReportIdNumberError.cs index 495f3ab4b1..aac8d3e955 100644 --- a/src/Stripe.net/Entities/Identity/VerificationReports/VerificationReportIdNumberError.cs +++ b/src/Stripe.net/Entities/Identity/VerificationReports/VerificationReportIdNumberError.cs @@ -2,6 +2,9 @@ namespace Stripe.Identity { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class VerificationReportIdNumberError : StripeEntity { @@ -11,6 +14,9 @@ public class VerificationReportIdNumberError : StripeEntityid_number_unverified_other. /// [JsonProperty("code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("code")] +#endif public string Code { get; set; } /// @@ -18,6 +24,9 @@ public class VerificationReportIdNumberError : StripeEntity [JsonProperty("reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reason")] +#endif public string Reason { get; set; } } } diff --git a/src/Stripe.net/Entities/Identity/VerificationReports/VerificationReportOptions.cs b/src/Stripe.net/Entities/Identity/VerificationReports/VerificationReportOptions.cs index 76b416336d..cd2d8662ac 100644 --- a/src/Stripe.net/Entities/Identity/VerificationReports/VerificationReportOptions.cs +++ b/src/Stripe.net/Entities/Identity/VerificationReports/VerificationReportOptions.cs @@ -2,13 +2,22 @@ namespace Stripe.Identity { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class VerificationReportOptions : StripeEntity { [JsonProperty("document")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("document")] +#endif public VerificationReportOptionsDocument Document { get; set; } [JsonProperty("id_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id_number")] +#endif public VerificationReportOptionsIdNumber IdNumber { get; set; } } } diff --git a/src/Stripe.net/Entities/Identity/VerificationReports/VerificationReportOptionsDocument.cs b/src/Stripe.net/Entities/Identity/VerificationReports/VerificationReportOptionsDocument.cs index 7a5507f110..2530303713 100644 --- a/src/Stripe.net/Entities/Identity/VerificationReports/VerificationReportOptionsDocument.cs +++ b/src/Stripe.net/Entities/Identity/VerificationReports/VerificationReportOptionsDocument.cs @@ -3,6 +3,9 @@ namespace Stripe.Identity { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class VerificationReportOptionsDocument : StripeEntity { @@ -13,6 +16,9 @@ public class VerificationReportOptionsDocument : StripeEntitydriving_license, id_card, or passport. /// [JsonProperty("allowed_types")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("allowed_types")] +#endif public List AllowedTypes { get; set; } /// @@ -21,6 +27,9 @@ public class VerificationReportOptionsDocument : StripeEntity with the document’s extracted name and date of birth. /// [JsonProperty("require_id_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("require_id_number")] +#endif public bool RequireIdNumber { get; set; } /// @@ -28,6 +37,9 @@ public class VerificationReportOptionsDocument : StripeEntity [JsonProperty("require_live_capture")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("require_live_capture")] +#endif public bool RequireLiveCapture { get; set; } /// @@ -37,6 +49,9 @@ public class VerificationReportOptionsDocument : StripeEntityLearn more. /// [JsonProperty("require_matching_selfie")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("require_matching_selfie")] +#endif public bool RequireMatchingSelfie { get; set; } } } diff --git a/src/Stripe.net/Entities/Identity/VerificationReports/VerificationReportPhone.cs b/src/Stripe.net/Entities/Identity/VerificationReports/VerificationReportPhone.cs index b456140284..ce22dd4498 100644 --- a/src/Stripe.net/Entities/Identity/VerificationReports/VerificationReportPhone.cs +++ b/src/Stripe.net/Entities/Identity/VerificationReports/VerificationReportPhone.cs @@ -2,6 +2,9 @@ namespace Stripe.Identity { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class VerificationReportPhone : StripeEntity { @@ -9,12 +12,18 @@ public class VerificationReportPhone : StripeEntity /// Details on the verification error. Present when status is unverified. /// [JsonProperty("error")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("error")] +#endif public VerificationReportPhoneError Error { get; set; } /// /// Phone to be verified. /// [JsonProperty("phone")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("phone")] +#endif public string Phone { get; set; } /// @@ -22,6 +31,9 @@ public class VerificationReportPhone : StripeEntity /// One of: unverified, or verified. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } } } diff --git a/src/Stripe.net/Entities/Identity/VerificationReports/VerificationReportPhoneError.cs b/src/Stripe.net/Entities/Identity/VerificationReports/VerificationReportPhoneError.cs index e3c31ed296..bef6992f13 100644 --- a/src/Stripe.net/Entities/Identity/VerificationReports/VerificationReportPhoneError.cs +++ b/src/Stripe.net/Entities/Identity/VerificationReports/VerificationReportPhoneError.cs @@ -2,6 +2,9 @@ namespace Stripe.Identity { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class VerificationReportPhoneError : StripeEntity { @@ -10,6 +13,9 @@ public class VerificationReportPhoneError : StripeEntityphone_unverified_other, or phone_verification_declined. /// [JsonProperty("code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("code")] +#endif public string Code { get; set; } /// @@ -17,6 +23,9 @@ public class VerificationReportPhoneError : StripeEntity [JsonProperty("reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reason")] +#endif public string Reason { get; set; } } } diff --git a/src/Stripe.net/Entities/Identity/VerificationReports/VerificationReportSelfie.cs b/src/Stripe.net/Entities/Identity/VerificationReports/VerificationReportSelfie.cs index 6f76b93cd2..0a2d375d68 100644 --- a/src/Stripe.net/Entities/Identity/VerificationReports/VerificationReportSelfie.cs +++ b/src/Stripe.net/Entities/Identity/VerificationReports/VerificationReportSelfie.cs @@ -2,6 +2,9 @@ namespace Stripe.Identity { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class VerificationReportSelfie : StripeEntity { @@ -10,12 +13,18 @@ public class VerificationReportSelfie : StripeEntity /// identity document used in this check. /// [JsonProperty("document")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("document")] +#endif public string Document { get; set; } /// /// Details on the verification error. Present when status is unverified. /// [JsonProperty("error")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("error")] +#endif public VerificationReportSelfieError Error { get; set; } /// @@ -23,6 +32,9 @@ public class VerificationReportSelfie : StripeEntity /// selfie used in this check. /// [JsonProperty("selfie")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("selfie")] +#endif public string Selfie { get; set; } /// @@ -30,6 +42,9 @@ public class VerificationReportSelfie : StripeEntity /// One of: unverified, or verified. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } } } diff --git a/src/Stripe.net/Entities/Identity/VerificationReports/VerificationReportSelfieError.cs b/src/Stripe.net/Entities/Identity/VerificationReports/VerificationReportSelfieError.cs index 21b2210435..8dc277a491 100644 --- a/src/Stripe.net/Entities/Identity/VerificationReports/VerificationReportSelfieError.cs +++ b/src/Stripe.net/Entities/Identity/VerificationReports/VerificationReportSelfieError.cs @@ -2,6 +2,9 @@ namespace Stripe.Identity { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class VerificationReportSelfieError : StripeEntity { @@ -11,6 +14,9 @@ public class VerificationReportSelfieError : StripeEntityselfie_manipulated, or selfie_unverified_other. /// [JsonProperty("code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("code")] +#endif public string Code { get; set; } /// @@ -18,6 +24,9 @@ public class VerificationReportSelfieError : StripeEntity [JsonProperty("reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reason")] +#endif public string Reason { get; set; } } } diff --git a/src/Stripe.net/Entities/Identity/VerificationSessions/VerificationSession.cs b/src/Stripe.net/Entities/Identity/VerificationSessions/VerificationSession.cs index 6082800239..9139b15120 100644 --- a/src/Stripe.net/Entities/Identity/VerificationSessions/VerificationSession.cs +++ b/src/Stripe.net/Entities/Identity/VerificationSessions/VerificationSession.cs @@ -5,6 +5,9 @@ namespace Stripe.Identity using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// A VerificationSession guides you through the process of collecting and verifying the @@ -22,18 +25,27 @@ namespace Stripe.Identity /// Related guide: The /// Verification Sessions API. /// +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class VerificationSession : StripeEntity, IHasId, IHasMetadata, IHasObject { /// /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// @@ -41,6 +53,9 @@ public class VerificationSession : StripeEntity, IHasId, IH /// and can be used to reconcile this verification with your internal systems. /// [JsonProperty("client_reference_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("client_reference_id")] +#endif public string ClientReferenceId { get; set; } /// @@ -54,6 +69,9 @@ public class VerificationSession : StripeEntity, IHasId, IH /// client secret to the frontend to learn more. /// [JsonProperty("client_secret")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("client_secret")] +#endif public string ClientSecret { get; set; } /// @@ -61,6 +79,10 @@ public class VerificationSession : StripeEntity, IHasId, IH /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -68,6 +90,9 @@ public class VerificationSession : StripeEntity, IHasId, IH /// verification. /// [JsonProperty("last_error")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last_error")] +#endif public VerificationSessionLastError LastError { get; set; } #region Expandable LastVerificationReport @@ -79,6 +104,9 @@ public class VerificationSession : StripeEntity, IHasId, IH /// accessing detailed verification results.. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string LastVerificationReportId { get => this.InternalLastVerificationReport?.Id; @@ -94,6 +122,9 @@ public string LastVerificationReportId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public VerificationReport LastVerificationReport { get => this.InternalLastVerificationReport?.ExpandedObject; @@ -102,6 +133,10 @@ public VerificationReport LastVerificationReport [JsonProperty("last_verification_report")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last_verification_report")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalLastVerificationReport { get; set; } #endregion @@ -110,6 +145,9 @@ public VerificationReport LastVerificationReport /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// @@ -118,18 +156,27 @@ public VerificationReport LastVerificationReport /// object in a structured format. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// A set of options for the session’s verification checks. /// [JsonProperty("options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("options")] +#endif public VerificationSessionOptions Options { get; set; } /// /// Details provided about the user being verified. These details may be shown to the user. /// [JsonProperty("provided_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("provided_details")] +#endif public VerificationSessionProvidedDetails ProvidedDetails { get; set; } /// @@ -137,12 +184,18 @@ public VerificationReport LastVerificationReport /// redacted, this field will be null. /// [JsonProperty("redaction")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("redaction")] +#endif public VerificationSessionRedaction Redaction { get; set; } /// /// Token referencing a Customer resource. /// [JsonProperty("related_customer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_customer")] +#endif public string RelatedCustomer { get; set; } /// @@ -152,6 +205,9 @@ public VerificationReport LastVerificationReport /// One of: canceled, processing, requires_input, or verified. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } /// @@ -160,6 +216,9 @@ public VerificationReport LastVerificationReport /// One of: document, id_number, or verification_flow. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } /// @@ -171,18 +230,27 @@ public VerificationReport LastVerificationReport /// identity documents to learn how to redirect users to Stripe. /// [JsonProperty("url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("url")] +#endif public string Url { get; set; } /// /// The configuration token of a verification flow from the dashboard. /// [JsonProperty("verification_flow")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("verification_flow")] +#endif public string VerificationFlow { get; set; } /// /// The user’s verified data. /// [JsonProperty("verified_outputs")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("verified_outputs")] +#endif public VerificationSessionVerifiedOutputs VerifiedOutputs { get; set; } } } diff --git a/src/Stripe.net/Entities/Identity/VerificationSessions/VerificationSessionLastError.cs b/src/Stripe.net/Entities/Identity/VerificationSessions/VerificationSessionLastError.cs index 4070f7bdf6..7f5f230307 100644 --- a/src/Stripe.net/Entities/Identity/VerificationSessions/VerificationSessionLastError.cs +++ b/src/Stripe.net/Entities/Identity/VerificationSessions/VerificationSessionLastError.cs @@ -2,6 +2,9 @@ namespace Stripe.Identity { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class VerificationSessionLastError : StripeEntity { @@ -19,12 +22,18 @@ public class VerificationSessionLastError : StripeEntityunder_supported_age. /// [JsonProperty("code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("code")] +#endif public string Code { get; set; } /// /// A message that explains the reason for verification or user-session failure. /// [JsonProperty("reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reason")] +#endif public string Reason { get; set; } } } diff --git a/src/Stripe.net/Entities/Identity/VerificationSessions/VerificationSessionOptions.cs b/src/Stripe.net/Entities/Identity/VerificationSessions/VerificationSessionOptions.cs index ef3a92c965..f34588e9f7 100644 --- a/src/Stripe.net/Entities/Identity/VerificationSessions/VerificationSessionOptions.cs +++ b/src/Stripe.net/Entities/Identity/VerificationSessions/VerificationSessionOptions.cs @@ -2,19 +2,34 @@ namespace Stripe.Identity { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class VerificationSessionOptions : StripeEntity { [JsonProperty("document")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("document")] +#endif public VerificationSessionOptionsDocument Document { get; set; } [JsonProperty("email")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("email")] +#endif public VerificationSessionOptionsEmail Email { get; set; } [JsonProperty("id_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id_number")] +#endif public VerificationSessionOptionsIdNumber IdNumber { get; set; } [JsonProperty("phone")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("phone")] +#endif public VerificationSessionOptionsPhone Phone { get; set; } } } diff --git a/src/Stripe.net/Entities/Identity/VerificationSessions/VerificationSessionOptionsDocument.cs b/src/Stripe.net/Entities/Identity/VerificationSessions/VerificationSessionOptionsDocument.cs index 13b2c2f9cb..45a03ff994 100644 --- a/src/Stripe.net/Entities/Identity/VerificationSessions/VerificationSessionOptionsDocument.cs +++ b/src/Stripe.net/Entities/Identity/VerificationSessions/VerificationSessionOptionsDocument.cs @@ -3,6 +3,9 @@ namespace Stripe.Identity { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class VerificationSessionOptionsDocument : StripeEntity { @@ -13,6 +16,9 @@ public class VerificationSessionOptionsDocument : StripeEntitydriving_license, id_card, or passport. /// [JsonProperty("allowed_types")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("allowed_types")] +#endif public List AllowedTypes { get; set; } /// @@ -21,6 +27,9 @@ public class VerificationSessionOptionsDocument : StripeEntity with the document’s extracted name and date of birth. /// [JsonProperty("require_id_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("require_id_number")] +#endif public bool RequireIdNumber { get; set; } /// @@ -28,6 +37,9 @@ public class VerificationSessionOptionsDocument : StripeEntity [JsonProperty("require_live_capture")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("require_live_capture")] +#endif public bool RequireLiveCapture { get; set; } /// @@ -37,6 +49,9 @@ public class VerificationSessionOptionsDocument : StripeEntityLearn more. /// [JsonProperty("require_matching_selfie")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("require_matching_selfie")] +#endif public bool RequireMatchingSelfie { get; set; } } } diff --git a/src/Stripe.net/Entities/Identity/VerificationSessions/VerificationSessionOptionsEmail.cs b/src/Stripe.net/Entities/Identity/VerificationSessions/VerificationSessionOptionsEmail.cs index 5af0950a0a..e158d276b9 100644 --- a/src/Stripe.net/Entities/Identity/VerificationSessions/VerificationSessionOptionsEmail.cs +++ b/src/Stripe.net/Entities/Identity/VerificationSessions/VerificationSessionOptionsEmail.cs @@ -2,6 +2,9 @@ namespace Stripe.Identity { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class VerificationSessionOptionsEmail : StripeEntity { @@ -9,6 +12,9 @@ public class VerificationSessionOptionsEmail : StripeEntityprovided_details.email. /// [JsonProperty("require_verification")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("require_verification")] +#endif public bool RequireVerification { get; set; } } } diff --git a/src/Stripe.net/Entities/Identity/VerificationSessions/VerificationSessionOptionsPhone.cs b/src/Stripe.net/Entities/Identity/VerificationSessions/VerificationSessionOptionsPhone.cs index 7314905141..b60cf6c22c 100644 --- a/src/Stripe.net/Entities/Identity/VerificationSessions/VerificationSessionOptionsPhone.cs +++ b/src/Stripe.net/Entities/Identity/VerificationSessions/VerificationSessionOptionsPhone.cs @@ -2,6 +2,9 @@ namespace Stripe.Identity { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class VerificationSessionOptionsPhone : StripeEntity { @@ -9,6 +12,9 @@ public class VerificationSessionOptionsPhone : StripeEntityprovided_details.phone. /// [JsonProperty("require_verification")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("require_verification")] +#endif public bool RequireVerification { get; set; } } } diff --git a/src/Stripe.net/Entities/Identity/VerificationSessions/VerificationSessionProvidedDetails.cs b/src/Stripe.net/Entities/Identity/VerificationSessions/VerificationSessionProvidedDetails.cs index 4a77de95de..589c81ac34 100644 --- a/src/Stripe.net/Entities/Identity/VerificationSessions/VerificationSessionProvidedDetails.cs +++ b/src/Stripe.net/Entities/Identity/VerificationSessions/VerificationSessionProvidedDetails.cs @@ -2,6 +2,9 @@ namespace Stripe.Identity { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class VerificationSessionProvidedDetails : StripeEntity { @@ -9,12 +12,18 @@ public class VerificationSessionProvidedDetails : StripeEntity [JsonProperty("email")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("email")] +#endif public string Email { get; set; } /// /// Phone number of user being verified. /// [JsonProperty("phone")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("phone")] +#endif public string Phone { get; set; } } } diff --git a/src/Stripe.net/Entities/Identity/VerificationSessions/VerificationSessionRedaction.cs b/src/Stripe.net/Entities/Identity/VerificationSessions/VerificationSessionRedaction.cs index 1b359b5ac6..f3571802bd 100644 --- a/src/Stripe.net/Entities/Identity/VerificationSessions/VerificationSessionRedaction.cs +++ b/src/Stripe.net/Entities/Identity/VerificationSessions/VerificationSessionRedaction.cs @@ -2,6 +2,9 @@ namespace Stripe.Identity { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class VerificationSessionRedaction : StripeEntity { @@ -10,6 +13,9 @@ public class VerificationSessionRedaction : StripeEntityprocessing, or redacted. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } } } diff --git a/src/Stripe.net/Entities/Identity/VerificationSessions/VerificationSessionVerifiedOutputs.cs b/src/Stripe.net/Entities/Identity/VerificationSessions/VerificationSessionVerifiedOutputs.cs index 97f6f11786..52bae6219c 100644 --- a/src/Stripe.net/Entities/Identity/VerificationSessions/VerificationSessionVerifiedOutputs.cs +++ b/src/Stripe.net/Entities/Identity/VerificationSessions/VerificationSessionVerifiedOutputs.cs @@ -2,6 +2,9 @@ namespace Stripe.Identity { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class VerificationSessionVerifiedOutputs : StripeEntity { @@ -9,30 +12,45 @@ public class VerificationSessionVerifiedOutputs : StripeEntity [JsonProperty("address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address")] +#endif public Address Address { get; set; } /// /// The user’s verified date of birth. /// [JsonProperty("dob")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("dob")] +#endif public VerificationSessionVerifiedOutputsDob Dob { get; set; } /// /// The user's verified email address. /// [JsonProperty("email")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("email")] +#endif public string Email { get; set; } /// /// The user's verified first name. /// [JsonProperty("first_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("first_name")] +#endif public string FirstName { get; set; } /// /// The user's verified id number. /// [JsonProperty("id_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id_number")] +#endif public string IdNumber { get; set; } /// @@ -40,18 +58,27 @@ public class VerificationSessionVerifiedOutputs : StripeEntitybr_cpf, sg_nric, or us_ssn. /// [JsonProperty("id_number_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id_number_type")] +#endif public string IdNumberType { get; set; } /// /// The user's verified last name. /// [JsonProperty("last_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last_name")] +#endif public string LastName { get; set; } /// /// The user's verified phone number. /// [JsonProperty("phone")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("phone")] +#endif public string Phone { get; set; } } } diff --git a/src/Stripe.net/Entities/Identity/VerificationSessions/VerificationSessionVerifiedOutputsDob.cs b/src/Stripe.net/Entities/Identity/VerificationSessions/VerificationSessionVerifiedOutputsDob.cs index 80904bdb04..01aa338fe2 100644 --- a/src/Stripe.net/Entities/Identity/VerificationSessions/VerificationSessionVerifiedOutputsDob.cs +++ b/src/Stripe.net/Entities/Identity/VerificationSessions/VerificationSessionVerifiedOutputsDob.cs @@ -2,6 +2,9 @@ namespace Stripe.Identity { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class VerificationSessionVerifiedOutputsDob : StripeEntity { @@ -9,18 +12,27 @@ public class VerificationSessionVerifiedOutputsDob : StripeEntity [JsonProperty("day")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("day")] +#endif public long? Day { get; set; } /// /// Numerical month between 1 and 12. /// [JsonProperty("month")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("month")] +#endif public long? Month { get; set; } /// /// The four-digit year. /// [JsonProperty("year")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("year")] +#endif public long? Year { get; set; } } } diff --git a/src/Stripe.net/Entities/InvoiceItems/InvoiceItem.cs b/src/Stripe.net/Entities/InvoiceItems/InvoiceItem.cs index 0f9fff04db..352bf38368 100644 --- a/src/Stripe.net/Entities/InvoiceItems/InvoiceItem.cs +++ b/src/Stripe.net/Entities/InvoiceItems/InvoiceItem.cs @@ -6,6 +6,9 @@ namespace Stripe using System.Linq; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// Invoice Items represent the component lines of an Subscription /// Invoices. /// +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class InvoiceItem : StripeEntity, IHasId, IHasMetadata, IHasObject { /// /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// @@ -47,6 +59,9 @@ public class InvoiceItem : StripeEntity, IHasId, IHasMetadata, IHas /// equal to unit_amount * quantity. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long Amount { get; set; } /// @@ -55,6 +70,9 @@ public class InvoiceItem : StripeEntity, IHasId, IHasMetadata, IHas /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } #region Expandable Customer @@ -64,6 +82,9 @@ public class InvoiceItem : StripeEntity, IHasId, IHasMetadata, IHas /// The ID of the customer who will be billed when this invoice item is billed. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string CustomerId { get => this.InternalCustomer?.Id; @@ -77,6 +98,9 @@ public string CustomerId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Customer Customer { get => this.InternalCustomer?.ExpandedObject; @@ -85,6 +109,10 @@ public Customer Customer [JsonProperty("customer")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalCustomer { get; set; } #endregion @@ -93,24 +121,38 @@ public Customer Customer /// [JsonProperty("date")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("date")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Date { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// /// Whether this object is deleted or not. /// [JsonProperty("deleted", NullValueHandling = NullValueHandling.Ignore)] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("deleted")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] +#endif public bool? Deleted { get; set; } /// /// An arbitrary string attached to the object. Often useful for displaying to users. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// /// If true, discounts will apply to this invoice item. Always false for prorations. /// [JsonProperty("discountable")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discountable")] +#endif public bool Discountable { get; set; } #region Expandable Discounts @@ -121,6 +163,9 @@ public Customer Customer /// discounts. Use expand[]=discounts to expand each discount. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public List DiscountIds { get => this.InternalDiscounts?.Select((x) => x.Id).ToList(); @@ -135,6 +180,9 @@ public List DiscountIds /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public List Discounts { get => this.InternalDiscounts?.Select((x) => x.ExpandedObject).ToList(); @@ -142,6 +190,9 @@ public List Discounts } [JsonProperty("discounts", ItemConverterType = typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discounts")] +#endif internal List> InternalDiscounts { get; set; } #endregion @@ -152,6 +203,9 @@ public List Discounts /// The ID of the invoice this invoice item belongs to. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string InvoiceId { get => this.InternalInvoice?.Id; @@ -165,6 +219,9 @@ public string InvoiceId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Invoice Invoice { get => this.InternalInvoice?.ExpandedObject; @@ -173,6 +230,10 @@ public Invoice Invoice [JsonProperty("invoice")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("invoice")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalInvoice { get; set; } #endregion @@ -181,6 +242,9 @@ public Invoice Invoice /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// @@ -189,9 +253,15 @@ public Invoice Invoice /// object in a structured format. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } [JsonProperty("period")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("period")] +#endif public InvoiceItemPeriod Period { get; set; } /// @@ -199,12 +269,18 @@ public Invoice Invoice /// computed for. /// [JsonProperty("plan")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("plan")] +#endif public Plan Plan { get; set; } /// /// The price of the invoice item. /// [JsonProperty("price")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("price")] +#endif public Price Price { get; set; } /// @@ -212,6 +288,9 @@ public Invoice Invoice /// customer switched plans. /// [JsonProperty("proration")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("proration")] +#endif public bool Proration { get; set; } /// @@ -219,6 +298,9 @@ public Invoice Invoice /// of the subscription that the proration was computed for. /// [JsonProperty("quantity")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("quantity")] +#endif public long Quantity { get; set; } #region Expandable Subscription @@ -228,6 +310,9 @@ public Invoice Invoice /// The subscription that this invoice item has been created for, if any. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string SubscriptionId { get => this.InternalSubscription?.Id; @@ -241,6 +326,9 @@ public string SubscriptionId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Subscription Subscription { get => this.InternalSubscription?.ExpandedObject; @@ -249,6 +337,10 @@ public Subscription Subscription [JsonProperty("subscription")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("subscription")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalSubscription { get; set; } #endregion @@ -256,6 +348,9 @@ public Subscription Subscription /// The subscription item that this invoice item has been created for, if any. /// [JsonProperty("subscription_item")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("subscription_item")] +#endif public string SubscriptionItem { get; set; } /// @@ -263,6 +358,9 @@ public Subscription Subscription /// the invoice do not apply to this invoice item. /// [JsonProperty("tax_rates")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_rates")] +#endif public List TaxRates { get; set; } #region Expandable TestClock @@ -272,6 +370,9 @@ public Subscription Subscription /// ID of the test clock this invoice item belongs to. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string TestClockId { get => this.InternalTestClock?.Id; @@ -285,6 +386,9 @@ public string TestClockId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public TestHelpers.TestClock TestClock { get => this.InternalTestClock?.ExpandedObject; @@ -293,6 +397,10 @@ public TestHelpers.TestClock TestClock [JsonProperty("test_clock")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("test_clock")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalTestClock { get; set; } #endregion @@ -300,12 +408,18 @@ public TestHelpers.TestClock TestClock /// Unit amount (in the currency specified) of the invoice item. /// [JsonProperty("unit_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_amount")] +#endif public long? UnitAmount { get; set; } /// /// Same as unit_amount, but contains a decimal value with at most 12 decimal places. /// [JsonProperty("unit_amount_decimal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_amount_decimal")] +#endif public decimal? UnitAmountDecimal { get; set; } } } diff --git a/src/Stripe.net/Entities/InvoiceItems/InvoiceItemPeriod.cs b/src/Stripe.net/Entities/InvoiceItems/InvoiceItemPeriod.cs index a169a75009..0b1b2aa5a7 100644 --- a/src/Stripe.net/Entities/InvoiceItems/InvoiceItemPeriod.cs +++ b/src/Stripe.net/Entities/InvoiceItems/InvoiceItemPeriod.cs @@ -4,6 +4,9 @@ namespace Stripe using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceItemPeriod : StripeEntity { @@ -13,6 +16,10 @@ public class InvoiceItemPeriod : StripeEntity /// [JsonProperty("end")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("end")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime End { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -20,6 +27,10 @@ public class InvoiceItemPeriod : StripeEntity /// [JsonProperty("start")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("start")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Start { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; } } diff --git a/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItem.cs b/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItem.cs index 80c1c2f234..42258b16b8 100644 --- a/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItem.cs +++ b/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItem.cs @@ -5,6 +5,9 @@ namespace Stripe using System.Linq; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// Invoice Line Items represent the individual lines within an invoice item or a subscription item. /// +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class InvoiceLineItem : StripeEntity, IHasId, IHasMetadata, IHasObject { /// /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// /// The amount, in cents (or local equivalent). /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long Amount { get; set; } /// @@ -40,6 +55,9 @@ public class InvoiceLineItem : StripeEntity, IHasId, IHasMetada /// item, excluding all tax and discounts. /// [JsonProperty("amount_excluding_tax")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_excluding_tax")] +#endif public long? AmountExcludingTax { get; set; } /// @@ -48,24 +66,36 @@ public class InvoiceLineItem : StripeEntity, IHasId, IHasMetada /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// /// An arbitrary string attached to the object. Often useful for displaying to users. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// /// The amount of discount calculated per discount for this line item. /// [JsonProperty("discount_amounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discount_amounts")] +#endif public List DiscountAmounts { get; set; } /// /// If true, discounts will apply to this line item. Always false for prorations. /// [JsonProperty("discountable")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discountable")] +#endif public bool Discountable { get; set; } #region Expandable Discounts @@ -76,6 +106,9 @@ public class InvoiceLineItem : StripeEntity, IHasId, IHasMetada /// invoice discounts. Use expand[]=discounts to expand each discount. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public List DiscountIds { get => this.InternalDiscounts?.Select((x) => x.Id).ToList(); @@ -90,6 +123,9 @@ public List DiscountIds /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public List Discounts { get => this.InternalDiscounts?.Select((x) => x.ExpandedObject).ToList(); @@ -97,6 +133,9 @@ public List Discounts } [JsonProperty("discounts", ItemConverterType = typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discounts")] +#endif internal List> InternalDiscounts { get; set; } #endregion @@ -104,6 +143,9 @@ public List Discounts /// The ID of the invoice that contains this line item. /// [JsonProperty("invoice")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("invoice")] +#endif public string Invoice { get; set; } #region Expandable InvoiceItem @@ -114,6 +156,9 @@ public List Discounts /// associated with this line item if any. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string InvoiceItemId { get => this.InternalInvoiceItem?.Id; @@ -128,6 +173,9 @@ public string InvoiceItemId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public InvoiceItem InvoiceItem { get => this.InternalInvoiceItem?.ExpandedObject; @@ -136,6 +184,10 @@ public InvoiceItem InvoiceItem [JsonProperty("invoice_item")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("invoice_item")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalInvoiceItem { get; set; } #endregion @@ -144,6 +196,9 @@ public InvoiceItem InvoiceItem /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// @@ -155,15 +210,24 @@ public InvoiceItem InvoiceItem /// creation. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } [JsonProperty("period")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("period")] +#endif public InvoiceLineItemPeriod Period { get; set; } /// /// The plan of the subscription, if the line item is a subscription or a proration. /// [JsonProperty("plan")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("plan")] +#endif public Plan Plan { get; set; } /// @@ -171,30 +235,45 @@ public InvoiceItem InvoiceItem /// line item. /// [JsonProperty("pretax_credit_amounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("pretax_credit_amounts")] +#endif public List PretaxCreditAmounts { get; set; } /// /// The price of the line item. /// [JsonProperty("price")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("price")] +#endif public Price Price { get; set; } /// /// Whether this is a proration. /// [JsonProperty("proration")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("proration")] +#endif public bool Proration { get; set; } /// /// Additional details for proration line items. /// [JsonProperty("proration_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("proration_details")] +#endif public InvoiceLineItemProrationDetails ProrationDetails { get; set; } /// /// The quantity of the subscription, if the line item is a subscription or a proration. /// [JsonProperty("quantity")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("quantity")] +#endif public long? Quantity { get; set; } #region Expandable Subscription @@ -204,6 +283,9 @@ public InvoiceItem InvoiceItem /// The subscription that the invoice item pertains to, if any. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string SubscriptionId { get => this.InternalSubscription?.Id; @@ -217,6 +299,9 @@ public string SubscriptionId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Subscription Subscription { get => this.InternalSubscription?.ExpandedObject; @@ -225,6 +310,10 @@ public Subscription Subscription [JsonProperty("subscription")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("subscription")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalSubscription { get; set; } #endregion @@ -236,6 +325,9 @@ public Subscription Subscription /// an explicit result of a subscription. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string SubscriptionItemId { get => this.InternalSubscriptionItem?.Id; @@ -250,6 +342,9 @@ public string SubscriptionItemId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public SubscriptionItem SubscriptionItem { get => this.InternalSubscriptionItem?.ExpandedObject; @@ -258,6 +353,10 @@ public SubscriptionItem SubscriptionItem [JsonProperty("subscription_item")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("subscription_item")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalSubscriptionItem { get; set; } #endregion @@ -265,12 +364,18 @@ public SubscriptionItem SubscriptionItem /// The amount of tax calculated per tax rate for this line item. /// [JsonProperty("tax_amounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_amounts")] +#endif public List TaxAmounts { get; set; } /// /// The tax rates which apply to the line item. /// [JsonProperty("tax_rates")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_rates")] +#endif public List TaxRates { get; set; } /// @@ -279,6 +384,9 @@ public SubscriptionItem SubscriptionItem /// One of: invoiceitem, or subscription. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } /// @@ -286,6 +394,9 @@ public SubscriptionItem SubscriptionItem /// item, excluding all tax and discounts. /// [JsonProperty("unit_amount_excluding_tax")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_amount_excluding_tax")] +#endif public decimal? UnitAmountExcludingTax { get; set; } } } diff --git a/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemDiscountAmount.cs b/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemDiscountAmount.cs index 372e2b047d..395bf60894 100644 --- a/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemDiscountAmount.cs +++ b/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemDiscountAmount.cs @@ -3,13 +3,22 @@ namespace Stripe { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class InvoiceLineItemDiscountAmount : StripeEntity { /// /// The amount, in cents (or local equivalent), of the discount. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long Amount { get; set; } #region Expandable Discount @@ -19,6 +28,9 @@ public class InvoiceLineItemDiscountAmount : StripeEntity [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string DiscountId { get => this.InternalDiscount?.Id; @@ -32,6 +44,9 @@ public string DiscountId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Discount Discount { get => this.InternalDiscount?.ExpandedObject; @@ -40,6 +55,10 @@ public Discount Discount [JsonProperty("discount")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discount")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalDiscount { get; set; } #endregion } diff --git a/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemPeriod.cs b/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemPeriod.cs index 25744df3f8..88973309a6 100644 --- a/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemPeriod.cs +++ b/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemPeriod.cs @@ -4,6 +4,9 @@ namespace Stripe using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceLineItemPeriod : StripeEntity { @@ -13,6 +16,10 @@ public class InvoiceLineItemPeriod : StripeEntity /// [JsonProperty("end")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("end")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime End { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -20,6 +27,10 @@ public class InvoiceLineItemPeriod : StripeEntity /// [JsonProperty("start")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("start")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Start { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; } } diff --git a/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemPretaxCreditAmount.cs b/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemPretaxCreditAmount.cs index 4205739176..591be6b185 100644 --- a/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemPretaxCreditAmount.cs +++ b/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemPretaxCreditAmount.cs @@ -3,13 +3,22 @@ namespace Stripe { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class InvoiceLineItemPretaxCreditAmount : StripeEntity { /// /// The amount, in cents (or local equivalent), of the pretax credit amount. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long Amount { get; set; } #region Expandable CreditBalanceTransaction @@ -19,6 +28,9 @@ public class InvoiceLineItemPretaxCreditAmount : StripeEntity [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string CreditBalanceTransactionId { get => this.InternalCreditBalanceTransaction?.Id; @@ -32,6 +44,9 @@ public string CreditBalanceTransactionId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Billing.CreditBalanceTransaction CreditBalanceTransaction { get => this.InternalCreditBalanceTransaction?.ExpandedObject; @@ -40,6 +55,10 @@ public Billing.CreditBalanceTransaction CreditBalanceTransaction [JsonProperty("credit_balance_transaction")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("credit_balance_transaction")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalCreditBalanceTransaction { get; set; } #endregion @@ -50,6 +69,9 @@ public Billing.CreditBalanceTransaction CreditBalanceTransaction /// The discount that was applied to get this pretax credit amount. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string DiscountId { get => this.InternalDiscount?.Id; @@ -63,6 +85,9 @@ public string DiscountId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Discount Discount { get => this.InternalDiscount?.ExpandedObject; @@ -71,6 +96,10 @@ public Discount Discount [JsonProperty("discount")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discount")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalDiscount { get; set; } #endregion @@ -79,6 +108,9 @@ public Discount Discount /// One of: credit_balance_transaction, or discount. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemProrationDetails.cs b/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemProrationDetails.cs index c2a278c521..7216e26868 100644 --- a/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemProrationDetails.cs +++ b/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemProrationDetails.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceLineItemProrationDetails : StripeEntity { @@ -10,6 +13,9 @@ public class InvoiceLineItemProrationDetails : StripeEntity [JsonProperty("credited_items")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("credited_items")] +#endif public InvoiceLineItemProrationDetailsCreditedItems CreditedItems { get; set; } } } diff --git a/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemProrationDetailsCreditedItems.cs b/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemProrationDetailsCreditedItems.cs index 75ba1baaa1..d65fd02cd3 100644 --- a/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemProrationDetailsCreditedItems.cs +++ b/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemProrationDetailsCreditedItems.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceLineItemProrationDetailsCreditedItems : StripeEntity { @@ -10,12 +13,18 @@ public class InvoiceLineItemProrationDetailsCreditedItems : StripeEntity [JsonProperty("invoice")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("invoice")] +#endif public string Invoice { get; set; } /// /// Credited invoice line items. /// [JsonProperty("invoice_line_items")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("invoice_line_items")] +#endif public List InvoiceLineItems { get; set; } } } diff --git a/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemTaxAmount.cs b/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemTaxAmount.cs index 7943a45076..a35f7ccd05 100644 --- a/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemTaxAmount.cs +++ b/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemTaxAmount.cs @@ -3,19 +3,31 @@ namespace Stripe { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class InvoiceLineItemTaxAmount : StripeEntity { /// /// The amount, in cents (or local equivalent), of the tax. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long Amount { get; set; } /// /// Whether this tax amount is inclusive or exclusive. /// [JsonProperty("inclusive")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("inclusive")] +#endif public bool Inclusive { get; set; } #region Expandable TaxRate @@ -25,6 +37,9 @@ public class InvoiceLineItemTaxAmount : StripeEntity /// The tax rate that was applied to get this tax amount. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string TaxRateId { get => this.InternalTaxRate?.Id; @@ -38,6 +53,9 @@ public string TaxRateId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public TaxRate TaxRate { get => this.InternalTaxRate?.ExpandedObject; @@ -46,6 +64,10 @@ public TaxRate TaxRate [JsonProperty("tax_rate")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_rate")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalTaxRate { get; set; } #endregion @@ -59,12 +81,18 @@ public TaxRate TaxRate /// standard_rated, taxable_basis_reduced, or zero_rated. /// [JsonProperty("taxability_reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("taxability_reason")] +#endif public string TaxabilityReason { get; set; } /// /// The amount on which tax is calculated, in cents (or local equivalent). /// [JsonProperty("taxable_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("taxable_amount")] +#endif public long? TaxableAmount { get; set; } } } diff --git a/src/Stripe.net/Entities/InvoiceRenderingTemplates/InvoiceRenderingTemplate.cs b/src/Stripe.net/Entities/InvoiceRenderingTemplates/InvoiceRenderingTemplate.cs index 3d2f29bb4c..15ffec3fdb 100644 --- a/src/Stripe.net/Entities/InvoiceRenderingTemplates/InvoiceRenderingTemplate.cs +++ b/src/Stripe.net/Entities/InvoiceRenderingTemplates/InvoiceRenderingTemplate.cs @@ -5,6 +5,9 @@ namespace Stripe using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// Invoice Rendering Templates are used to configure how invoices are rendered on surfaces @@ -17,12 +20,18 @@ public class InvoiceRenderingTemplate : StripeEntity, /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// @@ -30,6 +39,10 @@ public class InvoiceRenderingTemplate : StripeEntity, /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -37,6 +50,9 @@ public class InvoiceRenderingTemplate : StripeEntity, /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// @@ -45,12 +61,18 @@ public class InvoiceRenderingTemplate : StripeEntity, /// object in a structured format. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// A brief description of the template, hidden from customers. /// [JsonProperty("nickname")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("nickname")] +#endif public string Nickname { get; set; } /// @@ -58,6 +80,9 @@ public class InvoiceRenderingTemplate : StripeEntity, /// One of: active, or archived. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } /// @@ -65,6 +90,9 @@ public class InvoiceRenderingTemplate : StripeEntity, /// changes any field that controls invoice rendering. /// [JsonProperty("version")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("version")] +#endif public long Version { get; set; } } } diff --git a/src/Stripe.net/Entities/Invoices/Invoice.cs b/src/Stripe.net/Entities/Invoices/Invoice.cs index 0f5f783403..7c88c16052 100644 --- a/src/Stripe.net/Entities/Invoices/Invoice.cs +++ b/src/Stripe.net/Entities/Invoices/Invoice.cs @@ -6,6 +6,9 @@ namespace Stripe using System.Linq; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// Invoices are statements of amounts owed by a customer, and are either generated one-off, @@ -42,6 +45,9 @@ namespace Stripe /// Related guide: Send invoices /// to customers. /// +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class Invoice : StripeEntity, IHasId, IHasMetadata, IHasObject { /// @@ -51,12 +57,18 @@ public class Invoice : StripeEntity, IHasId, IHasMetadata, IHasObject /// for more details. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// @@ -64,6 +76,9 @@ public class Invoice : StripeEntity, IHasId, IHasMetadata, IHasObject /// creating the invoice. /// [JsonProperty("account_country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_country")] +#endif public string AccountCountry { get; set; } /// @@ -71,6 +86,9 @@ public class Invoice : StripeEntity, IHasId, IHasMetadata, IHasObject /// creating the invoice. /// [JsonProperty("account_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_name")] +#endif public string AccountName { get; set; } #region Expandable AccountTaxIds @@ -81,6 +99,9 @@ public class Invoice : StripeEntity, IHasId, IHasMetadata, IHasObject /// draft. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public List AccountTaxIdIds { get => this.InternalAccountTaxIds?.Select((x) => x.Id).ToList(); @@ -95,6 +116,9 @@ public List AccountTaxIdIds /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public List AccountTaxIds { get => this.InternalAccountTaxIds?.Select((x) => x.ExpandedObject).ToList(); @@ -102,6 +126,9 @@ public List AccountTaxIds } [JsonProperty("account_tax_ids", ItemConverterType = typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_tax_ids")] +#endif internal List> InternalAccountTaxIds { get; set; } #endregion @@ -114,24 +141,36 @@ public List AccountTaxIds /// for the amount specified in amount_due. /// [JsonProperty("amount_due")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_due")] +#endif public long AmountDue { get; set; } /// /// The amount, in cents (or local equivalent), that was paid. /// [JsonProperty("amount_paid")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_paid")] +#endif public long AmountPaid { get; set; } /// /// The difference between amount_due and amount_paid, in cents (or local equivalent). /// [JsonProperty("amount_remaining")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_remaining")] +#endif public long AmountRemaining { get; set; } /// /// This is the sum of all the shipping amounts. /// [JsonProperty("amount_shipping")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_shipping")] +#endif public long AmountShipping { get; set; } #region Expandable Application @@ -141,6 +180,9 @@ public List AccountTaxIds /// ID of the Connect Application that created the invoice. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string ApplicationId { get => this.InternalApplication?.Id; @@ -154,6 +196,9 @@ public string ApplicationId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Application Application { get => this.InternalApplication?.ExpandedObject; @@ -162,6 +207,10 @@ public Application Application [JsonProperty("application")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("application")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalApplication { get; set; } #endregion @@ -170,6 +219,9 @@ public Application Application /// transferred to the application owner's Stripe account when the invoice is paid. /// [JsonProperty("application_fee_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("application_fee_amount")] +#endif public long? ApplicationFeeAmount { get; set; } /// @@ -183,6 +235,9 @@ public Application Application /// obtained. /// [JsonProperty("attempt_count")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("attempt_count")] +#endif public long AttemptCount { get; set; } /// @@ -191,6 +246,9 @@ public Application Application /// display that invoice as unpaid to your users. /// [JsonProperty("attempted")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("attempted")] +#endif public bool Attempted { get; set; } /// @@ -200,9 +258,15 @@ public Application Application /// automatically advance without an explicit action. /// [JsonProperty("auto_advance")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("auto_advance")] +#endif public bool AutoAdvance { get; set; } [JsonProperty("automatic_tax")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("automatic_tax")] +#endif public InvoiceAutomaticTax AutomaticTax { get; set; } /// @@ -213,6 +277,10 @@ public Application Application /// [JsonProperty("automatically_finalizes_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("automatically_finalizes_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? AutomaticallyFinalizesAt { get; set; } /// @@ -232,6 +300,9 @@ public Application Application /// upcoming. /// [JsonProperty("billing_reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_reason")] +#endif public string BillingReason { get; set; } #region Expandable Charge @@ -241,6 +312,9 @@ public Application Application /// ID of the latest charge generated for this invoice, if any. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string ChargeId { get => this.InternalCharge?.Id; @@ -254,6 +328,9 @@ public string ChargeId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Charge Charge { get => this.InternalCharge?.ExpandedObject; @@ -262,6 +339,10 @@ public Charge Charge [JsonProperty("charge")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("charge")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalCharge { get; set; } #endregion @@ -273,6 +354,9 @@ public Charge Charge /// One of: charge_automatically, or send_invoice. /// [JsonProperty("collection_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("collection_method")] +#endif public string CollectionMethod { get; set; } /// @@ -280,6 +364,10 @@ public Charge Charge /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -288,12 +376,18 @@ public Charge Charge /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// /// Custom fields displayed on the invoice. /// [JsonProperty("custom_fields")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("custom_fields")] +#endif public List CustomFields { get; set; } #region Expandable Customer @@ -303,6 +397,9 @@ public Charge Charge /// The ID of the customer who will be billed. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string CustomerId { get => this.InternalCustomer?.Id; @@ -316,6 +413,9 @@ public string CustomerId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Customer Customer { get => this.InternalCustomer?.ExpandedObject; @@ -324,6 +424,10 @@ public Customer Customer [JsonProperty("customer")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalCustomer { get; set; } #endregion @@ -333,6 +437,9 @@ public Customer Customer /// updated. /// [JsonProperty("customer_address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_address")] +#endif public Address CustomerAddress { get; set; } /// @@ -341,6 +448,9 @@ public Customer Customer /// updated. /// [JsonProperty("customer_email")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_email")] +#endif public string CustomerEmail { get; set; } /// @@ -349,6 +459,9 @@ public Customer Customer /// updated. /// [JsonProperty("customer_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_name")] +#endif public string CustomerName { get; set; } /// @@ -357,6 +470,9 @@ public Customer Customer /// updated. /// [JsonProperty("customer_phone")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_phone")] +#endif public string CustomerPhone { get; set; } /// @@ -365,6 +481,9 @@ public Customer Customer /// be updated. /// [JsonProperty("customer_shipping")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_shipping")] +#endif public Shipping CustomerShipping { get; set; } /// @@ -374,6 +493,9 @@ public Customer Customer /// One of: exempt, none, or reverse. /// [JsonProperty("customer_tax_exempt")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_tax_exempt")] +#endif public string CustomerTaxExempt { get; set; } /// @@ -382,6 +504,9 @@ public Customer Customer /// longer be updated. /// [JsonProperty("customer_tax_ids")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_tax_ids")] +#endif public List CustomerTaxIds { get; set; } #region Expandable DefaultPaymentMethod @@ -393,6 +518,9 @@ public Customer Customer /// method, if any, or to the default payment method in the customer's invoice settings. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string DefaultPaymentMethodId { get => this.InternalDefaultPaymentMethod?.Id; @@ -408,6 +536,9 @@ public string DefaultPaymentMethodId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public PaymentMethod DefaultPaymentMethod { get => this.InternalDefaultPaymentMethod?.ExpandedObject; @@ -416,6 +547,10 @@ public PaymentMethod DefaultPaymentMethod [JsonProperty("default_payment_method")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("default_payment_method")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalDefaultPaymentMethod { get; set; } #endregion @@ -428,6 +563,9 @@ public PaymentMethod DefaultPaymentMethod /// subscription's default source, if any, or to the customer's default source. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string DefaultSourceId { get => this.InternalDefaultSource?.Id; @@ -443,6 +581,9 @@ public string DefaultSourceId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public IPaymentSource DefaultSource { get => this.InternalDefaultSource?.ExpandedObject; @@ -451,6 +592,10 @@ public IPaymentSource DefaultSource [JsonProperty("default_source")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("default_source")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalDefaultSource { get; set; } #endregion @@ -458,12 +603,19 @@ public IPaymentSource DefaultSource /// The tax rates applied to this invoice, if any. /// [JsonProperty("default_tax_rates")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("default_tax_rates")] +#endif public List DefaultTaxRates { get; set; } /// /// Whether this object is deleted or not. /// [JsonProperty("deleted", NullValueHandling = NullValueHandling.Ignore)] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("deleted")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] +#endif public bool? Deleted { get; set; } /// @@ -471,6 +623,9 @@ public IPaymentSource DefaultSource /// Referenced as 'memo' in the Dashboard. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// @@ -478,6 +633,9 @@ public IPaymentSource DefaultSource /// if there are multiple discounts. /// [JsonProperty("discount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discount")] +#endif public Discount Discount { get; set; } #region Expandable Discounts @@ -488,6 +646,9 @@ public IPaymentSource DefaultSource /// discounts. Use expand[]=discounts to expand each discount. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public List DiscountIds { get => this.InternalDiscounts?.Select((x) => x.Id).ToList(); @@ -502,6 +663,9 @@ public List DiscountIds /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public List Discounts { get => this.InternalDiscounts?.Select((x) => x.ExpandedObject).ToList(); @@ -509,6 +673,9 @@ public List Discounts } [JsonProperty("discounts", ItemConverterType = typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discounts")] +#endif internal List> InternalDiscounts { get; set; } #endregion @@ -518,6 +685,10 @@ public List Discounts /// [JsonProperty("due_date")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("due_date")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? DueDate { get; set; } /// @@ -527,6 +698,10 @@ public List Discounts /// [JsonProperty("effective_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("effective_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? EffectiveAt { get; set; } /// @@ -535,12 +710,18 @@ public List Discounts /// attempted for the invoice. If the invoice has not been finalized yet, this will be null. /// [JsonProperty("ending_balance")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ending_balance")] +#endif public long? EndingBalance { get; set; } /// /// Footer displayed on the invoice. /// [JsonProperty("footer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("footer")] +#endif public string Footer { get; set; } /// @@ -549,6 +730,9 @@ public List Discounts /// for more details. /// [JsonProperty("from_invoice")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("from_invoice")] +#endif public InvoiceFromInvoice FromInvoice { get; set; } /// @@ -556,6 +740,9 @@ public List Discounts /// If the invoice has not been finalized yet, this will be null. /// [JsonProperty("hosted_invoice_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("hosted_invoice_url")] +#endif public string HostedInvoiceUrl { get; set; } /// @@ -563,9 +750,15 @@ public List Discounts /// this will be null. /// [JsonProperty("invoice_pdf")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("invoice_pdf")] +#endif public string InvoicePdf { get; set; } [JsonProperty("issuer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("issuer")] +#endif public InvoiceIssuer Issuer { get; set; } /// @@ -573,6 +766,9 @@ public List Discounts /// cleared when the invoice is successfully finalized. /// [JsonProperty("last_finalization_error")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last_finalization_error")] +#endif public StripeError LastFinalizationError { get; set; } #region Expandable LatestRevision @@ -582,6 +778,9 @@ public List Discounts /// The ID of the most recent non-draft revision of this invoice. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string LatestRevisionId { get => this.InternalLatestRevision?.Id; @@ -595,6 +794,9 @@ public string LatestRevisionId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Invoice LatestRevision { get => this.InternalLatestRevision?.ExpandedObject; @@ -603,6 +805,10 @@ public Invoice LatestRevision [JsonProperty("latest_revision")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("latest_revision")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalLatestRevision { get; set; } #endregion @@ -613,6 +819,9 @@ public Invoice LatestRevision /// invoice creation in chronological order. /// [JsonProperty("lines")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("lines")] +#endif public StripeList Lines { get; set; } /// @@ -620,6 +829,9 @@ public Invoice LatestRevision /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// @@ -628,6 +840,9 @@ public Invoice LatestRevision /// object in a structured format. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -636,6 +851,10 @@ public Invoice LatestRevision /// [JsonProperty("next_payment_attempt")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("next_payment_attempt")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? NextPaymentAttempt { get; set; } /// @@ -643,6 +862,9 @@ public Invoice LatestRevision /// invoice. This starts with the customer's unique invoice_prefix if it is specified. /// [JsonProperty("number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("number")] +#endif public string Number { get; set; } #region Expandable OnBehalfOf @@ -655,6 +877,9 @@ public Invoice LatestRevision /// with Connect documentation for details. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string OnBehalfOfId { get => this.InternalOnBehalfOf?.Id; @@ -671,6 +896,9 @@ public string OnBehalfOfId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Account OnBehalfOf { get => this.InternalOnBehalfOf?.ExpandedObject; @@ -679,6 +907,10 @@ public Account OnBehalfOf [JsonProperty("on_behalf_of")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("on_behalf_of")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalOnBehalfOf { get; set; } #endregion @@ -687,6 +919,9 @@ public Account OnBehalfOf /// (most commonly) with a charge or with credit from the customer's account balance. /// [JsonProperty("paid")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("paid")] +#endif public bool Paid { get; set; } /// @@ -694,6 +929,9 @@ public Account OnBehalfOf /// hasn't been paid yet or was paid on Stripe. /// [JsonProperty("paid_out_of_band")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("paid_out_of_band")] +#endif public bool PaidOutOfBand { get; set; } #region Expandable PaymentIntent @@ -705,6 +943,9 @@ public Account OnBehalfOf /// invoice will cancel the PaymentIntent. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string PaymentIntentId { get => this.InternalPaymentIntent?.Id; @@ -720,6 +961,9 @@ public string PaymentIntentId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public PaymentIntent PaymentIntent { get => this.InternalPaymentIntent?.ExpandedObject; @@ -728,10 +972,17 @@ public PaymentIntent PaymentIntent [JsonProperty("payment_intent")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_intent")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalPaymentIntent { get; set; } #endregion [JsonProperty("payment_settings")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_settings")] +#endif public InvoicePaymentSettings PaymentSettings { get; set; } /// @@ -742,6 +993,10 @@ public PaymentIntent PaymentIntent /// [JsonProperty("period_end")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("period_end")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime PeriodEnd { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -752,18 +1007,28 @@ public PaymentIntent PaymentIntent /// [JsonProperty("period_start")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("period_start")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime PeriodStart { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// /// Total amount of all post-payment credit notes issued for this invoice. /// [JsonProperty("post_payment_credit_notes_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("post_payment_credit_notes_amount")] +#endif public long PostPaymentCreditNotesAmount { get; set; } /// /// Total amount of all pre-payment credit notes issued for this invoice. /// [JsonProperty("pre_payment_credit_notes_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("pre_payment_credit_notes_amount")] +#endif public long PrePaymentCreditNotesAmount { get; set; } #region Expandable Quote @@ -773,6 +1038,9 @@ public PaymentIntent PaymentIntent /// The quote this invoice was generated from. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string QuoteId { get => this.InternalQuote?.Id; @@ -786,6 +1054,9 @@ public string QuoteId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Quote Quote { get => this.InternalQuote?.ExpandedObject; @@ -794,6 +1065,10 @@ public Quote Quote [JsonProperty("quote")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("quote")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalQuote { get; set; } #endregion @@ -801,6 +1076,9 @@ public Quote Quote /// This is the transaction number that appears on email receipts sent for this invoice. /// [JsonProperty("receipt_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("receipt_number")] +#endif public string ReceiptNumber { get; set; } /// @@ -808,12 +1086,18 @@ public Quote Quote /// customer-facing surfaces such as PDF and Hosted Invoice Page. /// [JsonProperty("rendering")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("rendering")] +#endif public InvoiceRendering Rendering { get; set; } /// /// The details of the cost of shipping, including the ShippingRate applied on the invoice. /// [JsonProperty("shipping_cost")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping_cost")] +#endif public InvoiceShippingCost ShippingCost { get; set; } /// @@ -822,6 +1106,9 @@ public Quote Quote /// customer. /// [JsonProperty("shipping_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping_details")] +#endif public InvoiceShippingDetails ShippingDetails { get; set; } /// @@ -830,12 +1117,18 @@ public Quote Quote /// also includes any customer balance that was applied to the original invoice. /// [JsonProperty("starting_balance")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("starting_balance")] +#endif public long StartingBalance { get; set; } /// /// Extra information about an invoice for the customer's credit card statement. /// [JsonProperty("statement_descriptor")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("statement_descriptor")] +#endif public string StatementDescriptor { get; set; } /// @@ -846,9 +1139,15 @@ public Quote Quote /// One of: draft, open, paid, uncollectible, or void. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } [JsonProperty("status_transitions")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status_transitions")] +#endif public InvoiceStatusTransitions StatusTransitions { get; set; } #region Expandable Subscription @@ -858,6 +1157,9 @@ public Quote Quote /// The subscription that this invoice was prepared for, if any. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string SubscriptionId { get => this.InternalSubscription?.Id; @@ -871,6 +1173,9 @@ public string SubscriptionId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Subscription Subscription { get => this.InternalSubscription?.ExpandedObject; @@ -879,6 +1184,10 @@ public Subscription Subscription [JsonProperty("subscription")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("subscription")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalSubscription { get; set; } #endregion @@ -886,6 +1195,9 @@ public Subscription Subscription /// Details about the subscription that created this invoice. /// [JsonProperty("subscription_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("subscription_details")] +#endif public InvoiceSubscriptionDetails SubscriptionDetails { get; set; } /// @@ -894,6 +1206,10 @@ public Subscription Subscription /// [JsonProperty("subscription_proration_date")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("subscription_proration_date")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime SubscriptionProrationDate { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -902,6 +1218,9 @@ public Subscription Subscription /// incorporated. /// [JsonProperty("subtotal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("subtotal")] +#endif public long Subtotal { get; set; } /// @@ -910,6 +1229,9 @@ public Subscription Subscription /// incorporated. /// [JsonProperty("subtotal_excluding_tax")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("subtotal_excluding_tax")] +#endif public long? SubtotalExcludingTax { get; set; } /// @@ -917,6 +1239,9 @@ public Subscription Subscription /// invoice. /// [JsonProperty("tax")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax")] +#endif public long? Tax { get; set; } #region Expandable TestClock @@ -926,6 +1251,9 @@ public Subscription Subscription /// ID of the test clock this invoice belongs to. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string TestClockId { get => this.InternalTestClock?.Id; @@ -939,6 +1267,9 @@ public string TestClockId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public TestHelpers.TestClock TestClock { get => this.InternalTestClock?.ExpandedObject; @@ -947,22 +1278,35 @@ public TestHelpers.TestClock TestClock [JsonProperty("test_clock")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("test_clock")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalTestClock { get; set; } #endregion [JsonProperty("threshold_reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("threshold_reason")] +#endif public InvoiceThresholdReason ThresholdReason { get; set; } /// /// Total after discounts and taxes. /// [JsonProperty("total")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("total")] +#endif public long Total { get; set; } /// /// The aggregate amounts calculated per discount across all line items. /// [JsonProperty("total_discount_amounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("total_discount_amounts")] +#endif public List TotalDiscountAmounts { get; set; } /// @@ -970,6 +1314,9 @@ public TestHelpers.TestClock TestClock /// invoice including all discounts but excluding all tax. /// [JsonProperty("total_excluding_tax")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("total_excluding_tax")] +#endif public long? TotalExcludingTax { get; set; } /// @@ -978,12 +1325,18 @@ public TestHelpers.TestClock TestClock /// items. /// [JsonProperty("total_pretax_credit_amounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("total_pretax_credit_amounts")] +#endif public List TotalPretaxCreditAmounts { get; set; } /// /// The aggregate amounts calculated per tax rate for all line items. /// [JsonProperty("total_tax_amounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("total_tax_amounts")] +#endif public List TotalTaxAmounts { get; set; } /// @@ -991,6 +1344,9 @@ public TestHelpers.TestClock TestClock /// funds from the payment will be transferred to for the invoice. /// [JsonProperty("transfer_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transfer_data")] +#endif public InvoiceTransferData TransferData { get; set; } /// @@ -1002,6 +1358,10 @@ public TestHelpers.TestClock TestClock /// [JsonProperty("webhooks_delivered_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("webhooks_delivered_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? WebhooksDeliveredAt { get; set; } } } diff --git a/src/Stripe.net/Entities/Invoices/InvoiceAutomaticTax.cs b/src/Stripe.net/Entities/Invoices/InvoiceAutomaticTax.cs index bac2c6d988..65eeaa6b38 100644 --- a/src/Stripe.net/Entities/Invoices/InvoiceAutomaticTax.cs +++ b/src/Stripe.net/Entities/Invoices/InvoiceAutomaticTax.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceAutomaticTax : StripeEntity { @@ -12,6 +15,9 @@ public class InvoiceAutomaticTax : StripeEntity /// tax_behavior=unspecified) cannot be added to automatic tax invoices. /// [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool Enabled { get; set; } /// @@ -20,6 +26,9 @@ public class InvoiceAutomaticTax : StripeEntity /// transaction is returned in the report of the connected account. /// [JsonProperty("liability")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("liability")] +#endif public InvoiceAutomaticTaxLiability Liability { get; set; } /// @@ -27,6 +36,9 @@ public class InvoiceAutomaticTax : StripeEntity /// One of: complete, failed, or requires_location_inputs. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } } } diff --git a/src/Stripe.net/Entities/Invoices/InvoiceAutomaticTaxLiability.cs b/src/Stripe.net/Entities/Invoices/InvoiceAutomaticTaxLiability.cs index 0b62ae5deb..53d31c083c 100644 --- a/src/Stripe.net/Entities/Invoices/InvoiceAutomaticTaxLiability.cs +++ b/src/Stripe.net/Entities/Invoices/InvoiceAutomaticTaxLiability.cs @@ -3,7 +3,13 @@ namespace Stripe { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class InvoiceAutomaticTaxLiability : StripeEntity { #region Expandable Account @@ -13,6 +19,9 @@ public class InvoiceAutomaticTaxLiability : StripeEntitytype is account. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string AccountId { get => this.InternalAccount?.Id; @@ -26,6 +35,9 @@ public string AccountId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Account Account { get => this.InternalAccount?.ExpandedObject; @@ -34,6 +46,10 @@ public Account Account [JsonProperty("account")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalAccount { get; set; } #endregion @@ -42,6 +58,9 @@ public Account Account /// One of: account, or self. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Invoices/InvoiceCustomField.cs b/src/Stripe.net/Entities/Invoices/InvoiceCustomField.cs index c03ae8e362..2eb2a2373a 100644 --- a/src/Stripe.net/Entities/Invoices/InvoiceCustomField.cs +++ b/src/Stripe.net/Entities/Invoices/InvoiceCustomField.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceCustomField : StripeEntity { @@ -9,12 +12,18 @@ public class InvoiceCustomField : StripeEntity /// The name of the custom field. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } /// /// The value of the custom field. /// [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public string Value { get; set; } } } diff --git a/src/Stripe.net/Entities/Invoices/InvoiceCustomerTaxId.cs b/src/Stripe.net/Entities/Invoices/InvoiceCustomerTaxId.cs index 18b509d621..d31069badb 100644 --- a/src/Stripe.net/Entities/Invoices/InvoiceCustomerTaxId.cs +++ b/src/Stripe.net/Entities/Invoices/InvoiceCustomerTaxId.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceCustomerTaxId : StripeEntity { @@ -42,12 +45,18 @@ public class InvoiceCustomerTaxId : StripeEntity /// za_vat. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } /// /// The value of the tax ID. /// [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public string Value { get; set; } } } diff --git a/src/Stripe.net/Entities/Invoices/InvoiceFromInvoice.cs b/src/Stripe.net/Entities/Invoices/InvoiceFromInvoice.cs index 948930ca85..e9f7efcc44 100644 --- a/src/Stripe.net/Entities/Invoices/InvoiceFromInvoice.cs +++ b/src/Stripe.net/Entities/Invoices/InvoiceFromInvoice.cs @@ -3,13 +3,22 @@ namespace Stripe { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class InvoiceFromInvoice : StripeEntity { /// /// The relation between this invoice and the cloned invoice. /// [JsonProperty("action")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("action")] +#endif public string Action { get; set; } #region Expandable Invoice @@ -19,6 +28,9 @@ public class InvoiceFromInvoice : StripeEntity /// The invoice that was cloned. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string InvoiceId { get => this.InternalInvoice?.Id; @@ -32,6 +44,9 @@ public string InvoiceId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Invoice Invoice { get => this.InternalInvoice?.ExpandedObject; @@ -40,6 +55,10 @@ public Invoice Invoice [JsonProperty("invoice")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("invoice")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalInvoice { get; set; } #endregion } diff --git a/src/Stripe.net/Entities/Invoices/InvoiceIssuer.cs b/src/Stripe.net/Entities/Invoices/InvoiceIssuer.cs index cb256a0078..042fda1c8c 100644 --- a/src/Stripe.net/Entities/Invoices/InvoiceIssuer.cs +++ b/src/Stripe.net/Entities/Invoices/InvoiceIssuer.cs @@ -3,7 +3,13 @@ namespace Stripe { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class InvoiceIssuer : StripeEntity { #region Expandable Account @@ -13,6 +19,9 @@ public class InvoiceIssuer : StripeEntity /// The connected account being referenced when type is account. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string AccountId { get => this.InternalAccount?.Id; @@ -26,6 +35,9 @@ public string AccountId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Account Account { get => this.InternalAccount?.ExpandedObject; @@ -34,6 +46,10 @@ public Account Account [JsonProperty("account")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalAccount { get; set; } #endregion @@ -42,6 +58,9 @@ public Account Account /// One of: account, or self. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Invoices/InvoicePaymentSettings.cs b/src/Stripe.net/Entities/Invoices/InvoicePaymentSettings.cs index 5863c42172..088386bc06 100644 --- a/src/Stripe.net/Entities/Invoices/InvoicePaymentSettings.cs +++ b/src/Stripe.net/Entities/Invoices/InvoicePaymentSettings.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoicePaymentSettings : StripeEntity { @@ -12,12 +15,18 @@ public class InvoicePaymentSettings : StripeEntity /// default_source, if set. /// [JsonProperty("default_mandate")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("default_mandate")] +#endif public string DefaultMandate { get; set; } /// /// Payment-method-specific configuration to provide to the invoice’s PaymentIntent. /// [JsonProperty("payment_method_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_options")] +#endif public InvoicePaymentSettingsPaymentMethodOptions PaymentMethodOptions { get; set; } /// @@ -37,6 +46,9 @@ public class InvoicePaymentSettings : StripeEntity /// sofort, swish, us_bank_account, or wechat_pay. /// [JsonProperty("payment_method_types")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_types")] +#endif public List PaymentMethodTypes { get; set; } } } diff --git a/src/Stripe.net/Entities/Invoices/InvoicePaymentSettingsPaymentMethodOptions.cs b/src/Stripe.net/Entities/Invoices/InvoicePaymentSettingsPaymentMethodOptions.cs index 3c30cf920f..dd664c9752 100644 --- a/src/Stripe.net/Entities/Invoices/InvoicePaymentSettingsPaymentMethodOptions.cs +++ b/src/Stripe.net/Entities/Invoices/InvoicePaymentSettingsPaymentMethodOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoicePaymentSettingsPaymentMethodOptions : StripeEntity { @@ -10,6 +13,9 @@ public class InvoicePaymentSettingsPaymentMethodOptions : StripeEntity [JsonProperty("acss_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("acss_debit")] +#endif public InvoicePaymentSettingsPaymentMethodOptionsAcssDebit AcssDebit { get; set; } /// @@ -17,6 +23,9 @@ public class InvoicePaymentSettingsPaymentMethodOptions : StripeEntity [JsonProperty("bancontact")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bancontact")] +#endif public InvoicePaymentSettingsPaymentMethodOptionsBancontact Bancontact { get; set; } /// @@ -24,6 +33,9 @@ public class InvoicePaymentSettingsPaymentMethodOptions : StripeEntity [JsonProperty("card")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card")] +#endif public InvoicePaymentSettingsPaymentMethodOptionsCard Card { get; set; } /// @@ -31,6 +43,9 @@ public class InvoicePaymentSettingsPaymentMethodOptions : StripeEntity [JsonProperty("customer_balance")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_balance")] +#endif public InvoicePaymentSettingsPaymentMethodOptionsCustomerBalance CustomerBalance { get; set; } /// @@ -38,6 +53,9 @@ public class InvoicePaymentSettingsPaymentMethodOptions : StripeEntity [JsonProperty("konbini")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("konbini")] +#endif public InvoicePaymentSettingsPaymentMethodOptionsKonbini Konbini { get; set; } /// @@ -45,6 +63,9 @@ public class InvoicePaymentSettingsPaymentMethodOptions : StripeEntity [JsonProperty("sepa_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sepa_debit")] +#endif public InvoicePaymentSettingsPaymentMethodOptionsSepaDebit SepaDebit { get; set; } /// @@ -52,6 +73,9 @@ public class InvoicePaymentSettingsPaymentMethodOptions : StripeEntity [JsonProperty("us_bank_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("us_bank_account")] +#endif public InvoicePaymentSettingsPaymentMethodOptionsUsBankAccount UsBankAccount { get; set; } } } diff --git a/src/Stripe.net/Entities/Invoices/InvoicePaymentSettingsPaymentMethodOptionsAcssDebit.cs b/src/Stripe.net/Entities/Invoices/InvoicePaymentSettingsPaymentMethodOptionsAcssDebit.cs index 99c3122722..3eee47a45e 100644 --- a/src/Stripe.net/Entities/Invoices/InvoicePaymentSettingsPaymentMethodOptionsAcssDebit.cs +++ b/src/Stripe.net/Entities/Invoices/InvoicePaymentSettingsPaymentMethodOptionsAcssDebit.cs @@ -2,10 +2,16 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoicePaymentSettingsPaymentMethodOptionsAcssDebit : StripeEntity { [JsonProperty("mandate_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mandate_options")] +#endif public InvoicePaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions MandateOptions { get; set; } /// @@ -13,6 +19,9 @@ public class InvoicePaymentSettingsPaymentMethodOptionsAcssDebit : StripeEntity< /// One of: automatic, instant, or microdeposits. /// [JsonProperty("verification_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("verification_method")] +#endif public string VerificationMethod { get; set; } } } diff --git a/src/Stripe.net/Entities/Invoices/InvoicePaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions.cs b/src/Stripe.net/Entities/Invoices/InvoicePaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions.cs index 8da48f4177..e722f70563 100644 --- a/src/Stripe.net/Entities/Invoices/InvoicePaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions.cs +++ b/src/Stripe.net/Entities/Invoices/InvoicePaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoicePaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions : StripeEntity { @@ -10,6 +13,9 @@ public class InvoicePaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions : /// One of: business, or personal. /// [JsonProperty("transaction_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transaction_type")] +#endif public string TransactionType { get; set; } } } diff --git a/src/Stripe.net/Entities/Invoices/InvoicePaymentSettingsPaymentMethodOptionsBancontact.cs b/src/Stripe.net/Entities/Invoices/InvoicePaymentSettingsPaymentMethodOptionsBancontact.cs index 037a3dcadf..9405154251 100644 --- a/src/Stripe.net/Entities/Invoices/InvoicePaymentSettingsPaymentMethodOptionsBancontact.cs +++ b/src/Stripe.net/Entities/Invoices/InvoicePaymentSettingsPaymentMethodOptionsBancontact.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoicePaymentSettingsPaymentMethodOptionsBancontact : StripeEntity { @@ -11,6 +14,9 @@ public class InvoicePaymentSettingsPaymentMethodOptionsBancontact : StripeEntity /// One of: de, en, fr, or nl. /// [JsonProperty("preferred_language")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preferred_language")] +#endif public string PreferredLanguage { get; set; } } } diff --git a/src/Stripe.net/Entities/Invoices/InvoicePaymentSettingsPaymentMethodOptionsCard.cs b/src/Stripe.net/Entities/Invoices/InvoicePaymentSettingsPaymentMethodOptionsCard.cs index 35788fd097..a640a00559 100644 --- a/src/Stripe.net/Entities/Invoices/InvoicePaymentSettingsPaymentMethodOptionsCard.cs +++ b/src/Stripe.net/Entities/Invoices/InvoicePaymentSettingsPaymentMethodOptionsCard.cs @@ -2,10 +2,16 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoicePaymentSettingsPaymentMethodOptionsCard : StripeEntity { [JsonProperty("installments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("installments")] +#endif public InvoicePaymentSettingsPaymentMethodOptionsCardInstallments Installments { get; set; } /// @@ -20,6 +26,9 @@ public class InvoicePaymentSettingsPaymentMethodOptionsCard : StripeEntityany, automatic, or challenge. /// [JsonProperty("request_three_d_secure")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("request_three_d_secure")] +#endif public string RequestThreeDSecure { get; set; } } } diff --git a/src/Stripe.net/Entities/Invoices/InvoicePaymentSettingsPaymentMethodOptionsCardInstallments.cs b/src/Stripe.net/Entities/Invoices/InvoicePaymentSettingsPaymentMethodOptionsCardInstallments.cs index 7971c3da19..e590f43c86 100644 --- a/src/Stripe.net/Entities/Invoices/InvoicePaymentSettingsPaymentMethodOptionsCardInstallments.cs +++ b/src/Stripe.net/Entities/Invoices/InvoicePaymentSettingsPaymentMethodOptionsCardInstallments.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoicePaymentSettingsPaymentMethodOptionsCardInstallments : StripeEntity { @@ -9,6 +12,9 @@ public class InvoicePaymentSettingsPaymentMethodOptionsCardInstallments : Stripe /// Whether Installments are enabled for this Invoice. /// [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool? Enabled { get; set; } } } diff --git a/src/Stripe.net/Entities/Invoices/InvoicePaymentSettingsPaymentMethodOptionsCustomerBalance.cs b/src/Stripe.net/Entities/Invoices/InvoicePaymentSettingsPaymentMethodOptionsCustomerBalance.cs index f23e0ef726..ee5c75ff8b 100644 --- a/src/Stripe.net/Entities/Invoices/InvoicePaymentSettingsPaymentMethodOptionsCustomerBalance.cs +++ b/src/Stripe.net/Entities/Invoices/InvoicePaymentSettingsPaymentMethodOptionsCustomerBalance.cs @@ -2,10 +2,16 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoicePaymentSettingsPaymentMethodOptionsCustomerBalance : StripeEntity { [JsonProperty("bank_transfer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_transfer")] +#endif public InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer BankTransfer { get; set; } /// @@ -13,6 +19,9 @@ public class InvoicePaymentSettingsPaymentMethodOptionsCustomerBalance : StripeE /// balance. Permitted values include: bank_transfer. /// [JsonProperty("funding_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("funding_type")] +#endif public string FundingType { get; set; } } } diff --git a/src/Stripe.net/Entities/Invoices/InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer.cs b/src/Stripe.net/Entities/Invoices/InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer.cs index 59b3df1dcf..1f2798f2f5 100644 --- a/src/Stripe.net/Entities/Invoices/InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer.cs +++ b/src/Stripe.net/Entities/Invoices/InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer.cs @@ -2,10 +2,16 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer : StripeEntity { [JsonProperty("eu_bank_transfer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("eu_bank_transfer")] +#endif public InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer EuBankTransfer { get; set; } /// @@ -14,6 +20,9 @@ public class InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransf /// mx_bank_transfer, or us_bank_transfer. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Invoices/InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer.cs b/src/Stripe.net/Entities/Invoices/InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer.cs index 57f8a282cc..6af33af56b 100644 --- a/src/Stripe.net/Entities/Invoices/InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer.cs +++ b/src/Stripe.net/Entities/Invoices/InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer : StripeEntity { @@ -11,6 +14,9 @@ public class InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransf /// One of: BE, DE, ES, FR, IE, or NL. /// [JsonProperty("country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country")] +#endif public string Country { get; set; } } } diff --git a/src/Stripe.net/Entities/Invoices/InvoicePaymentSettingsPaymentMethodOptionsUsBankAccount.cs b/src/Stripe.net/Entities/Invoices/InvoicePaymentSettingsPaymentMethodOptionsUsBankAccount.cs index e4c4f77374..54352a898b 100644 --- a/src/Stripe.net/Entities/Invoices/InvoicePaymentSettingsPaymentMethodOptionsUsBankAccount.cs +++ b/src/Stripe.net/Entities/Invoices/InvoicePaymentSettingsPaymentMethodOptionsUsBankAccount.cs @@ -2,10 +2,16 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoicePaymentSettingsPaymentMethodOptionsUsBankAccount : StripeEntity { [JsonProperty("financial_connections")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("financial_connections")] +#endif public InvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections FinancialConnections { get; set; } /// @@ -13,6 +19,9 @@ public class InvoicePaymentSettingsPaymentMethodOptionsUsBankAccount : StripeEnt /// One of: automatic, instant, or microdeposits. /// [JsonProperty("verification_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("verification_method")] +#endif public string VerificationMethod { get; set; } } } diff --git a/src/Stripe.net/Entities/Invoices/InvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections.cs b/src/Stripe.net/Entities/Invoices/InvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections.cs index b9efe08fe2..0f3be4f6d2 100644 --- a/src/Stripe.net/Entities/Invoices/InvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections.cs +++ b/src/Stripe.net/Entities/Invoices/InvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections.cs @@ -3,10 +3,16 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections : StripeEntity { [JsonProperty("filters")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("filters")] +#endif public InvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters Filters { get; set; } /// @@ -16,6 +22,9 @@ public class InvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialCon /// transactions. /// [JsonProperty("permissions")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("permissions")] +#endif public List Permissions { get; set; } /// @@ -23,6 +32,9 @@ public class InvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialCon /// One of: balances, ownership, or transactions. /// [JsonProperty("prefetch")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("prefetch")] +#endif public List Prefetch { get; set; } } } diff --git a/src/Stripe.net/Entities/Invoices/InvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters.cs b/src/Stripe.net/Entities/Invoices/InvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters.cs index 1e6787380e..832a5c5b57 100644 --- a/src/Stripe.net/Entities/Invoices/InvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters.cs +++ b/src/Stripe.net/Entities/Invoices/InvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters : StripeEntity { @@ -12,6 +15,9 @@ public class InvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialCon /// One of: checking, or savings. /// [JsonProperty("account_subcategories")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_subcategories")] +#endif public List AccountSubcategories { get; set; } } } diff --git a/src/Stripe.net/Entities/Invoices/InvoiceRendering.cs b/src/Stripe.net/Entities/Invoices/InvoiceRendering.cs index a41de30876..e382c8da57 100644 --- a/src/Stripe.net/Entities/Invoices/InvoiceRendering.cs +++ b/src/Stripe.net/Entities/Invoices/InvoiceRendering.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceRendering : StripeEntity { @@ -9,24 +12,36 @@ public class InvoiceRendering : StripeEntity /// How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. /// [JsonProperty("amount_tax_display")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_tax_display")] +#endif public string AmountTaxDisplay { get; set; } /// /// Invoice pdf rendering options. /// [JsonProperty("pdf")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("pdf")] +#endif public InvoiceRenderingPdf Pdf { get; set; } /// /// ID of the rendering template that the invoice is formatted by. /// [JsonProperty("template")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("template")] +#endif public string Template { get; set; } /// /// Version of the rendering template that the invoice is using. /// [JsonProperty("template_version")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("template_version")] +#endif public long? TemplateVersion { get; set; } } } diff --git a/src/Stripe.net/Entities/Invoices/InvoiceRenderingPdf.cs b/src/Stripe.net/Entities/Invoices/InvoiceRenderingPdf.cs index c77303bfc9..ce1ffa8aaa 100644 --- a/src/Stripe.net/Entities/Invoices/InvoiceRenderingPdf.cs +++ b/src/Stripe.net/Entities/Invoices/InvoiceRenderingPdf.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceRenderingPdf : StripeEntity { @@ -11,6 +14,9 @@ public class InvoiceRenderingPdf : StripeEntity /// One of: a4, auto, or letter. /// [JsonProperty("page_size")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("page_size")] +#endif public string PageSize { get; set; } } } diff --git a/src/Stripe.net/Entities/Invoices/InvoiceShippingCost.cs b/src/Stripe.net/Entities/Invoices/InvoiceShippingCost.cs index d29e991091..cf01023712 100644 --- a/src/Stripe.net/Entities/Invoices/InvoiceShippingCost.cs +++ b/src/Stripe.net/Entities/Invoices/InvoiceShippingCost.cs @@ -4,25 +4,40 @@ namespace Stripe using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class InvoiceShippingCost : StripeEntity { /// /// Total shipping cost before any taxes are applied. /// [JsonProperty("amount_subtotal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_subtotal")] +#endif public long AmountSubtotal { get; set; } /// /// Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0. /// [JsonProperty("amount_tax")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_tax")] +#endif public long AmountTax { get; set; } /// /// Total shipping cost after taxes are applied. /// [JsonProperty("amount_total")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_total")] +#endif public long AmountTotal { get; set; } #region Expandable ShippingRate @@ -32,6 +47,9 @@ public class InvoiceShippingCost : StripeEntity /// The ID of the ShippingRate for this invoice. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string ShippingRateId { get => this.InternalShippingRate?.Id; @@ -45,6 +63,9 @@ public string ShippingRateId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public ShippingRate ShippingRate { get => this.InternalShippingRate?.ExpandedObject; @@ -53,6 +74,10 @@ public ShippingRate ShippingRate [JsonProperty("shipping_rate")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping_rate")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalShippingRate { get; set; } #endregion @@ -60,6 +85,9 @@ public ShippingRate ShippingRate /// The taxes applied to the shipping rate. /// [JsonProperty("taxes")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("taxes")] +#endif public List Taxes { get; set; } } } diff --git a/src/Stripe.net/Entities/Invoices/InvoiceShippingCostTax.cs b/src/Stripe.net/Entities/Invoices/InvoiceShippingCostTax.cs index 50aaf61694..54af7cb9d1 100644 --- a/src/Stripe.net/Entities/Invoices/InvoiceShippingCostTax.cs +++ b/src/Stripe.net/Entities/Invoices/InvoiceShippingCostTax.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceShippingCostTax : StripeEntity { @@ -9,6 +12,9 @@ public class InvoiceShippingCostTax : StripeEntity /// Amount of tax applied for this rate. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long Amount { get; set; } /// @@ -21,6 +27,9 @@ public class InvoiceShippingCostTax : StripeEntity /// Related guide: Tax rates. /// [JsonProperty("rate")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("rate")] +#endif public TaxRate Rate { get; set; } /// @@ -33,12 +42,18 @@ public class InvoiceShippingCostTax : StripeEntity /// standard_rated, taxable_basis_reduced, or zero_rated. /// [JsonProperty("taxability_reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("taxability_reason")] +#endif public string TaxabilityReason { get; set; } /// /// The amount on which tax is calculated, in cents (or local equivalent). /// [JsonProperty("taxable_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("taxable_amount")] +#endif public long? TaxableAmount { get; set; } } } diff --git a/src/Stripe.net/Entities/Invoices/InvoiceShippingDetails.cs b/src/Stripe.net/Entities/Invoices/InvoiceShippingDetails.cs index caf37b7944..0439964096 100644 --- a/src/Stripe.net/Entities/Invoices/InvoiceShippingDetails.cs +++ b/src/Stripe.net/Entities/Invoices/InvoiceShippingDetails.cs @@ -2,28 +2,43 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceShippingDetails : StripeEntity { [JsonProperty("address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address")] +#endif public Address Address { get; set; } /// /// The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. /// [JsonProperty("carrier")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("carrier")] +#endif public string Carrier { get; set; } /// /// Recipient name. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } /// /// Recipient phone (including extension). /// [JsonProperty("phone")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("phone")] +#endif public string Phone { get; set; } /// @@ -32,6 +47,9 @@ public class InvoiceShippingDetails : StripeEntity /// commas. /// [JsonProperty("tracking_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tracking_number")] +#endif public string TrackingNumber { get; set; } } } diff --git a/src/Stripe.net/Entities/Invoices/InvoiceStatusTransitions.cs b/src/Stripe.net/Entities/Invoices/InvoiceStatusTransitions.cs index 1333bc4930..b6aa2d247e 100644 --- a/src/Stripe.net/Entities/Invoices/InvoiceStatusTransitions.cs +++ b/src/Stripe.net/Entities/Invoices/InvoiceStatusTransitions.cs @@ -4,6 +4,9 @@ namespace Stripe using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceStatusTransitions : StripeEntity { @@ -12,6 +15,10 @@ public class InvoiceStatusTransitions : StripeEntity /// [JsonProperty("finalized_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("finalized_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? FinalizedAt { get; set; } /// @@ -19,6 +26,10 @@ public class InvoiceStatusTransitions : StripeEntity /// [JsonProperty("marked_uncollectible_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("marked_uncollectible_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? MarkedUncollectibleAt { get; set; } /// @@ -26,6 +37,10 @@ public class InvoiceStatusTransitions : StripeEntity /// [JsonProperty("paid_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("paid_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? PaidAt { get; set; } /// @@ -33,6 +48,10 @@ public class InvoiceStatusTransitions : StripeEntity /// [JsonProperty("voided_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("voided_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? VoidedAt { get; set; } } } diff --git a/src/Stripe.net/Entities/Invoices/InvoiceSubscriptionDetails.cs b/src/Stripe.net/Entities/Invoices/InvoiceSubscriptionDetails.cs index bf820cf3ac..5529d40a71 100644 --- a/src/Stripe.net/Entities/Invoices/InvoiceSubscriptionDetails.cs +++ b/src/Stripe.net/Entities/Invoices/InvoiceSubscriptionDetails.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceSubscriptionDetails : StripeEntity, IHasMetadata { @@ -13,6 +16,9 @@ public class InvoiceSubscriptionDetails : StripeEntity. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } } } diff --git a/src/Stripe.net/Entities/Invoices/InvoiceThresholdReason.cs b/src/Stripe.net/Entities/Invoices/InvoiceThresholdReason.cs index 65d3c86f93..7e40146177 100644 --- a/src/Stripe.net/Entities/Invoices/InvoiceThresholdReason.cs +++ b/src/Stripe.net/Entities/Invoices/InvoiceThresholdReason.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceThresholdReason : StripeEntity { @@ -10,12 +13,18 @@ public class InvoiceThresholdReason : StripeEntity /// The total invoice amount threshold boundary if it triggered the threshold invoice. /// [JsonProperty("amount_gte")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_gte")] +#endif public long? AmountGte { get; set; } /// /// Indicates which line items triggered a threshold invoice. /// [JsonProperty("item_reasons")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("item_reasons")] +#endif public List ItemReasons { get; set; } } } diff --git a/src/Stripe.net/Entities/Invoices/InvoiceThresholdReasonItemReason.cs b/src/Stripe.net/Entities/Invoices/InvoiceThresholdReasonItemReason.cs index 7fbfdda7e8..ef7f6d2e0a 100644 --- a/src/Stripe.net/Entities/Invoices/InvoiceThresholdReasonItemReason.cs +++ b/src/Stripe.net/Entities/Invoices/InvoiceThresholdReasonItemReason.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceThresholdReasonItemReason : StripeEntity { @@ -10,12 +13,18 @@ public class InvoiceThresholdReasonItemReason : StripeEntity [JsonProperty("line_item_ids")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("line_item_ids")] +#endif public List LineItemIds { get; set; } /// /// The quantity threshold boundary that applied to the given line item. /// [JsonProperty("usage_gte")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("usage_gte")] +#endif public long UsageGte { get; set; } } } diff --git a/src/Stripe.net/Entities/Invoices/InvoiceTotalPretaxCreditAmount.cs b/src/Stripe.net/Entities/Invoices/InvoiceTotalPretaxCreditAmount.cs index 562273de0a..7e6539e5fe 100644 --- a/src/Stripe.net/Entities/Invoices/InvoiceTotalPretaxCreditAmount.cs +++ b/src/Stripe.net/Entities/Invoices/InvoiceTotalPretaxCreditAmount.cs @@ -3,13 +3,22 @@ namespace Stripe { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class InvoiceTotalPretaxCreditAmount : StripeEntity { /// /// The amount, in cents (or local equivalent), of the pretax credit amount. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long Amount { get; set; } #region Expandable CreditBalanceTransaction @@ -19,6 +28,9 @@ public class InvoiceTotalPretaxCreditAmount : StripeEntity [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string CreditBalanceTransactionId { get => this.InternalCreditBalanceTransaction?.Id; @@ -32,6 +44,9 @@ public string CreditBalanceTransactionId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Billing.CreditBalanceTransaction CreditBalanceTransaction { get => this.InternalCreditBalanceTransaction?.ExpandedObject; @@ -40,6 +55,10 @@ public Billing.CreditBalanceTransaction CreditBalanceTransaction [JsonProperty("credit_balance_transaction")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("credit_balance_transaction")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalCreditBalanceTransaction { get; set; } #endregion @@ -50,6 +69,9 @@ public Billing.CreditBalanceTransaction CreditBalanceTransaction /// The discount that was applied to get this pretax credit amount. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string DiscountId { get => this.InternalDiscount?.Id; @@ -63,6 +85,9 @@ public string DiscountId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Discount Discount { get => this.InternalDiscount?.ExpandedObject; @@ -71,6 +96,10 @@ public Discount Discount [JsonProperty("discount")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discount")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalDiscount { get; set; } #endregion @@ -79,6 +108,9 @@ public Discount Discount /// One of: credit_balance_transaction, or discount. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Invoices/InvoiceTransferData.cs b/src/Stripe.net/Entities/Invoices/InvoiceTransferData.cs index 8c9d79312d..ca9d366aba 100644 --- a/src/Stripe.net/Entities/Invoices/InvoiceTransferData.cs +++ b/src/Stripe.net/Entities/Invoices/InvoiceTransferData.cs @@ -3,7 +3,13 @@ namespace Stripe { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class InvoiceTransferData : StripeEntity { /// @@ -12,6 +18,9 @@ public class InvoiceTransferData : StripeEntity /// destination. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long? Amount { get; set; } #region Expandable Destination @@ -21,6 +30,9 @@ public class InvoiceTransferData : StripeEntity /// The account where funds from the payment will be transferred to upon payment success. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string DestinationId { get => this.InternalDestination?.Id; @@ -34,6 +46,9 @@ public string DestinationId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Account Destination { get => this.InternalDestination?.ExpandedObject; @@ -42,6 +57,10 @@ public Account Destination [JsonProperty("destination")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("destination")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalDestination { get; set; } #endregion } diff --git a/src/Stripe.net/Entities/Issuing/Authorizations/Authorization.cs b/src/Stripe.net/Entities/Issuing/Authorizations/Authorization.cs index 6be292db2f..1e13a8038a 100644 --- a/src/Stripe.net/Entities/Issuing/Authorizations/Authorization.cs +++ b/src/Stripe.net/Entities/Issuing/Authorizations/Authorization.cs @@ -5,6 +5,9 @@ namespace Stripe.Issuing using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// When an issued card is used to make a @@ -15,18 +18,27 @@ namespace Stripe.Issuing /// Related guide: Issued /// card authorizations. /// +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class Authorization : StripeEntity, IHasId, IHasMetadata, IHasObject, IBalanceTransactionSource { /// /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// @@ -36,6 +48,9 @@ public class Authorization : StripeEntity, IHasId, IHasMetadata, /// currency and merchant_currency are different. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long Amount { get; set; } /// @@ -44,12 +59,18 @@ public class Authorization : StripeEntity, IHasId, IHasMetadata, /// href="https://stripe.com/docs/currencies#zero-decimal">smallest currency unit. /// [JsonProperty("amount_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_details")] +#endif public AuthorizationAmountDetails AmountDetails { get; set; } /// /// Whether the authorization has been approved. /// [JsonProperty("approved")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("approved")] +#endif public bool Approved { get; set; } /// @@ -58,12 +79,18 @@ public class Authorization : StripeEntity, IHasId, IHasMetadata, /// swipe. /// [JsonProperty("authorization_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("authorization_method")] +#endif public string AuthorizationMethod { get; set; } /// /// List of balance transactions associated with this authorization. /// [JsonProperty("balance_transactions")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("balance_transactions")] +#endif public List BalanceTransactions { get; set; } /// @@ -71,6 +98,9 @@ public class Authorization : StripeEntity, IHasId, IHasMetadata, /// that are issued to cardholders. /// [JsonProperty("card")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card")] +#endif public Card Card { get; set; } #region Expandable Cardholder @@ -80,6 +110,9 @@ public class Authorization : StripeEntity, IHasId, IHasMetadata, /// The cardholder to whom this authorization belongs. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string CardholderId { get => this.InternalCardholder?.Id; @@ -93,6 +126,9 @@ public string CardholderId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Cardholder Cardholder { get => this.InternalCardholder?.ExpandedObject; @@ -101,6 +137,10 @@ public Cardholder Cardholder [JsonProperty("cardholder")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cardholder")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalCardholder { get; set; } #endregion @@ -109,6 +149,10 @@ public Cardholder Cardholder /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -119,12 +163,18 @@ public Cardholder Cardholder /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// /// Fleet-specific information for authorizations using Fleet cards. /// [JsonProperty("fleet")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fleet")] +#endif public AuthorizationFleet Fleet { get; set; } /// @@ -132,6 +182,9 @@ public Cardholder Cardholder /// risk reasons. /// [JsonProperty("fraud_challenges")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fraud_challenges")] +#endif public List FraudChallenges { get; set; } /// @@ -140,6 +193,9 @@ public Cardholder Cardholder /// the fuel dispensed. /// [JsonProperty("fuel")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fuel")] +#endif public AuthorizationFuel Fuel { get; set; } /// @@ -147,6 +203,9 @@ public Cardholder Cardholder /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// @@ -157,6 +216,9 @@ public Cardholder Cardholder /// merchant_currency and currency are different. /// [JsonProperty("merchant_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("merchant_amount")] +#endif public long MerchantAmount { get; set; } /// @@ -168,9 +230,15 @@ public Cardholder Cardholder /// currency. /// [JsonProperty("merchant_currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("merchant_currency")] +#endif public string MerchantCurrency { get; set; } [JsonProperty("merchant_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("merchant_data")] +#endif public AuthorizationMerchantData MerchantData { get; set; } /// @@ -179,12 +247,18 @@ public Cardholder Cardholder /// object in a structured format. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// Details about the authorization, such as identifiers, set by the card network. /// [JsonProperty("network_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("network_data")] +#endif public AuthorizationNetworkData NetworkData { get; set; } /// @@ -192,6 +266,9 @@ public Cardholder Cardholder /// issuing_authorization.request webhook. /// [JsonProperty("pending_request")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("pending_request")] +#endif public AuthorizationPendingRequest PendingRequest { get; set; } /// @@ -202,6 +279,9 @@ public Cardholder Cardholder /// helpful in determining why a given authorization was approved/declined. /// [JsonProperty("request_history")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("request_history")] +#endif public List RequestHistory { get; set; } /// @@ -209,6 +289,9 @@ public Cardholder Cardholder /// One of: closed, pending, or reversed. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } #region Expandable Token @@ -220,6 +303,9 @@ public Cardholder Cardholder /// will be null. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string TokenId { get => this.InternalToken?.Id; @@ -235,6 +321,9 @@ public string TokenId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Token Token { get => this.InternalToken?.ExpandedObject; @@ -243,6 +332,10 @@ public Token Token [JsonProperty("token")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("token")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalToken { get; set; } #endregion @@ -251,6 +344,9 @@ public Token Token /// associated with this authorization. /// [JsonProperty("transactions")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transactions")] +#endif public List Transactions { get; set; } /// @@ -259,9 +355,15 @@ public Token Token /// href="https://stripe.com/docs/api/treasury/financial_accounts">FinancialAccount. /// [JsonProperty("treasury")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("treasury")] +#endif public AuthorizationTreasury Treasury { get; set; } [JsonProperty("verification_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("verification_data")] +#endif public AuthorizationVerificationData VerificationData { get; set; } /// @@ -270,6 +372,9 @@ public Token Token /// same merchant. /// [JsonProperty("verified_by_fraud_challenge")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("verified_by_fraud_challenge")] +#endif public bool? VerifiedByFraudChallenge { get; set; } /// @@ -278,6 +383,9 @@ public Token Token /// wallet was utilized. /// [JsonProperty("wallet")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("wallet")] +#endif public string Wallet { get; set; } } } diff --git a/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationAmountDetails.cs b/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationAmountDetails.cs index 1c5c0d5a5c..f5ce29c386 100644 --- a/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationAmountDetails.cs +++ b/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationAmountDetails.cs @@ -2,6 +2,9 @@ namespace Stripe.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AuthorizationAmountDetails : StripeEntity { @@ -9,12 +12,18 @@ public class AuthorizationAmountDetails : StripeEntity [JsonProperty("atm_fee")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("atm_fee")] +#endif public long? AtmFee { get; set; } /// /// The amount of cash requested by the cardholder. /// [JsonProperty("cashback_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cashback_amount")] +#endif public long? CashbackAmount { get; set; } } } diff --git a/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationFleet.cs b/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationFleet.cs index 83fb3818db..f60c831ccf 100644 --- a/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationFleet.cs +++ b/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationFleet.cs @@ -2,6 +2,9 @@ namespace Stripe.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AuthorizationFleet : StripeEntity { @@ -11,6 +14,9 @@ public class AuthorizationFleet : StripeEntity /// support only numeric entry. /// [JsonProperty("cardholder_prompt_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cardholder_prompt_data")] +#endif public AuthorizationFleetCardholderPromptData CardholderPromptData { get; set; } /// @@ -19,6 +25,9 @@ public class AuthorizationFleet : StripeEntity /// non_fuel_purchase. /// [JsonProperty("purchase_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("purchase_type")] +#endif public string PurchaseType { get; set; } /// @@ -28,6 +37,9 @@ public class AuthorizationFleet : StripeEntity /// data. /// [JsonProperty("reported_breakdown")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reported_breakdown")] +#endif public AuthorizationFleetReportedBreakdown ReportedBreakdown { get; set; } /// @@ -35,6 +47,9 @@ public class AuthorizationFleet : StripeEntity /// One of: full_service, non_fuel_transaction, or self_service. /// [JsonProperty("service_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("service_type")] +#endif public string ServiceType { get; set; } } } diff --git a/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationFleetCardholderPromptData.cs b/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationFleetCardholderPromptData.cs index b1894f273f..1116b35127 100644 --- a/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationFleetCardholderPromptData.cs +++ b/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationFleetCardholderPromptData.cs @@ -3,6 +3,9 @@ namespace Stripe.Issuing { using System; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AuthorizationFleetCardholderPromptData : StripeEntity { @@ -13,18 +16,27 @@ public class AuthorizationFleetCardholderPromptData : StripeEntity [Obsolete("This property is deprecated, please refer to the description for details.")] [JsonProperty("alphanumeric_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("alphanumeric_id")] +#endif public string AlphanumericId { get; set; } /// /// Driver ID. /// [JsonProperty("driver_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("driver_id")] +#endif public string DriverId { get; set; } /// /// Odometer reading. /// [JsonProperty("odometer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("odometer")] +#endif public long? Odometer { get; set; } /// @@ -33,18 +45,27 @@ public class AuthorizationFleetCardholderPromptData : StripeEntity [JsonProperty("unspecified_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unspecified_id")] +#endif public string UnspecifiedId { get; set; } /// /// User ID. /// [JsonProperty("user_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("user_id")] +#endif public string UserId { get; set; } /// /// Vehicle number. /// [JsonProperty("vehicle_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("vehicle_number")] +#endif public string VehicleNumber { get; set; } } } diff --git a/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationFleetReportedBreakdown.cs b/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationFleetReportedBreakdown.cs index cd8f7e6a4f..1f663ee29f 100644 --- a/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationFleetReportedBreakdown.cs +++ b/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationFleetReportedBreakdown.cs @@ -2,6 +2,9 @@ namespace Stripe.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AuthorizationFleetReportedBreakdown : StripeEntity { @@ -9,18 +12,27 @@ public class AuthorizationFleetReportedBreakdown : StripeEntity [JsonProperty("fuel")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fuel")] +#endif public AuthorizationFleetReportedBreakdownFuel Fuel { get; set; } /// /// Breakdown of non-fuel portion of the purchase. /// [JsonProperty("non_fuel")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("non_fuel")] +#endif public AuthorizationFleetReportedBreakdownNonFuel NonFuel { get; set; } /// /// Information about tax included in this transaction. /// [JsonProperty("tax")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax")] +#endif public AuthorizationFleetReportedBreakdownTax Tax { get; set; } } } diff --git a/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationFleetReportedBreakdownFuel.cs b/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationFleetReportedBreakdownFuel.cs index de332ad003..8accbb6c4d 100644 --- a/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationFleetReportedBreakdownFuel.cs +++ b/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationFleetReportedBreakdownFuel.cs @@ -2,6 +2,9 @@ namespace Stripe.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AuthorizationFleetReportedBreakdownFuel : StripeEntity { @@ -10,6 +13,9 @@ public class AuthorizationFleetReportedBreakdownFuel : StripeEntity [JsonProperty("gross_amount_decimal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("gross_amount_decimal")] +#endif public decimal? GrossAmountDecimal { get; set; } } } diff --git a/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationFleetReportedBreakdownNonFuel.cs b/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationFleetReportedBreakdownNonFuel.cs index ea9e587e1d..de122f4d96 100644 --- a/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationFleetReportedBreakdownNonFuel.cs +++ b/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationFleetReportedBreakdownNonFuel.cs @@ -2,6 +2,9 @@ namespace Stripe.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AuthorizationFleetReportedBreakdownNonFuel : StripeEntity { @@ -9,6 +12,9 @@ public class AuthorizationFleetReportedBreakdownNonFuel : StripeEntity [JsonProperty("gross_amount_decimal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("gross_amount_decimal")] +#endif public decimal? GrossAmountDecimal { get; set; } } } diff --git a/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationFleetReportedBreakdownTax.cs b/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationFleetReportedBreakdownTax.cs index 1df3bd345c..362b8f2059 100644 --- a/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationFleetReportedBreakdownTax.cs +++ b/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationFleetReportedBreakdownTax.cs @@ -2,6 +2,9 @@ namespace Stripe.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AuthorizationFleetReportedBreakdownTax : StripeEntity { @@ -10,6 +13,9 @@ public class AuthorizationFleetReportedBreakdownTax : StripeEntity [JsonProperty("local_amount_decimal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("local_amount_decimal")] +#endif public decimal? LocalAmountDecimal { get; set; } /// @@ -17,6 +23,9 @@ public class AuthorizationFleetReportedBreakdownTax : StripeEntity [JsonProperty("national_amount_decimal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("national_amount_decimal")] +#endif public decimal? NationalAmountDecimal { get; set; } } } diff --git a/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationFraudChallenge.cs b/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationFraudChallenge.cs index 7541abeed5..75109fb74c 100644 --- a/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationFraudChallenge.cs +++ b/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationFraudChallenge.cs @@ -2,6 +2,9 @@ namespace Stripe.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AuthorizationFraudChallenge : StripeEntity { @@ -9,6 +12,9 @@ public class AuthorizationFraudChallenge : StripeEntity [JsonProperty("channel")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("channel")] +#endif public string Channel { get; set; } /// @@ -17,6 +23,9 @@ public class AuthorizationFraudChallenge : StripeEntityverified. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } /// @@ -24,6 +33,9 @@ public class AuthorizationFraudChallenge : StripeEntityno_phone_number, or unsupported_phone_number. /// [JsonProperty("undeliverable_reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("undeliverable_reason")] +#endif public string UndeliverableReason { get; set; } } } diff --git a/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationFuel.cs b/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationFuel.cs index e360492e04..991f2d22a6 100644 --- a/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationFuel.cs +++ b/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationFuel.cs @@ -2,6 +2,9 @@ namespace Stripe.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AuthorizationFuel : StripeEntity { @@ -10,6 +13,9 @@ public class AuthorizationFuel : StripeEntity /// Payment System Product Code identifying the primary fuel product purchased. /// [JsonProperty("industry_product_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("industry_product_code")] +#endif public string IndustryProductCode { get; set; } /// @@ -17,6 +23,9 @@ public class AuthorizationFuel : StripeEntity /// with at most 12 decimal places. /// [JsonProperty("quantity_decimal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("quantity_decimal")] +#endif public decimal? QuantityDecimal { get; set; } /// @@ -25,6 +34,9 @@ public class AuthorizationFuel : StripeEntity /// unleaded_super. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } /// @@ -33,6 +45,9 @@ public class AuthorizationFuel : StripeEntity /// kilowatt_hour, liter, other, pound, or us_gallon. /// [JsonProperty("unit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit")] +#endif public string Unit { get; set; } /// @@ -40,6 +55,9 @@ public class AuthorizationFuel : StripeEntity /// decimal places. /// [JsonProperty("unit_cost_decimal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_cost_decimal")] +#endif public decimal? UnitCostDecimal { get; set; } } } diff --git a/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationMerchantData.cs b/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationMerchantData.cs index b3b6ac75d3..4582806b70 100644 --- a/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationMerchantData.cs +++ b/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationMerchantData.cs @@ -2,6 +2,9 @@ namespace Stripe.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AuthorizationMerchantData : StripeEntity { @@ -11,30 +14,45 @@ public class AuthorizationMerchantData : StripeEntity /// for a list of possible values. /// [JsonProperty("category")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("category")] +#endif public string Category { get; set; } /// /// The merchant category code for the seller’s business. /// [JsonProperty("category_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("category_code")] +#endif public string CategoryCode { get; set; } /// /// City where the seller is located. /// [JsonProperty("city")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("city")] +#endif public string City { get; set; } /// /// Country where the seller is located. /// [JsonProperty("country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country")] +#endif public string Country { get; set; } /// /// Name of the seller. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } /// @@ -42,30 +60,45 @@ public class AuthorizationMerchantData : StripeEntity /// assign different network_id fields to the same merchant. /// [JsonProperty("network_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("network_id")] +#endif public string NetworkId { get; set; } /// /// Postal code where the seller is located. /// [JsonProperty("postal_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("postal_code")] +#endif public string PostalCode { get; set; } /// /// State where the seller is located. /// [JsonProperty("state")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("state")] +#endif public string State { get; set; } /// /// An ID assigned by the seller to the location of the sale. /// [JsonProperty("terminal_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("terminal_id")] +#endif public string TerminalId { get; set; } /// /// URL provided by the merchant on a 3DS request. /// [JsonProperty("url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("url")] +#endif public string Url { get; set; } } } diff --git a/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationNetworkData.cs b/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationNetworkData.cs index c6a0430646..ec4df60df3 100644 --- a/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationNetworkData.cs +++ b/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationNetworkData.cs @@ -2,6 +2,9 @@ namespace Stripe.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AuthorizationNetworkData : StripeEntity { @@ -10,6 +13,9 @@ public class AuthorizationNetworkData : StripeEntity /// provided by the network; in this case, the value will be null. /// [JsonProperty("acquiring_institution_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("acquiring_institution_id")] +#endif public string AcquiringInstitutionId { get; set; } /// @@ -18,6 +24,9 @@ public class AuthorizationNetworkData : StripeEntity /// requirements. /// [JsonProperty("system_trace_audit_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("system_trace_audit_number")] +#endif public string SystemTraceAuditNumber { get; set; } /// @@ -25,6 +34,9 @@ public class AuthorizationNetworkData : StripeEntity /// subsequent messages, disputes, and transactions. /// [JsonProperty("transaction_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transaction_id")] +#endif public string TransactionId { get; set; } } } diff --git a/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationPendingRequest.cs b/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationPendingRequest.cs index 842596f075..869496eef7 100644 --- a/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationPendingRequest.cs +++ b/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationPendingRequest.cs @@ -2,6 +2,9 @@ namespace Stripe.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AuthorizationPendingRequest : StripeEntity { @@ -13,6 +16,9 @@ public class AuthorizationPendingRequest : StripeEntity. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long Amount { get; set; } /// @@ -21,6 +27,9 @@ public class AuthorizationPendingRequest : StripeEntitysmallest currency unit. /// [JsonProperty("amount_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_details")] +#endif public AuthorizationPendingRequestAmountDetails AmountDetails { get; set; } /// @@ -29,6 +38,9 @@ public class AuthorizationPendingRequest : StripeEntity. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// @@ -37,6 +49,9 @@ public class AuthorizationPendingRequest : StripeEntity [JsonProperty("is_amount_controllable")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("is_amount_controllable")] +#endif public bool IsAmountControllable { get; set; } /// @@ -45,12 +60,18 @@ public class AuthorizationPendingRequest : StripeEntity. /// [JsonProperty("merchant_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("merchant_amount")] +#endif public long MerchantAmount { get; set; } /// /// The local currency the merchant is requesting to authorize. /// [JsonProperty("merchant_currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("merchant_currency")] +#endif public string MerchantCurrency { get; set; } /// @@ -58,6 +79,9 @@ public class AuthorizationPendingRequest : StripeEntity [JsonProperty("network_risk_score")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("network_risk_score")] +#endif public long? NetworkRiskScore { get; set; } } } diff --git a/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationPendingRequestAmountDetails.cs b/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationPendingRequestAmountDetails.cs index be66037463..4f29f0027e 100644 --- a/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationPendingRequestAmountDetails.cs +++ b/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationPendingRequestAmountDetails.cs @@ -2,6 +2,9 @@ namespace Stripe.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AuthorizationPendingRequestAmountDetails : StripeEntity { @@ -9,12 +12,18 @@ public class AuthorizationPendingRequestAmountDetails : StripeEntity [JsonProperty("atm_fee")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("atm_fee")] +#endif public long? AtmFee { get; set; } /// /// The amount of cash requested by the cardholder. /// [JsonProperty("cashback_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cashback_amount")] +#endif public long? CashbackAmount { get; set; } } } diff --git a/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationRequestHistory.cs b/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationRequestHistory.cs index 98700be0c1..b3d026af98 100644 --- a/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationRequestHistory.cs +++ b/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationRequestHistory.cs @@ -4,6 +4,9 @@ namespace Stripe.Issuing using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AuthorizationRequestHistory : StripeEntity { @@ -14,6 +17,9 @@ public class AuthorizationRequestHistory : StripeEntity [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long Amount { get; set; } /// @@ -22,12 +28,18 @@ public class AuthorizationRequestHistory : StripeEntitysmallest currency unit. /// [JsonProperty("amount_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_details")] +#endif public AuthorizationRequestHistoryAmountDetails AmountDetails { get; set; } /// /// Whether this request was approved. /// [JsonProperty("approved")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("approved")] +#endif public bool Approved { get; set; } /// @@ -38,6 +50,9 @@ public class AuthorizationRequestHistory : StripeEntity [JsonProperty("authorization_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("authorization_code")] +#endif public string AuthorizationCode { get; set; } /// @@ -45,6 +60,10 @@ public class AuthorizationRequestHistory : StripeEntity [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -53,6 +72,9 @@ public class AuthorizationRequestHistory : StripeEntity. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// @@ -61,6 +83,9 @@ public class AuthorizationRequestHistory : StripeEntitysmallest currency unit. /// [JsonProperty("merchant_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("merchant_amount")] +#endif public long MerchantAmount { get; set; } /// @@ -71,6 +96,9 @@ public class AuthorizationRequestHistory : StripeEntity. /// [JsonProperty("merchant_currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("merchant_currency")] +#endif public string MerchantCurrency { get; set; } /// @@ -78,6 +106,9 @@ public class AuthorizationRequestHistory : StripeEntity [JsonProperty("network_risk_score")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("network_risk_score")] +#endif public long? NetworkRiskScore { get; set; } /// @@ -92,6 +123,9 @@ public class AuthorizationRequestHistory : StripeEntitywebhook_error, or webhook_timeout. /// [JsonProperty("reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reason")] +#endif public string Reason { get; set; } /// @@ -100,6 +134,9 @@ public class AuthorizationRequestHistory : StripeEntity [JsonProperty("reason_message")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reason_message")] +#endif public string ReasonMessage { get; set; } /// @@ -108,6 +145,10 @@ public class AuthorizationRequestHistory : StripeEntity [JsonProperty("requested_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? RequestedAt { get; set; } } } diff --git a/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationRequestHistoryAmountDetails.cs b/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationRequestHistoryAmountDetails.cs index 7fc4931a10..380e683a1d 100644 --- a/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationRequestHistoryAmountDetails.cs +++ b/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationRequestHistoryAmountDetails.cs @@ -2,6 +2,9 @@ namespace Stripe.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AuthorizationRequestHistoryAmountDetails : StripeEntity { @@ -9,12 +12,18 @@ public class AuthorizationRequestHistoryAmountDetails : StripeEntity [JsonProperty("atm_fee")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("atm_fee")] +#endif public long? AtmFee { get; set; } /// /// The amount of cash requested by the cardholder. /// [JsonProperty("cashback_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cashback_amount")] +#endif public long? CashbackAmount { get; set; } } } diff --git a/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationTreasury.cs b/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationTreasury.cs index 431e7df8cd..16ffd5e58e 100644 --- a/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationTreasury.cs +++ b/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationTreasury.cs @@ -3,6 +3,9 @@ namespace Stripe.Issuing { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AuthorizationTreasury : StripeEntity { @@ -12,6 +15,9 @@ public class AuthorizationTreasury : StripeEntity /// associated with this authorization. /// [JsonProperty("received_credits")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("received_credits")] +#endif public List ReceivedCredits { get; set; } /// @@ -20,6 +26,9 @@ public class AuthorizationTreasury : StripeEntity /// associated with this authorization. /// [JsonProperty("received_debits")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("received_debits")] +#endif public List ReceivedDebits { get; set; } /// @@ -27,6 +36,9 @@ public class AuthorizationTreasury : StripeEntity /// associated with this authorization. /// [JsonProperty("transaction")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transaction")] +#endif public string Transaction { get; set; } } } diff --git a/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationVerificationData.cs b/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationVerificationData.cs index ba0b6a6189..7e4c10585b 100644 --- a/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationVerificationData.cs +++ b/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationVerificationData.cs @@ -2,6 +2,9 @@ namespace Stripe.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AuthorizationVerificationData : StripeEntity { @@ -11,6 +14,9 @@ public class AuthorizationVerificationData : StripeEntitymatch, mismatch, or not_provided. /// [JsonProperty("address_line1_check")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_line1_check")] +#endif public string AddressLine1Check { get; set; } /// @@ -19,12 +25,18 @@ public class AuthorizationVerificationData : StripeEntitymatch, mismatch, or not_provided. /// [JsonProperty("address_postal_code_check")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_postal_code_check")] +#endif public string AddressPostalCodeCheck { get; set; } /// /// The exemption applied to this authorization. /// [JsonProperty("authentication_exemption")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("authentication_exemption")] +#endif public AuthorizationVerificationDataAuthenticationExemption AuthenticationExemption { get; set; } /// @@ -32,6 +44,9 @@ public class AuthorizationVerificationData : StripeEntitymatch, mismatch, or not_provided. /// [JsonProperty("cvc_check")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cvc_check")] +#endif public string CvcCheck { get; set; } /// @@ -39,6 +54,9 @@ public class AuthorizationVerificationData : StripeEntitymatch, mismatch, or not_provided. /// [JsonProperty("expiry_check")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("expiry_check")] +#endif public string ExpiryCheck { get; set; } /// @@ -46,12 +64,18 @@ public class AuthorizationVerificationData : StripeEntity [JsonProperty("postal_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("postal_code")] +#endif public string PostalCode { get; set; } /// /// 3D Secure details. /// [JsonProperty("three_d_secure")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("three_d_secure")] +#endif public AuthorizationVerificationDataThreeDSecure ThreeDSecure { get; set; } } } diff --git a/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationVerificationDataAuthenticationExemption.cs b/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationVerificationDataAuthenticationExemption.cs index 5a7959e661..6744d09fe8 100644 --- a/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationVerificationDataAuthenticationExemption.cs +++ b/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationVerificationDataAuthenticationExemption.cs @@ -2,6 +2,9 @@ namespace Stripe.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AuthorizationVerificationDataAuthenticationExemption : StripeEntity { @@ -11,6 +14,9 @@ public class AuthorizationVerificationDataAuthenticationExemption : StripeEntity /// One of: acquirer, or issuer. /// [JsonProperty("claimed_by")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("claimed_by")] +#endif public string ClaimedBy { get; set; } /// @@ -19,6 +25,9 @@ public class AuthorizationVerificationDataAuthenticationExemption : StripeEntity /// unknown. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationVerificationDataThreeDSecure.cs b/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationVerificationDataThreeDSecure.cs index 3be0822ba6..5a2db53491 100644 --- a/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationVerificationDataThreeDSecure.cs +++ b/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationVerificationDataThreeDSecure.cs @@ -2,6 +2,9 @@ namespace Stripe.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AuthorizationVerificationDataThreeDSecure : StripeEntity { @@ -11,6 +14,9 @@ public class AuthorizationVerificationDataThreeDSecure : StripeEntityrequired. /// [JsonProperty("result")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("result")] +#endif public string Result { get; set; } } } diff --git a/src/Stripe.net/Entities/Issuing/Cardholders/Cardholder.cs b/src/Stripe.net/Entities/Issuing/Cardholders/Cardholder.cs index 9510751286..13a0930626 100644 --- a/src/Stripe.net/Entities/Issuing/Cardholders/Cardholder.cs +++ b/src/Stripe.net/Entities/Issuing/Cardholders/Cardholder.cs @@ -5,6 +5,9 @@ namespace Stripe.Issuing using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// An Issuing Cardholder object represents an individual or business entity who is @@ -20,21 +23,33 @@ public class Cardholder : StripeEntity, IHasId, IHasMetadata, IHasOb /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } [JsonProperty("billing")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing")] +#endif public CardholderBilling Billing { get; set; } /// /// Additional information about a company cardholder. /// [JsonProperty("company")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("company")] +#endif public CardholderCompany Company { get; set; } /// @@ -42,18 +57,28 @@ public class Cardholder : StripeEntity, IHasId, IHasMetadata, IHasOb /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// /// The cardholder's email address. /// [JsonProperty("email")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("email")] +#endif public string Email { get; set; } /// /// Additional information about an individual cardholder. /// [JsonProperty("individual")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("individual")] +#endif public CardholderIndividual Individual { get; set; } /// @@ -61,6 +86,9 @@ public class Cardholder : StripeEntity, IHasId, IHasMetadata, IHasOb /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// @@ -69,12 +97,18 @@ public class Cardholder : StripeEntity, IHasId, IHasMetadata, IHasOb /// object in a structured format. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// The cardholder's name. This will be printed on cards issued to them. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } /// @@ -84,6 +118,9 @@ public class Cardholder : StripeEntity, IHasId, IHasMetadata, IHasOb /// documentation for more details. /// [JsonProperty("phone_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("phone_number")] +#endif public string PhoneNumber { get; set; } /// @@ -94,9 +131,15 @@ public class Cardholder : StripeEntity, IHasId, IHasMetadata, IHasOb /// One of: de, en, es, fr, or it. /// [JsonProperty("preferred_locales")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preferred_locales")] +#endif public List PreferredLocales { get; set; } [JsonProperty("requirements")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requirements")] +#endif public CardholderRequirements Requirements { get; set; } /// @@ -105,6 +148,9 @@ public class Cardholder : StripeEntity, IHasId, IHasMetadata, IHasOb /// more details. /// [JsonProperty("spending_controls")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("spending_controls")] +#endif public CardholderSpendingControls SpendingControls { get; set; } /// @@ -112,6 +158,9 @@ public class Cardholder : StripeEntity, IHasId, IHasMetadata, IHasOb /// One of: active, blocked, or inactive. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } /// @@ -121,6 +170,9 @@ public class Cardholder : StripeEntity, IHasId, IHasMetadata, IHasOb /// One of: company, or individual. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Issuing/Cardholders/CardholderBilling.cs b/src/Stripe.net/Entities/Issuing/Cardholders/CardholderBilling.cs index ca62b820ea..41b6608771 100644 --- a/src/Stripe.net/Entities/Issuing/Cardholders/CardholderBilling.cs +++ b/src/Stripe.net/Entities/Issuing/Cardholders/CardholderBilling.cs @@ -2,10 +2,16 @@ namespace Stripe.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CardholderBilling : StripeEntity { [JsonProperty("address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address")] +#endif public Address Address { get; set; } } } diff --git a/src/Stripe.net/Entities/Issuing/Cardholders/CardholderCompany.cs b/src/Stripe.net/Entities/Issuing/Cardholders/CardholderCompany.cs index 91607e3035..a31585d8c0 100644 --- a/src/Stripe.net/Entities/Issuing/Cardholders/CardholderCompany.cs +++ b/src/Stripe.net/Entities/Issuing/Cardholders/CardholderCompany.cs @@ -2,6 +2,9 @@ namespace Stripe.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CardholderCompany : StripeEntity { @@ -9,6 +12,9 @@ public class CardholderCompany : StripeEntity /// Whether the company's business ID number was provided. /// [JsonProperty("tax_id_provided")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_id_provided")] +#endif public bool TaxIdProvided { get; set; } } } diff --git a/src/Stripe.net/Entities/Issuing/Cardholders/CardholderIndividual.cs b/src/Stripe.net/Entities/Issuing/Cardholders/CardholderIndividual.cs index 318741c93a..dd55779c59 100644 --- a/src/Stripe.net/Entities/Issuing/Cardholders/CardholderIndividual.cs +++ b/src/Stripe.net/Entities/Issuing/Cardholders/CardholderIndividual.cs @@ -2,6 +2,9 @@ namespace Stripe.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CardholderIndividual : StripeEntity { @@ -9,12 +12,18 @@ public class CardholderIndividual : StripeEntity /// Information related to the card_issuing program for this cardholder. /// [JsonProperty("card_issuing")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card_issuing")] +#endif public CardholderIndividualCardIssuing CardIssuing { get; set; } /// /// The date of birth of this cardholder. /// [JsonProperty("dob")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("dob")] +#endif public CardholderIndividualDob Dob { get; set; } /// @@ -23,6 +32,9 @@ public class CardholderIndividual : StripeEntity /// apostrophes) or non-latin letters. /// [JsonProperty("first_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("first_name")] +#endif public string FirstName { get; set; } /// @@ -31,12 +43,18 @@ public class CardholderIndividual : StripeEntity /// apostrophes) or non-latin letters. /// [JsonProperty("last_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last_name")] +#endif public string LastName { get; set; } /// /// Government-issued ID document for this cardholder. /// [JsonProperty("verification")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("verification")] +#endif public CardholderIndividualVerification Verification { get; set; } } } diff --git a/src/Stripe.net/Entities/Issuing/Cardholders/CardholderIndividualCardIssuing.cs b/src/Stripe.net/Entities/Issuing/Cardholders/CardholderIndividualCardIssuing.cs index 1826e8f22a..8bbfeb8775 100644 --- a/src/Stripe.net/Entities/Issuing/Cardholders/CardholderIndividualCardIssuing.cs +++ b/src/Stripe.net/Entities/Issuing/Cardholders/CardholderIndividualCardIssuing.cs @@ -2,6 +2,9 @@ namespace Stripe.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CardholderIndividualCardIssuing : StripeEntity { @@ -11,6 +14,9 @@ public class CardholderIndividualCardIssuing : StripeEntity. Required for cards backed by a Celtic program. /// [JsonProperty("user_terms_acceptance")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("user_terms_acceptance")] +#endif public CardholderIndividualCardIssuingUserTermsAcceptance UserTermsAcceptance { get; set; } } } diff --git a/src/Stripe.net/Entities/Issuing/Cardholders/CardholderIndividualCardIssuingUserTermsAcceptance.cs b/src/Stripe.net/Entities/Issuing/Cardholders/CardholderIndividualCardIssuingUserTermsAcceptance.cs index 2bc384fc27..09ce2a18c7 100644 --- a/src/Stripe.net/Entities/Issuing/Cardholders/CardholderIndividualCardIssuingUserTermsAcceptance.cs +++ b/src/Stripe.net/Entities/Issuing/Cardholders/CardholderIndividualCardIssuingUserTermsAcceptance.cs @@ -4,6 +4,9 @@ namespace Stripe.Issuing using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CardholderIndividualCardIssuingUserTermsAcceptance : StripeEntity { @@ -12,12 +15,19 @@ public class CardholderIndividualCardIssuingUserTermsAcceptance : StripeEntity [JsonProperty("date")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("date")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? Date { get; set; } /// /// The IP address from which the cardholder accepted the Authorized User Terms. /// [JsonProperty("ip")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ip")] +#endif public string Ip { get; set; } /// @@ -25,6 +35,9 @@ public class CardholderIndividualCardIssuingUserTermsAcceptance : StripeEntity [JsonProperty("user_agent")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("user_agent")] +#endif public string UserAgent { get; set; } } } diff --git a/src/Stripe.net/Entities/Issuing/Cardholders/CardholderIndividualDob.cs b/src/Stripe.net/Entities/Issuing/Cardholders/CardholderIndividualDob.cs index 5c2274c3c7..fa2c1f3f97 100644 --- a/src/Stripe.net/Entities/Issuing/Cardholders/CardholderIndividualDob.cs +++ b/src/Stripe.net/Entities/Issuing/Cardholders/CardholderIndividualDob.cs @@ -2,6 +2,9 @@ namespace Stripe.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CardholderIndividualDob : StripeEntity { @@ -9,18 +12,27 @@ public class CardholderIndividualDob : StripeEntity /// The day of birth, between 1 and 31. /// [JsonProperty("day")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("day")] +#endif public long? Day { get; set; } /// /// The month of birth, between 1 and 12. /// [JsonProperty("month")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("month")] +#endif public long? Month { get; set; } /// /// The four-digit year of birth. /// [JsonProperty("year")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("year")] +#endif public long? Year { get; set; } } } diff --git a/src/Stripe.net/Entities/Issuing/Cardholders/CardholderIndividualVerification.cs b/src/Stripe.net/Entities/Issuing/Cardholders/CardholderIndividualVerification.cs index a934803902..74d5273805 100644 --- a/src/Stripe.net/Entities/Issuing/Cardholders/CardholderIndividualVerification.cs +++ b/src/Stripe.net/Entities/Issuing/Cardholders/CardholderIndividualVerification.cs @@ -2,6 +2,9 @@ namespace Stripe.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CardholderIndividualVerification : StripeEntity { @@ -9,6 +12,9 @@ public class CardholderIndividualVerification : StripeEntity [JsonProperty("document")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("document")] +#endif public CardholderIndividualVerificationDocument Document { get; set; } } } diff --git a/src/Stripe.net/Entities/Issuing/Cardholders/CardholderIndividualVerificationDocument.cs b/src/Stripe.net/Entities/Issuing/Cardholders/CardholderIndividualVerificationDocument.cs index 60e219a288..2f636191d8 100644 --- a/src/Stripe.net/Entities/Issuing/Cardholders/CardholderIndividualVerificationDocument.cs +++ b/src/Stripe.net/Entities/Issuing/Cardholders/CardholderIndividualVerificationDocument.cs @@ -3,7 +3,13 @@ namespace Stripe.Issuing { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class CardholderIndividualVerificationDocument : StripeEntity { #region Expandable Back @@ -15,6 +21,9 @@ public class CardholderIndividualVerificationDocument : StripeEntityidentity_document. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string BackId { get => this.InternalBack?.Id; @@ -30,6 +39,9 @@ public string BackId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public File Back { get => this.InternalBack?.ExpandedObject; @@ -38,6 +50,10 @@ public File Back [JsonProperty("back")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("back")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalBack { get; set; } #endregion @@ -50,6 +66,9 @@ public File Back /// value of identity_document. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string FrontId { get => this.InternalFront?.Id; @@ -65,6 +84,9 @@ public string FrontId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public File Front { get => this.InternalFront?.ExpandedObject; @@ -73,6 +95,10 @@ public File Front [JsonProperty("front")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("front")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalFront { get; set; } #endregion } diff --git a/src/Stripe.net/Entities/Issuing/Cardholders/CardholderRequirements.cs b/src/Stripe.net/Entities/Issuing/Cardholders/CardholderRequirements.cs index 59bc79e78a..e23a715a73 100644 --- a/src/Stripe.net/Entities/Issuing/Cardholders/CardholderRequirements.cs +++ b/src/Stripe.net/Entities/Issuing/Cardholders/CardholderRequirements.cs @@ -3,6 +3,9 @@ namespace Stripe.Issuing { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CardholderRequirements : StripeEntity { @@ -13,6 +16,9 @@ public class CardholderRequirements : StripeEntity /// under_review. /// [JsonProperty("disabled_reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("disabled_reason")] +#endif public string DisabledReason { get; set; } /// @@ -25,6 +31,9 @@ public class CardholderRequirements : StripeEntity /// individual.last_name, or individual.verification.document. /// [JsonProperty("past_due")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("past_due")] +#endif public List PastDue { get; set; } } } diff --git a/src/Stripe.net/Entities/Issuing/Cardholders/CardholderSpendingControls.cs b/src/Stripe.net/Entities/Issuing/Cardholders/CardholderSpendingControls.cs index 1ebad8ecd5..bd4bbf5a4d 100644 --- a/src/Stripe.net/Entities/Issuing/Cardholders/CardholderSpendingControls.cs +++ b/src/Stripe.net/Entities/Issuing/Cardholders/CardholderSpendingControls.cs @@ -3,6 +3,9 @@ namespace Stripe.Issuing { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CardholderSpendingControls : StripeEntity { @@ -158,6 +161,9 @@ public class CardholderSpendingControls : StripeEntitywrecking_and_salvage_yards. /// [JsonProperty("allowed_categories")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("allowed_categories")] +#endif public List AllowedCategories { get; set; } /// @@ -167,6 +173,9 @@ public class CardholderSpendingControls : StripeEntityblocked_merchant_countries. Provide an empty value to unset this control. /// [JsonProperty("allowed_merchant_countries")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("allowed_merchant_countries")] +#endif public List AllowedMerchantCountries { get; set; } /// @@ -321,6 +330,9 @@ public class CardholderSpendingControls : StripeEntitywrecking_and_salvage_yards. /// [JsonProperty("blocked_categories")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("blocked_categories")] +#endif public List BlockedCategories { get; set; } /// @@ -330,18 +342,27 @@ public class CardholderSpendingControls : StripeEntity [JsonProperty("blocked_merchant_countries")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("blocked_merchant_countries")] +#endif public List BlockedMerchantCountries { get; set; } /// /// Limit spending with amount-based rules that apply across this cardholder's cards. /// [JsonProperty("spending_limits")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("spending_limits")] +#endif public List SpendingLimits { get; set; } /// /// Currency of the amounts within spending_limits. /// [JsonProperty("spending_limits_currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("spending_limits_currency")] +#endif public string SpendingLimitsCurrency { get; set; } } } diff --git a/src/Stripe.net/Entities/Issuing/Cardholders/CardholderSpendingControlsSpendingLimit.cs b/src/Stripe.net/Entities/Issuing/Cardholders/CardholderSpendingControlsSpendingLimit.cs index 041d3b8b7e..4275211ef8 100644 --- a/src/Stripe.net/Entities/Issuing/Cardholders/CardholderSpendingControlsSpendingLimit.cs +++ b/src/Stripe.net/Entities/Issuing/Cardholders/CardholderSpendingControlsSpendingLimit.cs @@ -3,6 +3,9 @@ namespace Stripe.Issuing { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CardholderSpendingControlsSpendingLimit : StripeEntity { @@ -12,6 +15,9 @@ public class CardholderSpendingControlsSpendingLimit : StripeEntity. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long Amount { get; set; } /// @@ -165,6 +171,9 @@ public class CardholderSpendingControlsSpendingLimit : StripeEntitywrecking_and_salvage_yards. /// [JsonProperty("categories")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("categories")] +#endif public List Categories { get; set; } /// @@ -173,6 +182,9 @@ public class CardholderSpendingControlsSpendingLimit : StripeEntityweekly, or yearly. /// [JsonProperty("interval")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interval")] +#endif public string Interval { get; set; } } } diff --git a/src/Stripe.net/Entities/Issuing/Cards/Card.cs b/src/Stripe.net/Entities/Issuing/Cards/Card.cs index 37f46fbb3f..4a9f225dfa 100644 --- a/src/Stripe.net/Entities/Issuing/Cards/Card.cs +++ b/src/Stripe.net/Entities/Issuing/Cards/Card.cs @@ -5,29 +5,44 @@ namespace Stripe.Issuing using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// You can create physical or virtual cards /// that are issued to cardholders. /// +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class Card : StripeEntity, IHasId, IHasMetadata, IHasObject { /// /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// /// The brand of the card. /// [JsonProperty("brand")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("brand")] +#endif public string Brand { get; set; } /// @@ -35,6 +50,9 @@ public class Card : StripeEntity, IHasId, IHasMetadata, IHasObject /// One of: design_rejected, lost, or stolen. /// [JsonProperty("cancellation_reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cancellation_reason")] +#endif public string CancellationReason { get; set; } /// @@ -46,6 +64,9 @@ public class Card : StripeEntity, IHasId, IHasMetadata, IHasObject /// to create a cardholder. /// [JsonProperty("cardholder")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cardholder")] +#endif public Cardholder Cardholder { get; set; } /// @@ -53,6 +74,10 @@ public class Card : StripeEntity, IHasId, IHasMetadata, IHasObject /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -61,6 +86,9 @@ public class Card : StripeEntity, IHasId, IHasMetadata, IHasObject /// EU, and gbp in the UK. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// @@ -72,30 +100,45 @@ public class Card : StripeEntity, IHasId, IHasMetadata, IHasObject /// endpoint, not via "List all cards" or any other endpoint. /// [JsonProperty("cvc")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cvc")] +#endif public string Cvc { get; set; } /// /// The expiration month of the card. /// [JsonProperty("exp_month")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("exp_month")] +#endif public long ExpMonth { get; set; } /// /// The expiration year of the card. /// [JsonProperty("exp_year")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("exp_year")] +#endif public long ExpYear { get; set; } /// /// The financial account this card is attached to. /// [JsonProperty("financial_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("financial_account")] +#endif public string FinancialAccount { get; set; } /// /// The last 4 digits of the card number. /// [JsonProperty("last4")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last4")] +#endif public string Last4 { get; set; } /// @@ -103,6 +146,9 @@ public class Card : StripeEntity, IHasId, IHasMetadata, IHasObject /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// @@ -111,6 +157,9 @@ public class Card : StripeEntity, IHasId, IHasMetadata, IHasObject /// object in a structured format. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -122,6 +171,9 @@ public class Card : StripeEntity, IHasId, IHasMetadata, IHasObject /// endpoint, not via "List all cards" or any other endpoint. /// [JsonProperty("number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("number")] +#endif public string Number { get; set; } #region Expandable PersonalizationDesign @@ -131,6 +183,9 @@ public class Card : StripeEntity, IHasId, IHasMetadata, IHasObject /// The personalization design object belonging to this card. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string PersonalizationDesignId { get => this.InternalPersonalizationDesign?.Id; @@ -144,6 +199,9 @@ public string PersonalizationDesignId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public PersonalizationDesign PersonalizationDesign { get => this.InternalPersonalizationDesign?.ExpandedObject; @@ -152,6 +210,10 @@ public PersonalizationDesign PersonalizationDesign [JsonProperty("personalization_design")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("personalization_design")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalPersonalizationDesign { get; set; } #endregion @@ -162,6 +224,9 @@ public PersonalizationDesign PersonalizationDesign /// The latest card that replaces this card, if any. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string ReplacedById { get => this.InternalReplacedBy?.Id; @@ -175,6 +240,9 @@ public string ReplacedById /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Card ReplacedBy { get => this.InternalReplacedBy?.ExpandedObject; @@ -183,6 +251,10 @@ public Card ReplacedBy [JsonProperty("replaced_by")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("replaced_by")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalReplacedBy { get; set; } #endregion @@ -193,6 +265,9 @@ public Card ReplacedBy /// The card this card replaces, if any. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string ReplacementForId { get => this.InternalReplacementFor?.Id; @@ -206,6 +281,9 @@ public string ReplacementForId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Card ReplacementFor { get => this.InternalReplacementFor?.ExpandedObject; @@ -214,6 +292,10 @@ public Card ReplacementFor [JsonProperty("replacement_for")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("replacement_for")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalReplacementFor { get; set; } #endregion @@ -222,15 +304,24 @@ public Card ReplacementFor /// One of: damaged, expired, lost, or stolen. /// [JsonProperty("replacement_reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("replacement_reason")] +#endif public string ReplacementReason { get; set; } /// /// Where and how the card will be shipped. /// [JsonProperty("shipping")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping")] +#endif public CardShipping Shipping { get; set; } [JsonProperty("spending_controls")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("spending_controls")] +#endif public CardSpendingControls SpendingControls { get; set; } /// @@ -239,6 +330,9 @@ public Card ReplacementFor /// One of: active, canceled, or inactive. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } /// @@ -246,12 +340,18 @@ public Card ReplacementFor /// One of: physical, or virtual. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } /// /// Information relating to digital wallets (like Apple Pay and Google Pay). /// [JsonProperty("wallets")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("wallets")] +#endif public CardWallets Wallets { get; set; } } } diff --git a/src/Stripe.net/Entities/Issuing/Cards/CardShipping.cs b/src/Stripe.net/Entities/Issuing/Cards/CardShipping.cs index ee94f54dd7..4293d02be0 100644 --- a/src/Stripe.net/Entities/Issuing/Cards/CardShipping.cs +++ b/src/Stripe.net/Entities/Issuing/Cards/CardShipping.cs @@ -4,16 +4,25 @@ namespace Stripe.Issuing using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CardShipping : StripeEntity { [JsonProperty("address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address")] +#endif public Address Address { get; set; } /// /// Address validation details for the shipment. /// [JsonProperty("address_validation")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_validation")] +#endif public CardShippingAddressValidation AddressValidation { get; set; } /// @@ -21,12 +30,18 @@ public class CardShipping : StripeEntity /// One of: dhl, fedex, royal_mail, or usps. /// [JsonProperty("carrier")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("carrier")] +#endif public string Carrier { get; set; } /// /// Additional information that may be required for clearing customs. /// [JsonProperty("customs")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customs")] +#endif public CardShippingCustoms Customs { get; set; } /// @@ -34,12 +49,19 @@ public class CardShipping : StripeEntity /// [JsonProperty("eta")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("eta")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? Eta { get; set; } /// /// Recipient name. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } /// @@ -49,6 +71,9 @@ public class CardShipping : StripeEntity /// when the cardholder was initially created. /// [JsonProperty("phone_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("phone_number")] +#endif public string PhoneNumber { get; set; } /// @@ -58,6 +83,9 @@ public class CardShipping : StripeEntity /// true. /// [JsonProperty("require_signature")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("require_signature")] +#endif public bool? RequireSignature { get; set; } /// @@ -65,6 +93,9 @@ public class CardShipping : StripeEntity /// One of: express, priority, or standard. /// [JsonProperty("service")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("service")] +#endif public string Service { get; set; } /// @@ -73,12 +104,18 @@ public class CardShipping : StripeEntity /// returned, shipped, or submitted. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } /// /// A tracking number for a card shipment. /// [JsonProperty("tracking_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tracking_number")] +#endif public string TrackingNumber { get; set; } /// @@ -86,6 +123,9 @@ public class CardShipping : StripeEntity /// card shipment. /// [JsonProperty("tracking_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tracking_url")] +#endif public string TrackingUrl { get; set; } /// @@ -93,6 +133,9 @@ public class CardShipping : StripeEntity /// One of: bulk, or individual. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Issuing/Cards/CardShippingAddressValidation.cs b/src/Stripe.net/Entities/Issuing/Cards/CardShippingAddressValidation.cs index da01e67e41..89b5a0f038 100644 --- a/src/Stripe.net/Entities/Issuing/Cards/CardShippingAddressValidation.cs +++ b/src/Stripe.net/Entities/Issuing/Cards/CardShippingAddressValidation.cs @@ -2,6 +2,9 @@ namespace Stripe.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CardShippingAddressValidation : StripeEntity { @@ -11,12 +14,18 @@ public class CardShippingAddressValidation : StripeEntityvalidation_and_normalization. /// [JsonProperty("mode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mode")] +#endif public string Mode { get; set; } /// /// The normalized shipping address. /// [JsonProperty("normalized_address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("normalized_address")] +#endif public Address NormalizedAddress { get; set; } /// @@ -24,6 +33,9 @@ public class CardShippingAddressValidation : StripeEntityindeterminate, likely_deliverable, or likely_undeliverable. /// [JsonProperty("result")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("result")] +#endif public string Result { get; set; } } } diff --git a/src/Stripe.net/Entities/Issuing/Cards/CardShippingCustoms.cs b/src/Stripe.net/Entities/Issuing/Cards/CardShippingCustoms.cs index 330900e32b..ec3919e11f 100644 --- a/src/Stripe.net/Entities/Issuing/Cards/CardShippingCustoms.cs +++ b/src/Stripe.net/Entities/Issuing/Cards/CardShippingCustoms.cs @@ -2,6 +2,9 @@ namespace Stripe.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CardShippingCustoms : StripeEntity { @@ -12,6 +15,9 @@ public class CardShippingCustoms : StripeEntity /// for the EU. /// [JsonProperty("eori_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("eori_number")] +#endif public string EoriNumber { get; set; } } } diff --git a/src/Stripe.net/Entities/Issuing/Cards/CardSpendingControls.cs b/src/Stripe.net/Entities/Issuing/Cards/CardSpendingControls.cs index 47fd46dcde..8e391c48e6 100644 --- a/src/Stripe.net/Entities/Issuing/Cards/CardSpendingControls.cs +++ b/src/Stripe.net/Entities/Issuing/Cards/CardSpendingControls.cs @@ -3,6 +3,9 @@ namespace Stripe.Issuing { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CardSpendingControls : StripeEntity { @@ -158,6 +161,9 @@ public class CardSpendingControls : StripeEntity /// wrecking_and_salvage_yards. /// [JsonProperty("allowed_categories")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("allowed_categories")] +#endif public List AllowedCategories { get; set; } /// @@ -167,6 +173,9 @@ public class CardSpendingControls : StripeEntity /// blocked_merchant_countries. Provide an empty value to unset this control. /// [JsonProperty("allowed_merchant_countries")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("allowed_merchant_countries")] +#endif public List AllowedMerchantCountries { get; set; } /// @@ -321,6 +330,9 @@ public class CardSpendingControls : StripeEntity /// wrecking_and_salvage_yards. /// [JsonProperty("blocked_categories")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("blocked_categories")] +#endif public List BlockedCategories { get; set; } /// @@ -330,6 +342,9 @@ public class CardSpendingControls : StripeEntity /// this control. /// [JsonProperty("blocked_merchant_countries")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("blocked_merchant_countries")] +#endif public List BlockedMerchantCountries { get; set; } /// @@ -338,6 +353,9 @@ public class CardSpendingControls : StripeEntity /// card, up the chain). /// [JsonProperty("spending_limits")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("spending_limits")] +#endif public List SpendingLimits { get; set; } /// @@ -345,6 +363,9 @@ public class CardSpendingControls : StripeEntity /// of the card. /// [JsonProperty("spending_limits_currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("spending_limits_currency")] +#endif public string SpendingLimitsCurrency { get; set; } } } diff --git a/src/Stripe.net/Entities/Issuing/Cards/CardSpendingControlsSpendingLimit.cs b/src/Stripe.net/Entities/Issuing/Cards/CardSpendingControlsSpendingLimit.cs index 263746c9be..e561012012 100644 --- a/src/Stripe.net/Entities/Issuing/Cards/CardSpendingControlsSpendingLimit.cs +++ b/src/Stripe.net/Entities/Issuing/Cards/CardSpendingControlsSpendingLimit.cs @@ -3,6 +3,9 @@ namespace Stripe.Issuing { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CardSpendingControlsSpendingLimit : StripeEntity { @@ -12,6 +15,9 @@ public class CardSpendingControlsSpendingLimit : StripeEntity. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long Amount { get; set; } /// @@ -165,6 +171,9 @@ public class CardSpendingControlsSpendingLimit : StripeEntitywrecking_and_salvage_yards. /// [JsonProperty("categories")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("categories")] +#endif public List Categories { get; set; } /// @@ -173,6 +182,9 @@ public class CardSpendingControlsSpendingLimit : StripeEntityweekly, or yearly. /// [JsonProperty("interval")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interval")] +#endif public string Interval { get; set; } } } diff --git a/src/Stripe.net/Entities/Issuing/Cards/CardWallets.cs b/src/Stripe.net/Entities/Issuing/Cards/CardWallets.cs index 122a5e3fad..e88793161a 100644 --- a/src/Stripe.net/Entities/Issuing/Cards/CardWallets.cs +++ b/src/Stripe.net/Entities/Issuing/Cards/CardWallets.cs @@ -2,19 +2,31 @@ namespace Stripe.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CardWallets : StripeEntity { [JsonProperty("apple_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("apple_pay")] +#endif public CardWalletsApplePay ApplePay { get; set; } [JsonProperty("google_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("google_pay")] +#endif public CardWalletsGooglePay GooglePay { get; set; } /// /// Unique identifier for a card used with digital wallets. /// [JsonProperty("primary_account_identifier")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("primary_account_identifier")] +#endif public string PrimaryAccountIdentifier { get; set; } } } diff --git a/src/Stripe.net/Entities/Issuing/Cards/CardWalletsApplePay.cs b/src/Stripe.net/Entities/Issuing/Cards/CardWalletsApplePay.cs index 23000668b8..5c3e694210 100644 --- a/src/Stripe.net/Entities/Issuing/Cards/CardWalletsApplePay.cs +++ b/src/Stripe.net/Entities/Issuing/Cards/CardWalletsApplePay.cs @@ -2,6 +2,9 @@ namespace Stripe.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CardWalletsApplePay : StripeEntity { @@ -9,6 +12,9 @@ public class CardWalletsApplePay : StripeEntity /// Apple Pay Eligibility. /// [JsonProperty("eligible")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("eligible")] +#endif public bool Eligible { get; set; } /// @@ -17,6 +23,9 @@ public class CardWalletsApplePay : StripeEntity /// unsupported_region. /// [JsonProperty("ineligible_reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ineligible_reason")] +#endif public string IneligibleReason { get; set; } } } diff --git a/src/Stripe.net/Entities/Issuing/Cards/CardWalletsGooglePay.cs b/src/Stripe.net/Entities/Issuing/Cards/CardWalletsGooglePay.cs index bfb606aa88..31c92229f5 100644 --- a/src/Stripe.net/Entities/Issuing/Cards/CardWalletsGooglePay.cs +++ b/src/Stripe.net/Entities/Issuing/Cards/CardWalletsGooglePay.cs @@ -2,6 +2,9 @@ namespace Stripe.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CardWalletsGooglePay : StripeEntity { @@ -9,6 +12,9 @@ public class CardWalletsGooglePay : StripeEntity /// Google Pay Eligibility. /// [JsonProperty("eligible")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("eligible")] +#endif public bool Eligible { get; set; } /// @@ -17,6 +23,9 @@ public class CardWalletsGooglePay : StripeEntity /// unsupported_region. /// [JsonProperty("ineligible_reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ineligible_reason")] +#endif public string IneligibleReason { get; set; } } } diff --git a/src/Stripe.net/Entities/Issuing/Disputes/Dispute.cs b/src/Stripe.net/Entities/Issuing/Disputes/Dispute.cs index 8dd8bcf246..9fe9b2f131 100644 --- a/src/Stripe.net/Entities/Issuing/Disputes/Dispute.cs +++ b/src/Stripe.net/Entities/Issuing/Disputes/Dispute.cs @@ -5,6 +5,9 @@ namespace Stripe.Issuing using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// As a card issuer, you can dispute @@ -14,18 +17,27 @@ namespace Stripe.Issuing /// Related guide: Issuing /// disputes. /// +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class Dispute : StripeEntity, IHasId, IHasMetadata, IHasObject, IBalanceTransactionSource { /// /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// @@ -35,12 +47,18 @@ public class Dispute : StripeEntity, IHasId, IHasMetadata, IHasObject, /// currency fluctuation). /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long Amount { get; set; } /// /// List of balance transactions associated with the dispute. /// [JsonProperty("balance_transactions")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("balance_transactions")] +#endif public List BalanceTransactions { get; set; } /// @@ -48,15 +66,25 @@ public class Dispute : StripeEntity, IHasId, IHasMetadata, IHasObject, /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// /// The currency the transaction was made in. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } [JsonProperty("evidence")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("evidence")] +#endif public DisputeEvidence Evidence { get; set; } /// @@ -64,6 +92,9 @@ public class Dispute : StripeEntity, IHasId, IHasMetadata, IHasObject, /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// @@ -84,6 +115,9 @@ public class Dispute : StripeEntity, IHasId, IHasMetadata, IHasObject, /// transaction_unattended. /// [JsonProperty("loss_reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("loss_reason")] +#endif public string LossReason { get; set; } /// @@ -92,6 +126,9 @@ public class Dispute : StripeEntity, IHasId, IHasMetadata, IHasObject, /// object in a structured format. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -100,6 +137,9 @@ public class Dispute : StripeEntity, IHasId, IHasMetadata, IHasObject, /// won. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } #region Expandable Transaction @@ -109,6 +149,9 @@ public class Dispute : StripeEntity, IHasId, IHasMetadata, IHasObject, /// The transaction being disputed. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string TransactionId { get => this.InternalTransaction?.Id; @@ -122,6 +165,9 @@ public string TransactionId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Transaction Transaction { get => this.InternalTransaction?.ExpandedObject; @@ -130,6 +176,10 @@ public Transaction Transaction [JsonProperty("transaction")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transaction")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalTransaction { get; set; } #endregion @@ -138,6 +188,9 @@ public Transaction Transaction /// dispute if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts. /// [JsonProperty("treasury")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("treasury")] +#endif public DisputeTreasury Treasury { get; set; } } } diff --git a/src/Stripe.net/Entities/Issuing/Disputes/DisputeEvidence.cs b/src/Stripe.net/Entities/Issuing/Disputes/DisputeEvidence.cs index 42ef8cf231..2ac7d78fdb 100644 --- a/src/Stripe.net/Entities/Issuing/Disputes/DisputeEvidence.cs +++ b/src/Stripe.net/Entities/Issuing/Disputes/DisputeEvidence.cs @@ -2,28 +2,52 @@ namespace Stripe.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class DisputeEvidence : StripeEntity { [JsonProperty("canceled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("canceled")] +#endif public DisputeEvidenceCanceled Canceled { get; set; } [JsonProperty("duplicate")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("duplicate")] +#endif public DisputeEvidenceDuplicate Duplicate { get; set; } [JsonProperty("fraudulent")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fraudulent")] +#endif public DisputeEvidenceFraudulent Fraudulent { get; set; } [JsonProperty("merchandise_not_as_described")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("merchandise_not_as_described")] +#endif public DisputeEvidenceMerchandiseNotAsDescribed MerchandiseNotAsDescribed { get; set; } [JsonProperty("no_valid_authorization")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("no_valid_authorization")] +#endif public DisputeEvidenceNoValidAuthorization NoValidAuthorization { get; set; } [JsonProperty("not_received")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("not_received")] +#endif public DisputeEvidenceNotReceived NotReceived { get; set; } [JsonProperty("other")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("other")] +#endif public DisputeEvidenceOther Other { get; set; } /// @@ -34,9 +58,15 @@ public class DisputeEvidence : StripeEntity /// other, or service_not_as_described. /// [JsonProperty("reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reason")] +#endif public string Reason { get; set; } [JsonProperty("service_not_as_described")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("service_not_as_described")] +#endif public DisputeEvidenceServiceNotAsDescribed ServiceNotAsDescribed { get; set; } } } diff --git a/src/Stripe.net/Entities/Issuing/Disputes/DisputeEvidenceCanceled.cs b/src/Stripe.net/Entities/Issuing/Disputes/DisputeEvidenceCanceled.cs index 50de13fe3b..716dd2138f 100644 --- a/src/Stripe.net/Entities/Issuing/Disputes/DisputeEvidenceCanceled.cs +++ b/src/Stripe.net/Entities/Issuing/Disputes/DisputeEvidenceCanceled.cs @@ -4,7 +4,13 @@ namespace Stripe.Issuing using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class DisputeEvidenceCanceled : StripeEntity { #region Expandable AdditionalDocumentation @@ -15,6 +21,9 @@ public class DisputeEvidenceCanceled : StripeEntity /// Additional documentation supporting the dispute. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string AdditionalDocumentationId { get => this.InternalAdditionalDocumentation?.Id; @@ -29,6 +38,9 @@ public string AdditionalDocumentationId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public File AdditionalDocumentation { get => this.InternalAdditionalDocumentation?.ExpandedObject; @@ -37,6 +49,10 @@ public File AdditionalDocumentation [JsonProperty("additional_documentation")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("additional_documentation")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalAdditionalDocumentation { get; set; } #endregion @@ -45,18 +61,28 @@ public File AdditionalDocumentation /// [JsonProperty("canceled_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("canceled_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? CanceledAt { get; set; } /// /// Whether the cardholder was provided with a cancellation policy. /// [JsonProperty("cancellation_policy_provided")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cancellation_policy_provided")] +#endif public bool? CancellationPolicyProvided { get; set; } /// /// Reason for canceling the order. /// [JsonProperty("cancellation_reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cancellation_reason")] +#endif public string CancellationReason { get; set; } /// @@ -64,18 +90,28 @@ public File AdditionalDocumentation /// [JsonProperty("expected_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("expected_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? ExpectedAt { get; set; } /// /// Explanation of why the cardholder is disputing this transaction. /// [JsonProperty("explanation")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("explanation")] +#endif public string Explanation { get; set; } /// /// Description of the merchandise or service that was purchased. /// [JsonProperty("product_description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("product_description")] +#endif public string ProductDescription { get; set; } /// @@ -83,6 +119,9 @@ public File AdditionalDocumentation /// One of: merchandise, or service. /// [JsonProperty("product_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("product_type")] +#endif public string ProductType { get; set; } /// @@ -90,6 +129,9 @@ public File AdditionalDocumentation /// One of: merchant_rejected, or successful. /// [JsonProperty("return_status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("return_status")] +#endif public string ReturnStatus { get; set; } /// @@ -97,6 +139,10 @@ public File AdditionalDocumentation /// [JsonProperty("returned_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("returned_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? ReturnedAt { get; set; } } } diff --git a/src/Stripe.net/Entities/Issuing/Disputes/DisputeEvidenceDuplicate.cs b/src/Stripe.net/Entities/Issuing/Disputes/DisputeEvidenceDuplicate.cs index 7c5df310a8..ea1fbd1389 100644 --- a/src/Stripe.net/Entities/Issuing/Disputes/DisputeEvidenceDuplicate.cs +++ b/src/Stripe.net/Entities/Issuing/Disputes/DisputeEvidenceDuplicate.cs @@ -3,7 +3,13 @@ namespace Stripe.Issuing { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class DisputeEvidenceDuplicate : StripeEntity { #region Expandable AdditionalDocumentation @@ -14,6 +20,9 @@ public class DisputeEvidenceDuplicate : StripeEntity /// Additional documentation supporting the dispute. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string AdditionalDocumentationId { get => this.InternalAdditionalDocumentation?.Id; @@ -28,6 +37,9 @@ public string AdditionalDocumentationId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public File AdditionalDocumentation { get => this.InternalAdditionalDocumentation?.ExpandedObject; @@ -36,6 +48,10 @@ public File AdditionalDocumentation [JsonProperty("additional_documentation")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("additional_documentation")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalAdditionalDocumentation { get; set; } #endregion @@ -47,6 +63,9 @@ public File AdditionalDocumentation /// the card statement showing that the product had already been paid for. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string CardStatementId { get => this.InternalCardStatement?.Id; @@ -61,6 +80,9 @@ public string CardStatementId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public File CardStatement { get => this.InternalCardStatement?.ExpandedObject; @@ -69,6 +91,10 @@ public File CardStatement [JsonProperty("card_statement")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card_statement")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalCardStatement { get; set; } #endregion @@ -80,6 +106,9 @@ public File CardStatement /// the receipt showing that the product had been paid for in cash. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string CashReceiptId { get => this.InternalCashReceipt?.Id; @@ -94,6 +123,9 @@ public string CashReceiptId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public File CashReceipt { get => this.InternalCashReceipt?.ExpandedObject; @@ -102,6 +134,10 @@ public File CashReceipt [JsonProperty("cash_receipt")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cash_receipt")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalCashReceipt { get; set; } #endregion @@ -113,6 +149,9 @@ public File CashReceipt /// the front and back of the check that was used to pay for the product. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string CheckImageId { get => this.InternalCheckImage?.Id; @@ -127,6 +166,9 @@ public string CheckImageId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public File CheckImage { get => this.InternalCheckImage?.ExpandedObject; @@ -135,6 +177,10 @@ public File CheckImage [JsonProperty("check_image")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("check_image")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalCheckImage { get; set; } #endregion @@ -142,6 +188,9 @@ public File CheckImage /// Explanation of why the cardholder is disputing this transaction. /// [JsonProperty("explanation")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("explanation")] +#endif public string Explanation { get; set; } /// @@ -149,6 +198,9 @@ public File CheckImage /// or more transactions that are copies of each other, this is original undisputed one. /// [JsonProperty("original_transaction")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("original_transaction")] +#endif public string OriginalTransaction { get; set; } } } diff --git a/src/Stripe.net/Entities/Issuing/Disputes/DisputeEvidenceFraudulent.cs b/src/Stripe.net/Entities/Issuing/Disputes/DisputeEvidenceFraudulent.cs index 2f8bfe74ba..7a06edf86a 100644 --- a/src/Stripe.net/Entities/Issuing/Disputes/DisputeEvidenceFraudulent.cs +++ b/src/Stripe.net/Entities/Issuing/Disputes/DisputeEvidenceFraudulent.cs @@ -3,7 +3,13 @@ namespace Stripe.Issuing { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class DisputeEvidenceFraudulent : StripeEntity { #region Expandable AdditionalDocumentation @@ -14,6 +20,9 @@ public class DisputeEvidenceFraudulent : StripeEntity /// Additional documentation supporting the dispute. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string AdditionalDocumentationId { get => this.InternalAdditionalDocumentation?.Id; @@ -28,6 +37,9 @@ public string AdditionalDocumentationId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public File AdditionalDocumentation { get => this.InternalAdditionalDocumentation?.ExpandedObject; @@ -36,6 +48,10 @@ public File AdditionalDocumentation [JsonProperty("additional_documentation")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("additional_documentation")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalAdditionalDocumentation { get; set; } #endregion @@ -43,6 +59,9 @@ public File AdditionalDocumentation /// Explanation of why the cardholder is disputing this transaction. /// [JsonProperty("explanation")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("explanation")] +#endif public string Explanation { get; set; } } } diff --git a/src/Stripe.net/Entities/Issuing/Disputes/DisputeEvidenceMerchandiseNotAsDescribed.cs b/src/Stripe.net/Entities/Issuing/Disputes/DisputeEvidenceMerchandiseNotAsDescribed.cs index 83aee3738b..857b475234 100644 --- a/src/Stripe.net/Entities/Issuing/Disputes/DisputeEvidenceMerchandiseNotAsDescribed.cs +++ b/src/Stripe.net/Entities/Issuing/Disputes/DisputeEvidenceMerchandiseNotAsDescribed.cs @@ -4,7 +4,13 @@ namespace Stripe.Issuing using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class DisputeEvidenceMerchandiseNotAsDescribed : StripeEntity { #region Expandable AdditionalDocumentation @@ -15,6 +21,9 @@ public class DisputeEvidenceMerchandiseNotAsDescribed : StripeEntity [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string AdditionalDocumentationId { get => this.InternalAdditionalDocumentation?.Id; @@ -29,6 +38,9 @@ public string AdditionalDocumentationId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public File AdditionalDocumentation { get => this.InternalAdditionalDocumentation?.ExpandedObject; @@ -37,6 +49,10 @@ public File AdditionalDocumentation [JsonProperty("additional_documentation")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("additional_documentation")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalAdditionalDocumentation { get; set; } #endregion @@ -44,6 +60,9 @@ public File AdditionalDocumentation /// Explanation of why the cardholder is disputing this transaction. /// [JsonProperty("explanation")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("explanation")] +#endif public string Explanation { get; set; } /// @@ -51,12 +70,19 @@ public File AdditionalDocumentation /// [JsonProperty("received_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("received_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? ReceivedAt { get; set; } /// /// Description of the cardholder's attempt to return the product. /// [JsonProperty("return_description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("return_description")] +#endif public string ReturnDescription { get; set; } /// @@ -64,6 +90,9 @@ public File AdditionalDocumentation /// One of: merchant_rejected, or successful. /// [JsonProperty("return_status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("return_status")] +#endif public string ReturnStatus { get; set; } /// @@ -71,6 +100,10 @@ public File AdditionalDocumentation /// [JsonProperty("returned_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("returned_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? ReturnedAt { get; set; } } } diff --git a/src/Stripe.net/Entities/Issuing/Disputes/DisputeEvidenceNoValidAuthorization.cs b/src/Stripe.net/Entities/Issuing/Disputes/DisputeEvidenceNoValidAuthorization.cs index dc57fb5390..5a31d3f442 100644 --- a/src/Stripe.net/Entities/Issuing/Disputes/DisputeEvidenceNoValidAuthorization.cs +++ b/src/Stripe.net/Entities/Issuing/Disputes/DisputeEvidenceNoValidAuthorization.cs @@ -3,7 +3,13 @@ namespace Stripe.Issuing { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class DisputeEvidenceNoValidAuthorization : StripeEntity { #region Expandable AdditionalDocumentation @@ -14,6 +20,9 @@ public class DisputeEvidenceNoValidAuthorization : StripeEntity [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string AdditionalDocumentationId { get => this.InternalAdditionalDocumentation?.Id; @@ -28,6 +37,9 @@ public string AdditionalDocumentationId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public File AdditionalDocumentation { get => this.InternalAdditionalDocumentation?.ExpandedObject; @@ -36,6 +48,10 @@ public File AdditionalDocumentation [JsonProperty("additional_documentation")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("additional_documentation")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalAdditionalDocumentation { get; set; } #endregion @@ -43,6 +59,9 @@ public File AdditionalDocumentation /// Explanation of why the cardholder is disputing this transaction. /// [JsonProperty("explanation")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("explanation")] +#endif public string Explanation { get; set; } } } diff --git a/src/Stripe.net/Entities/Issuing/Disputes/DisputeEvidenceNotReceived.cs b/src/Stripe.net/Entities/Issuing/Disputes/DisputeEvidenceNotReceived.cs index 0e11a75826..4c90273c58 100644 --- a/src/Stripe.net/Entities/Issuing/Disputes/DisputeEvidenceNotReceived.cs +++ b/src/Stripe.net/Entities/Issuing/Disputes/DisputeEvidenceNotReceived.cs @@ -4,7 +4,13 @@ namespace Stripe.Issuing using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class DisputeEvidenceNotReceived : StripeEntity { #region Expandable AdditionalDocumentation @@ -15,6 +21,9 @@ public class DisputeEvidenceNotReceived : StripeEntity [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string AdditionalDocumentationId { get => this.InternalAdditionalDocumentation?.Id; @@ -29,6 +38,9 @@ public string AdditionalDocumentationId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public File AdditionalDocumentation { get => this.InternalAdditionalDocumentation?.ExpandedObject; @@ -37,6 +49,10 @@ public File AdditionalDocumentation [JsonProperty("additional_documentation")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("additional_documentation")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalAdditionalDocumentation { get; set; } #endregion @@ -45,18 +61,28 @@ public File AdditionalDocumentation /// [JsonProperty("expected_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("expected_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? ExpectedAt { get; set; } /// /// Explanation of why the cardholder is disputing this transaction. /// [JsonProperty("explanation")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("explanation")] +#endif public string Explanation { get; set; } /// /// Description of the merchandise or service that was purchased. /// [JsonProperty("product_description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("product_description")] +#endif public string ProductDescription { get; set; } /// @@ -64,6 +90,9 @@ public File AdditionalDocumentation /// One of: merchandise, or service. /// [JsonProperty("product_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("product_type")] +#endif public string ProductType { get; set; } } } diff --git a/src/Stripe.net/Entities/Issuing/Disputes/DisputeEvidenceOther.cs b/src/Stripe.net/Entities/Issuing/Disputes/DisputeEvidenceOther.cs index 6c3f38df12..44ab5cf5ba 100644 --- a/src/Stripe.net/Entities/Issuing/Disputes/DisputeEvidenceOther.cs +++ b/src/Stripe.net/Entities/Issuing/Disputes/DisputeEvidenceOther.cs @@ -3,7 +3,13 @@ namespace Stripe.Issuing { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class DisputeEvidenceOther : StripeEntity { #region Expandable AdditionalDocumentation @@ -14,6 +20,9 @@ public class DisputeEvidenceOther : StripeEntity /// Additional documentation supporting the dispute. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string AdditionalDocumentationId { get => this.InternalAdditionalDocumentation?.Id; @@ -28,6 +37,9 @@ public string AdditionalDocumentationId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public File AdditionalDocumentation { get => this.InternalAdditionalDocumentation?.ExpandedObject; @@ -36,6 +48,10 @@ public File AdditionalDocumentation [JsonProperty("additional_documentation")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("additional_documentation")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalAdditionalDocumentation { get; set; } #endregion @@ -43,12 +59,18 @@ public File AdditionalDocumentation /// Explanation of why the cardholder is disputing this transaction. /// [JsonProperty("explanation")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("explanation")] +#endif public string Explanation { get; set; } /// /// Description of the merchandise or service that was purchased. /// [JsonProperty("product_description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("product_description")] +#endif public string ProductDescription { get; set; } /// @@ -56,6 +78,9 @@ public File AdditionalDocumentation /// One of: merchandise, or service. /// [JsonProperty("product_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("product_type")] +#endif public string ProductType { get; set; } } } diff --git a/src/Stripe.net/Entities/Issuing/Disputes/DisputeEvidenceServiceNotAsDescribed.cs b/src/Stripe.net/Entities/Issuing/Disputes/DisputeEvidenceServiceNotAsDescribed.cs index 3802a41da0..469f2098da 100644 --- a/src/Stripe.net/Entities/Issuing/Disputes/DisputeEvidenceServiceNotAsDescribed.cs +++ b/src/Stripe.net/Entities/Issuing/Disputes/DisputeEvidenceServiceNotAsDescribed.cs @@ -4,7 +4,13 @@ namespace Stripe.Issuing using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class DisputeEvidenceServiceNotAsDescribed : StripeEntity { #region Expandable AdditionalDocumentation @@ -15,6 +21,9 @@ public class DisputeEvidenceServiceNotAsDescribed : StripeEntity [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string AdditionalDocumentationId { get => this.InternalAdditionalDocumentation?.Id; @@ -29,6 +38,9 @@ public string AdditionalDocumentationId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public File AdditionalDocumentation { get => this.InternalAdditionalDocumentation?.ExpandedObject; @@ -37,6 +49,10 @@ public File AdditionalDocumentation [JsonProperty("additional_documentation")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("additional_documentation")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalAdditionalDocumentation { get; set; } #endregion @@ -45,18 +61,28 @@ public File AdditionalDocumentation /// [JsonProperty("canceled_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("canceled_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? CanceledAt { get; set; } /// /// Reason for canceling the order. /// [JsonProperty("cancellation_reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cancellation_reason")] +#endif public string CancellationReason { get; set; } /// /// Explanation of why the cardholder is disputing this transaction. /// [JsonProperty("explanation")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("explanation")] +#endif public string Explanation { get; set; } /// @@ -64,6 +90,10 @@ public File AdditionalDocumentation /// [JsonProperty("received_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("received_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? ReceivedAt { get; set; } } } diff --git a/src/Stripe.net/Entities/Issuing/Disputes/DisputeTreasury.cs b/src/Stripe.net/Entities/Issuing/Disputes/DisputeTreasury.cs index 118a993c54..1697e6c0d9 100644 --- a/src/Stripe.net/Entities/Issuing/Disputes/DisputeTreasury.cs +++ b/src/Stripe.net/Entities/Issuing/Disputes/DisputeTreasury.cs @@ -2,6 +2,9 @@ namespace Stripe.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class DisputeTreasury : StripeEntity { @@ -11,6 +14,9 @@ public class DisputeTreasury : StripeEntity /// representing this Issuing dispute. /// [JsonProperty("debit_reversal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("debit_reversal")] +#endif public string DebitReversal { get; set; } /// @@ -19,6 +25,9 @@ public class DisputeTreasury : StripeEntity /// being disputed. /// [JsonProperty("received_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("received_debit")] +#endif public string ReceivedDebit { get; set; } } } diff --git a/src/Stripe.net/Entities/Issuing/PersonalizationDesigns/PersonalizationDesign.cs b/src/Stripe.net/Entities/Issuing/PersonalizationDesigns/PersonalizationDesign.cs index 804f725ea8..beac2c3605 100644 --- a/src/Stripe.net/Entities/Issuing/PersonalizationDesigns/PersonalizationDesign.cs +++ b/src/Stripe.net/Entities/Issuing/PersonalizationDesigns/PersonalizationDesign.cs @@ -5,23 +5,35 @@ namespace Stripe.Issuing using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// A Personalization Design is a logical grouping of a Physical Bundle, card logo, and /// carrier text that represents a product line. /// +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class PersonalizationDesign : StripeEntity, IHasId, IHasMetadata, IHasObject { /// /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } #region Expandable CardLogo @@ -32,6 +44,9 @@ public class PersonalizationDesign : StripeEntity, IHasId /// have a purpose value of issuing_logo. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string CardLogoId { get => this.InternalCardLogo?.Id; @@ -46,6 +61,9 @@ public string CardLogoId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public File CardLogo { get => this.InternalCardLogo?.ExpandedObject; @@ -54,6 +72,10 @@ public File CardLogo [JsonProperty("card_logo")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card_logo")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalCardLogo { get; set; } #endregion @@ -61,6 +83,9 @@ public File CardLogo /// Hash containing carrier text, for use with physical bundles that support carrier text. /// [JsonProperty("carrier_text")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("carrier_text")] +#endif public PersonalizationDesignCarrierText CarrierText { get; set; } /// @@ -68,6 +93,10 @@ public File CardLogo /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -75,6 +104,9 @@ public File CardLogo /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// @@ -82,6 +114,9 @@ public File CardLogo /// This may be up to 200 characters. /// [JsonProperty("lookup_key")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("lookup_key")] +#endif public string LookupKey { get; set; } /// @@ -90,12 +125,18 @@ public File CardLogo /// object in a structured format. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// Friendly display name. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } #region Expandable PhysicalBundle @@ -105,6 +146,9 @@ public File CardLogo /// The physical bundle object belonging to this personalization design. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string PhysicalBundleId { get => this.InternalPhysicalBundle?.Id; @@ -118,6 +162,9 @@ public string PhysicalBundleId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public PhysicalBundle PhysicalBundle { get => this.InternalPhysicalBundle?.ExpandedObject; @@ -126,13 +173,23 @@ public PhysicalBundle PhysicalBundle [JsonProperty("physical_bundle")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("physical_bundle")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalPhysicalBundle { get; set; } #endregion [JsonProperty("preferences")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preferences")] +#endif public PersonalizationDesignPreferences Preferences { get; set; } [JsonProperty("rejection_reasons")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("rejection_reasons")] +#endif public PersonalizationDesignRejectionReasons RejectionReasons { get; set; } /// @@ -140,6 +197,9 @@ public PhysicalBundle PhysicalBundle /// One of: active, inactive, rejected, or review. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } } } diff --git a/src/Stripe.net/Entities/Issuing/PersonalizationDesigns/PersonalizationDesignCarrierText.cs b/src/Stripe.net/Entities/Issuing/PersonalizationDesigns/PersonalizationDesignCarrierText.cs index 1612c99193..dd52c11511 100644 --- a/src/Stripe.net/Entities/Issuing/PersonalizationDesigns/PersonalizationDesignCarrierText.cs +++ b/src/Stripe.net/Entities/Issuing/PersonalizationDesigns/PersonalizationDesignCarrierText.cs @@ -2,6 +2,9 @@ namespace Stripe.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PersonalizationDesignCarrierText : StripeEntity { @@ -9,24 +12,36 @@ public class PersonalizationDesignCarrierText : StripeEntity [JsonProperty("footer_body")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("footer_body")] +#endif public string FooterBody { get; set; } /// /// The footer title text of the carrier letter. /// [JsonProperty("footer_title")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("footer_title")] +#endif public string FooterTitle { get; set; } /// /// The header body text of the carrier letter. /// [JsonProperty("header_body")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("header_body")] +#endif public string HeaderBody { get; set; } /// /// The header title text of the carrier letter. /// [JsonProperty("header_title")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("header_title")] +#endif public string HeaderTitle { get; set; } } } diff --git a/src/Stripe.net/Entities/Issuing/PersonalizationDesigns/PersonalizationDesignPreferences.cs b/src/Stripe.net/Entities/Issuing/PersonalizationDesigns/PersonalizationDesignPreferences.cs index 098f48aae9..c1256dc688 100644 --- a/src/Stripe.net/Entities/Issuing/PersonalizationDesigns/PersonalizationDesignPreferences.cs +++ b/src/Stripe.net/Entities/Issuing/PersonalizationDesigns/PersonalizationDesignPreferences.cs @@ -2,6 +2,9 @@ namespace Stripe.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PersonalizationDesignPreferences : StripeEntity { @@ -11,6 +14,9 @@ public class PersonalizationDesignPreferences : StripeEntity [JsonProperty("is_default")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("is_default")] +#endif public bool IsDefault { get; set; } /// @@ -18,6 +24,9 @@ public class PersonalizationDesignPreferences : StripeEntity [JsonProperty("is_platform_default")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("is_platform_default")] +#endif public bool? IsPlatformDefault { get; set; } } } diff --git a/src/Stripe.net/Entities/Issuing/PersonalizationDesigns/PersonalizationDesignRejectionReasons.cs b/src/Stripe.net/Entities/Issuing/PersonalizationDesigns/PersonalizationDesignRejectionReasons.cs index ebbb289c80..e1a095766a 100644 --- a/src/Stripe.net/Entities/Issuing/PersonalizationDesigns/PersonalizationDesignRejectionReasons.cs +++ b/src/Stripe.net/Entities/Issuing/PersonalizationDesigns/PersonalizationDesignRejectionReasons.cs @@ -3,6 +3,9 @@ namespace Stripe.Issuing { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PersonalizationDesignRejectionReasons : StripeEntity { @@ -13,6 +16,9 @@ public class PersonalizationDesignRejectionReasons : StripeEntitypromotional_material. /// [JsonProperty("card_logo")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card_logo")] +#endif public List CardLogo { get; set; } /// @@ -22,6 +28,9 @@ public class PersonalizationDesignRejectionReasons : StripeEntitypromotional_material. /// [JsonProperty("carrier_text")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("carrier_text")] +#endif public List CarrierText { get; set; } } } diff --git a/src/Stripe.net/Entities/Issuing/PhysicalBundles/PhysicalBundle.cs b/src/Stripe.net/Entities/Issuing/PhysicalBundles/PhysicalBundle.cs index ff94d0ea54..4b1d5c1c1a 100644 --- a/src/Stripe.net/Entities/Issuing/PhysicalBundles/PhysicalBundle.cs +++ b/src/Stripe.net/Entities/Issuing/PhysicalBundles/PhysicalBundle.cs @@ -2,6 +2,9 @@ namespace Stripe.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// A Physical Bundle represents the bundle of physical items - card stock, carrier letter, @@ -13,15 +16,24 @@ public class PhysicalBundle : StripeEntity, IHasId, IHasObject /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } [JsonProperty("features")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("features")] +#endif public PhysicalBundleFeatures Features { get; set; } /// @@ -29,12 +41,18 @@ public class PhysicalBundle : StripeEntity, IHasId, IHasObject /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// /// Friendly display name. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } /// @@ -42,6 +60,9 @@ public class PhysicalBundle : StripeEntity, IHasId, IHasObject /// One of: active, inactive, or review. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } /// @@ -49,6 +70,9 @@ public class PhysicalBundle : StripeEntity, IHasId, IHasObject /// One of: custom, or standard. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Issuing/PhysicalBundles/PhysicalBundleFeatures.cs b/src/Stripe.net/Entities/Issuing/PhysicalBundles/PhysicalBundleFeatures.cs index 66cc304e07..a3b1c7f3f9 100644 --- a/src/Stripe.net/Entities/Issuing/PhysicalBundles/PhysicalBundleFeatures.cs +++ b/src/Stripe.net/Entities/Issuing/PhysicalBundles/PhysicalBundleFeatures.cs @@ -2,6 +2,9 @@ namespace Stripe.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PhysicalBundleFeatures : StripeEntity { @@ -10,6 +13,9 @@ public class PhysicalBundleFeatures : StripeEntity /// One of: optional, required, or unsupported. /// [JsonProperty("card_logo")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card_logo")] +#endif public string CardLogo { get; set; } /// @@ -18,6 +24,9 @@ public class PhysicalBundleFeatures : StripeEntity /// One of: optional, required, or unsupported. /// [JsonProperty("carrier_text")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("carrier_text")] +#endif public string CarrierText { get; set; } /// @@ -25,6 +34,9 @@ public class PhysicalBundleFeatures : StripeEntity /// One of: optional, required, or unsupported. /// [JsonProperty("second_line")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("second_line")] +#endif public string SecondLine { get; set; } } } diff --git a/src/Stripe.net/Entities/Issuing/Tokens/Token.cs b/src/Stripe.net/Entities/Issuing/Tokens/Token.cs index c125e60934..c923a54f93 100644 --- a/src/Stripe.net/Entities/Issuing/Tokens/Token.cs +++ b/src/Stripe.net/Entities/Issuing/Tokens/Token.cs @@ -4,6 +4,9 @@ namespace Stripe.Issuing using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// An issuing token object is created when an issued card is added to a digital wallet. As @@ -11,18 +14,27 @@ namespace Stripe.Issuing /// href="https://stripe.com/docs/issuing/controls/token-management">view and manage these /// tokens through Stripe. /// +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class Token : StripeEntity, IHasId, IHasObject { /// /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } #region Expandable Card @@ -32,6 +44,9 @@ public class Token : StripeEntity, IHasId, IHasObject /// Card associated with this token. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string CardId { get => this.InternalCard?.Id; @@ -45,6 +60,9 @@ public string CardId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Card Card { get => this.InternalCard?.ExpandedObject; @@ -53,6 +71,10 @@ public Card Card [JsonProperty("card")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalCard { get; set; } #endregion @@ -61,6 +83,10 @@ public Card Card /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -68,12 +94,18 @@ public Card Card /// token. /// [JsonProperty("device_fingerprint")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("device_fingerprint")] +#endif public string DeviceFingerprint { get; set; } /// /// The last four digits of the token. /// [JsonProperty("last4")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last4")] +#endif public string Last4 { get; set; } /// @@ -81,6 +113,9 @@ public Card Card /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// @@ -88,9 +123,15 @@ public Card Card /// One of: mastercard, or visa. /// [JsonProperty("network")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("network")] +#endif public string Network { get; set; } [JsonProperty("network_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("network_data")] +#endif public TokenNetworkData NetworkData { get; set; } /// @@ -99,6 +140,10 @@ public Card Card /// [JsonProperty("network_updated_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("network_updated_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime NetworkUpdatedAt { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -106,6 +151,9 @@ public Card Card /// One of: active, deleted, requested, or suspended. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } /// @@ -113,6 +161,9 @@ public Card Card /// One of: apple_pay, google_pay, or samsung_pay. /// [JsonProperty("wallet_provider")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("wallet_provider")] +#endif public string WalletProvider { get; set; } } } diff --git a/src/Stripe.net/Entities/Issuing/Tokens/TokenNetworkData.cs b/src/Stripe.net/Entities/Issuing/Tokens/TokenNetworkData.cs index 20f7f55817..83a29127bb 100644 --- a/src/Stripe.net/Entities/Issuing/Tokens/TokenNetworkData.cs +++ b/src/Stripe.net/Entities/Issuing/Tokens/TokenNetworkData.cs @@ -2,13 +2,22 @@ namespace Stripe.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TokenNetworkData : StripeEntity { [JsonProperty("device")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("device")] +#endif public TokenNetworkDataDevice Device { get; set; } [JsonProperty("mastercard")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mastercard")] +#endif public TokenNetworkDataMastercard Mastercard { get; set; } /// @@ -17,12 +26,21 @@ public class TokenNetworkData : StripeEntity /// One of: mastercard, or visa. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } [JsonProperty("visa")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("visa")] +#endif public TokenNetworkDataVisa Visa { get; set; } [JsonProperty("wallet_provider")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("wallet_provider")] +#endif public TokenNetworkDataWalletProvider WalletProvider { get; set; } } } diff --git a/src/Stripe.net/Entities/Issuing/Tokens/TokenNetworkDataDevice.cs b/src/Stripe.net/Entities/Issuing/Tokens/TokenNetworkDataDevice.cs index 2c8302961f..1b57dc2b0e 100644 --- a/src/Stripe.net/Entities/Issuing/Tokens/TokenNetworkDataDevice.cs +++ b/src/Stripe.net/Entities/Issuing/Tokens/TokenNetworkDataDevice.cs @@ -2,6 +2,9 @@ namespace Stripe.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TokenNetworkDataDevice : StripeEntity { @@ -9,12 +12,18 @@ public class TokenNetworkDataDevice : StripeEntity /// An obfuscated ID derived from the device ID. /// [JsonProperty("device_fingerprint")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("device_fingerprint")] +#endif public string DeviceFingerprint { get; set; } /// /// The IP address of the device at provisioning time. /// [JsonProperty("ip_address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ip_address")] +#endif public string IpAddress { get; set; } /// @@ -22,18 +31,27 @@ public class TokenNetworkDataDevice : StripeEntity /// format is [+-]decimal/[+-]decimal. /// [JsonProperty("location")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("location")] +#endif public string Location { get; set; } /// /// The name of the device used for tokenization. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } /// /// The phone number of the device used for tokenization. /// [JsonProperty("phone_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("phone_number")] +#endif public string PhoneNumber { get; set; } /// @@ -41,6 +59,9 @@ public class TokenNetworkDataDevice : StripeEntity /// One of: other, phone, or watch. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Issuing/Tokens/TokenNetworkDataMastercard.cs b/src/Stripe.net/Entities/Issuing/Tokens/TokenNetworkDataMastercard.cs index 12a176780e..a11532b68e 100644 --- a/src/Stripe.net/Entities/Issuing/Tokens/TokenNetworkDataMastercard.cs +++ b/src/Stripe.net/Entities/Issuing/Tokens/TokenNetworkDataMastercard.cs @@ -2,6 +2,9 @@ namespace Stripe.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TokenNetworkDataMastercard : StripeEntity { @@ -9,18 +12,27 @@ public class TokenNetworkDataMastercard : StripeEntity [JsonProperty("card_reference_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card_reference_id")] +#endif public string CardReferenceId { get; set; } /// /// The network-unique identifier for the token. /// [JsonProperty("token_reference_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("token_reference_id")] +#endif public string TokenReferenceId { get; set; } /// /// The ID of the entity requesting tokenization, specific to MasterCard. /// [JsonProperty("token_requestor_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("token_requestor_id")] +#endif public string TokenRequestorId { get; set; } /// @@ -28,6 +40,9 @@ public class TokenNetworkDataMastercard : StripeEntity [JsonProperty("token_requestor_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("token_requestor_name")] +#endif public string TokenRequestorName { get; set; } } } diff --git a/src/Stripe.net/Entities/Issuing/Tokens/TokenNetworkDataVisa.cs b/src/Stripe.net/Entities/Issuing/Tokens/TokenNetworkDataVisa.cs index b2fb9b3e66..e833cc16ba 100644 --- a/src/Stripe.net/Entities/Issuing/Tokens/TokenNetworkDataVisa.cs +++ b/src/Stripe.net/Entities/Issuing/Tokens/TokenNetworkDataVisa.cs @@ -2,6 +2,9 @@ namespace Stripe.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TokenNetworkDataVisa : StripeEntity { @@ -9,18 +12,27 @@ public class TokenNetworkDataVisa : StripeEntity /// A unique reference ID from Visa to represent the card account number. /// [JsonProperty("card_reference_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card_reference_id")] +#endif public string CardReferenceId { get; set; } /// /// The network-unique identifier for the token. /// [JsonProperty("token_reference_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("token_reference_id")] +#endif public string TokenReferenceId { get; set; } /// /// The ID of the entity requesting tokenization, specific to Visa. /// [JsonProperty("token_requestor_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("token_requestor_id")] +#endif public string TokenRequestorId { get; set; } /// @@ -29,6 +41,9 @@ public class TokenNetworkDataVisa : StripeEntity /// Visa. /// [JsonProperty("token_risk_score")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("token_risk_score")] +#endif public string TokenRiskScore { get; set; } } } diff --git a/src/Stripe.net/Entities/Issuing/Tokens/TokenNetworkDataWalletProvider.cs b/src/Stripe.net/Entities/Issuing/Tokens/TokenNetworkDataWalletProvider.cs index 19dbcfd168..c7c7c05788 100644 --- a/src/Stripe.net/Entities/Issuing/Tokens/TokenNetworkDataWalletProvider.cs +++ b/src/Stripe.net/Entities/Issuing/Tokens/TokenNetworkDataWalletProvider.cs @@ -3,6 +3,9 @@ namespace Stripe.Issuing { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TokenNetworkDataWalletProvider : StripeEntity { @@ -10,6 +13,9 @@ public class TokenNetworkDataWalletProvider : StripeEntity [JsonProperty("account_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_id")] +#endif public string AccountId { get; set; } /// @@ -17,6 +23,9 @@ public class TokenNetworkDataWalletProvider : StripeEntity [JsonProperty("account_trust_score")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_trust_score")] +#endif public long AccountTrustScore { get; set; } /// @@ -24,15 +33,24 @@ public class TokenNetworkDataWalletProvider : StripeEntityapp, manual, on_file, or other. /// [JsonProperty("card_number_source")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card_number_source")] +#endif public string CardNumberSource { get; set; } [JsonProperty("cardholder_address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cardholder_address")] +#endif public TokenNetworkDataWalletProviderCardholderAddress CardholderAddress { get; set; } /// /// The name of the cardholder tokenizing the card. /// [JsonProperty("cardholder_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cardholder_name")] +#endif public string CardholderName { get; set; } /// @@ -40,12 +58,18 @@ public class TokenNetworkDataWalletProvider : StripeEntity [JsonProperty("device_trust_score")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("device_trust_score")] +#endif public long DeviceTrustScore { get; set; } /// /// The hashed email address of the cardholder's account with the wallet provider. /// [JsonProperty("hashed_account_email_address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("hashed_account_email_address")] +#endif public string HashedAccountEmailAddress { get; set; } /// @@ -64,6 +88,9 @@ public class TokenNetworkDataWalletProvider : StripeEntitytoo_many_recent_attempts, or too_many_recent_tokens. /// [JsonProperty("reason_codes")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reason_codes")] +#endif public List ReasonCodes { get; set; } /// @@ -71,12 +98,18 @@ public class TokenNetworkDataWalletProvider : StripeEntityapprove, decline, or require_auth. /// [JsonProperty("suggested_decision")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("suggested_decision")] +#endif public string SuggestedDecision { get; set; } /// /// The version of the standard for mapping reason codes followed by the wallet provider. /// [JsonProperty("suggested_decision_version")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("suggested_decision_version")] +#endif public string SuggestedDecisionVersion { get; set; } } } diff --git a/src/Stripe.net/Entities/Issuing/Tokens/TokenNetworkDataWalletProviderCardholderAddress.cs b/src/Stripe.net/Entities/Issuing/Tokens/TokenNetworkDataWalletProviderCardholderAddress.cs index 6a42585def..166d205f17 100644 --- a/src/Stripe.net/Entities/Issuing/Tokens/TokenNetworkDataWalletProviderCardholderAddress.cs +++ b/src/Stripe.net/Entities/Issuing/Tokens/TokenNetworkDataWalletProviderCardholderAddress.cs @@ -2,6 +2,9 @@ namespace Stripe.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TokenNetworkDataWalletProviderCardholderAddress : StripeEntity { @@ -9,12 +12,18 @@ public class TokenNetworkDataWalletProviderCardholderAddress : StripeEntity [JsonProperty("line1")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("line1")] +#endif public string Line1 { get; set; } /// /// The postal code of the cardholder tokenizing the card. /// [JsonProperty("postal_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("postal_code")] +#endif public string PostalCode { get; set; } } } diff --git a/src/Stripe.net/Entities/Issuing/Transactions/Transaction.cs b/src/Stripe.net/Entities/Issuing/Transactions/Transaction.cs index 13d429df4c..0c98afe716 100644 --- a/src/Stripe.net/Entities/Issuing/Transactions/Transaction.cs +++ b/src/Stripe.net/Entities/Issuing/Transactions/Transaction.cs @@ -5,6 +5,9 @@ namespace Stripe.Issuing using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// Any use of an issued card that results in @@ -14,18 +17,27 @@ namespace Stripe.Issuing /// Related guide: Issued /// card transactions. /// +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class Transaction : StripeEntity, IHasId, IHasMetadata, IHasObject, IBalanceTransactionSource { /// /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// @@ -34,6 +46,9 @@ public class Transaction : StripeEntity, IHasId, IHasMetadata, IHas /// currency unit. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long Amount { get; set; } /// @@ -42,6 +57,9 @@ public class Transaction : StripeEntity, IHasId, IHasMetadata, IHas /// href="https://stripe.com/docs/currencies#zero-decimal">smallest currency unit. /// [JsonProperty("amount_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_details")] +#endif public TransactionAmountDetails AmountDetails { get; set; } #region Expandable Authorization @@ -51,6 +69,9 @@ public class Transaction : StripeEntity, IHasId, IHasMetadata, IHas /// The Authorization object that led to this transaction. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string AuthorizationId { get => this.InternalAuthorization?.Id; @@ -64,6 +85,9 @@ public string AuthorizationId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Authorization Authorization { get => this.InternalAuthorization?.ExpandedObject; @@ -72,6 +96,10 @@ public Authorization Authorization [JsonProperty("authorization")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("authorization")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalAuthorization { get; set; } #endregion @@ -83,6 +111,9 @@ public Authorization Authorization /// transaction associated with this transaction. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string BalanceTransactionId { get => this.InternalBalanceTransaction?.Id; @@ -97,6 +128,9 @@ public string BalanceTransactionId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public BalanceTransaction BalanceTransaction { get => this.InternalBalanceTransaction?.ExpandedObject; @@ -105,6 +139,10 @@ public BalanceTransaction BalanceTransaction [JsonProperty("balance_transaction")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("balance_transaction")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalBalanceTransaction { get; set; } #endregion @@ -115,6 +153,9 @@ public BalanceTransaction BalanceTransaction /// The card used to make this transaction. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string CardId { get => this.InternalCard?.Id; @@ -128,6 +169,9 @@ public string CardId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Card Card { get => this.InternalCard?.ExpandedObject; @@ -136,6 +180,10 @@ public Card Card [JsonProperty("card")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalCard { get; set; } #endregion @@ -146,6 +194,9 @@ public Card Card /// The cardholder to whom this transaction belongs. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string CardholderId { get => this.InternalCardholder?.Id; @@ -159,6 +210,9 @@ public string CardholderId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Cardholder Cardholder { get => this.InternalCardholder?.ExpandedObject; @@ -167,6 +221,10 @@ public Cardholder Cardholder [JsonProperty("cardholder")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cardholder")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalCardholder { get; set; } #endregion @@ -175,6 +233,10 @@ public Cardholder Cardholder /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -183,6 +245,9 @@ public Cardholder Cardholder /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } #region Expandable Dispute @@ -192,6 +257,9 @@ public Cardholder Cardholder /// If you've disputed the transaction, the ID of the dispute. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string DisputeId { get => this.InternalDispute?.Id; @@ -205,6 +273,9 @@ public string DisputeId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Dispute Dispute { get => this.InternalDispute?.ExpandedObject; @@ -213,6 +284,10 @@ public Dispute Dispute [JsonProperty("dispute")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("dispute")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalDispute { get; set; } #endregion @@ -221,6 +296,9 @@ public Dispute Dispute /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// @@ -230,15 +308,24 @@ public Dispute Dispute /// different currency. /// [JsonProperty("merchant_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("merchant_amount")] +#endif public long MerchantAmount { get; set; } /// /// The currency with which the merchant is taking payment. /// [JsonProperty("merchant_currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("merchant_currency")] +#endif public string MerchantCurrency { get; set; } [JsonProperty("merchant_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("merchant_data")] +#endif public AuthorizationMerchantData MerchantData { get; set; } /// @@ -247,18 +334,27 @@ public Dispute Dispute /// object in a structured format. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// Details about the transaction, such as processing dates, set by the card network. /// [JsonProperty("network_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("network_data")] +#endif public TransactionNetworkData NetworkData { get; set; } /// /// Additional purchase information that is optionally provided by the merchant. /// [JsonProperty("purchase_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("purchase_details")] +#endif public TransactionPurchaseDetails PurchaseDetails { get; set; } #region Expandable Token @@ -270,6 +366,9 @@ public Dispute Dispute /// be null. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string TokenId { get => this.InternalToken?.Id; @@ -285,6 +384,9 @@ public string TokenId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Token Token { get => this.InternalToken?.ExpandedObject; @@ -293,6 +395,10 @@ public Token Token [JsonProperty("token")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("token")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalToken { get; set; } #endregion @@ -302,6 +408,9 @@ public Token Token /// [FinancialAccount](/docs/api/treasury/financial_accounts. /// [JsonProperty("treasury")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("treasury")] +#endif public TransactionTreasury Treasury { get; set; } /// @@ -309,6 +418,9 @@ public Token Token /// One of: capture, or refund. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } /// @@ -317,6 +429,9 @@ public Token Token /// One of: apple_pay, google_pay, or samsung_pay. /// [JsonProperty("wallet")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("wallet")] +#endif public string Wallet { get; set; } } } diff --git a/src/Stripe.net/Entities/Issuing/Transactions/TransactionAmountDetails.cs b/src/Stripe.net/Entities/Issuing/Transactions/TransactionAmountDetails.cs index 3b45ab2981..219ecb5af8 100644 --- a/src/Stripe.net/Entities/Issuing/Transactions/TransactionAmountDetails.cs +++ b/src/Stripe.net/Entities/Issuing/Transactions/TransactionAmountDetails.cs @@ -2,6 +2,9 @@ namespace Stripe.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TransactionAmountDetails : StripeEntity { @@ -9,12 +12,18 @@ public class TransactionAmountDetails : StripeEntity /// The fee charged by the ATM for the cash withdrawal. /// [JsonProperty("atm_fee")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("atm_fee")] +#endif public long? AtmFee { get; set; } /// /// The amount of cash requested by the cardholder. /// [JsonProperty("cashback_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cashback_amount")] +#endif public long? CashbackAmount { get; set; } } } diff --git a/src/Stripe.net/Entities/Issuing/Transactions/TransactionNetworkData.cs b/src/Stripe.net/Entities/Issuing/Transactions/TransactionNetworkData.cs index 51e5f68cc4..29e1fbe348 100644 --- a/src/Stripe.net/Entities/Issuing/Transactions/TransactionNetworkData.cs +++ b/src/Stripe.net/Entities/Issuing/Transactions/TransactionNetworkData.cs @@ -2,6 +2,9 @@ namespace Stripe.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TransactionNetworkData : StripeEntity { @@ -13,6 +16,9 @@ public class TransactionNetworkData : StripeEntity /// authorizations. /// [JsonProperty("authorization_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("authorization_code")] +#endif public string AuthorizationCode { get; set; } /// @@ -21,6 +27,9 @@ public class TransactionNetworkData : StripeEntity /// transaction to the network. /// [JsonProperty("processing_date")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("processing_date")] +#endif public string ProcessingDate { get; set; } /// @@ -28,6 +37,9 @@ public class TransactionNetworkData : StripeEntity /// subsequent messages, disputes, and transactions. /// [JsonProperty("transaction_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transaction_id")] +#endif public string TransactionId { get; set; } } } diff --git a/src/Stripe.net/Entities/Issuing/Transactions/TransactionPurchaseDetails.cs b/src/Stripe.net/Entities/Issuing/Transactions/TransactionPurchaseDetails.cs index d175605aeb..0238ad091d 100644 --- a/src/Stripe.net/Entities/Issuing/Transactions/TransactionPurchaseDetails.cs +++ b/src/Stripe.net/Entities/Issuing/Transactions/TransactionPurchaseDetails.cs @@ -3,6 +3,9 @@ namespace Stripe.Issuing { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TransactionPurchaseDetails : StripeEntity { @@ -10,36 +13,54 @@ public class TransactionPurchaseDetails : StripeEntity [JsonProperty("fleet")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fleet")] +#endif public TransactionPurchaseDetailsFleet Fleet { get; set; } /// /// Information about the flight that was purchased with this transaction. /// [JsonProperty("flight")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("flight")] +#endif public TransactionPurchaseDetailsFlight Flight { get; set; } /// /// Information about fuel that was purchased with this transaction. /// [JsonProperty("fuel")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fuel")] +#endif public TransactionPurchaseDetailsFuel Fuel { get; set; } /// /// Information about lodging that was purchased with this transaction. /// [JsonProperty("lodging")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("lodging")] +#endif public TransactionPurchaseDetailsLodging Lodging { get; set; } /// /// The line items in the purchase. /// [JsonProperty("receipt")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("receipt")] +#endif public List Receipt { get; set; } /// /// A merchant-specific order number. /// [JsonProperty("reference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reference")] +#endif public string Reference { get; set; } } } diff --git a/src/Stripe.net/Entities/Issuing/Transactions/TransactionPurchaseDetailsFleet.cs b/src/Stripe.net/Entities/Issuing/Transactions/TransactionPurchaseDetailsFleet.cs index 001e10ff5c..02dbe49e3b 100644 --- a/src/Stripe.net/Entities/Issuing/Transactions/TransactionPurchaseDetailsFleet.cs +++ b/src/Stripe.net/Entities/Issuing/Transactions/TransactionPurchaseDetailsFleet.cs @@ -2,6 +2,9 @@ namespace Stripe.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TransactionPurchaseDetailsFleet : StripeEntity { @@ -9,6 +12,9 @@ public class TransactionPurchaseDetailsFleet : StripeEntity [JsonProperty("cardholder_prompt_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cardholder_prompt_data")] +#endif public TransactionPurchaseDetailsFleetCardholderPromptData CardholderPromptData { get; set; } /// @@ -16,6 +22,9 @@ public class TransactionPurchaseDetailsFleet : StripeEntityfuel_and_non_fuel_purchase. /// [JsonProperty("purchase_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("purchase_type")] +#endif public string PurchaseType { get; set; } /// @@ -23,6 +32,9 @@ public class TransactionPurchaseDetailsFleet : StripeEntity [JsonProperty("reported_breakdown")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reported_breakdown")] +#endif public TransactionPurchaseDetailsFleetReportedBreakdown ReportedBreakdown { get; set; } /// @@ -30,6 +42,9 @@ public class TransactionPurchaseDetailsFleet : StripeEntityself_service. /// [JsonProperty("service_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("service_type")] +#endif public string ServiceType { get; set; } } } diff --git a/src/Stripe.net/Entities/Issuing/Transactions/TransactionPurchaseDetailsFleetCardholderPromptData.cs b/src/Stripe.net/Entities/Issuing/Transactions/TransactionPurchaseDetailsFleetCardholderPromptData.cs index 16281dbf05..e85f149091 100644 --- a/src/Stripe.net/Entities/Issuing/Transactions/TransactionPurchaseDetailsFleetCardholderPromptData.cs +++ b/src/Stripe.net/Entities/Issuing/Transactions/TransactionPurchaseDetailsFleetCardholderPromptData.cs @@ -2,6 +2,9 @@ namespace Stripe.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TransactionPurchaseDetailsFleetCardholderPromptData : StripeEntity { @@ -9,12 +12,18 @@ public class TransactionPurchaseDetailsFleetCardholderPromptData : StripeEntity< /// Driver ID. /// [JsonProperty("driver_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("driver_id")] +#endif public string DriverId { get; set; } /// /// Odometer reading. /// [JsonProperty("odometer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("odometer")] +#endif public long? Odometer { get; set; } /// @@ -23,18 +32,27 @@ public class TransactionPurchaseDetailsFleetCardholderPromptData : StripeEntity< /// type. /// [JsonProperty("unspecified_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unspecified_id")] +#endif public string UnspecifiedId { get; set; } /// /// User ID. /// [JsonProperty("user_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("user_id")] +#endif public string UserId { get; set; } /// /// Vehicle number. /// [JsonProperty("vehicle_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("vehicle_number")] +#endif public string VehicleNumber { get; set; } } } diff --git a/src/Stripe.net/Entities/Issuing/Transactions/TransactionPurchaseDetailsFleetReportedBreakdown.cs b/src/Stripe.net/Entities/Issuing/Transactions/TransactionPurchaseDetailsFleetReportedBreakdown.cs index 6d27218d5b..cf80f4a71c 100644 --- a/src/Stripe.net/Entities/Issuing/Transactions/TransactionPurchaseDetailsFleetReportedBreakdown.cs +++ b/src/Stripe.net/Entities/Issuing/Transactions/TransactionPurchaseDetailsFleetReportedBreakdown.cs @@ -2,6 +2,9 @@ namespace Stripe.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TransactionPurchaseDetailsFleetReportedBreakdown : StripeEntity { @@ -9,18 +12,27 @@ public class TransactionPurchaseDetailsFleetReportedBreakdown : StripeEntity [JsonProperty("fuel")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fuel")] +#endif public TransactionPurchaseDetailsFleetReportedBreakdownFuel Fuel { get; set; } /// /// Breakdown of non-fuel portion of the purchase. /// [JsonProperty("non_fuel")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("non_fuel")] +#endif public TransactionPurchaseDetailsFleetReportedBreakdownNonFuel NonFuel { get; set; } /// /// Information about tax included in this transaction. /// [JsonProperty("tax")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax")] +#endif public TransactionPurchaseDetailsFleetReportedBreakdownTax Tax { get; set; } } } diff --git a/src/Stripe.net/Entities/Issuing/Transactions/TransactionPurchaseDetailsFleetReportedBreakdownFuel.cs b/src/Stripe.net/Entities/Issuing/Transactions/TransactionPurchaseDetailsFleetReportedBreakdownFuel.cs index a233f23024..51c62016b2 100644 --- a/src/Stripe.net/Entities/Issuing/Transactions/TransactionPurchaseDetailsFleetReportedBreakdownFuel.cs +++ b/src/Stripe.net/Entities/Issuing/Transactions/TransactionPurchaseDetailsFleetReportedBreakdownFuel.cs @@ -2,6 +2,9 @@ namespace Stripe.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TransactionPurchaseDetailsFleetReportedBreakdownFuel : StripeEntity { @@ -10,6 +13,9 @@ public class TransactionPurchaseDetailsFleetReportedBreakdownFuel : StripeEntity /// of taxes. /// [JsonProperty("gross_amount_decimal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("gross_amount_decimal")] +#endif public decimal? GrossAmountDecimal { get; set; } } } diff --git a/src/Stripe.net/Entities/Issuing/Transactions/TransactionPurchaseDetailsFleetReportedBreakdownNonFuel.cs b/src/Stripe.net/Entities/Issuing/Transactions/TransactionPurchaseDetailsFleetReportedBreakdownNonFuel.cs index fbbd7da648..da9706e65f 100644 --- a/src/Stripe.net/Entities/Issuing/Transactions/TransactionPurchaseDetailsFleetReportedBreakdownNonFuel.cs +++ b/src/Stripe.net/Entities/Issuing/Transactions/TransactionPurchaseDetailsFleetReportedBreakdownNonFuel.cs @@ -2,6 +2,9 @@ namespace Stripe.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TransactionPurchaseDetailsFleetReportedBreakdownNonFuel : StripeEntity { @@ -9,6 +12,9 @@ public class TransactionPurchaseDetailsFleetReportedBreakdownNonFuel : StripeEnt /// Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. /// [JsonProperty("gross_amount_decimal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("gross_amount_decimal")] +#endif public decimal? GrossAmountDecimal { get; set; } } } diff --git a/src/Stripe.net/Entities/Issuing/Transactions/TransactionPurchaseDetailsFleetReportedBreakdownTax.cs b/src/Stripe.net/Entities/Issuing/Transactions/TransactionPurchaseDetailsFleetReportedBreakdownTax.cs index 7b18f03335..83335394f0 100644 --- a/src/Stripe.net/Entities/Issuing/Transactions/TransactionPurchaseDetailsFleetReportedBreakdownTax.cs +++ b/src/Stripe.net/Entities/Issuing/Transactions/TransactionPurchaseDetailsFleetReportedBreakdownTax.cs @@ -2,6 +2,9 @@ namespace Stripe.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TransactionPurchaseDetailsFleetReportedBreakdownTax : StripeEntity { @@ -10,6 +13,9 @@ public class TransactionPurchaseDetailsFleetReportedBreakdownTax : StripeEntity< /// reported by merchant or not subject to tax. /// [JsonProperty("local_amount_decimal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("local_amount_decimal")] +#endif public decimal? LocalAmountDecimal { get; set; } /// @@ -17,6 +23,9 @@ public class TransactionPurchaseDetailsFleetReportedBreakdownTax : StripeEntity< /// reported by merchant or not subject to tax. /// [JsonProperty("national_amount_decimal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("national_amount_decimal")] +#endif public decimal? NationalAmountDecimal { get; set; } } } diff --git a/src/Stripe.net/Entities/Issuing/Transactions/TransactionPurchaseDetailsFlight.cs b/src/Stripe.net/Entities/Issuing/Transactions/TransactionPurchaseDetailsFlight.cs index 1b42a94621..648afbef57 100644 --- a/src/Stripe.net/Entities/Issuing/Transactions/TransactionPurchaseDetailsFlight.cs +++ b/src/Stripe.net/Entities/Issuing/Transactions/TransactionPurchaseDetailsFlight.cs @@ -5,6 +5,9 @@ namespace Stripe.Issuing using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TransactionPurchaseDetailsFlight : StripeEntity { @@ -13,30 +16,46 @@ public class TransactionPurchaseDetailsFlight : StripeEntity [JsonProperty("departure_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("departure_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? DepartureAt { get; set; } /// /// The name of the passenger. /// [JsonProperty("passenger_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("passenger_name")] +#endif public string PassengerName { get; set; } /// /// Whether the ticket is refundable. /// [JsonProperty("refundable")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("refundable")] +#endif public bool? Refundable { get; set; } /// /// The legs of the trip. /// [JsonProperty("segments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("segments")] +#endif public List Segments { get; set; } /// /// The travel agency that issued the ticket. /// [JsonProperty("travel_agency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("travel_agency")] +#endif public string TravelAgency { get; set; } } } diff --git a/src/Stripe.net/Entities/Issuing/Transactions/TransactionPurchaseDetailsFlightSegment.cs b/src/Stripe.net/Entities/Issuing/Transactions/TransactionPurchaseDetailsFlightSegment.cs index e52ee8b64f..144580280b 100644 --- a/src/Stripe.net/Entities/Issuing/Transactions/TransactionPurchaseDetailsFlightSegment.cs +++ b/src/Stripe.net/Entities/Issuing/Transactions/TransactionPurchaseDetailsFlightSegment.cs @@ -2,6 +2,9 @@ namespace Stripe.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TransactionPurchaseDetailsFlightSegment : StripeEntity { @@ -9,36 +12,54 @@ public class TransactionPurchaseDetailsFlightSegment : StripeEntity [JsonProperty("arrival_airport_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("arrival_airport_code")] +#endif public string ArrivalAirportCode { get; set; } /// /// The airline carrier code. /// [JsonProperty("carrier")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("carrier")] +#endif public string Carrier { get; set; } /// /// The three-letter IATA airport code that the flight departed from. /// [JsonProperty("departure_airport_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("departure_airport_code")] +#endif public string DepartureAirportCode { get; set; } /// /// The flight number. /// [JsonProperty("flight_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("flight_number")] +#endif public string FlightNumber { get; set; } /// /// The flight's service class. /// [JsonProperty("service_class")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("service_class")] +#endif public string ServiceClass { get; set; } /// /// Whether a stopover is allowed on this flight. /// [JsonProperty("stopover_allowed")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("stopover_allowed")] +#endif public bool? StopoverAllowed { get; set; } } } diff --git a/src/Stripe.net/Entities/Issuing/Transactions/TransactionPurchaseDetailsFuel.cs b/src/Stripe.net/Entities/Issuing/Transactions/TransactionPurchaseDetailsFuel.cs index e66340b6c4..44441fe319 100644 --- a/src/Stripe.net/Entities/Issuing/Transactions/TransactionPurchaseDetailsFuel.cs +++ b/src/Stripe.net/Entities/Issuing/Transactions/TransactionPurchaseDetailsFuel.cs @@ -2,6 +2,9 @@ namespace Stripe.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TransactionPurchaseDetailsFuel : StripeEntity { @@ -10,6 +13,9 @@ public class TransactionPurchaseDetailsFuel : StripeEntity identifying the primary fuel product purchased. /// [JsonProperty("industry_product_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("industry_product_code")] +#endif public string IndustryProductCode { get; set; } /// @@ -17,6 +23,9 @@ public class TransactionPurchaseDetailsFuel : StripeEntity [JsonProperty("quantity_decimal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("quantity_decimal")] +#endif public decimal? QuantityDecimal { get; set; } /// @@ -24,6 +33,9 @@ public class TransactionPurchaseDetailsFuel : StripeEntityunleaded_regular, unleaded_super, or other. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } /// @@ -32,6 +44,9 @@ public class TransactionPurchaseDetailsFuel : StripeEntitypound, us_gallon, or other. /// [JsonProperty("unit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit")] +#endif public string Unit { get; set; } /// @@ -39,6 +54,9 @@ public class TransactionPurchaseDetailsFuel : StripeEntity [JsonProperty("unit_cost_decimal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_cost_decimal")] +#endif public decimal UnitCostDecimal { get; set; } } } diff --git a/src/Stripe.net/Entities/Issuing/Transactions/TransactionPurchaseDetailsLodging.cs b/src/Stripe.net/Entities/Issuing/Transactions/TransactionPurchaseDetailsLodging.cs index 63c8038c77..035c3e8a96 100644 --- a/src/Stripe.net/Entities/Issuing/Transactions/TransactionPurchaseDetailsLodging.cs +++ b/src/Stripe.net/Entities/Issuing/Transactions/TransactionPurchaseDetailsLodging.cs @@ -4,6 +4,9 @@ namespace Stripe.Issuing using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TransactionPurchaseDetailsLodging : StripeEntity { @@ -12,12 +15,19 @@ public class TransactionPurchaseDetailsLodging : StripeEntity [JsonProperty("check_in_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("check_in_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? CheckInAt { get; set; } /// /// The number of nights stayed at the lodging. /// [JsonProperty("nights")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("nights")] +#endif public long? Nights { get; set; } } } diff --git a/src/Stripe.net/Entities/Issuing/Transactions/TransactionPurchaseDetailsReceipt.cs b/src/Stripe.net/Entities/Issuing/Transactions/TransactionPurchaseDetailsReceipt.cs index e949d6eefe..0a70ecc5ee 100644 --- a/src/Stripe.net/Entities/Issuing/Transactions/TransactionPurchaseDetailsReceipt.cs +++ b/src/Stripe.net/Entities/Issuing/Transactions/TransactionPurchaseDetailsReceipt.cs @@ -2,6 +2,9 @@ namespace Stripe.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TransactionPurchaseDetailsReceipt : StripeEntity { @@ -9,24 +12,36 @@ public class TransactionPurchaseDetailsReceipt : StripeEntity [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// /// The quantity of the item. /// [JsonProperty("quantity")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("quantity")] +#endif public decimal? Quantity { get; set; } /// /// The total for this line item in cents. /// [JsonProperty("total")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("total")] +#endif public long? Total { get; set; } /// /// The unit cost of the item in cents. /// [JsonProperty("unit_cost")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_cost")] +#endif public long? UnitCost { get; set; } } } diff --git a/src/Stripe.net/Entities/Issuing/Transactions/TransactionTreasury.cs b/src/Stripe.net/Entities/Issuing/Transactions/TransactionTreasury.cs index 787a14f0f5..c3f8db34f9 100644 --- a/src/Stripe.net/Entities/Issuing/Transactions/TransactionTreasury.cs +++ b/src/Stripe.net/Entities/Issuing/Transactions/TransactionTreasury.cs @@ -2,6 +2,9 @@ namespace Stripe.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TransactionTreasury : StripeEntity { @@ -11,6 +14,9 @@ public class TransactionTreasury : StripeEntity /// representing this Issuing transaction if it is a refund. /// [JsonProperty("received_credit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("received_credit")] +#endif public string ReceivedCredit { get; set; } /// @@ -19,6 +25,9 @@ public class TransactionTreasury : StripeEntity /// representing this Issuing transaction if it is a capture. /// [JsonProperty("received_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("received_debit")] +#endif public string ReceivedDebit { get; set; } } } diff --git a/src/Stripe.net/Entities/LineItems/LineItem.cs b/src/Stripe.net/Entities/LineItems/LineItem.cs index faa32b3d0e..46194b6be8 100644 --- a/src/Stripe.net/Entities/LineItems/LineItem.cs +++ b/src/Stripe.net/Entities/LineItems/LineItem.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// A line item. @@ -13,36 +16,54 @@ public class LineItem : StripeEntity, IHasId, IHasObject /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// /// Total discount amount applied. If no discounts were applied, defaults to 0. /// [JsonProperty("amount_discount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_discount")] +#endif public long AmountDiscount { get; set; } /// /// Total before any discounts or taxes are applied. /// [JsonProperty("amount_subtotal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_subtotal")] +#endif public long AmountSubtotal { get; set; } /// /// Total tax amount applied. If no tax was applied, defaults to 0. /// [JsonProperty("amount_tax")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_tax")] +#endif public long AmountTax { get; set; } /// /// Total after discounts and taxes. /// [JsonProperty("amount_total")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_total")] +#endif public long AmountTotal { get; set; } /// @@ -51,12 +72,19 @@ public class LineItem : StripeEntity, IHasId, IHasObject /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// /// Whether this object is deleted or not. /// [JsonProperty("deleted", NullValueHandling = NullValueHandling.Ignore)] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("deleted")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] +#endif public bool? Deleted { get; set; } /// @@ -64,30 +92,45 @@ public class LineItem : StripeEntity, IHasId, IHasObject /// Defaults to product name. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// /// The discounts applied to the line item. /// [JsonProperty("discounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discounts")] +#endif public List Discounts { get; set; } /// /// The price used to generate the line item. /// [JsonProperty("price")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("price")] +#endif public Price Price { get; set; } /// /// The quantity of products being purchased. /// [JsonProperty("quantity")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("quantity")] +#endif public long? Quantity { get; set; } /// /// The taxes applied to the line item. /// [JsonProperty("taxes")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("taxes")] +#endif public List Taxes { get; set; } } } diff --git a/src/Stripe.net/Entities/LineItems/LineItemDiscount.cs b/src/Stripe.net/Entities/LineItems/LineItemDiscount.cs index 52002bd56f..f75007c7ea 100644 --- a/src/Stripe.net/Entities/LineItems/LineItemDiscount.cs +++ b/src/Stripe.net/Entities/LineItems/LineItemDiscount.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class LineItemDiscount : StripeEntity { @@ -9,6 +12,9 @@ public class LineItemDiscount : StripeEntity /// The amount discounted. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long Amount { get; set; } /// @@ -22,6 +28,9 @@ public class LineItemDiscount : StripeEntity /// subscriptions. /// [JsonProperty("discount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discount")] +#endif public Discount Discount { get; set; } } } diff --git a/src/Stripe.net/Entities/LineItems/LineItemTax.cs b/src/Stripe.net/Entities/LineItems/LineItemTax.cs index 49a29f2180..d9a8c718cb 100644 --- a/src/Stripe.net/Entities/LineItems/LineItemTax.cs +++ b/src/Stripe.net/Entities/LineItems/LineItemTax.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class LineItemTax : StripeEntity { @@ -9,6 +12,9 @@ public class LineItemTax : StripeEntity /// Amount of tax applied for this rate. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long Amount { get; set; } /// @@ -21,6 +27,9 @@ public class LineItemTax : StripeEntity /// Related guide: Tax rates. /// [JsonProperty("rate")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("rate")] +#endif public TaxRate Rate { get; set; } /// @@ -33,12 +42,18 @@ public class LineItemTax : StripeEntity /// standard_rated, taxable_basis_reduced, or zero_rated. /// [JsonProperty("taxability_reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("taxability_reason")] +#endif public string TaxabilityReason { get; set; } /// /// The amount on which tax is calculated, in cents (or local equivalent). /// [JsonProperty("taxable_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("taxable_amount")] +#endif public long? TaxableAmount { get; set; } } } diff --git a/src/Stripe.net/Entities/LoginLinks/LoginLink.cs b/src/Stripe.net/Entities/LoginLinks/LoginLink.cs index 53770195b9..5f128704dc 100644 --- a/src/Stripe.net/Entities/LoginLinks/LoginLink.cs +++ b/src/Stripe.net/Entities/LoginLinks/LoginLink.cs @@ -4,6 +4,9 @@ namespace Stripe using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// Login Links are single-use URLs for a connected account to access the Express Dashboard. @@ -17,6 +20,9 @@ public class LoginLink : StripeEntity, IHasObject /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// @@ -24,12 +30,19 @@ public class LoginLink : StripeEntity, IHasObject /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// /// The URL for the login link. /// [JsonProperty("url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("url")] +#endif public string Url { get; set; } } } diff --git a/src/Stripe.net/Entities/Mandates/Mandate.cs b/src/Stripe.net/Entities/Mandates/Mandate.cs index df95b93187..09191c3908 100644 --- a/src/Stripe.net/Entities/Mandates/Mandate.cs +++ b/src/Stripe.net/Entities/Mandates/Mandate.cs @@ -3,26 +3,41 @@ namespace Stripe { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// A Mandate is a record of the permission that your customer gives you to debit their /// payment method. /// +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class Mandate : StripeEntity, IHasId, IHasObject { /// /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } [JsonProperty("customer_acceptance")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_acceptance")] +#endif public MandateCustomerAcceptance CustomerAcceptance { get; set; } /// @@ -30,15 +45,24 @@ public class Mandate : StripeEntity, IHasId, IHasObject /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } [JsonProperty("multi_use")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("multi_use")] +#endif public MandateMultiUse MultiUse { get; set; } /// /// The account (if any) that the mandate is intended for. /// [JsonProperty("on_behalf_of")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("on_behalf_of")] +#endif public string OnBehalfOf { get; set; } #region Expandable PaymentMethod @@ -48,6 +72,9 @@ public class Mandate : StripeEntity, IHasId, IHasObject /// ID of the payment method associated with this mandate. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string PaymentMethodId { get => this.InternalPaymentMethod?.Id; @@ -61,6 +88,9 @@ public string PaymentMethodId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public PaymentMethod PaymentMethod { get => this.InternalPaymentMethod?.ExpandedObject; @@ -69,13 +99,23 @@ public PaymentMethod PaymentMethod [JsonProperty("payment_method")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalPaymentMethod { get; set; } #endregion [JsonProperty("payment_method_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_details")] +#endif public MandatePaymentMethodDetails PaymentMethodDetails { get; set; } [JsonProperty("single_use")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("single_use")] +#endif public MandateSingleUse SingleUse { get; set; } /// @@ -83,6 +123,9 @@ public PaymentMethod PaymentMethod /// One of: active, inactive, or pending. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } /// @@ -90,6 +133,9 @@ public PaymentMethod PaymentMethod /// One of: multi_use, or single_use. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Mandates/MandateCustomerAcceptance.cs b/src/Stripe.net/Entities/Mandates/MandateCustomerAcceptance.cs index 02674d0fcd..e80839bebb 100644 --- a/src/Stripe.net/Entities/Mandates/MandateCustomerAcceptance.cs +++ b/src/Stripe.net/Entities/Mandates/MandateCustomerAcceptance.cs @@ -4,6 +4,9 @@ namespace Stripe using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class MandateCustomerAcceptance : StripeEntity { @@ -12,12 +15,22 @@ public class MandateCustomerAcceptance : StripeEntity /// [JsonProperty("accepted_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("accepted_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? AcceptedAt { get; set; } [JsonProperty("offline")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("offline")] +#endif public MandateCustomerAcceptanceOffline Offline { get; set; } [JsonProperty("online")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("online")] +#endif public MandateCustomerAcceptanceOnline Online { get; set; } /// @@ -26,6 +39,9 @@ public class MandateCustomerAcceptance : StripeEntity /// One of: offline, or online. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Mandates/MandateCustomerAcceptanceOnline.cs b/src/Stripe.net/Entities/Mandates/MandateCustomerAcceptanceOnline.cs index 80d58d5a75..19022acca4 100644 --- a/src/Stripe.net/Entities/Mandates/MandateCustomerAcceptanceOnline.cs +++ b/src/Stripe.net/Entities/Mandates/MandateCustomerAcceptanceOnline.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class MandateCustomerAcceptanceOnline : StripeEntity { @@ -9,12 +12,18 @@ public class MandateCustomerAcceptanceOnline : StripeEntity [JsonProperty("ip_address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ip_address")] +#endif public string IpAddress { get; set; } /// /// The customer accepts the mandate using the user agent of the browser. /// [JsonProperty("user_agent")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("user_agent")] +#endif public string UserAgent { get; set; } } } diff --git a/src/Stripe.net/Entities/Mandates/MandatePaymentMethodDetails.cs b/src/Stripe.net/Entities/Mandates/MandatePaymentMethodDetails.cs index 169a38087c..df27dbbe66 100644 --- a/src/Stripe.net/Entities/Mandates/MandatePaymentMethodDetails.cs +++ b/src/Stripe.net/Entities/Mandates/MandatePaymentMethodDetails.cs @@ -2,43 +2,82 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class MandatePaymentMethodDetails : StripeEntity { [JsonProperty("acss_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("acss_debit")] +#endif public MandatePaymentMethodDetailsAcssDebit AcssDebit { get; set; } [JsonProperty("amazon_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amazon_pay")] +#endif public MandatePaymentMethodDetailsAmazonPay AmazonPay { get; set; } [JsonProperty("au_becs_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("au_becs_debit")] +#endif public MandatePaymentMethodDetailsAuBecsDebit AuBecsDebit { get; set; } [JsonProperty("bacs_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bacs_debit")] +#endif public MandatePaymentMethodDetailsBacsDebit BacsDebit { get; set; } [JsonProperty("card")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card")] +#endif public MandatePaymentMethodDetailsCard Card { get; set; } [JsonProperty("cashapp")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cashapp")] +#endif public MandatePaymentMethodDetailsCashapp Cashapp { get; set; } [JsonProperty("kakao_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("kakao_pay")] +#endif public MandatePaymentMethodDetailsKakaoPay KakaoPay { get; set; } [JsonProperty("kr_card")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("kr_card")] +#endif public MandatePaymentMethodDetailsKrCard KrCard { get; set; } [JsonProperty("link")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("link")] +#endif public MandatePaymentMethodDetailsLink Link { get; set; } [JsonProperty("paypal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("paypal")] +#endif public MandatePaymentMethodDetailsPaypal Paypal { get; set; } [JsonProperty("revolut_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("revolut_pay")] +#endif public MandatePaymentMethodDetailsRevolutPay RevolutPay { get; set; } [JsonProperty("sepa_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sepa_debit")] +#endif public MandatePaymentMethodDetailsSepaDebit SepaDebit { get; set; } /// @@ -47,9 +86,15 @@ public class MandatePaymentMethodDetails : StripeEntity [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } [JsonProperty("us_bank_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("us_bank_account")] +#endif public MandatePaymentMethodDetailsUsBankAccount UsBankAccount { get; set; } } } diff --git a/src/Stripe.net/Entities/Mandates/MandatePaymentMethodDetailsAcssDebit.cs b/src/Stripe.net/Entities/Mandates/MandatePaymentMethodDetailsAcssDebit.cs index 67185d0c8d..f1e83ae78d 100644 --- a/src/Stripe.net/Entities/Mandates/MandatePaymentMethodDetailsAcssDebit.cs +++ b/src/Stripe.net/Entities/Mandates/MandatePaymentMethodDetailsAcssDebit.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class MandatePaymentMethodDetailsAcssDebit : StripeEntity { @@ -11,6 +14,9 @@ public class MandatePaymentMethodDetailsAcssDebit : StripeEntityinvoice, or subscription. /// [JsonProperty("default_for")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("default_for")] +#endif public List DefaultFor { get; set; } /// @@ -18,6 +24,9 @@ public class MandatePaymentMethodDetailsAcssDebit : StripeEntity [JsonProperty("interval_description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interval_description")] +#endif public string IntervalDescription { get; set; } /// @@ -25,6 +34,9 @@ public class MandatePaymentMethodDetailsAcssDebit : StripeEntitycombined, interval, or sporadic. /// [JsonProperty("payment_schedule")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_schedule")] +#endif public string PaymentSchedule { get; set; } /// @@ -32,6 +44,9 @@ public class MandatePaymentMethodDetailsAcssDebit : StripeEntitybusiness, or personal. /// [JsonProperty("transaction_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transaction_type")] +#endif public string TransactionType { get; set; } } } diff --git a/src/Stripe.net/Entities/Mandates/MandatePaymentMethodDetailsAuBecsDebit.cs b/src/Stripe.net/Entities/Mandates/MandatePaymentMethodDetailsAuBecsDebit.cs index 51c646333d..ee70d58ca3 100644 --- a/src/Stripe.net/Entities/Mandates/MandatePaymentMethodDetailsAuBecsDebit.cs +++ b/src/Stripe.net/Entities/Mandates/MandatePaymentMethodDetailsAuBecsDebit.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class MandatePaymentMethodDetailsAuBecsDebit : StripeEntity { @@ -10,6 +13,9 @@ public class MandatePaymentMethodDetailsAuBecsDebit : StripeEntity [JsonProperty("url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("url")] +#endif public string Url { get; set; } } } diff --git a/src/Stripe.net/Entities/Mandates/MandatePaymentMethodDetailsBacsDebit.cs b/src/Stripe.net/Entities/Mandates/MandatePaymentMethodDetailsBacsDebit.cs index 6dcb55cd5a..20a1fdd8e2 100644 --- a/src/Stripe.net/Entities/Mandates/MandatePaymentMethodDetailsBacsDebit.cs +++ b/src/Stripe.net/Entities/Mandates/MandatePaymentMethodDetailsBacsDebit.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class MandatePaymentMethodDetailsBacsDebit : StripeEntity { @@ -11,12 +14,18 @@ public class MandatePaymentMethodDetailsBacsDebit : StripeEntityaccepted, pending, refused, or revoked. /// [JsonProperty("network_status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("network_status")] +#endif public string NetworkStatus { get; set; } /// /// The unique reference identifying the mandate on the Bacs network. /// [JsonProperty("reference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reference")] +#endif public string Reference { get; set; } /// @@ -26,12 +35,18 @@ public class MandatePaymentMethodDetailsBacsDebit : StripeEntitybank_ownership_changed, could_not_process, or debit_not_authorized. /// [JsonProperty("revocation_reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("revocation_reason")] +#endif public string RevocationReason { get; set; } /// /// The URL that will contain the mandate that the customer has signed. /// [JsonProperty("url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("url")] +#endif public string Url { get; set; } } } diff --git a/src/Stripe.net/Entities/Mandates/MandatePaymentMethodDetailsPaypal.cs b/src/Stripe.net/Entities/Mandates/MandatePaymentMethodDetailsPaypal.cs index e8e9c744c1..5298d8ec50 100644 --- a/src/Stripe.net/Entities/Mandates/MandatePaymentMethodDetailsPaypal.cs +++ b/src/Stripe.net/Entities/Mandates/MandatePaymentMethodDetailsPaypal.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class MandatePaymentMethodDetailsPaypal : StripeEntity { @@ -10,12 +13,18 @@ public class MandatePaymentMethodDetailsPaypal : StripeEntity [JsonProperty("billing_agreement_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_agreement_id")] +#endif public string BillingAgreementId { get; set; } /// /// PayPal account PayerID. This identifier uniquely identifies the PayPal customer. /// [JsonProperty("payer_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payer_id")] +#endif public string PayerId { get; set; } } } diff --git a/src/Stripe.net/Entities/Mandates/MandatePaymentMethodDetailsSepaDebit.cs b/src/Stripe.net/Entities/Mandates/MandatePaymentMethodDetailsSepaDebit.cs index bcbd249f48..5c5f5d25de 100644 --- a/src/Stripe.net/Entities/Mandates/MandatePaymentMethodDetailsSepaDebit.cs +++ b/src/Stripe.net/Entities/Mandates/MandatePaymentMethodDetailsSepaDebit.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class MandatePaymentMethodDetailsSepaDebit : StripeEntity { @@ -9,6 +12,9 @@ public class MandatePaymentMethodDetailsSepaDebit : StripeEntity [JsonProperty("reference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reference")] +#endif public string Reference { get; set; } /// @@ -16,6 +22,9 @@ public class MandatePaymentMethodDetailsSepaDebit : StripeEntity [JsonProperty("url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("url")] +#endif public string Url { get; set; } } } diff --git a/src/Stripe.net/Entities/Mandates/MandatePaymentMethodDetailsUsBankAccount.cs b/src/Stripe.net/Entities/Mandates/MandatePaymentMethodDetailsUsBankAccount.cs index 9dce558df7..e08bb16e2d 100644 --- a/src/Stripe.net/Entities/Mandates/MandatePaymentMethodDetailsUsBankAccount.cs +++ b/src/Stripe.net/Entities/Mandates/MandatePaymentMethodDetailsUsBankAccount.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class MandatePaymentMethodDetailsUsBankAccount : StripeEntity { @@ -9,6 +12,9 @@ public class MandatePaymentMethodDetailsUsBankAccount : StripeEntity [JsonProperty("collection_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("collection_method")] +#endif public string CollectionMethod { get; set; } } } diff --git a/src/Stripe.net/Entities/Mandates/MandateSingleUse.cs b/src/Stripe.net/Entities/Mandates/MandateSingleUse.cs index da1df85b0e..dd86f19e37 100644 --- a/src/Stripe.net/Entities/Mandates/MandateSingleUse.cs +++ b/src/Stripe.net/Entities/Mandates/MandateSingleUse.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class MandateSingleUse : StripeEntity { @@ -9,12 +12,18 @@ public class MandateSingleUse : StripeEntity /// The amount of the payment on a single use mandate. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long Amount { get; set; } /// /// The currency of the payment on a single use mandate. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntent.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntent.cs index 59638aeafa..3cce856521 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntent.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntent.cs @@ -5,6 +5,9 @@ namespace Stripe using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// A PaymentIntent guides you through the process of collecting a payment from your @@ -20,18 +23,27 @@ namespace Stripe /// Related guide: Payment /// Intents API. /// +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class PaymentIntent : StripeEntity, IHasId, IHasMetadata, IHasObject { /// /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// @@ -45,21 +57,33 @@ public class PaymentIntent : StripeEntity, IHasId, IHasMetadata, /// 99999999 for a USD charge of $999,999.99). /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long Amount { get; set; } /// /// Amount that can be captured from this PaymentIntent. /// [JsonProperty("amount_capturable")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_capturable")] +#endif public long AmountCapturable { get; set; } [JsonProperty("amount_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_details")] +#endif public PaymentIntentAmountDetails AmountDetails { get; set; } /// /// Amount that this PaymentIntent collects. /// [JsonProperty("amount_received")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_received")] +#endif public long AmountReceived { get; set; } #region Expandable Application @@ -69,6 +93,9 @@ public class PaymentIntent : StripeEntity, IHasId, IHasMetadata, /// ID of the Connect application that created the PaymentIntent. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string ApplicationId { get => this.InternalApplication?.Id; @@ -82,6 +109,9 @@ public string ApplicationId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Application Application { get => this.InternalApplication?.ExpandedObject; @@ -90,6 +120,10 @@ public Application Application [JsonProperty("application")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("application")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalApplication { get; set; } #endregion @@ -102,6 +136,9 @@ public Application Application /// accounts. /// [JsonProperty("application_fee_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("application_fee_amount")] +#endif public long? ApplicationFeeAmount { get; set; } /// @@ -109,6 +146,9 @@ public Application Application /// href="https://dashboard.stripe.com/settings/payment_methods">Stripe Dashboard. /// [JsonProperty("automatic_payment_methods")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("automatic_payment_methods")] +#endif public PaymentIntentAutomaticPaymentMethods AutomaticPaymentMethods { get; set; } /// @@ -117,6 +157,10 @@ public Application Application /// [JsonProperty("canceled_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("canceled_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? CanceledAt { get; set; } /// @@ -127,6 +171,9 @@ public Application Application /// fraudulent, requested_by_customer, or void_invoice. /// [JsonProperty("cancellation_reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cancellation_reason")] +#endif public string CancellationReason { get; set; } /// @@ -134,6 +181,9 @@ public Application Application /// One of: automatic, automatic_async, or manual. /// [JsonProperty("capture_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("capture_method")] +#endif public string CaptureMethod { get; set; } /// @@ -149,6 +199,9 @@ public Application Application /// payment and learn about how client_secret should be handled. /// [JsonProperty("client_secret")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("client_secret")] +#endif public string ClientSecret { get; set; } /// @@ -157,6 +210,9 @@ public Application Application /// One of: automatic, or manual. /// [JsonProperty("confirmation_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("confirmation_method")] +#endif public string ConfirmationMethod { get; set; } /// @@ -164,6 +220,10 @@ public Application Application /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -172,6 +232,9 @@ public Application Application /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } #region Expandable Customer @@ -192,6 +255,9 @@ public Application Application /// payment method representing the card is created and attached to the Customer instead. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string CustomerId { get => this.InternalCustomer?.Id; @@ -216,6 +282,9 @@ public string CustomerId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Customer Customer { get => this.InternalCustomer?.ExpandedObject; @@ -224,6 +293,10 @@ public Customer Customer [JsonProperty("customer")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalCustomer { get; set; } #endregion @@ -231,6 +304,9 @@ public Customer Customer /// An arbitrary string attached to the object. Often useful for displaying to users. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } #region Expandable Invoice @@ -240,6 +316,9 @@ public Customer Customer /// ID of the invoice that created this PaymentIntent, if it exists. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string InvoiceId { get => this.InternalInvoice?.Id; @@ -253,6 +332,9 @@ public string InvoiceId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Invoice Invoice { get => this.InternalInvoice?.ExpandedObject; @@ -261,6 +343,10 @@ public Invoice Invoice [JsonProperty("invoice")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("invoice")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalInvoice { get; set; } #endregion @@ -269,6 +355,9 @@ public Invoice Invoice /// cleared if the PaymentIntent is later updated for any reason. /// [JsonProperty("last_payment_error")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last_payment_error")] +#endif public StripeError LastPaymentError { get; set; } #region Expandable LatestCharge @@ -280,6 +369,9 @@ public Invoice Invoice /// attempted. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string LatestChargeId { get => this.InternalLatestCharge?.Id; @@ -295,6 +387,9 @@ public string LatestChargeId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Charge LatestCharge { get => this.InternalLatestCharge?.ExpandedObject; @@ -303,6 +398,10 @@ public Charge LatestCharge [JsonProperty("latest_charge")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("latest_charge")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalLatestCharge { get; set; } #endregion @@ -311,6 +410,9 @@ public Charge LatestCharge /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// @@ -321,6 +423,9 @@ public Charge LatestCharge /// information in metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -328,6 +433,9 @@ public Charge LatestCharge /// customer to fulfill a payment using the provided source. /// [JsonProperty("next_action")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("next_action")] +#endif public PaymentIntentNextAction NextAction { get; set; } #region Expandable OnBehalfOf @@ -339,6 +447,9 @@ public Charge LatestCharge /// for connected accounts for details. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string OnBehalfOfId { get => this.InternalOnBehalfOf?.Id; @@ -354,6 +465,9 @@ public string OnBehalfOfId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Account OnBehalfOf { get => this.InternalOnBehalfOf?.ExpandedObject; @@ -362,6 +476,10 @@ public Account OnBehalfOf [JsonProperty("on_behalf_of")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("on_behalf_of")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalOnBehalfOf { get; set; } #endregion @@ -372,6 +490,9 @@ public Account OnBehalfOf /// ID of the payment method used in this PaymentIntent. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string PaymentMethodId { get => this.InternalPaymentMethod?.Id; @@ -385,6 +506,9 @@ public string PaymentMethodId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public PaymentMethod PaymentMethod { get => this.InternalPaymentMethod?.ExpandedObject; @@ -393,6 +517,10 @@ public PaymentMethod PaymentMethod [JsonProperty("payment_method")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalPaymentMethod { get; set; } #endregion @@ -402,24 +530,36 @@ public PaymentMethod PaymentMethod /// configuration used for this PaymentIntent. /// [JsonProperty("payment_method_configuration_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_configuration_details")] +#endif public PaymentIntentPaymentMethodConfigurationDetails PaymentMethodConfigurationDetails { get; set; } /// /// Payment-method-specific configuration for this PaymentIntent. /// [JsonProperty("payment_method_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_options")] +#endif public PaymentIntentPaymentMethodOptions PaymentMethodOptions { get; set; } /// /// The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. /// [JsonProperty("payment_method_types")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_types")] +#endif public List PaymentMethodTypes { get; set; } /// /// If present, this property tells you about the processing state of the payment. /// [JsonProperty("processing")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("processing")] +#endif public PaymentIntentProcessing Processing { get; set; } /// @@ -429,6 +569,9 @@ public PaymentMethod PaymentMethod /// settings. /// [JsonProperty("receipt_email")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("receipt_email")] +#endif public string ReceiptEmail { get; set; } #region Expandable Review @@ -438,6 +581,9 @@ public PaymentMethod PaymentMethod /// ID of the review associated with this PaymentIntent, if any. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string ReviewId { get => this.InternalReview?.Id; @@ -451,6 +597,9 @@ public string ReviewId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Review Review { get => this.InternalReview?.ExpandedObject; @@ -459,6 +608,10 @@ public Review Review [JsonProperty("review")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("review")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalReview { get; set; } #endregion @@ -484,12 +637,18 @@ public Review Review /// One of: off_session, or on_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } /// /// Shipping information for this PaymentIntent. /// [JsonProperty("shipping")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping")] +#endif public Shipping Shipping { get; set; } #region Expandable Source @@ -500,6 +659,9 @@ public Review Review /// object that is associated with this PaymentIntent, if one was supplied. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string SourceId { get => this.InternalSource?.Id; @@ -514,6 +676,9 @@ public string SourceId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public IPaymentSource Source { get => this.InternalSource?.ExpandedObject; @@ -522,6 +687,10 @@ public IPaymentSource Source [JsonProperty("source")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("source")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalSource { get; set; } #endregion @@ -537,6 +706,9 @@ public IPaymentSource Source /// instead. /// [JsonProperty("statement_descriptor")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("statement_descriptor")] +#endif public string StatementDescriptor { get; set; } /// @@ -546,6 +718,9 @@ public IPaymentSource Source /// customer's statement. /// [JsonProperty("statement_descriptor_suffix")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("statement_descriptor_suffix")] +#endif public string StatementDescriptorSuffix { get; set; } /// @@ -559,6 +734,9 @@ public IPaymentSource Source /// or succeeded. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } /// @@ -567,6 +745,9 @@ public IPaymentSource Source /// connected accounts. /// [JsonProperty("transfer_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transfer_data")] +#endif public PaymentIntentTransferData TransferData { get; set; } /// @@ -575,6 +756,9 @@ public IPaymentSource Source /// connected accounts. /// [JsonProperty("transfer_group")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transfer_group")] +#endif public string TransferGroup { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentAmountDetails.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentAmountDetails.cs index eaba2c918a..1f305f7dcf 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentAmountDetails.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentAmountDetails.cs @@ -2,10 +2,16 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentAmountDetails : StripeEntity { [JsonProperty("tip")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tip")] +#endif public PaymentIntentAmountDetailsTip Tip { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentAmountDetailsTip.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentAmountDetailsTip.cs index 42ea7831c1..0dec8c711b 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentAmountDetailsTip.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentAmountDetailsTip.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentAmountDetailsTip : StripeEntity { @@ -9,6 +12,9 @@ public class PaymentIntentAmountDetailsTip : StripeEntity [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long Amount { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentAutomaticPaymentMethods.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentAutomaticPaymentMethods.cs index 73341c7b71..dfc1aed31f 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentAutomaticPaymentMethods.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentAutomaticPaymentMethods.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentAutomaticPaymentMethods : StripeEntity { @@ -16,12 +19,18 @@ public class PaymentIntentAutomaticPaymentMethods : StripeEntityalways, or never. /// [JsonProperty("allow_redirects")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("allow_redirects")] +#endif public string AllowRedirects { get; set; } /// /// Automatically calculates compatible payment methods. /// [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool Enabled { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextAction.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextAction.cs index 75f813e450..08e2825a31 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextAction.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextAction.cs @@ -2,46 +2,88 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentNextAction : StripeEntity { [JsonProperty("alipay_handle_redirect")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("alipay_handle_redirect")] +#endif public PaymentIntentNextActionAlipayHandleRedirect AlipayHandleRedirect { get; set; } [JsonProperty("boleto_display_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("boleto_display_details")] +#endif public PaymentIntentNextActionBoletoDisplayDetails BoletoDisplayDetails { get; set; } [JsonProperty("card_await_notification")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card_await_notification")] +#endif public PaymentIntentNextActionCardAwaitNotification CardAwaitNotification { get; set; } [JsonProperty("cashapp_handle_redirect_or_display_qr_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cashapp_handle_redirect_or_display_qr_code")] +#endif public PaymentIntentNextActionCashappHandleRedirectOrDisplayQrCode CashappHandleRedirectOrDisplayQrCode { get; set; } [JsonProperty("display_bank_transfer_instructions")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_bank_transfer_instructions")] +#endif public PaymentIntentNextActionDisplayBankTransferInstructions DisplayBankTransferInstructions { get; set; } [JsonProperty("konbini_display_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("konbini_display_details")] +#endif public PaymentIntentNextActionKonbiniDisplayDetails KonbiniDisplayDetails { get; set; } [JsonProperty("multibanco_display_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("multibanco_display_details")] +#endif public PaymentIntentNextActionMultibancoDisplayDetails MultibancoDisplayDetails { get; set; } [JsonProperty("oxxo_display_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("oxxo_display_details")] +#endif public PaymentIntentNextActionOxxoDisplayDetails OxxoDisplayDetails { get; set; } [JsonProperty("paynow_display_qr_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("paynow_display_qr_code")] +#endif public PaymentIntentNextActionPaynowDisplayQrCode PaynowDisplayQrCode { get; set; } [JsonProperty("pix_display_qr_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("pix_display_qr_code")] +#endif public PaymentIntentNextActionPixDisplayQrCode PixDisplayQrCode { get; set; } [JsonProperty("promptpay_display_qr_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("promptpay_display_qr_code")] +#endif public PaymentIntentNextActionPromptpayDisplayQrCode PromptpayDisplayQrCode { get; set; } [JsonProperty("redirect_to_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("redirect_to_url")] +#endif public PaymentIntentNextActionRedirectToUrl RedirectToUrl { get; set; } [JsonProperty("swish_handle_redirect_or_display_qr_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("swish_handle_redirect_or_display_qr_code")] +#endif public PaymentIntentNextActionSwishHandleRedirectOrDisplayQrCode SwishHandleRedirectOrDisplayQrCode { get; set; } /// @@ -50,6 +92,9 @@ public class PaymentIntentNextAction : StripeEntity /// verify_with_microdeposits. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } /// @@ -58,18 +103,33 @@ public class PaymentIntentNextAction : StripeEntity /// change and is only intended to be used by Stripe.js. /// [JsonProperty("use_stripe_sdk")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("use_stripe_sdk")] +#endif public PaymentIntentNextActionUseStripeSdk UseStripeSdk { get; set; } [JsonProperty("verify_with_microdeposits")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("verify_with_microdeposits")] +#endif public PaymentIntentNextActionVerifyWithMicrodeposits VerifyWithMicrodeposits { get; set; } [JsonProperty("wechat_pay_display_qr_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("wechat_pay_display_qr_code")] +#endif public PaymentIntentNextActionWechatPayDisplayQrCode WechatPayDisplayQrCode { get; set; } [JsonProperty("wechat_pay_redirect_to_android_app")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("wechat_pay_redirect_to_android_app")] +#endif public PaymentIntentNextActionWechatPayRedirectToAndroidApp WechatPayRedirectToAndroidApp { get; set; } [JsonProperty("wechat_pay_redirect_to_ios_app")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("wechat_pay_redirect_to_ios_app")] +#endif public PaymentIntentNextActionWechatPayRedirectToIosApp WechatPayRedirectToIosApp { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionAlipayHandleRedirect.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionAlipayHandleRedirect.cs index cd90db5da9..7894fc2399 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionAlipayHandleRedirect.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionAlipayHandleRedirect.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentNextActionAlipayHandleRedirect : StripeEntity { @@ -10,6 +13,9 @@ public class PaymentIntentNextActionAlipayHandleRedirect : StripeEntity [JsonProperty("native_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("native_data")] +#endif public string NativeData { get; set; } /// @@ -17,6 +23,9 @@ public class PaymentIntentNextActionAlipayHandleRedirect : StripeEntity [JsonProperty("native_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("native_url")] +#endif public string NativeUrl { get; set; } /// @@ -24,12 +33,18 @@ public class PaymentIntentNextActionAlipayHandleRedirect : StripeEntity [JsonProperty("return_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("return_url")] +#endif public string ReturnUrl { get; set; } /// /// The URL you must redirect your customer to in order to authenticate the payment. /// [JsonProperty("url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("url")] +#endif public string Url { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionBoletoDisplayDetails.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionBoletoDisplayDetails.cs index 59a062d1a0..abba0fd287 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionBoletoDisplayDetails.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionBoletoDisplayDetails.cs @@ -4,6 +4,9 @@ namespace Stripe using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentNextActionBoletoDisplayDetails : StripeEntity { @@ -12,6 +15,10 @@ public class PaymentIntentNextActionBoletoDisplayDetails : StripeEntity [JsonProperty("expires_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("expires_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? ExpiresAt { get; set; } /// @@ -19,18 +26,27 @@ public class PaymentIntentNextActionBoletoDisplayDetails : StripeEntity [JsonProperty("hosted_voucher_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("hosted_voucher_url")] +#endif public string HostedVoucherUrl { get; set; } /// /// The boleto number. /// [JsonProperty("number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("number")] +#endif public string Number { get; set; } /// /// The URL to the downloadable boleto voucher PDF. /// [JsonProperty("pdf")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("pdf")] +#endif public string Pdf { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionCardAwaitNotification.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionCardAwaitNotification.cs index 9adfdd970a..1811cf936b 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionCardAwaitNotification.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionCardAwaitNotification.cs @@ -4,6 +4,9 @@ namespace Stripe using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentNextActionCardAwaitNotification : StripeEntity { @@ -13,6 +16,10 @@ public class PaymentIntentNextActionCardAwaitNotification : StripeEntity [JsonProperty("charge_attempt_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("charge_attempt_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? ChargeAttemptAt { get; set; } /// @@ -20,6 +27,9 @@ public class PaymentIntentNextActionCardAwaitNotification : StripeEntity [JsonProperty("customer_approval_required")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_approval_required")] +#endif public bool? CustomerApprovalRequired { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionCashappHandleRedirectOrDisplayQrCode.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionCashappHandleRedirectOrDisplayQrCode.cs index bc709e426b..dab493acc1 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionCashappHandleRedirectOrDisplayQrCode.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionCashappHandleRedirectOrDisplayQrCode.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentNextActionCashappHandleRedirectOrDisplayQrCode : StripeEntity { @@ -10,15 +13,24 @@ public class PaymentIntentNextActionCashappHandleRedirectOrDisplayQrCode : Strip /// QR code, and supports QR code refreshing on expiration. /// [JsonProperty("hosted_instructions_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("hosted_instructions_url")] +#endif public string HostedInstructionsUrl { get; set; } /// /// The url for mobile redirect based auth. /// [JsonProperty("mobile_auth_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mobile_auth_url")] +#endif public string MobileAuthUrl { get; set; } [JsonProperty("qr_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("qr_code")] +#endif public PaymentIntentNextActionCashappHandleRedirectOrDisplayQrCodeQrCode QrCode { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionCashappHandleRedirectOrDisplayQrCodeQrCode.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionCashappHandleRedirectOrDisplayQrCodeQrCode.cs index aaddf2f79a..8862da26fd 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionCashappHandleRedirectOrDisplayQrCodeQrCode.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionCashappHandleRedirectOrDisplayQrCodeQrCode.cs @@ -4,6 +4,9 @@ namespace Stripe using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentNextActionCashappHandleRedirectOrDisplayQrCodeQrCode : StripeEntity { @@ -12,18 +15,28 @@ public class PaymentIntentNextActionCashappHandleRedirectOrDisplayQrCodeQrCode : /// [JsonProperty("expires_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("expires_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime ExpiresAt { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// /// The image_url_png string used to render QR code. /// [JsonProperty("image_url_png")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("image_url_png")] +#endif public string ImageUrlPng { get; set; } /// /// The image_url_svg string used to render QR code. /// [JsonProperty("image_url_svg")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("image_url_svg")] +#endif public string ImageUrlSvg { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionDisplayBankTransferInstructions.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionDisplayBankTransferInstructions.cs index e3952e12b7..6692e453e0 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionDisplayBankTransferInstructions.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionDisplayBankTransferInstructions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentNextActionDisplayBankTransferInstructions : StripeEntity { @@ -10,6 +13,9 @@ public class PaymentIntentNextActionDisplayBankTransferInstructions : StripeEnti /// The remaining amount that needs to be transferred to complete the payment. /// [JsonProperty("amount_remaining")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_remaining")] +#endif public long? AmountRemaining { get; set; } /// @@ -18,18 +24,27 @@ public class PaymentIntentNextActionDisplayBankTransferInstructions : StripeEnti /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// /// A list of financial addresses that can be used to fund the customer balance. /// [JsonProperty("financial_addresses")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("financial_addresses")] +#endif public List FinancialAddresses { get; set; } /// /// A link to a hosted page that guides your customer through completing the transfer. /// [JsonProperty("hosted_instructions_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("hosted_instructions_url")] +#endif public string HostedInstructionsUrl { get; set; } /// @@ -37,6 +52,9 @@ public class PaymentIntentNextActionDisplayBankTransferInstructions : StripeEnti /// reference or memo field of their bank transfer. /// [JsonProperty("reference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reference")] +#endif public string Reference { get; set; } /// @@ -45,6 +63,9 @@ public class PaymentIntentNextActionDisplayBankTransferInstructions : StripeEnti /// mx_bank_transfer, or us_bank_transfer. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddress.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddress.cs index c2cadabd86..a9cd85a78b 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddress.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddress.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddress : StripeEntity { @@ -10,24 +13,36 @@ public class PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddr /// ABA Records contain U.S. bank account details per the ABA format. /// [JsonProperty("aba")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("aba")] +#endif public PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressAba Aba { get; set; } /// /// Iban Records contain E.U. bank account details per the SEPA format. /// [JsonProperty("iban")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("iban")] +#endif public PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressIban Iban { get; set; } /// /// Sort Code Records contain U.K. bank account details per the sort code format. /// [JsonProperty("sort_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sort_code")] +#endif public PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressSortCode SortCode { get; set; } /// /// SPEI Records contain Mexico bank account details per the SPEI format. /// [JsonProperty("spei")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("spei")] +#endif public PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressSpei Spei { get; set; } /// @@ -36,12 +51,18 @@ public class PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddr /// spei, swift, or zengin. /// [JsonProperty("supported_networks")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("supported_networks")] +#endif public List SupportedNetworks { get; set; } /// /// SWIFT Records contain U.S. bank account details per the SWIFT format. /// [JsonProperty("swift")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("swift")] +#endif public PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressSwift Swift { get; set; } /// @@ -50,12 +71,18 @@ public class PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddr /// zengin. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } /// /// Zengin Records contain Japan bank account details per the Zengin format. /// [JsonProperty("zengin")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("zengin")] +#endif public PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressZengin Zengin { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressAba.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressAba.cs index f02d9d213e..98443a9b72 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressAba.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressAba.cs @@ -2,43 +2,67 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressAba : StripeEntity { [JsonProperty("account_holder_address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_holder_address")] +#endif public Address AccountHolderAddress { get; set; } /// /// The account holder name. /// [JsonProperty("account_holder_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_holder_name")] +#endif public string AccountHolderName { get; set; } /// /// The ABA account number. /// [JsonProperty("account_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_number")] +#endif public string AccountNumber { get; set; } /// /// The account type. /// [JsonProperty("account_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_type")] +#endif public string AccountType { get; set; } [JsonProperty("bank_address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_address")] +#endif public Address BankAddress { get; set; } /// /// The bank name. /// [JsonProperty("bank_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_name")] +#endif public string BankName { get; set; } /// /// The ABA routing number. /// [JsonProperty("routing_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("routing_number")] +#endif public string RoutingNumber { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressIban.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressIban.cs index a1c0e960e1..848e96fc21 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressIban.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressIban.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressIban : StripeEntity { @@ -9,12 +12,18 @@ public class PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddr /// The name of the person or business that owns the bank account. /// [JsonProperty("account_holder_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_holder_name")] +#endif public string AccountHolderName { get; set; } /// /// The BIC/SWIFT code of the account. /// [JsonProperty("bic")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bic")] +#endif public string Bic { get; set; } /// @@ -22,12 +31,18 @@ public class PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddr /// 3166-1 alpha-2). /// [JsonProperty("country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country")] +#endif public string Country { get; set; } /// /// The IBAN of the account. /// [JsonProperty("iban")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("iban")] +#endif public string Iban { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressSortCode.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressSortCode.cs index 4597c10102..1aa6cc3319 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressSortCode.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressSortCode.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressSortCode : StripeEntity { @@ -9,18 +12,27 @@ public class PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddr /// The name of the person or business that owns the bank account. /// [JsonProperty("account_holder_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_holder_name")] +#endif public string AccountHolderName { get; set; } /// /// The account number. /// [JsonProperty("account_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_number")] +#endif public string AccountNumber { get; set; } /// /// The six-digit sort code. /// [JsonProperty("sort_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sort_code")] +#endif public string SortCode { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressSpei.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressSpei.cs index d176d0908f..10c459efb5 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressSpei.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressSpei.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressSpei : StripeEntity { @@ -9,18 +12,27 @@ public class PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddr /// The three-digit bank code. /// [JsonProperty("bank_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_code")] +#endif public string BankCode { get; set; } /// /// The short banking institution name. /// [JsonProperty("bank_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_name")] +#endif public string BankName { get; set; } /// /// The CLABE number. /// [JsonProperty("clabe")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("clabe")] +#endif public string Clabe { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressSwift.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressSwift.cs index 414f53b251..594de88411 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressSwift.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressSwift.cs @@ -2,43 +2,67 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressSwift : StripeEntity { [JsonProperty("account_holder_address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_holder_address")] +#endif public Address AccountHolderAddress { get; set; } /// /// The account holder name. /// [JsonProperty("account_holder_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_holder_name")] +#endif public string AccountHolderName { get; set; } /// /// The account number. /// [JsonProperty("account_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_number")] +#endif public string AccountNumber { get; set; } /// /// The account type. /// [JsonProperty("account_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_type")] +#endif public string AccountType { get; set; } [JsonProperty("bank_address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_address")] +#endif public Address BankAddress { get; set; } /// /// The bank name. /// [JsonProperty("bank_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_name")] +#endif public string BankName { get; set; } /// /// The SWIFT code. /// [JsonProperty("swift_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("swift_code")] +#endif public string SwiftCode { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressZengin.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressZengin.cs index ace8aaae17..3f0945567c 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressZengin.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressZengin.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressZengin : StripeEntity { @@ -9,42 +12,63 @@ public class PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddr /// The account holder name. /// [JsonProperty("account_holder_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_holder_name")] +#endif public string AccountHolderName { get; set; } /// /// The account number. /// [JsonProperty("account_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_number")] +#endif public string AccountNumber { get; set; } /// /// The bank account type. In Japan, this can only be futsu or toza. /// [JsonProperty("account_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_type")] +#endif public string AccountType { get; set; } /// /// The bank code of the account. /// [JsonProperty("bank_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_code")] +#endif public string BankCode { get; set; } /// /// The bank name of the account. /// [JsonProperty("bank_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_name")] +#endif public string BankName { get; set; } /// /// The branch code of the account. /// [JsonProperty("branch_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("branch_code")] +#endif public string BranchCode { get; set; } /// /// The branch name of the account. /// [JsonProperty("branch_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("branch_name")] +#endif public string BranchName { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionKonbiniDisplayDetails.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionKonbiniDisplayDetails.cs index a49f8dffcf..0346fd9dce 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionKonbiniDisplayDetails.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionKonbiniDisplayDetails.cs @@ -4,6 +4,9 @@ namespace Stripe using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentNextActionKonbiniDisplayDetails : StripeEntity { @@ -12,6 +15,10 @@ public class PaymentIntentNextActionKonbiniDisplayDetails : StripeEntity [JsonProperty("expires_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("expires_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime ExpiresAt { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -19,9 +26,15 @@ public class PaymentIntentNextActionKonbiniDisplayDetails : StripeEntity [JsonProperty("hosted_voucher_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("hosted_voucher_url")] +#endif public string HostedVoucherUrl { get; set; } [JsonProperty("stores")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("stores")] +#endif public PaymentIntentNextActionKonbiniDisplayDetailsStores Stores { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionKonbiniDisplayDetailsStores.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionKonbiniDisplayDetailsStores.cs index 4c23f93cb5..93de7cc5c0 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionKonbiniDisplayDetailsStores.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionKonbiniDisplayDetailsStores.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentNextActionKonbiniDisplayDetailsStores : StripeEntity { @@ -9,24 +12,36 @@ public class PaymentIntentNextActionKonbiniDisplayDetailsStores : StripeEntity

[JsonProperty("familymart")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("familymart")] +#endif public PaymentIntentNextActionKonbiniDisplayDetailsStoresFamilymart Familymart { get; set; } ///

/// Lawson instruction details. /// [JsonProperty("lawson")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("lawson")] +#endif public PaymentIntentNextActionKonbiniDisplayDetailsStoresLawson Lawson { get; set; } /// /// Ministop instruction details. /// [JsonProperty("ministop")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ministop")] +#endif public PaymentIntentNextActionKonbiniDisplayDetailsStoresMinistop Ministop { get; set; } /// /// Seicomart instruction details. /// [JsonProperty("seicomart")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("seicomart")] +#endif public PaymentIntentNextActionKonbiniDisplayDetailsStoresSeicomart Seicomart { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionKonbiniDisplayDetailsStoresFamilymart.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionKonbiniDisplayDetailsStoresFamilymart.cs index 7af4c7a4c8..2aea828a40 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionKonbiniDisplayDetailsStoresFamilymart.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionKonbiniDisplayDetailsStoresFamilymart.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentNextActionKonbiniDisplayDetailsStoresFamilymart : StripeEntity { @@ -9,12 +12,18 @@ public class PaymentIntentNextActionKonbiniDisplayDetailsStoresFamilymart : Stri /// The confirmation number. ///
[JsonProperty("confirmation_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("confirmation_number")] +#endif public string ConfirmationNumber { get; set; } /// /// The payment code. /// [JsonProperty("payment_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_code")] +#endif public string PaymentCode { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionKonbiniDisplayDetailsStoresLawson.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionKonbiniDisplayDetailsStoresLawson.cs index f14deee3b1..f2c6a7439d 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionKonbiniDisplayDetailsStoresLawson.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionKonbiniDisplayDetailsStoresLawson.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentNextActionKonbiniDisplayDetailsStoresLawson : StripeEntity { @@ -9,12 +12,18 @@ public class PaymentIntentNextActionKonbiniDisplayDetailsStoresLawson : StripeEn /// The confirmation number. /// [JsonProperty("confirmation_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("confirmation_number")] +#endif public string ConfirmationNumber { get; set; } /// /// The payment code. /// [JsonProperty("payment_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_code")] +#endif public string PaymentCode { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionKonbiniDisplayDetailsStoresMinistop.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionKonbiniDisplayDetailsStoresMinistop.cs index fa8751d4e5..260aead678 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionKonbiniDisplayDetailsStoresMinistop.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionKonbiniDisplayDetailsStoresMinistop.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentNextActionKonbiniDisplayDetailsStoresMinistop : StripeEntity { @@ -9,12 +12,18 @@ public class PaymentIntentNextActionKonbiniDisplayDetailsStoresMinistop : Stripe /// The confirmation number. /// [JsonProperty("confirmation_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("confirmation_number")] +#endif public string ConfirmationNumber { get; set; } /// /// The payment code. /// [JsonProperty("payment_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_code")] +#endif public string PaymentCode { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionKonbiniDisplayDetailsStoresSeicomart.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionKonbiniDisplayDetailsStoresSeicomart.cs index 29f628ead5..5961d952eb 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionKonbiniDisplayDetailsStoresSeicomart.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionKonbiniDisplayDetailsStoresSeicomart.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentNextActionKonbiniDisplayDetailsStoresSeicomart : StripeEntity { @@ -9,12 +12,18 @@ public class PaymentIntentNextActionKonbiniDisplayDetailsStoresSeicomart : Strip /// The confirmation number. /// [JsonProperty("confirmation_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("confirmation_number")] +#endif public string ConfirmationNumber { get; set; } /// /// The payment code. /// [JsonProperty("payment_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_code")] +#endif public string PaymentCode { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionMultibancoDisplayDetails.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionMultibancoDisplayDetails.cs index 07b5868eb7..55e3500aa2 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionMultibancoDisplayDetails.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionMultibancoDisplayDetails.cs @@ -4,6 +4,9 @@ namespace Stripe using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentNextActionMultibancoDisplayDetails : StripeEntity { @@ -11,6 +14,9 @@ public class PaymentIntentNextActionMultibancoDisplayDetails : StripeEntity [JsonProperty("entity")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("entity")] +#endif public string Entity { get; set; } /// @@ -18,6 +24,10 @@ public class PaymentIntentNextActionMultibancoDisplayDetails : StripeEntity [JsonProperty("expires_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("expires_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? ExpiresAt { get; set; } /// @@ -25,12 +35,18 @@ public class PaymentIntentNextActionMultibancoDisplayDetails : StripeEntity [JsonProperty("hosted_voucher_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("hosted_voucher_url")] +#endif public string HostedVoucherUrl { get; set; } /// /// Reference number associated with this Multibanco payment. /// [JsonProperty("reference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reference")] +#endif public string Reference { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionOxxoDisplayDetails.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionOxxoDisplayDetails.cs index 3d5e186e9a..1b7835dcc2 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionOxxoDisplayDetails.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionOxxoDisplayDetails.cs @@ -4,6 +4,9 @@ namespace Stripe using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentNextActionOxxoDisplayDetails : StripeEntity { @@ -12,6 +15,10 @@ public class PaymentIntentNextActionOxxoDisplayDetails : StripeEntity [JsonProperty("expires_after")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("expires_after")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? ExpiresAfter { get; set; } /// @@ -19,12 +26,18 @@ public class PaymentIntentNextActionOxxoDisplayDetails : StripeEntity [JsonProperty("hosted_voucher_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("hosted_voucher_url")] +#endif public string HostedVoucherUrl { get; set; } /// /// OXXO reference number. /// [JsonProperty("number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("number")] +#endif public string Number { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionPaynowDisplayQrCode.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionPaynowDisplayQrCode.cs index a30e594a36..218bd796ee 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionPaynowDisplayQrCode.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionPaynowDisplayQrCode.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentNextActionPaynowDisplayQrCode : StripeEntity { @@ -10,6 +13,9 @@ public class PaymentIntentNextActionPaynowDisplayQrCode : StripeEntity [JsonProperty("data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("data")] +#endif public string Data { get; set; } /// @@ -17,18 +23,27 @@ public class PaymentIntentNextActionPaynowDisplayQrCode : StripeEntity [JsonProperty("hosted_instructions_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("hosted_instructions_url")] +#endif public string HostedInstructionsUrl { get; set; } /// /// The image_url_png string used to render QR code. /// [JsonProperty("image_url_png")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("image_url_png")] +#endif public string ImageUrlPng { get; set; } /// /// The image_url_svg string used to render QR code. /// [JsonProperty("image_url_svg")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("image_url_svg")] +#endif public string ImageUrlSvg { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionPixDisplayQrCode.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionPixDisplayQrCode.cs index 2485427d9b..8a5c5fd17b 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionPixDisplayQrCode.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionPixDisplayQrCode.cs @@ -4,6 +4,9 @@ namespace Stripe using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentNextActionPixDisplayQrCode : StripeEntity { @@ -12,6 +15,9 @@ public class PaymentIntentNextActionPixDisplayQrCode : StripeEntity [JsonProperty("data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("data")] +#endif public string Data { get; set; } /// @@ -19,6 +25,10 @@ public class PaymentIntentNextActionPixDisplayQrCode : StripeEntity [JsonProperty("expires_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("expires_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime ExpiresAt { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -26,18 +36,27 @@ public class PaymentIntentNextActionPixDisplayQrCode : StripeEntity [JsonProperty("hosted_instructions_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("hosted_instructions_url")] +#endif public string HostedInstructionsUrl { get; set; } /// /// The image_url_png string used to render png QR code. /// [JsonProperty("image_url_png")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("image_url_png")] +#endif public string ImageUrlPng { get; set; } /// /// The image_url_svg string used to render svg QR code. /// [JsonProperty("image_url_svg")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("image_url_svg")] +#endif public string ImageUrlSvg { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionPromptpayDisplayQrCode.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionPromptpayDisplayQrCode.cs index 1d1fe6a07d..5dc015fec1 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionPromptpayDisplayQrCode.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionPromptpayDisplayQrCode.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentNextActionPromptpayDisplayQrCode : StripeEntity { @@ -10,6 +13,9 @@ public class PaymentIntentNextActionPromptpayDisplayQrCode : StripeEntity [JsonProperty("data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("data")] +#endif public string Data { get; set; } /// @@ -17,18 +23,27 @@ public class PaymentIntentNextActionPromptpayDisplayQrCode : StripeEntity [JsonProperty("hosted_instructions_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("hosted_instructions_url")] +#endif public string HostedInstructionsUrl { get; set; } /// /// The PNG path used to render the QR code, can be used as the source in an HTML img tag. /// [JsonProperty("image_url_png")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("image_url_png")] +#endif public string ImageUrlPng { get; set; } /// /// The SVG path used to render the QR code, can be used as the source in an HTML img tag. /// [JsonProperty("image_url_svg")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("image_url_svg")] +#endif public string ImageUrlSvg { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionRedirectToUrl.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionRedirectToUrl.cs index 37a03a224e..66f96bd06c 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionRedirectToUrl.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionRedirectToUrl.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentNextActionRedirectToUrl : StripeEntity { @@ -10,12 +13,18 @@ public class PaymentIntentNextActionRedirectToUrl : StripeEntity [JsonProperty("return_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("return_url")] +#endif public string ReturnUrl { get; set; } /// /// The URL you must redirect your customer to in order to authenticate the payment. /// [JsonProperty("url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("url")] +#endif public string Url { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionSwishHandleRedirectOrDisplayQrCode.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionSwishHandleRedirectOrDisplayQrCode.cs index f7ab76d492..d67fc4e070 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionSwishHandleRedirectOrDisplayQrCode.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionSwishHandleRedirectOrDisplayQrCode.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentNextActionSwishHandleRedirectOrDisplayQrCode : StripeEntity { @@ -10,6 +13,9 @@ public class PaymentIntentNextActionSwishHandleRedirectOrDisplayQrCode : StripeE /// code. /// [JsonProperty("hosted_instructions_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("hosted_instructions_url")] +#endif public string HostedInstructionsUrl { get; set; } /// @@ -17,9 +23,15 @@ public class PaymentIntentNextActionSwishHandleRedirectOrDisplayQrCode : StripeE /// available in standard API requests). /// [JsonProperty("mobile_auth_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mobile_auth_url")] +#endif public string MobileAuthUrl { get; set; } [JsonProperty("qr_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("qr_code")] +#endif public PaymentIntentNextActionSwishHandleRedirectOrDisplayQrCodeQrCode QrCode { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionSwishHandleRedirectOrDisplayQrCodeQrCode.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionSwishHandleRedirectOrDisplayQrCodeQrCode.cs index 6b4913ec4a..ae0ef3aa23 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionSwishHandleRedirectOrDisplayQrCodeQrCode.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionSwishHandleRedirectOrDisplayQrCodeQrCode.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentNextActionSwishHandleRedirectOrDisplayQrCodeQrCode : StripeEntity { @@ -10,18 +13,27 @@ public class PaymentIntentNextActionSwishHandleRedirectOrDisplayQrCodeQrCode : S /// library. /// [JsonProperty("data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("data")] +#endif public string Data { get; set; } /// /// The image_url_png string used to render QR code. /// [JsonProperty("image_url_png")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("image_url_png")] +#endif public string ImageUrlPng { get; set; } /// /// The image_url_svg string used to render QR code. /// [JsonProperty("image_url_svg")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("image_url_svg")] +#endif public string ImageUrlSvg { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionVerifyWithMicrodeposits.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionVerifyWithMicrodeposits.cs index 840e132312..a700bd6aa7 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionVerifyWithMicrodeposits.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionVerifyWithMicrodeposits.cs @@ -4,6 +4,9 @@ namespace Stripe using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentNextActionVerifyWithMicrodeposits : StripeEntity { @@ -12,6 +15,10 @@ public class PaymentIntentNextActionVerifyWithMicrodeposits : StripeEntity [JsonProperty("arrival_date")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("arrival_date")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime ArrivalDate { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -19,6 +26,9 @@ public class PaymentIntentNextActionVerifyWithMicrodeposits : StripeEntity [JsonProperty("hosted_verification_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("hosted_verification_url")] +#endif public string HostedVerificationUrl { get; set; } /// @@ -27,6 +37,9 @@ public class PaymentIntentNextActionVerifyWithMicrodeposits : StripeEntityamounts, or descriptor_code. /// [JsonProperty("microdeposit_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("microdeposit_type")] +#endif public string MicrodepositType { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionWechatPayDisplayQrCode.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionWechatPayDisplayQrCode.cs index 34b5eb0b5c..c9462a59f0 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionWechatPayDisplayQrCode.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionWechatPayDisplayQrCode.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentNextActionWechatPayDisplayQrCode : StripeEntity { @@ -9,6 +12,9 @@ public class PaymentIntentNextActionWechatPayDisplayQrCode : StripeEntity [JsonProperty("data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("data")] +#endif public string Data { get; set; } /// @@ -16,24 +22,36 @@ public class PaymentIntentNextActionWechatPayDisplayQrCode : StripeEntity [JsonProperty("hosted_instructions_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("hosted_instructions_url")] +#endif public string HostedInstructionsUrl { get; set; } /// /// The base64 image data for a pre-generated QR code. /// [JsonProperty("image_data_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("image_data_url")] +#endif public string ImageDataUrl { get; set; } /// /// The image_url_png string used to render QR code. /// [JsonProperty("image_url_png")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("image_url_png")] +#endif public string ImageUrlPng { get; set; } /// /// The image_url_svg string used to render QR code. /// [JsonProperty("image_url_svg")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("image_url_svg")] +#endif public string ImageUrlSvg { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionWechatPayRedirectToAndroidApp.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionWechatPayRedirectToAndroidApp.cs index 79b9697d7c..96a864edde 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionWechatPayRedirectToAndroidApp.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionWechatPayRedirectToAndroidApp.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentNextActionWechatPayRedirectToAndroidApp : StripeEntity { @@ -9,42 +12,63 @@ public class PaymentIntentNextActionWechatPayRedirectToAndroidApp : StripeEntity /// app_id is the APP ID registered on WeChat open platform. /// [JsonProperty("app_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("app_id")] +#endif public string AppId { get; set; } /// /// nonce_str is a random string. /// [JsonProperty("nonce_str")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("nonce_str")] +#endif public string NonceStr { get; set; } /// /// package is static value. /// [JsonProperty("package")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("package")] +#endif public string Package { get; set; } /// /// an unique merchant ID assigned by WeChat Pay. /// [JsonProperty("partner_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("partner_id")] +#endif public string PartnerId { get; set; } /// /// an unique trading ID assigned by WeChat Pay. /// [JsonProperty("prepay_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("prepay_id")] +#endif public string PrepayId { get; set; } /// /// A signature. /// [JsonProperty("sign")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sign")] +#endif public string Sign { get; set; } /// /// Specifies the current time in epoch format. /// [JsonProperty("timestamp")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("timestamp")] +#endif public string Timestamp { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionWechatPayRedirectToIosApp.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionWechatPayRedirectToIosApp.cs index 9d9646d9ab..d80371504d 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionWechatPayRedirectToIosApp.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionWechatPayRedirectToIosApp.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentNextActionWechatPayRedirectToIosApp : StripeEntity { @@ -9,6 +12,9 @@ public class PaymentIntentNextActionWechatPayRedirectToIosApp : StripeEntity [JsonProperty("native_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("native_url")] +#endif public string NativeUrl { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodConfigurationDetails.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodConfigurationDetails.cs index 643941f98e..43d5e7c80b 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodConfigurationDetails.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodConfigurationDetails.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodConfigurationDetails : StripeEntity, IHasId { @@ -9,12 +12,18 @@ public class PaymentIntentPaymentMethodConfigurationDetails : StripeEntity [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// ID of the parent payment method configuration used. /// [JsonProperty("parent")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("parent")] +#endif public string Parent { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptions.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptions.cs index 7221ed12d2..fa7cd403ee 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptions.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptions.cs @@ -2,142 +2,280 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptions : StripeEntity { [JsonProperty("acss_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("acss_debit")] +#endif public PaymentIntentPaymentMethodOptionsAcssDebit AcssDebit { get; set; } [JsonProperty("affirm")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("affirm")] +#endif public PaymentIntentPaymentMethodOptionsAffirm Affirm { get; set; } [JsonProperty("afterpay_clearpay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("afterpay_clearpay")] +#endif public PaymentIntentPaymentMethodOptionsAfterpayClearpay AfterpayClearpay { get; set; } [JsonProperty("alipay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("alipay")] +#endif public PaymentIntentPaymentMethodOptionsAlipay Alipay { get; set; } [JsonProperty("alma")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("alma")] +#endif public PaymentIntentPaymentMethodOptionsAlma Alma { get; set; } [JsonProperty("amazon_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amazon_pay")] +#endif public PaymentIntentPaymentMethodOptionsAmazonPay AmazonPay { get; set; } [JsonProperty("au_becs_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("au_becs_debit")] +#endif public PaymentIntentPaymentMethodOptionsAuBecsDebit AuBecsDebit { get; set; } [JsonProperty("bacs_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bacs_debit")] +#endif public PaymentIntentPaymentMethodOptionsBacsDebit BacsDebit { get; set; } [JsonProperty("bancontact")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bancontact")] +#endif public PaymentIntentPaymentMethodOptionsBancontact Bancontact { get; set; } [JsonProperty("blik")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("blik")] +#endif public PaymentIntentPaymentMethodOptionsBlik Blik { get; set; } [JsonProperty("boleto")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("boleto")] +#endif public PaymentIntentPaymentMethodOptionsBoleto Boleto { get; set; } [JsonProperty("card")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card")] +#endif public PaymentIntentPaymentMethodOptionsCard Card { get; set; } [JsonProperty("card_present")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card_present")] +#endif public PaymentIntentPaymentMethodOptionsCardPresent CardPresent { get; set; } [JsonProperty("cashapp")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cashapp")] +#endif public PaymentIntentPaymentMethodOptionsCashapp Cashapp { get; set; } [JsonProperty("customer_balance")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_balance")] +#endif public PaymentIntentPaymentMethodOptionsCustomerBalance CustomerBalance { get; set; } [JsonProperty("eps")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("eps")] +#endif public PaymentIntentPaymentMethodOptionsEps Eps { get; set; } [JsonProperty("fpx")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fpx")] +#endif public PaymentIntentPaymentMethodOptionsFpx Fpx { get; set; } [JsonProperty("giropay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("giropay")] +#endif public PaymentIntentPaymentMethodOptionsGiropay Giropay { get; set; } [JsonProperty("grabpay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("grabpay")] +#endif public PaymentIntentPaymentMethodOptionsGrabpay Grabpay { get; set; } [JsonProperty("ideal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ideal")] +#endif public PaymentIntentPaymentMethodOptionsIdeal Ideal { get; set; } [JsonProperty("interac_present")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interac_present")] +#endif public PaymentIntentPaymentMethodOptionsInteracPresent InteracPresent { get; set; } [JsonProperty("kakao_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("kakao_pay")] +#endif public PaymentIntentPaymentMethodOptionsKakaoPay KakaoPay { get; set; } [JsonProperty("klarna")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("klarna")] +#endif public PaymentIntentPaymentMethodOptionsKlarna Klarna { get; set; } [JsonProperty("konbini")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("konbini")] +#endif public PaymentIntentPaymentMethodOptionsKonbini Konbini { get; set; } [JsonProperty("kr_card")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("kr_card")] +#endif public PaymentIntentPaymentMethodOptionsKrCard KrCard { get; set; } [JsonProperty("link")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("link")] +#endif public PaymentIntentPaymentMethodOptionsLink Link { get; set; } [JsonProperty("mobilepay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mobilepay")] +#endif public PaymentIntentPaymentMethodOptionsMobilepay Mobilepay { get; set; } [JsonProperty("multibanco")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("multibanco")] +#endif public PaymentIntentPaymentMethodOptionsMultibanco Multibanco { get; set; } [JsonProperty("naver_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("naver_pay")] +#endif public PaymentIntentPaymentMethodOptionsNaverPay NaverPay { get; set; } [JsonProperty("oxxo")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("oxxo")] +#endif public PaymentIntentPaymentMethodOptionsOxxo Oxxo { get; set; } [JsonProperty("p24")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("p24")] +#endif public PaymentIntentPaymentMethodOptionsP24 P24 { get; set; } [JsonProperty("payco")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payco")] +#endif public PaymentIntentPaymentMethodOptionsPayco Payco { get; set; } [JsonProperty("paynow")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("paynow")] +#endif public PaymentIntentPaymentMethodOptionsPaynow Paynow { get; set; } [JsonProperty("paypal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("paypal")] +#endif public PaymentIntentPaymentMethodOptionsPaypal Paypal { get; set; } [JsonProperty("pix")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("pix")] +#endif public PaymentIntentPaymentMethodOptionsPix Pix { get; set; } [JsonProperty("promptpay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("promptpay")] +#endif public PaymentIntentPaymentMethodOptionsPromptpay Promptpay { get; set; } [JsonProperty("revolut_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("revolut_pay")] +#endif public PaymentIntentPaymentMethodOptionsRevolutPay RevolutPay { get; set; } [JsonProperty("samsung_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("samsung_pay")] +#endif public PaymentIntentPaymentMethodOptionsSamsungPay SamsungPay { get; set; } [JsonProperty("sepa_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sepa_debit")] +#endif public PaymentIntentPaymentMethodOptionsSepaDebit SepaDebit { get; set; } [JsonProperty("sofort")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sofort")] +#endif public PaymentIntentPaymentMethodOptionsSofort Sofort { get; set; } [JsonProperty("swish")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("swish")] +#endif public PaymentIntentPaymentMethodOptionsSwish Swish { get; set; } [JsonProperty("twint")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("twint")] +#endif public PaymentIntentPaymentMethodOptionsTwint Twint { get; set; } [JsonProperty("us_bank_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("us_bank_account")] +#endif public PaymentIntentPaymentMethodOptionsUsBankAccount UsBankAccount { get; set; } [JsonProperty("wechat_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("wechat_pay")] +#endif public PaymentIntentPaymentMethodOptionsWechatPay WechatPay { get; set; } [JsonProperty("zip")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("zip")] +#endif public PaymentIntentPaymentMethodOptionsZip Zip { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsAcssDebit.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsAcssDebit.cs index 90ae84a25b..5132b801e9 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsAcssDebit.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsAcssDebit.cs @@ -2,10 +2,16 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsAcssDebit : StripeEntity { [JsonProperty("mandate_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mandate_options")] +#endif public PaymentIntentPaymentMethodOptionsAcssDebitMandateOptions MandateOptions { get; set; } /// @@ -30,6 +36,9 @@ public class PaymentIntentPaymentMethodOptionsAcssDebit : StripeEntitynone, off_session, or on_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } /// @@ -37,6 +46,9 @@ public class PaymentIntentPaymentMethodOptionsAcssDebit : StripeEntityautomatic, instant, or microdeposits. /// [JsonProperty("verification_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("verification_method")] +#endif public string VerificationMethod { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsAcssDebitMandateOptions.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsAcssDebitMandateOptions.cs index 585d1d9213..eac840c40a 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsAcssDebitMandateOptions.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsAcssDebitMandateOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsAcssDebitMandateOptions : StripeEntity { @@ -9,6 +12,9 @@ public class PaymentIntentPaymentMethodOptionsAcssDebitMandateOptions : StripeEn /// A URL for custom mandate text. /// [JsonProperty("custom_mandate_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("custom_mandate_url")] +#endif public string CustomMandateUrl { get; set; } /// @@ -16,6 +22,9 @@ public class PaymentIntentPaymentMethodOptionsAcssDebitMandateOptions : StripeEn /// 'interval' or 'combined'. /// [JsonProperty("interval_description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interval_description")] +#endif public string IntervalDescription { get; set; } /// @@ -23,6 +32,9 @@ public class PaymentIntentPaymentMethodOptionsAcssDebitMandateOptions : StripeEn /// One of: combined, interval, or sporadic. /// [JsonProperty("payment_schedule")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_schedule")] +#endif public string PaymentSchedule { get; set; } /// @@ -30,6 +42,9 @@ public class PaymentIntentPaymentMethodOptionsAcssDebitMandateOptions : StripeEn /// One of: business, or personal. /// [JsonProperty("transaction_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transaction_type")] +#endif public string TransactionType { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsAffirm.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsAffirm.cs index 845cce12e2..6979e6803c 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsAffirm.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsAffirm.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsAffirm : StripeEntity { @@ -9,12 +12,18 @@ public class PaymentIntentPaymentMethodOptionsAffirm : StripeEntity [JsonProperty("capture_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("capture_method")] +#endif public string CaptureMethod { get; set; } /// /// Preferred language of the Affirm authorization page that the customer is redirected to. /// [JsonProperty("preferred_locale")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preferred_locale")] +#endif public string PreferredLocale { get; set; } /// @@ -38,6 +47,9 @@ public class PaymentIntentPaymentMethodOptionsAffirm : StripeEntitySCA. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsAfterpayClearpay.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsAfterpayClearpay.cs index 7d54c84c17..3d6cec1cea 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsAfterpayClearpay.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsAfterpayClearpay.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsAfterpayClearpay : StripeEntity { @@ -9,6 +12,9 @@ public class PaymentIntentPaymentMethodOptionsAfterpayClearpay : StripeEntity [JsonProperty("capture_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("capture_method")] +#endif public string CaptureMethod { get; set; } /// @@ -17,6 +23,9 @@ public class PaymentIntentPaymentMethodOptionsAfterpayClearpay : StripeEntity [JsonProperty("reference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reference")] +#endif public string Reference { get; set; } /// @@ -40,6 +49,9 @@ public class PaymentIntentPaymentMethodOptionsAfterpayClearpay : StripeEntitySCA. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsAlipay.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsAlipay.cs index d0873e7f8d..6148e5eb68 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsAlipay.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsAlipay.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsAlipay : StripeEntity { @@ -27,6 +30,9 @@ public class PaymentIntentPaymentMethodOptionsAlipay : StripeEntitynone, or off_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsAlma.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsAlma.cs index 926e793941..645a9e0f99 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsAlma.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsAlma.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsAlma : StripeEntity { @@ -9,6 +12,9 @@ public class PaymentIntentPaymentMethodOptionsAlma : StripeEntity [JsonProperty("capture_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("capture_method")] +#endif public string CaptureMethod { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsAmazonPay.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsAmazonPay.cs index b302aeb174..ad1df7b523 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsAmazonPay.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsAmazonPay.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsAmazonPay : StripeEntity { @@ -9,6 +12,9 @@ public class PaymentIntentPaymentMethodOptionsAmazonPay : StripeEntity [JsonProperty("capture_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("capture_method")] +#endif public string CaptureMethod { get; set; } /// @@ -33,6 +39,9 @@ public class PaymentIntentPaymentMethodOptionsAmazonPay : StripeEntitynone, or off_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsAuBecsDebit.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsAuBecsDebit.cs index a61644b1a7..e3a6f14b63 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsAuBecsDebit.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsAuBecsDebit.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsAuBecsDebit : StripeEntity { @@ -27,6 +30,9 @@ public class PaymentIntentPaymentMethodOptionsAuBecsDebit : StripeEntitynone, off_session, or on_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsBacsDebit.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsBacsDebit.cs index 9b9238b029..a09db51018 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsBacsDebit.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsBacsDebit.cs @@ -2,10 +2,16 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsBacsDebit : StripeEntity { [JsonProperty("mandate_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mandate_options")] +#endif public PaymentIntentPaymentMethodOptionsBacsDebitMandateOptions MandateOptions { get; set; } /// @@ -30,6 +36,9 @@ public class PaymentIntentPaymentMethodOptionsBacsDebit : StripeEntitynone, off_session, or on_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsBancontact.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsBancontact.cs index 082190631a..e33924053c 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsBancontact.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsBancontact.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsBancontact : StripeEntity { @@ -11,6 +14,9 @@ public class PaymentIntentPaymentMethodOptionsBancontact : StripeEntityde, en, fr, or nl. /// [JsonProperty("preferred_language")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preferred_language")] +#endif public string PreferredLanguage { get; set; } /// @@ -35,6 +41,9 @@ public class PaymentIntentPaymentMethodOptionsBancontact : StripeEntitynone, or off_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsBlik.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsBlik.cs index aec18b109c..33a68a9981 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsBlik.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsBlik.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsBlik : StripeEntity { @@ -26,6 +29,9 @@ public class PaymentIntentPaymentMethodOptionsBlik : StripeEntitySCA. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsBoleto.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsBoleto.cs index 451a7a59ae..82d385b5fc 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsBoleto.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsBoleto.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsBoleto : StripeEntity { @@ -11,6 +14,9 @@ public class PaymentIntentPaymentMethodOptionsBoleto : StripeEntity [JsonProperty("expires_after_days")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("expires_after_days")] +#endif public long ExpiresAfterDays { get; set; } /// @@ -35,6 +41,9 @@ public class PaymentIntentPaymentMethodOptionsBoleto : StripeEntitynone, off_session, or on_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsCard.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsCard.cs index 61350f320f..e01a76cc8a 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsCard.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsCard.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsCard : StripeEntity { @@ -9,6 +12,9 @@ public class PaymentIntentPaymentMethodOptionsCard : StripeEntity [JsonProperty("capture_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("capture_method")] +#endif public string CaptureMethod { get; set; } /// @@ -18,12 +24,18 @@ public class PaymentIntentPaymentMethodOptionsCard : StripeEntityinstallments integration guide. /// [JsonProperty("installments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("installments")] +#endif public PaymentIntentPaymentMethodOptionsCardInstallments Installments { get; set; } /// /// Configuration options for setting up an eMandate for cards issued in India. /// [JsonProperty("mandate_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mandate_options")] +#endif public PaymentIntentPaymentMethodOptionsCardMandateOptions MandateOptions { get; set; } /// @@ -34,6 +46,9 @@ public class PaymentIntentPaymentMethodOptionsCard : StripeEntitymastercard, unionpay, unknown, or visa. /// [JsonProperty("network")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("network")] +#endif public string Network { get; set; } /// @@ -43,6 +58,9 @@ public class PaymentIntentPaymentMethodOptionsCard : StripeEntityif_available, or never. /// [JsonProperty("request_extended_authorization")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("request_extended_authorization")] +#endif public string RequestExtendedAuthorization { get; set; } /// @@ -52,6 +70,9 @@ public class PaymentIntentPaymentMethodOptionsCard : StripeEntityif_available, or never. /// [JsonProperty("request_incremental_authorization")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("request_incremental_authorization")] +#endif public string RequestIncrementalAuthorization { get; set; } /// @@ -60,6 +81,9 @@ public class PaymentIntentPaymentMethodOptionsCard : StripeEntityif_available, or never. /// [JsonProperty("request_multicapture")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("request_multicapture")] +#endif public string RequestMulticapture { get; set; } /// @@ -69,6 +93,9 @@ public class PaymentIntentPaymentMethodOptionsCard : StripeEntityif_available, or never. /// [JsonProperty("request_overcapture")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("request_overcapture")] +#endif public string RequestOvercapture { get; set; } /// @@ -84,6 +111,9 @@ public class PaymentIntentPaymentMethodOptionsCard : StripeEntityany, automatic, or challenge. /// [JsonProperty("request_three_d_secure")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("request_three_d_secure")] +#endif public string RequestThreeDSecure { get; set; } /// @@ -91,6 +121,9 @@ public class PaymentIntentPaymentMethodOptionsCard : StripeEntity [JsonProperty("require_cvc_recollection")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("require_cvc_recollection")] +#endif public bool RequireCvcRecollection { get; set; } /// @@ -115,6 +148,9 @@ public class PaymentIntentPaymentMethodOptionsCard : StripeEntitynone, off_session, or on_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } /// @@ -125,6 +161,9 @@ public class PaymentIntentPaymentMethodOptionsCard : StripeEntity [JsonProperty("statement_descriptor_suffix_kana")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("statement_descriptor_suffix_kana")] +#endif public string StatementDescriptorSuffixKana { get; set; } /// @@ -135,6 +174,9 @@ public class PaymentIntentPaymentMethodOptionsCard : StripeEntity [JsonProperty("statement_descriptor_suffix_kanji")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("statement_descriptor_suffix_kanji")] +#endif public string StatementDescriptorSuffixKanji { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsCardInstallments.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsCardInstallments.cs index 53f04dc5da..3d6c4f99ff 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsCardInstallments.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsCardInstallments.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsCardInstallments : StripeEntity { @@ -10,18 +13,27 @@ public class PaymentIntentPaymentMethodOptionsCardInstallments : StripeEntity [JsonProperty("available_plans")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("available_plans")] +#endif public List AvailablePlans { get; set; } /// /// Whether Installments are enabled for this PaymentIntent. /// [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool Enabled { get; set; } /// /// Installment plan selected for this PaymentIntent. /// [JsonProperty("plan")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("plan")] +#endif public PaymentIntentPaymentMethodOptionsCardInstallmentsPlan Plan { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsCardInstallmentsPlan.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsCardInstallmentsPlan.cs index 852e8d202b..de3110f078 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsCardInstallmentsPlan.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsCardInstallmentsPlan.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsCardInstallmentsPlan : StripeEntity { @@ -10,6 +13,9 @@ public class PaymentIntentPaymentMethodOptionsCardInstallmentsPlan : StripeEntit /// your customer will make to their credit card. /// [JsonProperty("count")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("count")] +#endif public long? Count { get; set; } /// @@ -17,12 +23,18 @@ public class PaymentIntentPaymentMethodOptionsCardInstallmentsPlan : StripeEntit /// payments your customer will make to their credit card. One of month. /// [JsonProperty("interval")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interval")] +#endif public string Interval { get; set; } /// /// Type of installment plan, one of fixed_count. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsCardMandateOptions.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsCardMandateOptions.cs index effa74b2f2..b07ca03e66 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsCardMandateOptions.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsCardMandateOptions.cs @@ -5,6 +5,9 @@ namespace Stripe using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsCardMandateOptions : StripeEntity { @@ -12,6 +15,9 @@ public class PaymentIntentPaymentMethodOptionsCardMandateOptions : StripeEntity< /// Amount to be charged for future payments. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long Amount { get; set; } /// @@ -21,6 +27,9 @@ public class PaymentIntentPaymentMethodOptionsCardMandateOptions : StripeEntity< /// One of: fixed, or maximum. /// [JsonProperty("amount_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_type")] +#endif public string AmountType { get; set; } /// @@ -28,6 +37,9 @@ public class PaymentIntentPaymentMethodOptionsCardMandateOptions : StripeEntity< /// customer. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// @@ -36,6 +48,10 @@ public class PaymentIntentPaymentMethodOptionsCardMandateOptions : StripeEntity< /// [JsonProperty("end_date")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("end_date")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? EndDate { get; set; } /// @@ -44,6 +60,9 @@ public class PaymentIntentPaymentMethodOptionsCardMandateOptions : StripeEntity< /// One of: day, month, sporadic, week, or year. /// [JsonProperty("interval")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interval")] +#endif public string Interval { get; set; } /// @@ -53,12 +72,18 @@ public class PaymentIntentPaymentMethodOptionsCardMandateOptions : StripeEntity< /// interval=sporadic. /// [JsonProperty("interval_count")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interval_count")] +#endif public long? IntervalCount { get; set; } /// /// Unique identifier for the mandate or subscription. /// [JsonProperty("reference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reference")] +#endif public string Reference { get; set; } /// @@ -67,12 +92,19 @@ public class PaymentIntentPaymentMethodOptionsCardMandateOptions : StripeEntity< /// [JsonProperty("start_date")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("start_date")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime StartDate { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// /// Specifies the type of mandates supported. Possible values are india. /// [JsonProperty("supported_types")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("supported_types")] +#endif public List SupportedTypes { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsCardPresent.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsCardPresent.cs index 3ea1aa171f..9b2e8a7856 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsCardPresent.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsCardPresent.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsCardPresent : StripeEntity { @@ -11,6 +14,9 @@ public class PaymentIntentPaymentMethodOptionsCardPresent : StripeEntity. /// [JsonProperty("request_extended_authorization")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("request_extended_authorization")] +#endif public bool? RequestExtendedAuthorization { get; set; } /// @@ -22,9 +28,15 @@ public class PaymentIntentPaymentMethodOptionsCardPresent : StripeEntity [JsonProperty("request_incremental_authorization_support")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("request_incremental_authorization_support")] +#endif public bool? RequestIncrementalAuthorizationSupport { get; set; } [JsonProperty("routing")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("routing")] +#endif public PaymentIntentPaymentMethodOptionsCardPresentRouting Routing { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsCardPresentRouting.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsCardPresentRouting.cs index d17acb5c8c..71ed112e7e 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsCardPresentRouting.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsCardPresentRouting.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsCardPresentRouting : StripeEntity { @@ -10,6 +13,9 @@ public class PaymentIntentPaymentMethodOptionsCardPresentRouting : StripeEntity< /// One of: domestic, or international. /// [JsonProperty("requested_priority")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested_priority")] +#endif public string RequestedPriority { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsCashapp.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsCashapp.cs index 9f8dfa2d90..07f79a3338 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsCashapp.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsCashapp.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsCashapp : StripeEntity { @@ -9,6 +12,9 @@ public class PaymentIntentPaymentMethodOptionsCashapp : StripeEntity [JsonProperty("capture_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("capture_method")] +#endif public string CaptureMethod { get; set; } /// @@ -33,6 +39,9 @@ public class PaymentIntentPaymentMethodOptionsCashapp : StripeEntitynone, off_session, or on_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsCustomerBalance.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsCustomerBalance.cs index 2c6a157fbd..555901072a 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsCustomerBalance.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsCustomerBalance.cs @@ -2,10 +2,16 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsCustomerBalance : StripeEntity { [JsonProperty("bank_transfer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_transfer")] +#endif public PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransfer BankTransfer { get; set; } /// @@ -13,6 +19,9 @@ public class PaymentIntentPaymentMethodOptionsCustomerBalance : StripeEntitybank_transfer. /// [JsonProperty("funding_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("funding_type")] +#endif public string FundingType { get; set; } /// @@ -36,6 +45,9 @@ public class PaymentIntentPaymentMethodOptionsCustomerBalance : StripeEntitySCA. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransfer.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransfer.cs index aebb972ce0..38c8085ce4 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransfer.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransfer.cs @@ -3,10 +3,16 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransfer : StripeEntity { [JsonProperty("eu_bank_transfer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("eu_bank_transfer")] +#endif public PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer EuBankTransfer { get; set; } /// @@ -18,6 +24,9 @@ public class PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransfer : Stri /// swift, or zengin. /// [JsonProperty("requested_address_types")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested_address_types")] +#endif public List RequestedAddressTypes { get; set; } /// @@ -28,6 +37,9 @@ public class PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransfer : Stri /// mx_bank_transfer, or us_bank_transfer. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer.cs index 45d2b53080..99c36c9f93 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer : StripeEntity { @@ -11,6 +14,9 @@ public class PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferEuBankT /// One of: BE, DE, ES, FR, IE, or NL. /// [JsonProperty("country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country")] +#endif public string Country { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsEps.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsEps.cs index e68ea4787e..9160ac4b54 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsEps.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsEps.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsEps : StripeEntity { @@ -26,6 +29,9 @@ public class PaymentIntentPaymentMethodOptionsEps : StripeEntitySCA. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsFpx.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsFpx.cs index ee7f0a4e39..c86399d0ad 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsFpx.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsFpx.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsFpx : StripeEntity { @@ -26,6 +29,9 @@ public class PaymentIntentPaymentMethodOptionsFpx : StripeEntitySCA. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsGiropay.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsGiropay.cs index 2cb5c75bd4..2f5ac2a730 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsGiropay.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsGiropay.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsGiropay : StripeEntity { @@ -26,6 +29,9 @@ public class PaymentIntentPaymentMethodOptionsGiropay : StripeEntitySCA. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsGrabpay.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsGrabpay.cs index b7ef9626f4..0585d07254 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsGrabpay.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsGrabpay.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsGrabpay : StripeEntity { @@ -26,6 +29,9 @@ public class PaymentIntentPaymentMethodOptionsGrabpay : StripeEntitySCA. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsIdeal.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsIdeal.cs index 10851f2806..c30a8dbc28 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsIdeal.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsIdeal.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsIdeal : StripeEntity { @@ -27,6 +30,9 @@ public class PaymentIntentPaymentMethodOptionsIdeal : StripeEntitynone, or off_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsKakaoPay.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsKakaoPay.cs index 2000e9e9fe..7e7263b622 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsKakaoPay.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsKakaoPay.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsKakaoPay : StripeEntity { @@ -9,6 +12,9 @@ public class PaymentIntentPaymentMethodOptionsKakaoPay : StripeEntity [JsonProperty("capture_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("capture_method")] +#endif public string CaptureMethod { get; set; } /// @@ -33,6 +39,9 @@ public class PaymentIntentPaymentMethodOptionsKakaoPay : StripeEntitynone, or off_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsKlarna.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsKlarna.cs index 835fd13676..ddf6088eb2 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsKlarna.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsKlarna.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsKlarna : StripeEntity { @@ -9,12 +12,18 @@ public class PaymentIntentPaymentMethodOptionsKlarna : StripeEntity [JsonProperty("capture_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("capture_method")] +#endif public string CaptureMethod { get; set; } /// /// Preferred locale of the Klarna checkout page that the customer is redirected to. /// [JsonProperty("preferred_locale")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preferred_locale")] +#endif public string PreferredLocale { get; set; } /// @@ -38,6 +47,9 @@ public class PaymentIntentPaymentMethodOptionsKlarna : StripeEntitySCA. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsKonbini.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsKonbini.cs index 077df77ed6..6197abf63d 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsKonbini.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsKonbini.cs @@ -4,6 +4,9 @@ namespace Stripe using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsKonbini : StripeEntity { @@ -12,6 +15,9 @@ public class PaymentIntentPaymentMethodOptionsKonbini : StripeEntity [JsonProperty("confirmation_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("confirmation_number")] +#endif public string ConfirmationNumber { get; set; } /// @@ -21,6 +27,9 @@ public class PaymentIntentPaymentMethodOptionsKonbini : StripeEntity [JsonProperty("expires_after_days")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("expires_after_days")] +#endif public long? ExpiresAfterDays { get; set; } /// @@ -29,6 +38,10 @@ public class PaymentIntentPaymentMethodOptionsKonbini : StripeEntity [JsonProperty("expires_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("expires_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? ExpiresAt { get; set; } /// @@ -36,6 +49,9 @@ public class PaymentIntentPaymentMethodOptionsKonbini : StripeEntity [JsonProperty("product_description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("product_description")] +#endif public string ProductDescription { get; set; } /// @@ -59,6 +75,9 @@ public class PaymentIntentPaymentMethodOptionsKonbini : StripeEntitySCA. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsKrCard.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsKrCard.cs index 1d0eea533b..8a59603ba9 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsKrCard.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsKrCard.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsKrCard : StripeEntity { @@ -9,6 +12,9 @@ public class PaymentIntentPaymentMethodOptionsKrCard : StripeEntity [JsonProperty("capture_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("capture_method")] +#endif public string CaptureMethod { get; set; } /// @@ -33,6 +39,9 @@ public class PaymentIntentPaymentMethodOptionsKrCard : StripeEntitynone, or off_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsLink.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsLink.cs index 2f552792f7..28f32265dd 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsLink.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsLink.cs @@ -3,6 +3,9 @@ namespace Stripe { using System; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsLink : StripeEntity { @@ -10,6 +13,9 @@ public class PaymentIntentPaymentMethodOptionsLink : StripeEntity [JsonProperty("capture_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("capture_method")] +#endif public string CaptureMethod { get; set; } /// @@ -17,6 +23,9 @@ public class PaymentIntentPaymentMethodOptionsLink : StripeEntity [Obsolete("This property is deprecated, please refer to the description for details.")] [JsonProperty("persistent_token")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("persistent_token")] +#endif public string PersistentToken { get; set; } /// @@ -41,6 +50,9 @@ public class PaymentIntentPaymentMethodOptionsLink : StripeEntitynone, or off_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsMobilepay.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsMobilepay.cs index 2601f6af4b..ff2823972d 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsMobilepay.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsMobilepay.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsMobilepay : StripeEntity { @@ -9,6 +12,9 @@ public class PaymentIntentPaymentMethodOptionsMobilepay : StripeEntity [JsonProperty("capture_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("capture_method")] +#endif public string CaptureMethod { get; set; } /// @@ -32,6 +38,9 @@ public class PaymentIntentPaymentMethodOptionsMobilepay : StripeEntitySCA. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsMultibanco.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsMultibanco.cs index 55188afe92..466a0ed420 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsMultibanco.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsMultibanco.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsMultibanco : StripeEntity { @@ -26,6 +29,9 @@ public class PaymentIntentPaymentMethodOptionsMultibanco : StripeEntitySCA. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsNaverPay.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsNaverPay.cs index f6ab814155..a4d3d3824a 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsNaverPay.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsNaverPay.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsNaverPay : StripeEntity { @@ -9,6 +12,9 @@ public class PaymentIntentPaymentMethodOptionsNaverPay : StripeEntity [JsonProperty("capture_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("capture_method")] +#endif public string CaptureMethod { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsOxxo.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsOxxo.cs index 8893869269..612371c332 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsOxxo.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsOxxo.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsOxxo : StripeEntity { @@ -11,6 +14,9 @@ public class PaymentIntentPaymentMethodOptionsOxxo : StripeEntity [JsonProperty("expires_after_days")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("expires_after_days")] +#endif public long ExpiresAfterDays { get; set; } /// @@ -34,6 +40,9 @@ public class PaymentIntentPaymentMethodOptionsOxxo : StripeEntitySCA. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsP24.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsP24.cs index 0fc8a39d34..c60869a7fa 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsP24.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsP24.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsP24 : StripeEntity { @@ -26,6 +29,9 @@ public class PaymentIntentPaymentMethodOptionsP24 : StripeEntitySCA. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsPayco.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsPayco.cs index 3f1ddf4552..4c58bb71d9 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsPayco.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsPayco.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsPayco : StripeEntity { @@ -9,6 +12,9 @@ public class PaymentIntentPaymentMethodOptionsPayco : StripeEntity [JsonProperty("capture_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("capture_method")] +#endif public string CaptureMethod { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsPaynow.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsPaynow.cs index 10142f6fea..daa001c642 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsPaynow.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsPaynow.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsPaynow : StripeEntity { @@ -26,6 +29,9 @@ public class PaymentIntentPaymentMethodOptionsPaynow : StripeEntitySCA. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsPaypal.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsPaypal.cs index 5d846d1a3c..060c15b26e 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsPaypal.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsPaypal.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsPaypal : StripeEntity { @@ -9,12 +12,18 @@ public class PaymentIntentPaymentMethodOptionsPaypal : StripeEntity [JsonProperty("capture_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("capture_method")] +#endif public string CaptureMethod { get; set; } /// /// Preferred locale of the PayPal checkout page that the customer is redirected to. /// [JsonProperty("preferred_locale")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preferred_locale")] +#endif public string PreferredLocale { get; set; } /// @@ -23,6 +32,9 @@ public class PaymentIntentPaymentMethodOptionsPaypal : StripeEntity [JsonProperty("reference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reference")] +#endif public string Reference { get; set; } /// @@ -47,6 +59,9 @@ public class PaymentIntentPaymentMethodOptionsPaypal : StripeEntitynone, or off_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsPix.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsPix.cs index c77aee6c61..5f5d66e9e4 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsPix.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsPix.cs @@ -4,6 +4,9 @@ namespace Stripe using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsPix : StripeEntity { @@ -11,6 +14,9 @@ public class PaymentIntentPaymentMethodOptionsPix : StripeEntity [JsonProperty("expires_after_seconds")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("expires_after_seconds")] +#endif public long? ExpiresAfterSeconds { get; set; } /// @@ -18,6 +24,10 @@ public class PaymentIntentPaymentMethodOptionsPix : StripeEntity [JsonProperty("expires_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("expires_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? ExpiresAt { get; set; } /// @@ -41,6 +51,9 @@ public class PaymentIntentPaymentMethodOptionsPix : StripeEntitySCA. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsPromptpay.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsPromptpay.cs index 5541096e06..e77ad690ed 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsPromptpay.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsPromptpay.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsPromptpay : StripeEntity { @@ -26,6 +29,9 @@ public class PaymentIntentPaymentMethodOptionsPromptpay : StripeEntitySCA. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsRevolutPay.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsRevolutPay.cs index b4014f6dee..b0c345d448 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsRevolutPay.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsRevolutPay.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsRevolutPay : StripeEntity { @@ -9,6 +12,9 @@ public class PaymentIntentPaymentMethodOptionsRevolutPay : StripeEntity [JsonProperty("capture_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("capture_method")] +#endif public string CaptureMethod { get; set; } /// @@ -33,6 +39,9 @@ public class PaymentIntentPaymentMethodOptionsRevolutPay : StripeEntitynone, or off_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsSamsungPay.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsSamsungPay.cs index 11ee348fd2..3dc09c6e16 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsSamsungPay.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsSamsungPay.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsSamsungPay : StripeEntity { @@ -9,6 +12,9 @@ public class PaymentIntentPaymentMethodOptionsSamsungPay : StripeEntity [JsonProperty("capture_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("capture_method")] +#endif public string CaptureMethod { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsSepaDebit.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsSepaDebit.cs index d55f987e52..e0ed94ef54 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsSepaDebit.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsSepaDebit.cs @@ -2,10 +2,16 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsSepaDebit : StripeEntity { [JsonProperty("mandate_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mandate_options")] +#endif public PaymentIntentPaymentMethodOptionsSepaDebitMandateOptions MandateOptions { get; set; } /// @@ -30,6 +36,9 @@ public class PaymentIntentPaymentMethodOptionsSepaDebit : StripeEntitynone, off_session, or on_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsSofort.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsSofort.cs index 4d23a3ae3c..1b5a11a258 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsSofort.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsSofort.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsSofort : StripeEntity { @@ -10,6 +13,9 @@ public class PaymentIntentPaymentMethodOptionsSofort : StripeEntityde, en, es, fr, it, nl, or pl. /// [JsonProperty("preferred_language")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preferred_language")] +#endif public string PreferredLanguage { get; set; } /// @@ -34,6 +40,9 @@ public class PaymentIntentPaymentMethodOptionsSofort : StripeEntitynone, or off_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsSwish.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsSwish.cs index ef22df96b7..c92688b4e3 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsSwish.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsSwish.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsSwish : StripeEntity { @@ -9,6 +12,9 @@ public class PaymentIntentPaymentMethodOptionsSwish : StripeEntity [JsonProperty("reference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reference")] +#endif public string Reference { get; set; } /// @@ -32,6 +38,9 @@ public class PaymentIntentPaymentMethodOptionsSwish : StripeEntitySCA. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsTwint.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsTwint.cs index 6f38fa4b0e..3ea915deb2 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsTwint.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsTwint.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsTwint : StripeEntity { @@ -26,6 +29,9 @@ public class PaymentIntentPaymentMethodOptionsTwint : StripeEntitySCA. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsUsBankAccount.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsUsBankAccount.cs index 210aaed8f1..3dca7eba77 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsUsBankAccount.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsUsBankAccount.cs @@ -2,13 +2,22 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsUsBankAccount : StripeEntity { [JsonProperty("financial_connections")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("financial_connections")] +#endif public PaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnections FinancialConnections { get; set; } [JsonProperty("mandate_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mandate_options")] +#endif public PaymentIntentPaymentMethodOptionsUsBankAccountMandateOptions MandateOptions { get; set; } /// @@ -16,6 +25,9 @@ public class PaymentIntentPaymentMethodOptionsUsBankAccount : StripeEntityfastest, or standard. /// [JsonProperty("preferred_settlement_speed")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preferred_settlement_speed")] +#endif public string PreferredSettlementSpeed { get; set; } /// @@ -40,6 +52,9 @@ public class PaymentIntentPaymentMethodOptionsUsBankAccount : StripeEntitynone, off_session, or on_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } /// @@ -47,6 +62,9 @@ public class PaymentIntentPaymentMethodOptionsUsBankAccount : StripeEntityautomatic, instant, or microdeposits. /// [JsonProperty("verification_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("verification_method")] +#endif public string VerificationMethod { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnections.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnections.cs index 44c1ccdf2a..cf648d1b2b 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnections.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnections.cs @@ -3,10 +3,16 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnections : StripeEntity { [JsonProperty("filters")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("filters")] +#endif public PaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters Filters { get; set; } /// @@ -16,6 +22,9 @@ public class PaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnections /// transactions. /// [JsonProperty("permissions")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("permissions")] +#endif public List Permissions { get; set; } /// @@ -23,6 +32,9 @@ public class PaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnections /// One of: balances, ownership, or transactions. /// [JsonProperty("prefetch")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("prefetch")] +#endif public List Prefetch { get; set; } /// @@ -30,6 +42,9 @@ public class PaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnections /// user will be redirected to this URL to return to your app. /// [JsonProperty("return_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("return_url")] +#endif public string ReturnUrl { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters.cs index 32924ca145..8a90d9bdd9 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters : StripeEntity { @@ -12,6 +15,9 @@ public class PaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsF /// One of: checking, or savings. /// [JsonProperty("account_subcategories")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_subcategories")] +#endif public List AccountSubcategories { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsUsBankAccountMandateOptions.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsUsBankAccountMandateOptions.cs index 19fc4e7278..5915ad6b6c 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsUsBankAccountMandateOptions.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsUsBankAccountMandateOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsUsBankAccountMandateOptions : StripeEntity { @@ -9,6 +12,9 @@ public class PaymentIntentPaymentMethodOptionsUsBankAccountMandateOptions : Stri /// Mandate collection method. /// [JsonProperty("collection_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("collection_method")] +#endif public string CollectionMethod { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsWechatPay.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsWechatPay.cs index 1f38d69454..9aeb068bc0 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsWechatPay.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsWechatPay.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsWechatPay : StripeEntity { @@ -9,6 +12,9 @@ public class PaymentIntentPaymentMethodOptionsWechatPay : StripeEntity [JsonProperty("app_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("app_id")] +#endif public string AppId { get; set; } /// @@ -16,6 +22,9 @@ public class PaymentIntentPaymentMethodOptionsWechatPay : StripeEntityandroid, ios, or web. /// [JsonProperty("client")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("client")] +#endif public string Client { get; set; } /// @@ -39,6 +48,9 @@ public class PaymentIntentPaymentMethodOptionsWechatPay : StripeEntitySCA. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsZip.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsZip.cs index bb4b988b9f..5eabad739a 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsZip.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsZip.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsZip : StripeEntity { @@ -26,6 +29,9 @@ public class PaymentIntentPaymentMethodOptionsZip : StripeEntitySCA. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentProcessing.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentProcessing.cs index d9820daca7..96383d27e7 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentProcessing.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentProcessing.cs @@ -2,10 +2,16 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentProcessing : StripeEntity { [JsonProperty("card")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card")] +#endif public PaymentIntentProcessingCard Card { get; set; } /// @@ -13,6 +19,9 @@ public class PaymentIntentProcessing : StripeEntity /// card. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentProcessingCard.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentProcessingCard.cs index 561e1c6438..6a461be0a5 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentProcessingCard.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentProcessingCard.cs @@ -2,10 +2,16 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentProcessingCard : StripeEntity { [JsonProperty("customer_notification")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_notification")] +#endif public PaymentIntentProcessingCardCustomerNotification CustomerNotification { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentProcessingCardCustomerNotification.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentProcessingCardCustomerNotification.cs index 1382dc8af4..e7dcdff919 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentProcessingCardCustomerNotification.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentProcessingCardCustomerNotification.cs @@ -4,6 +4,9 @@ namespace Stripe using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentProcessingCardCustomerNotification : StripeEntity { @@ -13,6 +16,9 @@ public class PaymentIntentProcessingCardCustomerNotification : StripeEntity [JsonProperty("approval_requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("approval_requested")] +#endif public bool? ApprovalRequested { get; set; } /// @@ -20,6 +26,10 @@ public class PaymentIntentProcessingCardCustomerNotification : StripeEntity [JsonProperty("completes_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("completes_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? CompletesAt { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentTransferData.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentTransferData.cs index 892775bc6d..17d33ae8cb 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentTransferData.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentTransferData.cs @@ -3,7 +3,13 @@ namespace Stripe { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class PaymentIntentTransferData : StripeEntity { /// @@ -17,6 +23,9 @@ public class PaymentIntentTransferData : StripeEntity /// 99999999 for a USD charge of $999,999.99). /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long Amount { get; set; } #region Expandable Destination @@ -27,6 +36,9 @@ public class PaymentIntentTransferData : StripeEntity /// funds from the payment are transferred to after payment success. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string DestinationId { get => this.InternalDestination?.Id; @@ -41,6 +53,9 @@ public string DestinationId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Account Destination { get => this.InternalDestination?.ExpandedObject; @@ -49,6 +64,10 @@ public Account Destination [JsonProperty("destination")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("destination")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalDestination { get; set; } #endregion } diff --git a/src/Stripe.net/Entities/PaymentLinks/PaymentLink.cs b/src/Stripe.net/Entities/PaymentLinks/PaymentLink.cs index 7d5bcbff80..b8aadfaa5a 100644 --- a/src/Stripe.net/Entities/PaymentLinks/PaymentLink.cs +++ b/src/Stripe.net/Entities/PaymentLinks/PaymentLink.cs @@ -4,6 +4,9 @@ namespace Stripe using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// A payment link is a shareable URL that will take your customers to a hosted payment @@ -17,18 +20,27 @@ namespace Stripe /// /// Related guide: Payment Links API. /// +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class PaymentLink : StripeEntity, IHasId, IHasMetadata, IHasObject { /// /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// @@ -36,15 +48,24 @@ public class PaymentLink : StripeEntity, IHasId, IHasMetadata, IHas /// URL will be shown a page saying that the link has been deactivated. /// [JsonProperty("active")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("active")] +#endif public bool Active { get; set; } [JsonProperty("after_completion")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("after_completion")] +#endif public PaymentLinkAfterCompletion AfterCompletion { get; set; } /// /// Whether user redeemable promotion codes are enabled. /// [JsonProperty("allow_promotion_codes")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("allow_promotion_codes")] +#endif public bool AllowPromotionCodes { get; set; } #region Expandable Application @@ -54,6 +75,9 @@ public class PaymentLink : StripeEntity, IHasId, IHasMetadata, IHas /// The ID of the Connect application that created the Payment Link. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string ApplicationId { get => this.InternalApplication?.Id; @@ -67,6 +91,9 @@ public string ApplicationId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Application Application { get => this.InternalApplication?.ExpandedObject; @@ -75,6 +102,10 @@ public Application Application [JsonProperty("application")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("application")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalApplication { get; set; } #endregion @@ -83,6 +114,9 @@ public Application Application /// payment and transferred to the application owner's Stripe account. /// [JsonProperty("application_fee_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("application_fee_amount")] +#endif public long? ApplicationFeeAmount { get; set; } /// @@ -90,9 +124,15 @@ public Application Application /// transferred to the application owner's Stripe account. /// [JsonProperty("application_fee_percent")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("application_fee_percent")] +#endif public decimal? ApplicationFeePercent { get; set; } [JsonProperty("automatic_tax")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("automatic_tax")] +#endif public PaymentLinkAutomaticTax AutomaticTax { get; set; } /// @@ -100,12 +140,18 @@ public Application Application /// One of: auto, or required. /// [JsonProperty("billing_address_collection")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_address_collection")] +#endif public string BillingAddressCollection { get; set; } /// /// When set, provides configuration to gather active consent from customers. /// [JsonProperty("consent_collection")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("consent_collection")] +#endif public PaymentLinkConsentCollection ConsentCollection { get; set; } /// @@ -114,6 +160,9 @@ public Application Application /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// @@ -121,9 +170,15 @@ public Application Application /// are supported. /// [JsonProperty("custom_fields")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("custom_fields")] +#endif public List CustomFields { get; set; } [JsonProperty("custom_text")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("custom_text")] +#endif public PaymentLinkCustomText CustomText { get; set; } /// @@ -131,6 +186,9 @@ public Application Application /// One of: always, or if_required. /// [JsonProperty("customer_creation")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_creation")] +#endif public string CustomerCreation { get; set; } /// @@ -138,18 +196,27 @@ public Application Application /// active. /// [JsonProperty("inactive_message")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("inactive_message")] +#endif public string InactiveMessage { get; set; } /// /// Configuration for creating invoice for payment mode payment links. /// [JsonProperty("invoice_creation")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("invoice_creation")] +#endif public PaymentLinkInvoiceCreation InvoiceCreation { get; set; } /// /// The line items representing what is being sold. /// [JsonProperty("line_items")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("line_items")] +#endif public StripeList LineItems { get; set; } /// @@ -157,6 +224,9 @@ public Application Application /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// @@ -165,6 +235,9 @@ public Application Application /// object in a structured format. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } #region Expandable OnBehalfOf @@ -176,6 +249,9 @@ public Application Application /// documentation for details. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string OnBehalfOfId { get => this.InternalOnBehalfOf?.Id; @@ -191,6 +267,9 @@ public string OnBehalfOfId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Account OnBehalfOf { get => this.InternalOnBehalfOf?.ExpandedObject; @@ -199,6 +278,10 @@ public Account OnBehalfOf [JsonProperty("on_behalf_of")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("on_behalf_of")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalOnBehalfOf { get; set; } #endregion @@ -206,6 +289,9 @@ public Account OnBehalfOf /// Indicates the parameters to be passed to PaymentIntent creation during checkout. /// [JsonProperty("payment_intent_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_intent_data")] +#endif public PaymentLinkPaymentIntentData PaymentIntentData { get; set; } /// @@ -214,6 +300,9 @@ public Account OnBehalfOf /// One of: always, or if_required. /// [JsonProperty("payment_method_collection")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_collection")] +#endif public string PaymentMethodCollection { get; set; } /// @@ -230,27 +319,42 @@ public Account OnBehalfOf /// us_bank_account, wechat_pay, or zip. /// [JsonProperty("payment_method_types")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_types")] +#endif public List PaymentMethodTypes { get; set; } [JsonProperty("phone_number_collection")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("phone_number_collection")] +#endif public PaymentLinkPhoneNumberCollection PhoneNumberCollection { get; set; } /// /// Settings that restrict the usage of a payment link. /// [JsonProperty("restrictions")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("restrictions")] +#endif public PaymentLinkRestrictions Restrictions { get; set; } /// /// Configuration for collecting the customer's shipping address. /// [JsonProperty("shipping_address_collection")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping_address_collection")] +#endif public PaymentLinkShippingAddressCollection ShippingAddressCollection { get; set; } /// /// The shipping rate options applied to the session. /// [JsonProperty("shipping_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping_options")] +#endif public List ShippingOptions { get; set; } /// @@ -259,6 +363,9 @@ public Account OnBehalfOf /// One of: auto, book, donate, pay, or subscribe. /// [JsonProperty("submit_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("submit_type")] +#endif public string SubmitType { get; set; } /// @@ -266,9 +373,15 @@ public Account OnBehalfOf /// be at least one line item with a recurring price to use subscription_data. /// [JsonProperty("subscription_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("subscription_data")] +#endif public PaymentLinkSubscriptionData SubscriptionData { get; set; } [JsonProperty("tax_id_collection")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_id_collection")] +#endif public PaymentLinkTaxIdCollection TaxIdCollection { get; set; } /// @@ -276,12 +389,18 @@ public Account OnBehalfOf /// funds from each payment will be transferred to. /// [JsonProperty("transfer_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transfer_data")] +#endif public PaymentLinkTransferData TransferData { get; set; } /// /// The public URL that can be shared with customers. /// [JsonProperty("url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("url")] +#endif public string Url { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkAfterCompletion.cs b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkAfterCompletion.cs index 44d2335ad4..7f359e0a62 100644 --- a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkAfterCompletion.cs +++ b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkAfterCompletion.cs @@ -2,13 +2,22 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentLinkAfterCompletion : StripeEntity { [JsonProperty("hosted_confirmation")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("hosted_confirmation")] +#endif public PaymentLinkAfterCompletionHostedConfirmation HostedConfirmation { get; set; } [JsonProperty("redirect")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("redirect")] +#endif public PaymentLinkAfterCompletionRedirect Redirect { get; set; } /// @@ -16,6 +25,9 @@ public class PaymentLinkAfterCompletion : StripeEntityhosted_confirmation, or redirect. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkAfterCompletionHostedConfirmation.cs b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkAfterCompletionHostedConfirmation.cs index 0330bb00d6..c2ce550032 100644 --- a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkAfterCompletionHostedConfirmation.cs +++ b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkAfterCompletionHostedConfirmation.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentLinkAfterCompletionHostedConfirmation : StripeEntity { @@ -9,6 +12,9 @@ public class PaymentLinkAfterCompletionHostedConfirmation : StripeEntity [JsonProperty("custom_message")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("custom_message")] +#endif public string CustomMessage { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkAfterCompletionRedirect.cs b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkAfterCompletionRedirect.cs index f02316a335..ae8b82453c 100644 --- a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkAfterCompletionRedirect.cs +++ b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkAfterCompletionRedirect.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentLinkAfterCompletionRedirect : StripeEntity { @@ -9,6 +12,9 @@ public class PaymentLinkAfterCompletionRedirect : StripeEntity [JsonProperty("url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("url")] +#endif public string Url { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkAutomaticTax.cs b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkAutomaticTax.cs index 8847086291..1e150d786e 100644 --- a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkAutomaticTax.cs +++ b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkAutomaticTax.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentLinkAutomaticTax : StripeEntity { @@ -9,6 +12,9 @@ public class PaymentLinkAutomaticTax : StripeEntity /// If true, tax will be calculated automatically using the customer's location. /// [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool Enabled { get; set; } /// @@ -17,6 +23,9 @@ public class PaymentLinkAutomaticTax : StripeEntity /// transaction is returned in the report of the connected account. /// [JsonProperty("liability")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("liability")] +#endif public PaymentLinkAutomaticTaxLiability Liability { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkAutomaticTaxLiability.cs b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkAutomaticTaxLiability.cs index d1845cf3c9..95d27a0c2a 100644 --- a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkAutomaticTaxLiability.cs +++ b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkAutomaticTaxLiability.cs @@ -3,7 +3,13 @@ namespace Stripe { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class PaymentLinkAutomaticTaxLiability : StripeEntity { #region Expandable Account @@ -13,6 +19,9 @@ public class PaymentLinkAutomaticTaxLiability : StripeEntitytype is account. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string AccountId { get => this.InternalAccount?.Id; @@ -26,6 +35,9 @@ public string AccountId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Account Account { get => this.InternalAccount?.ExpandedObject; @@ -34,6 +46,10 @@ public Account Account [JsonProperty("account")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalAccount { get; set; } #endregion @@ -42,6 +58,9 @@ public Account Account /// One of: account, or self. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkConsentCollection.cs b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkConsentCollection.cs index 71a0bb63dc..2df18db89d 100644 --- a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkConsentCollection.cs +++ b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkConsentCollection.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentLinkConsentCollection : StripeEntity { @@ -9,6 +12,9 @@ public class PaymentLinkConsentCollection : StripeEntity [JsonProperty("payment_method_reuse_agreement")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_reuse_agreement")] +#endif public PaymentLinkConsentCollectionPaymentMethodReuseAgreement PaymentMethodReuseAgreement { get; set; } /// @@ -17,6 +23,9 @@ public class PaymentLinkConsentCollection : StripeEntityauto, or none. /// [JsonProperty("promotions")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("promotions")] +#endif public string Promotions { get; set; } /// @@ -26,6 +35,9 @@ public class PaymentLinkConsentCollection : StripeEntitynone, or required. /// [JsonProperty("terms_of_service")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("terms_of_service")] +#endif public string TermsOfService { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkConsentCollectionPaymentMethodReuseAgreement.cs b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkConsentCollectionPaymentMethodReuseAgreement.cs index a01cf0cca8..004d228638 100644 --- a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkConsentCollectionPaymentMethodReuseAgreement.cs +++ b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkConsentCollectionPaymentMethodReuseAgreement.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentLinkConsentCollectionPaymentMethodReuseAgreement : StripeEntity { @@ -14,6 +17,9 @@ public class PaymentLinkConsentCollectionPaymentMethodReuseAgreement : StripeEnt /// One of: auto, or hidden. /// [JsonProperty("position")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("position")] +#endif public string Position { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkCustomField.cs b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkCustomField.cs index d38e11e4c4..efef443791 100644 --- a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkCustomField.cs +++ b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkCustomField.cs @@ -2,10 +2,16 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentLinkCustomField : StripeEntity { [JsonProperty("dropdown")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("dropdown")] +#endif public PaymentLinkCustomFieldDropdown Dropdown { get; set; } /// @@ -13,12 +19,21 @@ public class PaymentLinkCustomField : StripeEntity /// unique to this field, alphanumeric, and up to 200 characters. /// [JsonProperty("key")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("key")] +#endif public string Key { get; set; } [JsonProperty("label")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("label")] +#endif public PaymentLinkCustomFieldLabel Label { get; set; } [JsonProperty("numeric")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("numeric")] +#endif public PaymentLinkCustomFieldNumeric Numeric { get; set; } /// @@ -26,9 +41,15 @@ public class PaymentLinkCustomField : StripeEntity /// Session. Defaults to false. /// [JsonProperty("optional")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("optional")] +#endif public bool Optional { get; set; } [JsonProperty("text")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("text")] +#endif public PaymentLinkCustomFieldText Text { get; set; } /// @@ -36,6 +57,9 @@ public class PaymentLinkCustomField : StripeEntity /// One of: dropdown, numeric, or text. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkCustomFieldDropdown.cs b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkCustomFieldDropdown.cs index d3b3f41180..3b500bc991 100644 --- a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkCustomFieldDropdown.cs +++ b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkCustomFieldDropdown.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentLinkCustomFieldDropdown : StripeEntity { @@ -10,6 +13,9 @@ public class PaymentLinkCustomFieldDropdown : StripeEntity [JsonProperty("options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("options")] +#endif public List Options { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkCustomFieldDropdownOption.cs b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkCustomFieldDropdownOption.cs index 2014d042b5..81c8015d1c 100644 --- a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkCustomFieldDropdownOption.cs +++ b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkCustomFieldDropdownOption.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentLinkCustomFieldDropdownOption : StripeEntity { @@ -9,6 +12,9 @@ public class PaymentLinkCustomFieldDropdownOption : StripeEntity [JsonProperty("label")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("label")] +#endif public string Label { get; set; } /// @@ -17,6 +23,9 @@ public class PaymentLinkCustomFieldDropdownOption : StripeEntity [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public string Value { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkCustomFieldLabel.cs b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkCustomFieldLabel.cs index f4470189e2..97b24e1148 100644 --- a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkCustomFieldLabel.cs +++ b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkCustomFieldLabel.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentLinkCustomFieldLabel : StripeEntity { @@ -9,12 +12,18 @@ public class PaymentLinkCustomFieldLabel : StripeEntity [JsonProperty("custom")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("custom")] +#endif public string Custom { get; set; } /// /// The type of the label. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkCustomFieldNumeric.cs b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkCustomFieldNumeric.cs index 14d889dd83..e1240d901b 100644 --- a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkCustomFieldNumeric.cs +++ b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkCustomFieldNumeric.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentLinkCustomFieldNumeric : StripeEntity { @@ -9,12 +12,18 @@ public class PaymentLinkCustomFieldNumeric : StripeEntity [JsonProperty("maximum_length")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("maximum_length")] +#endif public long? MaximumLength { get; set; } /// /// The minimum character length requirement for the customer's input. /// [JsonProperty("minimum_length")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("minimum_length")] +#endif public long? MinimumLength { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkCustomFieldText.cs b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkCustomFieldText.cs index 9ffcda976b..83a80e3888 100644 --- a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkCustomFieldText.cs +++ b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkCustomFieldText.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentLinkCustomFieldText : StripeEntity { @@ -9,12 +12,18 @@ public class PaymentLinkCustomFieldText : StripeEntity [JsonProperty("maximum_length")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("maximum_length")] +#endif public long? MaximumLength { get; set; } /// /// The minimum character length requirement for the customer's input. /// [JsonProperty("minimum_length")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("minimum_length")] +#endif public long? MinimumLength { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkCustomText.cs b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkCustomText.cs index ba7eab6b6d..a221e2835b 100644 --- a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkCustomText.cs +++ b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkCustomText.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentLinkCustomText : StripeEntity { @@ -9,18 +12,27 @@ public class PaymentLinkCustomText : StripeEntity /// Custom text that should be displayed after the payment confirmation button. /// [JsonProperty("after_submit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("after_submit")] +#endif public PaymentLinkCustomTextAfterSubmit AfterSubmit { get; set; } /// /// Custom text that should be displayed alongside shipping address collection. /// [JsonProperty("shipping_address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping_address")] +#endif public PaymentLinkCustomTextShippingAddress ShippingAddress { get; set; } /// /// Custom text that should be displayed alongside the payment confirmation button. /// [JsonProperty("submit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("submit")] +#endif public PaymentLinkCustomTextSubmit Submit { get; set; } /// @@ -28,6 +40,9 @@ public class PaymentLinkCustomText : StripeEntity /// text. /// [JsonProperty("terms_of_service_acceptance")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("terms_of_service_acceptance")] +#endif public PaymentLinkCustomTextTermsOfServiceAcceptance TermsOfServiceAcceptance { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkCustomTextAfterSubmit.cs b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkCustomTextAfterSubmit.cs index 92251fa416..a921d25d6d 100644 --- a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkCustomTextAfterSubmit.cs +++ b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkCustomTextAfterSubmit.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentLinkCustomTextAfterSubmit : StripeEntity { @@ -9,6 +12,9 @@ public class PaymentLinkCustomTextAfterSubmit : StripeEntity [JsonProperty("message")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("message")] +#endif public string Message { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkCustomTextShippingAddress.cs b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkCustomTextShippingAddress.cs index 4886bdfe1b..ff5b0b53bc 100644 --- a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkCustomTextShippingAddress.cs +++ b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkCustomTextShippingAddress.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentLinkCustomTextShippingAddress : StripeEntity { @@ -9,6 +12,9 @@ public class PaymentLinkCustomTextShippingAddress : StripeEntity [JsonProperty("message")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("message")] +#endif public string Message { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkCustomTextSubmit.cs b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkCustomTextSubmit.cs index 232c56ae3e..e25982a951 100644 --- a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkCustomTextSubmit.cs +++ b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkCustomTextSubmit.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentLinkCustomTextSubmit : StripeEntity { @@ -9,6 +12,9 @@ public class PaymentLinkCustomTextSubmit : StripeEntity [JsonProperty("message")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("message")] +#endif public string Message { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkCustomTextTermsOfServiceAcceptance.cs b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkCustomTextTermsOfServiceAcceptance.cs index 47cad1685b..2b24ccea5d 100644 --- a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkCustomTextTermsOfServiceAcceptance.cs +++ b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkCustomTextTermsOfServiceAcceptance.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentLinkCustomTextTermsOfServiceAcceptance : StripeEntity { @@ -9,6 +12,9 @@ public class PaymentLinkCustomTextTermsOfServiceAcceptance : StripeEntity [JsonProperty("message")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("message")] +#endif public string Message { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkInvoiceCreation.cs b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkInvoiceCreation.cs index d58869e133..6210e97ed9 100644 --- a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkInvoiceCreation.cs +++ b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkInvoiceCreation.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentLinkInvoiceCreation : StripeEntity { @@ -9,12 +12,18 @@ public class PaymentLinkInvoiceCreation : StripeEntity [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool Enabled { get; set; } /// /// Configuration for the invoice. Default invoice values will be used if unspecified. /// [JsonProperty("invoice_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("invoice_data")] +#endif public PaymentLinkInvoiceCreationInvoiceData InvoiceData { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkInvoiceCreationInvoiceData.cs b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkInvoiceCreationInvoiceData.cs index dc13e6034a..d2ea8977e7 100644 --- a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkInvoiceCreationInvoiceData.cs +++ b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkInvoiceCreationInvoiceData.cs @@ -5,7 +5,13 @@ namespace Stripe using System.Linq; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class PaymentLinkInvoiceCreationInvoiceData : StripeEntity, IHasMetadata { #region Expandable AccountTaxIds @@ -15,6 +21,9 @@ public class PaymentLinkInvoiceCreationInvoiceData : StripeEntity [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public List AccountTaxIdIds { get => this.InternalAccountTaxIds?.Select((x) => x.Id).ToList(); @@ -28,6 +37,9 @@ public List AccountTaxIdIds /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public List AccountTaxIds { get => this.InternalAccountTaxIds?.Select((x) => x.ExpandedObject).ToList(); @@ -35,6 +47,9 @@ public List AccountTaxIds } [JsonProperty("account_tax_ids", ItemConverterType = typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_tax_ids")] +#endif internal List> InternalAccountTaxIds { get; set; } #endregion @@ -42,18 +57,27 @@ public List AccountTaxIds /// A list of up to 4 custom fields to be displayed on the invoice. /// [JsonProperty("custom_fields")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("custom_fields")] +#endif public List CustomFields { get; set; } /// /// An arbitrary string attached to the object. Often useful for displaying to users. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// /// Footer to be displayed on the invoice. /// [JsonProperty("footer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("footer")] +#endif public string Footer { get; set; } /// @@ -61,6 +85,9 @@ public List AccountTaxIds /// branding and support information of the specified account. /// [JsonProperty("issuer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("issuer")] +#endif public PaymentLinkInvoiceCreationInvoiceDataIssuer Issuer { get; set; } /// @@ -69,12 +96,18 @@ public List AccountTaxIds /// object in a structured format. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// Options for invoice PDF rendering. /// [JsonProperty("rendering_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("rendering_options")] +#endif public PaymentLinkInvoiceCreationInvoiceDataRenderingOptions RenderingOptions { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkInvoiceCreationInvoiceDataCustomField.cs b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkInvoiceCreationInvoiceDataCustomField.cs index b84c4f9b2e..5819d84a45 100644 --- a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkInvoiceCreationInvoiceDataCustomField.cs +++ b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkInvoiceCreationInvoiceDataCustomField.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentLinkInvoiceCreationInvoiceDataCustomField : StripeEntity { @@ -9,12 +12,18 @@ public class PaymentLinkInvoiceCreationInvoiceDataCustomField : StripeEntity [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } /// /// The value of the custom field. /// [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public string Value { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkInvoiceCreationInvoiceDataIssuer.cs b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkInvoiceCreationInvoiceDataIssuer.cs index cf964991ee..7a943dcba7 100644 --- a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkInvoiceCreationInvoiceDataIssuer.cs +++ b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkInvoiceCreationInvoiceDataIssuer.cs @@ -3,7 +3,13 @@ namespace Stripe { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class PaymentLinkInvoiceCreationInvoiceDataIssuer : StripeEntity { #region Expandable Account @@ -13,6 +19,9 @@ public class PaymentLinkInvoiceCreationInvoiceDataIssuer : StripeEntitytype is account. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string AccountId { get => this.InternalAccount?.Id; @@ -26,6 +35,9 @@ public string AccountId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Account Account { get => this.InternalAccount?.ExpandedObject; @@ -34,6 +46,10 @@ public Account Account [JsonProperty("account")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalAccount { get; set; } #endregion @@ -42,6 +58,9 @@ public Account Account /// One of: account, or self. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkInvoiceCreationInvoiceDataRenderingOptions.cs b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkInvoiceCreationInvoiceDataRenderingOptions.cs index 743f360d26..3a1fa06a35 100644 --- a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkInvoiceCreationInvoiceDataRenderingOptions.cs +++ b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkInvoiceCreationInvoiceDataRenderingOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentLinkInvoiceCreationInvoiceDataRenderingOptions : StripeEntity { @@ -9,6 +12,9 @@ public class PaymentLinkInvoiceCreationInvoiceDataRenderingOptions : StripeEntit /// How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. /// [JsonProperty("amount_tax_display")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_tax_display")] +#endif public string AmountTaxDisplay { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkPaymentIntentData.cs b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkPaymentIntentData.cs index f318c4ab43..2c341b19ac 100644 --- a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkPaymentIntentData.cs +++ b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkPaymentIntentData.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentLinkPaymentIntentData : StripeEntity, IHasMetadata { @@ -11,12 +14,18 @@ public class PaymentLinkPaymentIntentData : StripeEntityautomatic, automatic_async, or manual. /// [JsonProperty("capture_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("capture_method")] +#endif public string CaptureMethod { get; set; } /// /// An arbitrary string attached to the object. Often useful for displaying to users. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// @@ -25,6 +34,9 @@ public class PaymentLinkPaymentIntentData : StripeEntity [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -33,6 +45,9 @@ public class PaymentLinkPaymentIntentData : StripeEntityoff_session, or on_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } /// @@ -40,6 +55,9 @@ public class PaymentLinkPaymentIntentData : StripeEntity [JsonProperty("statement_descriptor")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("statement_descriptor")] +#endif public string StatementDescriptor { get; set; } /// @@ -48,6 +66,9 @@ public class PaymentLinkPaymentIntentData : StripeEntity [JsonProperty("statement_descriptor_suffix")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("statement_descriptor_suffix")] +#endif public string StatementDescriptorSuffix { get; set; } /// @@ -57,6 +78,9 @@ public class PaymentLinkPaymentIntentData : StripeEntity for details. /// [JsonProperty("transfer_group")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transfer_group")] +#endif public string TransferGroup { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkPhoneNumberCollection.cs b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkPhoneNumberCollection.cs index a0334ea95f..fac70a13e0 100644 --- a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkPhoneNumberCollection.cs +++ b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkPhoneNumberCollection.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentLinkPhoneNumberCollection : StripeEntity { @@ -9,6 +12,9 @@ public class PaymentLinkPhoneNumberCollection : StripeEntitytrue, a phone number will be collected during checkout. /// [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool Enabled { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkRestrictions.cs b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkRestrictions.cs index f566e8589a..86e07fd9f2 100644 --- a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkRestrictions.cs +++ b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkRestrictions.cs @@ -2,10 +2,16 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentLinkRestrictions : StripeEntity { [JsonProperty("completed_sessions")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("completed_sessions")] +#endif public PaymentLinkRestrictionsCompletedSessions CompletedSessions { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkRestrictionsCompletedSessions.cs b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkRestrictionsCompletedSessions.cs index 3d72af2d7e..677d3c10b5 100644 --- a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkRestrictionsCompletedSessions.cs +++ b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkRestrictionsCompletedSessions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentLinkRestrictionsCompletedSessions : StripeEntity { @@ -10,6 +13,9 @@ public class PaymentLinkRestrictionsCompletedSessions : StripeEntitycompleted_sessions restriction to be met. /// [JsonProperty("count")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("count")] +#endif public long Count { get; set; } /// @@ -17,6 +23,9 @@ public class PaymentLinkRestrictionsCompletedSessions : StripeEntitycompleted_sessions restriction to be met. /// [JsonProperty("limit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("limit")] +#endif public long Limit { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkShippingAddressCollection.cs b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkShippingAddressCollection.cs index 5fe6adc9cf..7afaea6f66 100644 --- a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkShippingAddressCollection.cs +++ b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkShippingAddressCollection.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentLinkShippingAddressCollection : StripeEntity { @@ -42,6 +45,9 @@ public class PaymentLinkShippingAddressCollection : StripeEntityYE, YT, ZA, ZM, ZW, or ZZ. /// [JsonProperty("allowed_countries")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("allowed_countries")] +#endif public List AllowedCountries { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkShippingOption.cs b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkShippingOption.cs index 06d077f996..c544475952 100644 --- a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkShippingOption.cs +++ b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkShippingOption.cs @@ -3,13 +3,22 @@ namespace Stripe { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class PaymentLinkShippingOption : StripeEntity { /// /// A non-negative integer in cents representing how much to charge. /// [JsonProperty("shipping_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping_amount")] +#endif public long ShippingAmount { get; set; } #region Expandable ShippingRate @@ -19,6 +28,9 @@ public class PaymentLinkShippingOption : StripeEntity /// The ID of the Shipping Rate to use for this shipping option. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string ShippingRateId { get => this.InternalShippingRate?.Id; @@ -32,6 +44,9 @@ public string ShippingRateId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public ShippingRate ShippingRate { get => this.InternalShippingRate?.ExpandedObject; @@ -40,6 +55,10 @@ public ShippingRate ShippingRate [JsonProperty("shipping_rate")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping_rate")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalShippingRate { get; set; } #endregion } diff --git a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkSubscriptionData.cs b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkSubscriptionData.cs index c32cb43157..89af872101 100644 --- a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkSubscriptionData.cs +++ b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkSubscriptionData.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentLinkSubscriptionData : StripeEntity, IHasMetadata { @@ -12,9 +15,15 @@ public class PaymentLinkSubscriptionData : StripeEntity [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } [JsonProperty("invoice_settings")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("invoice_settings")] +#endif public PaymentLinkSubscriptionDataInvoiceSettings InvoiceSettings { get; set; } /// @@ -23,6 +32,9 @@ public class PaymentLinkSubscriptionData : StripeEntity [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -30,12 +42,18 @@ public class PaymentLinkSubscriptionData : StripeEntity [JsonProperty("trial_period_days")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("trial_period_days")] +#endif public long? TrialPeriodDays { get; set; } /// /// Settings related to subscription trials. /// [JsonProperty("trial_settings")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("trial_settings")] +#endif public PaymentLinkSubscriptionDataTrialSettings TrialSettings { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkSubscriptionDataInvoiceSettings.cs b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkSubscriptionDataInvoiceSettings.cs index edc7af6431..bb8c105528 100644 --- a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkSubscriptionDataInvoiceSettings.cs +++ b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkSubscriptionDataInvoiceSettings.cs @@ -2,10 +2,16 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentLinkSubscriptionDataInvoiceSettings : StripeEntity { [JsonProperty("issuer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("issuer")] +#endif public PaymentLinkSubscriptionDataInvoiceSettingsIssuer Issuer { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkSubscriptionDataInvoiceSettingsIssuer.cs b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkSubscriptionDataInvoiceSettingsIssuer.cs index f7cef504d0..16fe9295ff 100644 --- a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkSubscriptionDataInvoiceSettingsIssuer.cs +++ b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkSubscriptionDataInvoiceSettingsIssuer.cs @@ -3,7 +3,13 @@ namespace Stripe { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class PaymentLinkSubscriptionDataInvoiceSettingsIssuer : StripeEntity { #region Expandable Account @@ -13,6 +19,9 @@ public class PaymentLinkSubscriptionDataInvoiceSettingsIssuer : StripeEntitytype is account. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string AccountId { get => this.InternalAccount?.Id; @@ -26,6 +35,9 @@ public string AccountId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Account Account { get => this.InternalAccount?.ExpandedObject; @@ -34,6 +46,10 @@ public Account Account [JsonProperty("account")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalAccount { get; set; } #endregion @@ -42,6 +58,9 @@ public Account Account /// One of: account, or self. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkSubscriptionDataTrialSettings.cs b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkSubscriptionDataTrialSettings.cs index 246ae17c49..b7d16a3bfc 100644 --- a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkSubscriptionDataTrialSettings.cs +++ b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkSubscriptionDataTrialSettings.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentLinkSubscriptionDataTrialSettings : StripeEntity { @@ -9,6 +12,9 @@ public class PaymentLinkSubscriptionDataTrialSettings : StripeEntity [JsonProperty("end_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("end_behavior")] +#endif public PaymentLinkSubscriptionDataTrialSettingsEndBehavior EndBehavior { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkSubscriptionDataTrialSettingsEndBehavior.cs b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkSubscriptionDataTrialSettingsEndBehavior.cs index 5b6bae07e3..37c7afbc72 100644 --- a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkSubscriptionDataTrialSettingsEndBehavior.cs +++ b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkSubscriptionDataTrialSettingsEndBehavior.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentLinkSubscriptionDataTrialSettingsEndBehavior : StripeEntity { @@ -11,6 +14,9 @@ public class PaymentLinkSubscriptionDataTrialSettingsEndBehavior : StripeEntity< /// One of: cancel, create_invoice, or pause. /// [JsonProperty("missing_payment_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("missing_payment_method")] +#endif public string MissingPaymentMethod { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkTaxIdCollection.cs b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkTaxIdCollection.cs index 7a729184d5..023353412a 100644 --- a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkTaxIdCollection.cs +++ b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkTaxIdCollection.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentLinkTaxIdCollection : StripeEntity { @@ -9,12 +12,18 @@ public class PaymentLinkTaxIdCollection : StripeEntity [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool Enabled { get; set; } /// /// One of: if_supported, or never. /// [JsonProperty("required")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("required")] +#endif public string Required { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkTransferData.cs b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkTransferData.cs index b0c24b500c..2475924e3d 100644 --- a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkTransferData.cs +++ b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkTransferData.cs @@ -3,7 +3,13 @@ namespace Stripe { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class PaymentLinkTransferData : StripeEntity { /// @@ -11,6 +17,9 @@ public class PaymentLinkTransferData : StripeEntity /// account. By default, the entire amount is transferred to the destination. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long? Amount { get; set; } #region Expandable Destination @@ -20,6 +29,9 @@ public class PaymentLinkTransferData : StripeEntity /// The connected account receiving the transfer. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string DestinationId { get => this.InternalDestination?.Id; @@ -33,6 +45,9 @@ public string DestinationId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Account Destination { get => this.InternalDestination?.ExpandedObject; @@ -41,6 +56,10 @@ public Account Destination [JsonProperty("destination")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("destination")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalDestination { get; set; } #endregion } diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfiguration.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfiguration.cs index 38ce91dfc7..f86bb4bef6 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfiguration.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfiguration.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// PaymentMethodConfigurations control which payment methods are displayed to your @@ -39,90 +42,168 @@ public class PaymentMethodConfiguration : StripeEntity [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } [JsonProperty("acss_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("acss_debit")] +#endif public PaymentMethodConfigurationAcssDebit AcssDebit { get; set; } /// /// Whether the configuration can be used for new payments. /// [JsonProperty("active")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("active")] +#endif public bool Active { get; set; } [JsonProperty("affirm")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("affirm")] +#endif public PaymentMethodConfigurationAffirm Affirm { get; set; } [JsonProperty("afterpay_clearpay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("afterpay_clearpay")] +#endif public PaymentMethodConfigurationAfterpayClearpay AfterpayClearpay { get; set; } [JsonProperty("alipay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("alipay")] +#endif public PaymentMethodConfigurationAlipay Alipay { get; set; } [JsonProperty("alma")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("alma")] +#endif public PaymentMethodConfigurationAlma Alma { get; set; } [JsonProperty("amazon_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amazon_pay")] +#endif public PaymentMethodConfigurationAmazonPay AmazonPay { get; set; } [JsonProperty("apple_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("apple_pay")] +#endif public PaymentMethodConfigurationApplePay ApplePay { get; set; } /// /// For child configs, the Connect application associated with the configuration. /// [JsonProperty("application")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("application")] +#endif public string Application { get; set; } [JsonProperty("au_becs_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("au_becs_debit")] +#endif public PaymentMethodConfigurationAuBecsDebit AuBecsDebit { get; set; } [JsonProperty("bacs_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bacs_debit")] +#endif public PaymentMethodConfigurationBacsDebit BacsDebit { get; set; } [JsonProperty("bancontact")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bancontact")] +#endif public PaymentMethodConfigurationBancontact Bancontact { get; set; } [JsonProperty("blik")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("blik")] +#endif public PaymentMethodConfigurationBlik Blik { get; set; } [JsonProperty("boleto")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("boleto")] +#endif public PaymentMethodConfigurationBoleto Boleto { get; set; } [JsonProperty("card")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card")] +#endif public PaymentMethodConfigurationCard Card { get; set; } [JsonProperty("cartes_bancaires")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cartes_bancaires")] +#endif public PaymentMethodConfigurationCartesBancaires CartesBancaires { get; set; } [JsonProperty("cashapp")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cashapp")] +#endif public PaymentMethodConfigurationCashapp Cashapp { get; set; } [JsonProperty("customer_balance")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_balance")] +#endif public PaymentMethodConfigurationCustomerBalance CustomerBalance { get; set; } [JsonProperty("eps")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("eps")] +#endif public PaymentMethodConfigurationEps Eps { get; set; } [JsonProperty("fpx")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fpx")] +#endif public PaymentMethodConfigurationFpx Fpx { get; set; } [JsonProperty("giropay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("giropay")] +#endif public PaymentMethodConfigurationGiropay Giropay { get; set; } [JsonProperty("google_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("google_pay")] +#endif public PaymentMethodConfigurationGooglePay GooglePay { get; set; } [JsonProperty("grabpay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("grabpay")] +#endif public PaymentMethodConfigurationGrabpay Grabpay { get; set; } [JsonProperty("ideal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ideal")] +#endif public PaymentMethodConfigurationIdeal Ideal { get; set; } /// @@ -130,18 +211,33 @@ public class PaymentMethodConfiguration : StripeEntity [JsonProperty("is_default")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("is_default")] +#endif public bool IsDefault { get; set; } [JsonProperty("jcb")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("jcb")] +#endif public PaymentMethodConfigurationJcb Jcb { get; set; } [JsonProperty("klarna")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("klarna")] +#endif public PaymentMethodConfigurationKlarna Klarna { get; set; } [JsonProperty("konbini")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("konbini")] +#endif public PaymentMethodConfigurationKonbini Konbini { get; set; } [JsonProperty("link")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("link")] +#endif public PaymentMethodConfigurationLink Link { get; set; } /// @@ -149,63 +245,117 @@ public class PaymentMethodConfiguration : StripeEntity [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } [JsonProperty("mobilepay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mobilepay")] +#endif public PaymentMethodConfigurationMobilepay Mobilepay { get; set; } [JsonProperty("multibanco")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("multibanco")] +#endif public PaymentMethodConfigurationMultibanco Multibanco { get; set; } /// /// The configuration's name. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } [JsonProperty("oxxo")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("oxxo")] +#endif public PaymentMethodConfigurationOxxo Oxxo { get; set; } [JsonProperty("p24")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("p24")] +#endif public PaymentMethodConfigurationP24 P24 { get; set; } /// /// For child configs, the configuration's parent configuration. /// [JsonProperty("parent")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("parent")] +#endif public string Parent { get; set; } [JsonProperty("paynow")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("paynow")] +#endif public PaymentMethodConfigurationPaynow Paynow { get; set; } [JsonProperty("paypal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("paypal")] +#endif public PaymentMethodConfigurationPaypal Paypal { get; set; } [JsonProperty("promptpay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("promptpay")] +#endif public PaymentMethodConfigurationPromptpay Promptpay { get; set; } [JsonProperty("revolut_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("revolut_pay")] +#endif public PaymentMethodConfigurationRevolutPay RevolutPay { get; set; } [JsonProperty("sepa_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sepa_debit")] +#endif public PaymentMethodConfigurationSepaDebit SepaDebit { get; set; } [JsonProperty("sofort")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sofort")] +#endif public PaymentMethodConfigurationSofort Sofort { get; set; } [JsonProperty("swish")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("swish")] +#endif public PaymentMethodConfigurationSwish Swish { get; set; } [JsonProperty("twint")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("twint")] +#endif public PaymentMethodConfigurationTwint Twint { get; set; } [JsonProperty("us_bank_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("us_bank_account")] +#endif public PaymentMethodConfigurationUsBankAccount UsBankAccount { get; set; } [JsonProperty("wechat_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("wechat_pay")] +#endif public PaymentMethodConfigurationWechatPay WechatPay { get; set; } [JsonProperty("zip")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("zip")] +#endif public PaymentMethodConfigurationZip Zip { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationAcssDebit.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationAcssDebit.cs index f481b3dca9..2bb98c9e5d 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationAcssDebit.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationAcssDebit.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationAcssDebit : StripeEntity { @@ -10,9 +13,15 @@ public class PaymentMethodConfigurationAcssDebit : StripeEntitydisplay_preference is on and the payment method's capability is active. /// [JsonProperty("available")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("available")] +#endif public bool Available { get; set; } [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif public PaymentMethodConfigurationAcssDebitDisplayPreference DisplayPreference { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationAcssDebitDisplayPreference.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationAcssDebitDisplayPreference.cs index cebe7769fd..d6962479c5 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationAcssDebitDisplayPreference.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationAcssDebitDisplayPreference.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationAcssDebitDisplayPreference : StripeEntity { @@ -10,6 +13,9 @@ public class PaymentMethodConfigurationAcssDebitDisplayPreference : StripeEntity /// false, the parent configuration's default is used. /// [JsonProperty("overridable")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("overridable")] +#endif public bool? Overridable { get; set; } /// @@ -17,6 +23,9 @@ public class PaymentMethodConfigurationAcssDebitDisplayPreference : StripeEntity /// One of: none, off, or on. /// [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif public string Preference { get; set; } /// @@ -24,6 +33,9 @@ public class PaymentMethodConfigurationAcssDebitDisplayPreference : StripeEntity /// One of: off, or on. /// [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public string Value { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationAffirm.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationAffirm.cs index c0946a13af..62bbb800a9 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationAffirm.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationAffirm.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationAffirm : StripeEntity { @@ -10,9 +13,15 @@ public class PaymentMethodConfigurationAffirm : StripeEntitydisplay_preference is on and the payment method's capability is active. /// [JsonProperty("available")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("available")] +#endif public bool Available { get; set; } [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif public PaymentMethodConfigurationAffirmDisplayPreference DisplayPreference { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationAffirmDisplayPreference.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationAffirmDisplayPreference.cs index d8a33c267f..42801852c5 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationAffirmDisplayPreference.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationAffirmDisplayPreference.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationAffirmDisplayPreference : StripeEntity { @@ -10,6 +13,9 @@ public class PaymentMethodConfigurationAffirmDisplayPreference : StripeEntityfalse, the parent configuration's default is used. /// [JsonProperty("overridable")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("overridable")] +#endif public bool? Overridable { get; set; } /// @@ -17,6 +23,9 @@ public class PaymentMethodConfigurationAffirmDisplayPreference : StripeEntitynone, off, or on. /// [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif public string Preference { get; set; } /// @@ -24,6 +33,9 @@ public class PaymentMethodConfigurationAffirmDisplayPreference : StripeEntityoff, or on. /// [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public string Value { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationAfterpayClearpay.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationAfterpayClearpay.cs index 3a5a5fbacf..89bc5f3fc3 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationAfterpayClearpay.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationAfterpayClearpay.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationAfterpayClearpay : StripeEntity { @@ -10,9 +13,15 @@ public class PaymentMethodConfigurationAfterpayClearpay : StripeEntitydisplay_preference is on and the payment method's capability is active. /// [JsonProperty("available")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("available")] +#endif public bool Available { get; set; } [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif public PaymentMethodConfigurationAfterpayClearpayDisplayPreference DisplayPreference { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationAfterpayClearpayDisplayPreference.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationAfterpayClearpayDisplayPreference.cs index bcfbad5e12..ce2d5b3b8e 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationAfterpayClearpayDisplayPreference.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationAfterpayClearpayDisplayPreference.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationAfterpayClearpayDisplayPreference : StripeEntity { @@ -10,6 +13,9 @@ public class PaymentMethodConfigurationAfterpayClearpayDisplayPreference : Strip /// false, the parent configuration's default is used. /// [JsonProperty("overridable")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("overridable")] +#endif public bool? Overridable { get; set; } /// @@ -17,6 +23,9 @@ public class PaymentMethodConfigurationAfterpayClearpayDisplayPreference : Strip /// One of: none, off, or on. /// [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif public string Preference { get; set; } /// @@ -24,6 +33,9 @@ public class PaymentMethodConfigurationAfterpayClearpayDisplayPreference : Strip /// One of: off, or on. /// [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public string Value { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationAlipay.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationAlipay.cs index 6a9ded7310..1a479aebe6 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationAlipay.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationAlipay.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationAlipay : StripeEntity { @@ -10,9 +13,15 @@ public class PaymentMethodConfigurationAlipay : StripeEntitydisplay_preference is on and the payment method's capability is active. /// [JsonProperty("available")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("available")] +#endif public bool Available { get; set; } [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif public PaymentMethodConfigurationAlipayDisplayPreference DisplayPreference { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationAlipayDisplayPreference.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationAlipayDisplayPreference.cs index b9c5ee6b8f..13e9adb333 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationAlipayDisplayPreference.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationAlipayDisplayPreference.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationAlipayDisplayPreference : StripeEntity { @@ -10,6 +13,9 @@ public class PaymentMethodConfigurationAlipayDisplayPreference : StripeEntityfalse, the parent configuration's default is used. /// [JsonProperty("overridable")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("overridable")] +#endif public bool? Overridable { get; set; } /// @@ -17,6 +23,9 @@ public class PaymentMethodConfigurationAlipayDisplayPreference : StripeEntitynone, off, or on. /// [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif public string Preference { get; set; } /// @@ -24,6 +33,9 @@ public class PaymentMethodConfigurationAlipayDisplayPreference : StripeEntityoff, or on. /// [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public string Value { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationAlma.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationAlma.cs index 5aa5829db2..a5c85df897 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationAlma.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationAlma.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationAlma : StripeEntity { @@ -10,9 +13,15 @@ public class PaymentMethodConfigurationAlma : StripeEntitydisplay_preference is on and the payment method's capability is active. /// [JsonProperty("available")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("available")] +#endif public bool Available { get; set; } [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif public PaymentMethodConfigurationAlmaDisplayPreference DisplayPreference { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationAlmaDisplayPreference.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationAlmaDisplayPreference.cs index 4b1e0964f3..a2be643837 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationAlmaDisplayPreference.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationAlmaDisplayPreference.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationAlmaDisplayPreference : StripeEntity { @@ -10,6 +13,9 @@ public class PaymentMethodConfigurationAlmaDisplayPreference : StripeEntityfalse, the parent configuration's default is used. /// [JsonProperty("overridable")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("overridable")] +#endif public bool? Overridable { get; set; } /// @@ -17,6 +23,9 @@ public class PaymentMethodConfigurationAlmaDisplayPreference : StripeEntitynone, off, or on. /// [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif public string Preference { get; set; } /// @@ -24,6 +33,9 @@ public class PaymentMethodConfigurationAlmaDisplayPreference : StripeEntityoff, or on. /// [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public string Value { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationAmazonPay.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationAmazonPay.cs index 7e056dbb59..7276e1908f 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationAmazonPay.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationAmazonPay.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationAmazonPay : StripeEntity { @@ -10,9 +13,15 @@ public class PaymentMethodConfigurationAmazonPay : StripeEntitydisplay_preference is on and the payment method's capability is active. /// [JsonProperty("available")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("available")] +#endif public bool Available { get; set; } [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif public PaymentMethodConfigurationAmazonPayDisplayPreference DisplayPreference { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationAmazonPayDisplayPreference.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationAmazonPayDisplayPreference.cs index dba0e78fa7..e655a923f5 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationAmazonPayDisplayPreference.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationAmazonPayDisplayPreference.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationAmazonPayDisplayPreference : StripeEntity { @@ -10,6 +13,9 @@ public class PaymentMethodConfigurationAmazonPayDisplayPreference : StripeEntity /// false, the parent configuration's default is used. /// [JsonProperty("overridable")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("overridable")] +#endif public bool? Overridable { get; set; } /// @@ -17,6 +23,9 @@ public class PaymentMethodConfigurationAmazonPayDisplayPreference : StripeEntity /// One of: none, off, or on. /// [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif public string Preference { get; set; } /// @@ -24,6 +33,9 @@ public class PaymentMethodConfigurationAmazonPayDisplayPreference : StripeEntity /// One of: off, or on. /// [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public string Value { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationApplePay.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationApplePay.cs index 468244abff..01d5e82b85 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationApplePay.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationApplePay.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationApplePay : StripeEntity { @@ -10,9 +13,15 @@ public class PaymentMethodConfigurationApplePay : StripeEntitydisplay_preference is on and the payment method's capability is active. /// [JsonProperty("available")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("available")] +#endif public bool Available { get; set; } [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif public PaymentMethodConfigurationApplePayDisplayPreference DisplayPreference { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationApplePayDisplayPreference.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationApplePayDisplayPreference.cs index f281047a63..f85ea3ea95 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationApplePayDisplayPreference.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationApplePayDisplayPreference.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationApplePayDisplayPreference : StripeEntity { @@ -10,6 +13,9 @@ public class PaymentMethodConfigurationApplePayDisplayPreference : StripeEntity< /// false, the parent configuration's default is used. /// [JsonProperty("overridable")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("overridable")] +#endif public bool? Overridable { get; set; } /// @@ -17,6 +23,9 @@ public class PaymentMethodConfigurationApplePayDisplayPreference : StripeEntity< /// One of: none, off, or on. /// [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif public string Preference { get; set; } /// @@ -24,6 +33,9 @@ public class PaymentMethodConfigurationApplePayDisplayPreference : StripeEntity< /// One of: off, or on. /// [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public string Value { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationAuBecsDebit.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationAuBecsDebit.cs index 74a93f0c8d..5aa410fc88 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationAuBecsDebit.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationAuBecsDebit.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationAuBecsDebit : StripeEntity { @@ -10,9 +13,15 @@ public class PaymentMethodConfigurationAuBecsDebit : StripeEntitydisplay_preference is on and the payment method's capability is active. /// [JsonProperty("available")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("available")] +#endif public bool Available { get; set; } [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif public PaymentMethodConfigurationAuBecsDebitDisplayPreference DisplayPreference { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationAuBecsDebitDisplayPreference.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationAuBecsDebitDisplayPreference.cs index 36f8f51ed3..82b40b25e2 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationAuBecsDebitDisplayPreference.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationAuBecsDebitDisplayPreference.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationAuBecsDebitDisplayPreference : StripeEntity { @@ -10,6 +13,9 @@ public class PaymentMethodConfigurationAuBecsDebitDisplayPreference : StripeEnti /// false, the parent configuration's default is used. /// [JsonProperty("overridable")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("overridable")] +#endif public bool? Overridable { get; set; } /// @@ -17,6 +23,9 @@ public class PaymentMethodConfigurationAuBecsDebitDisplayPreference : StripeEnti /// One of: none, off, or on. /// [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif public string Preference { get; set; } /// @@ -24,6 +33,9 @@ public class PaymentMethodConfigurationAuBecsDebitDisplayPreference : StripeEnti /// One of: off, or on. /// [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public string Value { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationBacsDebit.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationBacsDebit.cs index a312771330..78842d65b6 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationBacsDebit.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationBacsDebit.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationBacsDebit : StripeEntity { @@ -10,9 +13,15 @@ public class PaymentMethodConfigurationBacsDebit : StripeEntitydisplay_preference is on and the payment method's capability is active. /// [JsonProperty("available")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("available")] +#endif public bool Available { get; set; } [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif public PaymentMethodConfigurationBacsDebitDisplayPreference DisplayPreference { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationBacsDebitDisplayPreference.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationBacsDebitDisplayPreference.cs index 6e51069d6c..d092eaaf43 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationBacsDebitDisplayPreference.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationBacsDebitDisplayPreference.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationBacsDebitDisplayPreference : StripeEntity { @@ -10,6 +13,9 @@ public class PaymentMethodConfigurationBacsDebitDisplayPreference : StripeEntity /// false, the parent configuration's default is used. /// [JsonProperty("overridable")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("overridable")] +#endif public bool? Overridable { get; set; } /// @@ -17,6 +23,9 @@ public class PaymentMethodConfigurationBacsDebitDisplayPreference : StripeEntity /// One of: none, off, or on. /// [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif public string Preference { get; set; } /// @@ -24,6 +33,9 @@ public class PaymentMethodConfigurationBacsDebitDisplayPreference : StripeEntity /// One of: off, or on. /// [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public string Value { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationBancontact.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationBancontact.cs index 8c43b6ce2d..e3e73cb381 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationBancontact.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationBancontact.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationBancontact : StripeEntity { @@ -10,9 +13,15 @@ public class PaymentMethodConfigurationBancontact : StripeEntitydisplay_preference is on and the payment method's capability is active. /// [JsonProperty("available")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("available")] +#endif public bool Available { get; set; } [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif public PaymentMethodConfigurationBancontactDisplayPreference DisplayPreference { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationBancontactDisplayPreference.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationBancontactDisplayPreference.cs index 1a0dd12845..d76e3dbee8 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationBancontactDisplayPreference.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationBancontactDisplayPreference.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationBancontactDisplayPreference : StripeEntity { @@ -10,6 +13,9 @@ public class PaymentMethodConfigurationBancontactDisplayPreference : StripeEntit /// false, the parent configuration's default is used. /// [JsonProperty("overridable")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("overridable")] +#endif public bool? Overridable { get; set; } /// @@ -17,6 +23,9 @@ public class PaymentMethodConfigurationBancontactDisplayPreference : StripeEntit /// One of: none, off, or on. /// [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif public string Preference { get; set; } /// @@ -24,6 +33,9 @@ public class PaymentMethodConfigurationBancontactDisplayPreference : StripeEntit /// One of: off, or on. /// [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public string Value { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationBlik.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationBlik.cs index ce58345c28..bf50d35c65 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationBlik.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationBlik.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationBlik : StripeEntity { @@ -10,9 +13,15 @@ public class PaymentMethodConfigurationBlik : StripeEntitydisplay_preference is on and the payment method's capability is active. /// [JsonProperty("available")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("available")] +#endif public bool Available { get; set; } [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif public PaymentMethodConfigurationBlikDisplayPreference DisplayPreference { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationBlikDisplayPreference.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationBlikDisplayPreference.cs index dddc43a90b..7d2a2e0b06 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationBlikDisplayPreference.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationBlikDisplayPreference.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationBlikDisplayPreference : StripeEntity { @@ -10,6 +13,9 @@ public class PaymentMethodConfigurationBlikDisplayPreference : StripeEntityfalse, the parent configuration's default is used. /// [JsonProperty("overridable")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("overridable")] +#endif public bool? Overridable { get; set; } /// @@ -17,6 +23,9 @@ public class PaymentMethodConfigurationBlikDisplayPreference : StripeEntitynone, off, or on. /// [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif public string Preference { get; set; } /// @@ -24,6 +33,9 @@ public class PaymentMethodConfigurationBlikDisplayPreference : StripeEntityoff, or on. /// [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public string Value { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationBoleto.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationBoleto.cs index dc8b9f4a4a..882349f66d 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationBoleto.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationBoleto.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationBoleto : StripeEntity { @@ -10,9 +13,15 @@ public class PaymentMethodConfigurationBoleto : StripeEntitydisplay_preference is on and the payment method's capability is active. /// [JsonProperty("available")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("available")] +#endif public bool Available { get; set; } [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif public PaymentMethodConfigurationBoletoDisplayPreference DisplayPreference { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationBoletoDisplayPreference.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationBoletoDisplayPreference.cs index 7c8b75cd9d..86195d78ac 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationBoletoDisplayPreference.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationBoletoDisplayPreference.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationBoletoDisplayPreference : StripeEntity { @@ -10,6 +13,9 @@ public class PaymentMethodConfigurationBoletoDisplayPreference : StripeEntityfalse, the parent configuration's default is used. /// [JsonProperty("overridable")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("overridable")] +#endif public bool? Overridable { get; set; } /// @@ -17,6 +23,9 @@ public class PaymentMethodConfigurationBoletoDisplayPreference : StripeEntitynone, off, or on. /// [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif public string Preference { get; set; } /// @@ -24,6 +33,9 @@ public class PaymentMethodConfigurationBoletoDisplayPreference : StripeEntityoff, or on. /// [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public string Value { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationCard.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationCard.cs index d8e357e2ed..710e5bdc4b 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationCard.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationCard.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationCard : StripeEntity { @@ -10,9 +13,15 @@ public class PaymentMethodConfigurationCard : StripeEntitydisplay_preference is on and the payment method's capability is active. /// [JsonProperty("available")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("available")] +#endif public bool Available { get; set; } [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif public PaymentMethodConfigurationCardDisplayPreference DisplayPreference { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationCardDisplayPreference.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationCardDisplayPreference.cs index a7cabd3651..88cee5e28f 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationCardDisplayPreference.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationCardDisplayPreference.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationCardDisplayPreference : StripeEntity { @@ -10,6 +13,9 @@ public class PaymentMethodConfigurationCardDisplayPreference : StripeEntityfalse, the parent configuration's default is used. /// [JsonProperty("overridable")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("overridable")] +#endif public bool? Overridable { get; set; } /// @@ -17,6 +23,9 @@ public class PaymentMethodConfigurationCardDisplayPreference : StripeEntitynone, off, or on. /// [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif public string Preference { get; set; } /// @@ -24,6 +33,9 @@ public class PaymentMethodConfigurationCardDisplayPreference : StripeEntityoff, or on. /// [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public string Value { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationCartesBancaires.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationCartesBancaires.cs index 261aa7220e..174d465dd5 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationCartesBancaires.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationCartesBancaires.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationCartesBancaires : StripeEntity { @@ -10,9 +13,15 @@ public class PaymentMethodConfigurationCartesBancaires : StripeEntitydisplay_preference is on and the payment method's capability is active. /// [JsonProperty("available")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("available")] +#endif public bool Available { get; set; } [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif public PaymentMethodConfigurationCartesBancairesDisplayPreference DisplayPreference { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationCartesBancairesDisplayPreference.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationCartesBancairesDisplayPreference.cs index 61dae7164f..3ac0d1378a 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationCartesBancairesDisplayPreference.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationCartesBancairesDisplayPreference.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationCartesBancairesDisplayPreference : StripeEntity { @@ -10,6 +13,9 @@ public class PaymentMethodConfigurationCartesBancairesDisplayPreference : Stripe /// false, the parent configuration's default is used. /// [JsonProperty("overridable")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("overridable")] +#endif public bool? Overridable { get; set; } /// @@ -17,6 +23,9 @@ public class PaymentMethodConfigurationCartesBancairesDisplayPreference : Stripe /// One of: none, off, or on. /// [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif public string Preference { get; set; } /// @@ -24,6 +33,9 @@ public class PaymentMethodConfigurationCartesBancairesDisplayPreference : Stripe /// One of: off, or on. /// [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public string Value { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationCashapp.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationCashapp.cs index d630f58f7f..37e3ae9bae 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationCashapp.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationCashapp.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationCashapp : StripeEntity { @@ -10,9 +13,15 @@ public class PaymentMethodConfigurationCashapp : StripeEntitydisplay_preference is on and the payment method's capability is active. /// [JsonProperty("available")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("available")] +#endif public bool Available { get; set; } [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif public PaymentMethodConfigurationCashappDisplayPreference DisplayPreference { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationCashappDisplayPreference.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationCashappDisplayPreference.cs index b20ecb3f68..e7938bc0ce 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationCashappDisplayPreference.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationCashappDisplayPreference.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationCashappDisplayPreference : StripeEntity { @@ -10,6 +13,9 @@ public class PaymentMethodConfigurationCashappDisplayPreference : StripeEntity

false, the parent configuration's default is used. /// [JsonProperty("overridable")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("overridable")] +#endif public bool? Overridable { get; set; } ///

@@ -17,6 +23,9 @@ public class PaymentMethodConfigurationCashappDisplayPreference : StripeEntity

none, off, or on. ///

[JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif public string Preference { get; set; } /// @@ -24,6 +33,9 @@ public class PaymentMethodConfigurationCashappDisplayPreference : StripeEntity

off, or on. ///

[JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public string Value { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationCustomerBalance.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationCustomerBalance.cs index 1ce4a3fc3a..8559e37b3a 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationCustomerBalance.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationCustomerBalance.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationCustomerBalance : StripeEntity { @@ -10,9 +13,15 @@ public class PaymentMethodConfigurationCustomerBalance : StripeEntitydisplay_preference is on and the payment method's capability is active. /// [JsonProperty("available")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("available")] +#endif public bool Available { get; set; } [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif public PaymentMethodConfigurationCustomerBalanceDisplayPreference DisplayPreference { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationCustomerBalanceDisplayPreference.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationCustomerBalanceDisplayPreference.cs index f6a82dab3c..b696477c8e 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationCustomerBalanceDisplayPreference.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationCustomerBalanceDisplayPreference.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationCustomerBalanceDisplayPreference : StripeEntity { @@ -10,6 +13,9 @@ public class PaymentMethodConfigurationCustomerBalanceDisplayPreference : Stripe /// false, the parent configuration's default is used. /// [JsonProperty("overridable")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("overridable")] +#endif public bool? Overridable { get; set; } /// @@ -17,6 +23,9 @@ public class PaymentMethodConfigurationCustomerBalanceDisplayPreference : Stripe /// One of: none, off, or on. /// [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif public string Preference { get; set; } /// @@ -24,6 +33,9 @@ public class PaymentMethodConfigurationCustomerBalanceDisplayPreference : Stripe /// One of: off, or on. /// [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public string Value { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationEps.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationEps.cs index 4fa6cbe412..3dd34a3123 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationEps.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationEps.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationEps : StripeEntity { @@ -10,9 +13,15 @@ public class PaymentMethodConfigurationEps : StripeEntitydisplay_preference is on and the payment method's capability is active. /// [JsonProperty("available")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("available")] +#endif public bool Available { get; set; } [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif public PaymentMethodConfigurationEpsDisplayPreference DisplayPreference { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationEpsDisplayPreference.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationEpsDisplayPreference.cs index d77ac2c819..df1f23f3e3 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationEpsDisplayPreference.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationEpsDisplayPreference.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationEpsDisplayPreference : StripeEntity { @@ -10,6 +13,9 @@ public class PaymentMethodConfigurationEpsDisplayPreference : StripeEntityfalse, the parent configuration's default is used. /// [JsonProperty("overridable")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("overridable")] +#endif public bool? Overridable { get; set; } /// @@ -17,6 +23,9 @@ public class PaymentMethodConfigurationEpsDisplayPreference : StripeEntitynone, off, or on. /// [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif public string Preference { get; set; } /// @@ -24,6 +33,9 @@ public class PaymentMethodConfigurationEpsDisplayPreference : StripeEntityoff, or on. /// [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public string Value { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationFpx.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationFpx.cs index 12c0c06a37..b0754fb7f5 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationFpx.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationFpx.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationFpx : StripeEntity { @@ -10,9 +13,15 @@ public class PaymentMethodConfigurationFpx : StripeEntitydisplay_preference is on and the payment method's capability is active. /// [JsonProperty("available")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("available")] +#endif public bool Available { get; set; } [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif public PaymentMethodConfigurationFpxDisplayPreference DisplayPreference { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationFpxDisplayPreference.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationFpxDisplayPreference.cs index 993695840f..728a866cf0 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationFpxDisplayPreference.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationFpxDisplayPreference.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationFpxDisplayPreference : StripeEntity { @@ -10,6 +13,9 @@ public class PaymentMethodConfigurationFpxDisplayPreference : StripeEntityfalse, the parent configuration's default is used. /// [JsonProperty("overridable")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("overridable")] +#endif public bool? Overridable { get; set; } /// @@ -17,6 +23,9 @@ public class PaymentMethodConfigurationFpxDisplayPreference : StripeEntitynone, off, or on. /// [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif public string Preference { get; set; } /// @@ -24,6 +33,9 @@ public class PaymentMethodConfigurationFpxDisplayPreference : StripeEntityoff, or on. /// [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public string Value { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationGiropay.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationGiropay.cs index e69f906868..635e1e00ea 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationGiropay.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationGiropay.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationGiropay : StripeEntity { @@ -10,9 +13,15 @@ public class PaymentMethodConfigurationGiropay : StripeEntitydisplay_preference is on and the payment method's capability is active. /// [JsonProperty("available")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("available")] +#endif public bool Available { get; set; } [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif public PaymentMethodConfigurationGiropayDisplayPreference DisplayPreference { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationGiropayDisplayPreference.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationGiropayDisplayPreference.cs index 0dd1267603..2e05a7044f 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationGiropayDisplayPreference.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationGiropayDisplayPreference.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationGiropayDisplayPreference : StripeEntity { @@ -10,6 +13,9 @@ public class PaymentMethodConfigurationGiropayDisplayPreference : StripeEntity

false, the parent configuration's default is used. /// [JsonProperty("overridable")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("overridable")] +#endif public bool? Overridable { get; set; } ///

@@ -17,6 +23,9 @@ public class PaymentMethodConfigurationGiropayDisplayPreference : StripeEntity

none, off, or on. ///

[JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif public string Preference { get; set; } /// @@ -24,6 +33,9 @@ public class PaymentMethodConfigurationGiropayDisplayPreference : StripeEntity

off, or on. ///

[JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public string Value { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationGooglePay.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationGooglePay.cs index 826b5899b3..fe5ac6f5cf 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationGooglePay.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationGooglePay.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationGooglePay : StripeEntity { @@ -10,9 +13,15 @@ public class PaymentMethodConfigurationGooglePay : StripeEntitydisplay_preference is on and the payment method's capability is active. /// [JsonProperty("available")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("available")] +#endif public bool Available { get; set; } [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif public PaymentMethodConfigurationGooglePayDisplayPreference DisplayPreference { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationGooglePayDisplayPreference.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationGooglePayDisplayPreference.cs index a2259e163b..a86d98550b 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationGooglePayDisplayPreference.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationGooglePayDisplayPreference.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationGooglePayDisplayPreference : StripeEntity { @@ -10,6 +13,9 @@ public class PaymentMethodConfigurationGooglePayDisplayPreference : StripeEntity /// false, the parent configuration's default is used. /// [JsonProperty("overridable")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("overridable")] +#endif public bool? Overridable { get; set; } /// @@ -17,6 +23,9 @@ public class PaymentMethodConfigurationGooglePayDisplayPreference : StripeEntity /// One of: none, off, or on. /// [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif public string Preference { get; set; } /// @@ -24,6 +33,9 @@ public class PaymentMethodConfigurationGooglePayDisplayPreference : StripeEntity /// One of: off, or on. /// [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public string Value { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationGrabpay.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationGrabpay.cs index 3a1fe7b11f..c84570319f 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationGrabpay.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationGrabpay.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationGrabpay : StripeEntity { @@ -10,9 +13,15 @@ public class PaymentMethodConfigurationGrabpay : StripeEntitydisplay_preference is on and the payment method's capability is active. /// [JsonProperty("available")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("available")] +#endif public bool Available { get; set; } [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif public PaymentMethodConfigurationGrabpayDisplayPreference DisplayPreference { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationGrabpayDisplayPreference.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationGrabpayDisplayPreference.cs index 7d21fbc115..ec950080cb 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationGrabpayDisplayPreference.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationGrabpayDisplayPreference.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationGrabpayDisplayPreference : StripeEntity { @@ -10,6 +13,9 @@ public class PaymentMethodConfigurationGrabpayDisplayPreference : StripeEntity

false, the parent configuration's default is used. /// [JsonProperty("overridable")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("overridable")] +#endif public bool? Overridable { get; set; } ///

@@ -17,6 +23,9 @@ public class PaymentMethodConfigurationGrabpayDisplayPreference : StripeEntity

none, off, or on. ///

[JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif public string Preference { get; set; } /// @@ -24,6 +33,9 @@ public class PaymentMethodConfigurationGrabpayDisplayPreference : StripeEntity

off, or on. ///

[JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public string Value { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationIdeal.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationIdeal.cs index 0868e74b70..6175748555 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationIdeal.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationIdeal.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationIdeal : StripeEntity { @@ -10,9 +13,15 @@ public class PaymentMethodConfigurationIdeal : StripeEntitydisplay_preference is on and the payment method's capability is active. /// [JsonProperty("available")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("available")] +#endif public bool Available { get; set; } [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif public PaymentMethodConfigurationIdealDisplayPreference DisplayPreference { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationIdealDisplayPreference.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationIdealDisplayPreference.cs index 13288fc702..ec72820268 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationIdealDisplayPreference.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationIdealDisplayPreference.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationIdealDisplayPreference : StripeEntity { @@ -10,6 +13,9 @@ public class PaymentMethodConfigurationIdealDisplayPreference : StripeEntityfalse, the parent configuration's default is used. /// [JsonProperty("overridable")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("overridable")] +#endif public bool? Overridable { get; set; } /// @@ -17,6 +23,9 @@ public class PaymentMethodConfigurationIdealDisplayPreference : StripeEntitynone, off, or on. /// [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif public string Preference { get; set; } /// @@ -24,6 +33,9 @@ public class PaymentMethodConfigurationIdealDisplayPreference : StripeEntityoff, or on. /// [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public string Value { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationJcb.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationJcb.cs index ce20abe0bd..3816dec042 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationJcb.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationJcb.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationJcb : StripeEntity { @@ -10,9 +13,15 @@ public class PaymentMethodConfigurationJcb : StripeEntitydisplay_preference is on and the payment method's capability is active. /// [JsonProperty("available")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("available")] +#endif public bool Available { get; set; } [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif public PaymentMethodConfigurationJcbDisplayPreference DisplayPreference { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationJcbDisplayPreference.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationJcbDisplayPreference.cs index b6f1e7151b..e6e4298ea6 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationJcbDisplayPreference.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationJcbDisplayPreference.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationJcbDisplayPreference : StripeEntity { @@ -10,6 +13,9 @@ public class PaymentMethodConfigurationJcbDisplayPreference : StripeEntityfalse, the parent configuration's default is used. /// [JsonProperty("overridable")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("overridable")] +#endif public bool? Overridable { get; set; } /// @@ -17,6 +23,9 @@ public class PaymentMethodConfigurationJcbDisplayPreference : StripeEntitynone, off, or on. /// [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif public string Preference { get; set; } /// @@ -24,6 +33,9 @@ public class PaymentMethodConfigurationJcbDisplayPreference : StripeEntityoff, or on. /// [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public string Value { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationKlarna.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationKlarna.cs index e651debd23..12838d1b07 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationKlarna.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationKlarna.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationKlarna : StripeEntity { @@ -10,9 +13,15 @@ public class PaymentMethodConfigurationKlarna : StripeEntitydisplay_preference is on and the payment method's capability is active. /// [JsonProperty("available")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("available")] +#endif public bool Available { get; set; } [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif public PaymentMethodConfigurationKlarnaDisplayPreference DisplayPreference { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationKlarnaDisplayPreference.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationKlarnaDisplayPreference.cs index b3baad3e12..54aa309cb7 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationKlarnaDisplayPreference.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationKlarnaDisplayPreference.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationKlarnaDisplayPreference : StripeEntity { @@ -10,6 +13,9 @@ public class PaymentMethodConfigurationKlarnaDisplayPreference : StripeEntityfalse, the parent configuration's default is used. /// [JsonProperty("overridable")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("overridable")] +#endif public bool? Overridable { get; set; } /// @@ -17,6 +23,9 @@ public class PaymentMethodConfigurationKlarnaDisplayPreference : StripeEntitynone, off, or on. /// [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif public string Preference { get; set; } /// @@ -24,6 +33,9 @@ public class PaymentMethodConfigurationKlarnaDisplayPreference : StripeEntityoff, or on. /// [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public string Value { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationKonbini.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationKonbini.cs index 03ac4a9a03..34674c4781 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationKonbini.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationKonbini.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationKonbini : StripeEntity { @@ -10,9 +13,15 @@ public class PaymentMethodConfigurationKonbini : StripeEntitydisplay_preference is on and the payment method's capability is active. /// [JsonProperty("available")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("available")] +#endif public bool Available { get; set; } [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif public PaymentMethodConfigurationKonbiniDisplayPreference DisplayPreference { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationKonbiniDisplayPreference.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationKonbiniDisplayPreference.cs index e9f3dcb0cc..c296febdcb 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationKonbiniDisplayPreference.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationKonbiniDisplayPreference.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationKonbiniDisplayPreference : StripeEntity { @@ -10,6 +13,9 @@ public class PaymentMethodConfigurationKonbiniDisplayPreference : StripeEntity

false, the parent configuration's default is used. /// [JsonProperty("overridable")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("overridable")] +#endif public bool? Overridable { get; set; } ///

@@ -17,6 +23,9 @@ public class PaymentMethodConfigurationKonbiniDisplayPreference : StripeEntity

none, off, or on. ///

[JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif public string Preference { get; set; } /// @@ -24,6 +33,9 @@ public class PaymentMethodConfigurationKonbiniDisplayPreference : StripeEntity

off, or on. ///

[JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public string Value { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationLink.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationLink.cs index dc189be7fe..fbe8d00f21 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationLink.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationLink.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationLink : StripeEntity { @@ -10,9 +13,15 @@ public class PaymentMethodConfigurationLink : StripeEntitydisplay_preference is on and the payment method's capability is active. /// [JsonProperty("available")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("available")] +#endif public bool Available { get; set; } [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif public PaymentMethodConfigurationLinkDisplayPreference DisplayPreference { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationLinkDisplayPreference.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationLinkDisplayPreference.cs index d2a8b0e89d..0fdc85a0ef 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationLinkDisplayPreference.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationLinkDisplayPreference.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationLinkDisplayPreference : StripeEntity { @@ -10,6 +13,9 @@ public class PaymentMethodConfigurationLinkDisplayPreference : StripeEntityfalse, the parent configuration's default is used. /// [JsonProperty("overridable")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("overridable")] +#endif public bool? Overridable { get; set; } /// @@ -17,6 +23,9 @@ public class PaymentMethodConfigurationLinkDisplayPreference : StripeEntitynone, off, or on. /// [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif public string Preference { get; set; } /// @@ -24,6 +33,9 @@ public class PaymentMethodConfigurationLinkDisplayPreference : StripeEntityoff, or on. /// [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public string Value { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationMobilepay.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationMobilepay.cs index 8f3888b1c0..ac20b4e73e 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationMobilepay.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationMobilepay.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationMobilepay : StripeEntity { @@ -10,9 +13,15 @@ public class PaymentMethodConfigurationMobilepay : StripeEntitydisplay_preference is on and the payment method's capability is active. /// [JsonProperty("available")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("available")] +#endif public bool Available { get; set; } [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif public PaymentMethodConfigurationMobilepayDisplayPreference DisplayPreference { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationMobilepayDisplayPreference.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationMobilepayDisplayPreference.cs index c1c9abc7ec..089519b36a 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationMobilepayDisplayPreference.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationMobilepayDisplayPreference.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationMobilepayDisplayPreference : StripeEntity { @@ -10,6 +13,9 @@ public class PaymentMethodConfigurationMobilepayDisplayPreference : StripeEntity /// false, the parent configuration's default is used. /// [JsonProperty("overridable")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("overridable")] +#endif public bool? Overridable { get; set; } /// @@ -17,6 +23,9 @@ public class PaymentMethodConfigurationMobilepayDisplayPreference : StripeEntity /// One of: none, off, or on. /// [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif public string Preference { get; set; } /// @@ -24,6 +33,9 @@ public class PaymentMethodConfigurationMobilepayDisplayPreference : StripeEntity /// One of: off, or on. /// [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public string Value { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationMultibanco.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationMultibanco.cs index 9fc67d8b99..78cb43e80d 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationMultibanco.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationMultibanco.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationMultibanco : StripeEntity { @@ -10,9 +13,15 @@ public class PaymentMethodConfigurationMultibanco : StripeEntitydisplay_preference is on and the payment method's capability is active. /// [JsonProperty("available")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("available")] +#endif public bool Available { get; set; } [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif public PaymentMethodConfigurationMultibancoDisplayPreference DisplayPreference { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationMultibancoDisplayPreference.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationMultibancoDisplayPreference.cs index c36c31d9d4..2e60d87992 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationMultibancoDisplayPreference.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationMultibancoDisplayPreference.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationMultibancoDisplayPreference : StripeEntity { @@ -10,6 +13,9 @@ public class PaymentMethodConfigurationMultibancoDisplayPreference : StripeEntit /// false, the parent configuration's default is used. /// [JsonProperty("overridable")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("overridable")] +#endif public bool? Overridable { get; set; } /// @@ -17,6 +23,9 @@ public class PaymentMethodConfigurationMultibancoDisplayPreference : StripeEntit /// One of: none, off, or on. /// [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif public string Preference { get; set; } /// @@ -24,6 +33,9 @@ public class PaymentMethodConfigurationMultibancoDisplayPreference : StripeEntit /// One of: off, or on. /// [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public string Value { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationOxxo.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationOxxo.cs index 8797824d62..efa72c7185 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationOxxo.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationOxxo.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationOxxo : StripeEntity { @@ -10,9 +13,15 @@ public class PaymentMethodConfigurationOxxo : StripeEntitydisplay_preference is on and the payment method's capability is active. /// [JsonProperty("available")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("available")] +#endif public bool Available { get; set; } [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif public PaymentMethodConfigurationOxxoDisplayPreference DisplayPreference { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationOxxoDisplayPreference.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationOxxoDisplayPreference.cs index b502628147..458eab88d5 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationOxxoDisplayPreference.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationOxxoDisplayPreference.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationOxxoDisplayPreference : StripeEntity { @@ -10,6 +13,9 @@ public class PaymentMethodConfigurationOxxoDisplayPreference : StripeEntityfalse, the parent configuration's default is used. /// [JsonProperty("overridable")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("overridable")] +#endif public bool? Overridable { get; set; } /// @@ -17,6 +23,9 @@ public class PaymentMethodConfigurationOxxoDisplayPreference : StripeEntitynone, off, or on. /// [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif public string Preference { get; set; } /// @@ -24,6 +33,9 @@ public class PaymentMethodConfigurationOxxoDisplayPreference : StripeEntityoff, or on. /// [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public string Value { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationP24.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationP24.cs index 928eb3df86..db7612e3fb 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationP24.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationP24.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationP24 : StripeEntity { @@ -10,9 +13,15 @@ public class PaymentMethodConfigurationP24 : StripeEntitydisplay_preference is on and the payment method's capability is active. /// [JsonProperty("available")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("available")] +#endif public bool Available { get; set; } [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif public PaymentMethodConfigurationP24DisplayPreference DisplayPreference { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationP24DisplayPreference.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationP24DisplayPreference.cs index 19c41e7996..b839492bf9 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationP24DisplayPreference.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationP24DisplayPreference.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationP24DisplayPreference : StripeEntity { @@ -10,6 +13,9 @@ public class PaymentMethodConfigurationP24DisplayPreference : StripeEntityfalse, the parent configuration's default is used. /// [JsonProperty("overridable")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("overridable")] +#endif public bool? Overridable { get; set; } /// @@ -17,6 +23,9 @@ public class PaymentMethodConfigurationP24DisplayPreference : StripeEntitynone, off, or on. /// [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif public string Preference { get; set; } /// @@ -24,6 +33,9 @@ public class PaymentMethodConfigurationP24DisplayPreference : StripeEntityoff, or on. /// [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public string Value { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationPaynow.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationPaynow.cs index 17e91fa980..1f019c22b7 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationPaynow.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationPaynow.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationPaynow : StripeEntity { @@ -10,9 +13,15 @@ public class PaymentMethodConfigurationPaynow : StripeEntitydisplay_preference is on and the payment method's capability is active. /// [JsonProperty("available")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("available")] +#endif public bool Available { get; set; } [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif public PaymentMethodConfigurationPaynowDisplayPreference DisplayPreference { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationPaynowDisplayPreference.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationPaynowDisplayPreference.cs index c38aecd244..07f0a9f7de 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationPaynowDisplayPreference.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationPaynowDisplayPreference.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationPaynowDisplayPreference : StripeEntity { @@ -10,6 +13,9 @@ public class PaymentMethodConfigurationPaynowDisplayPreference : StripeEntityfalse, the parent configuration's default is used. /// [JsonProperty("overridable")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("overridable")] +#endif public bool? Overridable { get; set; } /// @@ -17,6 +23,9 @@ public class PaymentMethodConfigurationPaynowDisplayPreference : StripeEntitynone, off, or on. /// [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif public string Preference { get; set; } /// @@ -24,6 +33,9 @@ public class PaymentMethodConfigurationPaynowDisplayPreference : StripeEntityoff, or on. /// [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public string Value { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationPaypal.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationPaypal.cs index ecdeafb6ba..41ec06732a 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationPaypal.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationPaypal.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationPaypal : StripeEntity { @@ -10,9 +13,15 @@ public class PaymentMethodConfigurationPaypal : StripeEntitydisplay_preference is on and the payment method's capability is active. /// [JsonProperty("available")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("available")] +#endif public bool Available { get; set; } [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif public PaymentMethodConfigurationPaypalDisplayPreference DisplayPreference { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationPaypalDisplayPreference.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationPaypalDisplayPreference.cs index 578fc02e5c..1d63b4a8ad 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationPaypalDisplayPreference.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationPaypalDisplayPreference.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationPaypalDisplayPreference : StripeEntity { @@ -10,6 +13,9 @@ public class PaymentMethodConfigurationPaypalDisplayPreference : StripeEntityfalse, the parent configuration's default is used. /// [JsonProperty("overridable")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("overridable")] +#endif public bool? Overridable { get; set; } /// @@ -17,6 +23,9 @@ public class PaymentMethodConfigurationPaypalDisplayPreference : StripeEntitynone, off, or on. /// [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif public string Preference { get; set; } /// @@ -24,6 +33,9 @@ public class PaymentMethodConfigurationPaypalDisplayPreference : StripeEntityoff, or on. /// [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public string Value { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationPromptpay.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationPromptpay.cs index ccda102833..45d9604f68 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationPromptpay.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationPromptpay.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationPromptpay : StripeEntity { @@ -10,9 +13,15 @@ public class PaymentMethodConfigurationPromptpay : StripeEntitydisplay_preference is on and the payment method's capability is active. /// [JsonProperty("available")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("available")] +#endif public bool Available { get; set; } [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif public PaymentMethodConfigurationPromptpayDisplayPreference DisplayPreference { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationPromptpayDisplayPreference.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationPromptpayDisplayPreference.cs index ef6e2c5e72..372a36b215 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationPromptpayDisplayPreference.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationPromptpayDisplayPreference.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationPromptpayDisplayPreference : StripeEntity { @@ -10,6 +13,9 @@ public class PaymentMethodConfigurationPromptpayDisplayPreference : StripeEntity /// false, the parent configuration's default is used. /// [JsonProperty("overridable")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("overridable")] +#endif public bool? Overridable { get; set; } /// @@ -17,6 +23,9 @@ public class PaymentMethodConfigurationPromptpayDisplayPreference : StripeEntity /// One of: none, off, or on. /// [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif public string Preference { get; set; } /// @@ -24,6 +33,9 @@ public class PaymentMethodConfigurationPromptpayDisplayPreference : StripeEntity /// One of: off, or on. /// [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public string Value { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationRevolutPay.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationRevolutPay.cs index a306e03bf3..46cff57bb1 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationRevolutPay.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationRevolutPay.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationRevolutPay : StripeEntity { @@ -10,9 +13,15 @@ public class PaymentMethodConfigurationRevolutPay : StripeEntitydisplay_preference is on and the payment method's capability is active. /// [JsonProperty("available")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("available")] +#endif public bool Available { get; set; } [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif public PaymentMethodConfigurationRevolutPayDisplayPreference DisplayPreference { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationRevolutPayDisplayPreference.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationRevolutPayDisplayPreference.cs index 8d12c8e117..5f66127743 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationRevolutPayDisplayPreference.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationRevolutPayDisplayPreference.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationRevolutPayDisplayPreference : StripeEntity { @@ -10,6 +13,9 @@ public class PaymentMethodConfigurationRevolutPayDisplayPreference : StripeEntit /// false, the parent configuration's default is used. /// [JsonProperty("overridable")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("overridable")] +#endif public bool? Overridable { get; set; } /// @@ -17,6 +23,9 @@ public class PaymentMethodConfigurationRevolutPayDisplayPreference : StripeEntit /// One of: none, off, or on. /// [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif public string Preference { get; set; } /// @@ -24,6 +33,9 @@ public class PaymentMethodConfigurationRevolutPayDisplayPreference : StripeEntit /// One of: off, or on. /// [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public string Value { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationSepaDebit.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationSepaDebit.cs index 127dcafe3a..1c3513a0c8 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationSepaDebit.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationSepaDebit.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationSepaDebit : StripeEntity { @@ -10,9 +13,15 @@ public class PaymentMethodConfigurationSepaDebit : StripeEntitydisplay_preference is on and the payment method's capability is active. /// [JsonProperty("available")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("available")] +#endif public bool Available { get; set; } [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif public PaymentMethodConfigurationSepaDebitDisplayPreference DisplayPreference { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationSepaDebitDisplayPreference.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationSepaDebitDisplayPreference.cs index 3bbabb0f4a..d5c99b0658 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationSepaDebitDisplayPreference.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationSepaDebitDisplayPreference.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationSepaDebitDisplayPreference : StripeEntity { @@ -10,6 +13,9 @@ public class PaymentMethodConfigurationSepaDebitDisplayPreference : StripeEntity /// false, the parent configuration's default is used. /// [JsonProperty("overridable")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("overridable")] +#endif public bool? Overridable { get; set; } /// @@ -17,6 +23,9 @@ public class PaymentMethodConfigurationSepaDebitDisplayPreference : StripeEntity /// One of: none, off, or on. /// [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif public string Preference { get; set; } /// @@ -24,6 +33,9 @@ public class PaymentMethodConfigurationSepaDebitDisplayPreference : StripeEntity /// One of: off, or on. /// [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public string Value { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationSofort.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationSofort.cs index 1d0b6172bb..fc429fd23d 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationSofort.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationSofort.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationSofort : StripeEntity { @@ -10,9 +13,15 @@ public class PaymentMethodConfigurationSofort : StripeEntitydisplay_preference is on and the payment method's capability is active. /// [JsonProperty("available")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("available")] +#endif public bool Available { get; set; } [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif public PaymentMethodConfigurationSofortDisplayPreference DisplayPreference { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationSofortDisplayPreference.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationSofortDisplayPreference.cs index 28dceb13bc..637399a02a 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationSofortDisplayPreference.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationSofortDisplayPreference.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationSofortDisplayPreference : StripeEntity { @@ -10,6 +13,9 @@ public class PaymentMethodConfigurationSofortDisplayPreference : StripeEntityfalse, the parent configuration's default is used. /// [JsonProperty("overridable")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("overridable")] +#endif public bool? Overridable { get; set; } /// @@ -17,6 +23,9 @@ public class PaymentMethodConfigurationSofortDisplayPreference : StripeEntitynone, off, or on. /// [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif public string Preference { get; set; } /// @@ -24,6 +33,9 @@ public class PaymentMethodConfigurationSofortDisplayPreference : StripeEntityoff, or on. /// [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public string Value { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationSwish.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationSwish.cs index 68a389732e..664d12953d 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationSwish.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationSwish.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationSwish : StripeEntity { @@ -10,9 +13,15 @@ public class PaymentMethodConfigurationSwish : StripeEntitydisplay_preference is on and the payment method's capability is active. /// [JsonProperty("available")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("available")] +#endif public bool Available { get; set; } [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif public PaymentMethodConfigurationSwishDisplayPreference DisplayPreference { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationSwishDisplayPreference.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationSwishDisplayPreference.cs index 31b3272d4c..5ecdaddd16 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationSwishDisplayPreference.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationSwishDisplayPreference.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationSwishDisplayPreference : StripeEntity { @@ -10,6 +13,9 @@ public class PaymentMethodConfigurationSwishDisplayPreference : StripeEntityfalse, the parent configuration's default is used. /// [JsonProperty("overridable")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("overridable")] +#endif public bool? Overridable { get; set; } /// @@ -17,6 +23,9 @@ public class PaymentMethodConfigurationSwishDisplayPreference : StripeEntitynone, off, or on. /// [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif public string Preference { get; set; } /// @@ -24,6 +33,9 @@ public class PaymentMethodConfigurationSwishDisplayPreference : StripeEntityoff, or on. /// [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public string Value { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationTwint.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationTwint.cs index 0c154522fa..5bc392baaa 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationTwint.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationTwint.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationTwint : StripeEntity { @@ -10,9 +13,15 @@ public class PaymentMethodConfigurationTwint : StripeEntitydisplay_preference is on and the payment method's capability is active. /// [JsonProperty("available")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("available")] +#endif public bool Available { get; set; } [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif public PaymentMethodConfigurationTwintDisplayPreference DisplayPreference { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationTwintDisplayPreference.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationTwintDisplayPreference.cs index 7f1f618da6..dd6d4b7b97 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationTwintDisplayPreference.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationTwintDisplayPreference.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationTwintDisplayPreference : StripeEntity { @@ -10,6 +13,9 @@ public class PaymentMethodConfigurationTwintDisplayPreference : StripeEntityfalse, the parent configuration's default is used. /// [JsonProperty("overridable")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("overridable")] +#endif public bool? Overridable { get; set; } /// @@ -17,6 +23,9 @@ public class PaymentMethodConfigurationTwintDisplayPreference : StripeEntitynone, off, or on. /// [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif public string Preference { get; set; } /// @@ -24,6 +33,9 @@ public class PaymentMethodConfigurationTwintDisplayPreference : StripeEntityoff, or on. /// [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public string Value { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationUsBankAccount.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationUsBankAccount.cs index b354b75f33..52b49d05f7 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationUsBankAccount.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationUsBankAccount.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationUsBankAccount : StripeEntity { @@ -10,9 +13,15 @@ public class PaymentMethodConfigurationUsBankAccount : StripeEntitydisplay_preference is on and the payment method's capability is active. /// [JsonProperty("available")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("available")] +#endif public bool Available { get; set; } [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif public PaymentMethodConfigurationUsBankAccountDisplayPreference DisplayPreference { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationUsBankAccountDisplayPreference.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationUsBankAccountDisplayPreference.cs index 040f84962d..3c2c7b3256 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationUsBankAccountDisplayPreference.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationUsBankAccountDisplayPreference.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationUsBankAccountDisplayPreference : StripeEntity { @@ -10,6 +13,9 @@ public class PaymentMethodConfigurationUsBankAccountDisplayPreference : StripeEn /// false, the parent configuration's default is used. /// [JsonProperty("overridable")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("overridable")] +#endif public bool? Overridable { get; set; } /// @@ -17,6 +23,9 @@ public class PaymentMethodConfigurationUsBankAccountDisplayPreference : StripeEn /// One of: none, off, or on. /// [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif public string Preference { get; set; } /// @@ -24,6 +33,9 @@ public class PaymentMethodConfigurationUsBankAccountDisplayPreference : StripeEn /// One of: off, or on. /// [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public string Value { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationWechatPay.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationWechatPay.cs index c1225cbc2e..c26df4457f 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationWechatPay.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationWechatPay.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationWechatPay : StripeEntity { @@ -10,9 +13,15 @@ public class PaymentMethodConfigurationWechatPay : StripeEntitydisplay_preference is on and the payment method's capability is active. /// [JsonProperty("available")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("available")] +#endif public bool Available { get; set; } [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif public PaymentMethodConfigurationWechatPayDisplayPreference DisplayPreference { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationWechatPayDisplayPreference.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationWechatPayDisplayPreference.cs index a0d569f8c5..8eebf5bb40 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationWechatPayDisplayPreference.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationWechatPayDisplayPreference.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationWechatPayDisplayPreference : StripeEntity { @@ -10,6 +13,9 @@ public class PaymentMethodConfigurationWechatPayDisplayPreference : StripeEntity /// false, the parent configuration's default is used. /// [JsonProperty("overridable")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("overridable")] +#endif public bool? Overridable { get; set; } /// @@ -17,6 +23,9 @@ public class PaymentMethodConfigurationWechatPayDisplayPreference : StripeEntity /// One of: none, off, or on. /// [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif public string Preference { get; set; } /// @@ -24,6 +33,9 @@ public class PaymentMethodConfigurationWechatPayDisplayPreference : StripeEntity /// One of: off, or on. /// [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public string Value { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationZip.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationZip.cs index d515742920..596b06a605 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationZip.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationZip.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationZip : StripeEntity { @@ -10,9 +13,15 @@ public class PaymentMethodConfigurationZip : StripeEntitydisplay_preference is on and the payment method's capability is active. /// [JsonProperty("available")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("available")] +#endif public bool Available { get; set; } [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif public PaymentMethodConfigurationZipDisplayPreference DisplayPreference { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationZipDisplayPreference.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationZipDisplayPreference.cs index dc0ef765e8..05f14848e4 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationZipDisplayPreference.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationZipDisplayPreference.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationZipDisplayPreference : StripeEntity { @@ -10,6 +13,9 @@ public class PaymentMethodConfigurationZipDisplayPreference : StripeEntityfalse, the parent configuration's default is used. /// [JsonProperty("overridable")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("overridable")] +#endif public bool? Overridable { get; set; } /// @@ -17,6 +23,9 @@ public class PaymentMethodConfigurationZipDisplayPreference : StripeEntitynone, off, or on. /// [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif public string Preference { get; set; } /// @@ -24,6 +33,9 @@ public class PaymentMethodConfigurationZipDisplayPreference : StripeEntityoff, or on. /// [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public string Value { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodDomains/PaymentMethodDomain.cs b/src/Stripe.net/Entities/PaymentMethodDomains/PaymentMethodDomain.cs index b81daf5722..9ecf7cdb81 100644 --- a/src/Stripe.net/Entities/PaymentMethodDomains/PaymentMethodDomain.cs +++ b/src/Stripe.net/Entities/PaymentMethodDomains/PaymentMethodDomain.cs @@ -4,6 +4,9 @@ namespace Stripe using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// A payment method domain represents a web domain that you have registered with Stripe. @@ -20,24 +23,36 @@ public class PaymentMethodDomain : StripeEntity, IHasId, IH /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// /// Indicates the status of a specific payment method on a payment method domain. /// [JsonProperty("amazon_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amazon_pay")] +#endif public PaymentMethodDomainAmazonPay AmazonPay { get; set; } /// /// Indicates the status of a specific payment method on a payment method domain. /// [JsonProperty("apple_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("apple_pay")] +#endif public PaymentMethodDomainApplePay ApplePay { get; set; } /// @@ -45,12 +60,19 @@ public class PaymentMethodDomain : StripeEntity, IHasId, IH /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// /// The domain name that this payment method domain object represents. /// [JsonProperty("domain_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("domain_name")] +#endif public string DomainName { get; set; } /// @@ -58,18 +80,27 @@ public class PaymentMethodDomain : StripeEntity, IHasId, IH /// methods that require a payment method domain will not appear in Elements. /// [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool Enabled { get; set; } /// /// Indicates the status of a specific payment method on a payment method domain. /// [JsonProperty("google_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("google_pay")] +#endif public PaymentMethodDomainGooglePay GooglePay { get; set; } /// /// Indicates the status of a specific payment method on a payment method domain. /// [JsonProperty("link")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("link")] +#endif public PaymentMethodDomainLink Link { get; set; } /// @@ -77,12 +108,18 @@ public class PaymentMethodDomain : StripeEntity, IHasId, IH /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// /// Indicates the status of a specific payment method on a payment method domain. /// [JsonProperty("paypal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("paypal")] +#endif public PaymentMethodDomainPaypal Paypal { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodDomains/PaymentMethodDomainAmazonPay.cs b/src/Stripe.net/Entities/PaymentMethodDomains/PaymentMethodDomainAmazonPay.cs index c8ecde6356..682635691f 100644 --- a/src/Stripe.net/Entities/PaymentMethodDomains/PaymentMethodDomainAmazonPay.cs +++ b/src/Stripe.net/Entities/PaymentMethodDomains/PaymentMethodDomainAmazonPay.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodDomainAmazonPay : StripeEntity { @@ -10,6 +13,9 @@ public class PaymentMethodDomainAmazonPay : StripeEntityactive, or inactive. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } /// @@ -17,6 +23,9 @@ public class PaymentMethodDomainAmazonPay : StripeEntity [JsonProperty("status_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status_details")] +#endif public PaymentMethodDomainAmazonPayStatusDetails StatusDetails { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodDomains/PaymentMethodDomainAmazonPayStatusDetails.cs b/src/Stripe.net/Entities/PaymentMethodDomains/PaymentMethodDomainAmazonPayStatusDetails.cs index dc3e4784c8..337486d654 100644 --- a/src/Stripe.net/Entities/PaymentMethodDomains/PaymentMethodDomainAmazonPayStatusDetails.cs +++ b/src/Stripe.net/Entities/PaymentMethodDomains/PaymentMethodDomainAmazonPayStatusDetails.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodDomainAmazonPayStatusDetails : StripeEntity { @@ -9,6 +12,9 @@ public class PaymentMethodDomainAmazonPayStatusDetails : StripeEntity [JsonProperty("error_message")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("error_message")] +#endif public string ErrorMessage { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodDomains/PaymentMethodDomainApplePay.cs b/src/Stripe.net/Entities/PaymentMethodDomains/PaymentMethodDomainApplePay.cs index 79f4f1e8ee..a74a5c6577 100644 --- a/src/Stripe.net/Entities/PaymentMethodDomains/PaymentMethodDomainApplePay.cs +++ b/src/Stripe.net/Entities/PaymentMethodDomains/PaymentMethodDomainApplePay.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodDomainApplePay : StripeEntity { @@ -10,6 +13,9 @@ public class PaymentMethodDomainApplePay : StripeEntityactive, or inactive. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } /// @@ -17,6 +23,9 @@ public class PaymentMethodDomainApplePay : StripeEntity [JsonProperty("status_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status_details")] +#endif public PaymentMethodDomainApplePayStatusDetails StatusDetails { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodDomains/PaymentMethodDomainApplePayStatusDetails.cs b/src/Stripe.net/Entities/PaymentMethodDomains/PaymentMethodDomainApplePayStatusDetails.cs index 0b4f33c06b..3b7a550b29 100644 --- a/src/Stripe.net/Entities/PaymentMethodDomains/PaymentMethodDomainApplePayStatusDetails.cs +++ b/src/Stripe.net/Entities/PaymentMethodDomains/PaymentMethodDomainApplePayStatusDetails.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodDomainApplePayStatusDetails : StripeEntity { @@ -9,6 +12,9 @@ public class PaymentMethodDomainApplePayStatusDetails : StripeEntity [JsonProperty("error_message")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("error_message")] +#endif public string ErrorMessage { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodDomains/PaymentMethodDomainGooglePay.cs b/src/Stripe.net/Entities/PaymentMethodDomains/PaymentMethodDomainGooglePay.cs index d936ac6be1..e2679b3470 100644 --- a/src/Stripe.net/Entities/PaymentMethodDomains/PaymentMethodDomainGooglePay.cs +++ b/src/Stripe.net/Entities/PaymentMethodDomains/PaymentMethodDomainGooglePay.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodDomainGooglePay : StripeEntity { @@ -10,6 +13,9 @@ public class PaymentMethodDomainGooglePay : StripeEntityactive, or inactive. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } /// @@ -17,6 +23,9 @@ public class PaymentMethodDomainGooglePay : StripeEntity [JsonProperty("status_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status_details")] +#endif public PaymentMethodDomainGooglePayStatusDetails StatusDetails { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodDomains/PaymentMethodDomainGooglePayStatusDetails.cs b/src/Stripe.net/Entities/PaymentMethodDomains/PaymentMethodDomainGooglePayStatusDetails.cs index 9b5f2e7c13..2adfdccc06 100644 --- a/src/Stripe.net/Entities/PaymentMethodDomains/PaymentMethodDomainGooglePayStatusDetails.cs +++ b/src/Stripe.net/Entities/PaymentMethodDomains/PaymentMethodDomainGooglePayStatusDetails.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodDomainGooglePayStatusDetails : StripeEntity { @@ -9,6 +12,9 @@ public class PaymentMethodDomainGooglePayStatusDetails : StripeEntity [JsonProperty("error_message")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("error_message")] +#endif public string ErrorMessage { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodDomains/PaymentMethodDomainLink.cs b/src/Stripe.net/Entities/PaymentMethodDomains/PaymentMethodDomainLink.cs index 4dbc02785c..1a6798de06 100644 --- a/src/Stripe.net/Entities/PaymentMethodDomains/PaymentMethodDomainLink.cs +++ b/src/Stripe.net/Entities/PaymentMethodDomains/PaymentMethodDomainLink.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodDomainLink : StripeEntity { @@ -10,6 +13,9 @@ public class PaymentMethodDomainLink : StripeEntity /// One of: active, or inactive. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } /// @@ -17,6 +23,9 @@ public class PaymentMethodDomainLink : StripeEntity /// method domain. /// [JsonProperty("status_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status_details")] +#endif public PaymentMethodDomainLinkStatusDetails StatusDetails { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodDomains/PaymentMethodDomainLinkStatusDetails.cs b/src/Stripe.net/Entities/PaymentMethodDomains/PaymentMethodDomainLinkStatusDetails.cs index 4868f98371..1fa5c8674b 100644 --- a/src/Stripe.net/Entities/PaymentMethodDomains/PaymentMethodDomainLinkStatusDetails.cs +++ b/src/Stripe.net/Entities/PaymentMethodDomains/PaymentMethodDomainLinkStatusDetails.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodDomainLinkStatusDetails : StripeEntity { @@ -9,6 +12,9 @@ public class PaymentMethodDomainLinkStatusDetails : StripeEntity [JsonProperty("error_message")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("error_message")] +#endif public string ErrorMessage { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodDomains/PaymentMethodDomainPaypal.cs b/src/Stripe.net/Entities/PaymentMethodDomains/PaymentMethodDomainPaypal.cs index cead61c29b..b48a0765bf 100644 --- a/src/Stripe.net/Entities/PaymentMethodDomains/PaymentMethodDomainPaypal.cs +++ b/src/Stripe.net/Entities/PaymentMethodDomains/PaymentMethodDomainPaypal.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodDomainPaypal : StripeEntity { @@ -10,6 +13,9 @@ public class PaymentMethodDomainPaypal : StripeEntity /// One of: active, or inactive. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } /// @@ -17,6 +23,9 @@ public class PaymentMethodDomainPaypal : StripeEntity /// method domain. /// [JsonProperty("status_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status_details")] +#endif public PaymentMethodDomainPaypalStatusDetails StatusDetails { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethodDomains/PaymentMethodDomainPaypalStatusDetails.cs b/src/Stripe.net/Entities/PaymentMethodDomains/PaymentMethodDomainPaypalStatusDetails.cs index 0342f2b813..ae8d339c15 100644 --- a/src/Stripe.net/Entities/PaymentMethodDomains/PaymentMethodDomainPaypalStatusDetails.cs +++ b/src/Stripe.net/Entities/PaymentMethodDomains/PaymentMethodDomainPaypalStatusDetails.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodDomainPaypalStatusDetails : StripeEntity { @@ -9,6 +12,9 @@ public class PaymentMethodDomainPaypalStatusDetails : StripeEntity [JsonProperty("error_message")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("error_message")] +#endif public string ErrorMessage { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethods/PaymentMethod.cs b/src/Stripe.net/Entities/PaymentMethods/PaymentMethod.cs index 874e56a0e1..e7adefb7d8 100644 --- a/src/Stripe.net/Entities/PaymentMethods/PaymentMethod.cs +++ b/src/Stripe.net/Entities/PaymentMethods/PaymentMethod.cs @@ -5,6 +5,9 @@ namespace Stripe using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// PaymentMethod objects represent your customer's payment instruments. You can use them @@ -16,30 +19,51 @@ namespace Stripe /// Methods and More /// Payment Scenarios. /// +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class PaymentMethod : StripeEntity, IHasId, IHasMetadata, IHasObject { /// /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } [JsonProperty("acss_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("acss_debit")] +#endif public PaymentMethodAcssDebit AcssDebit { get; set; } [JsonProperty("affirm")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("affirm")] +#endif public PaymentMethodAffirm Affirm { get; set; } [JsonProperty("afterpay_clearpay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("afterpay_clearpay")] +#endif public PaymentMethodAfterpayClearpay AfterpayClearpay { get; set; } [JsonProperty("alipay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("alipay")] +#endif public PaymentMethodAlipay Alipay { get; set; } /// @@ -50,39 +74,75 @@ public class PaymentMethod : StripeEntity, IHasId, IHasMetadata, /// One of: always, limited, or unspecified. /// [JsonProperty("allow_redisplay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("allow_redisplay")] +#endif public string AllowRedisplay { get; set; } [JsonProperty("alma")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("alma")] +#endif public PaymentMethodAlma Alma { get; set; } [JsonProperty("amazon_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amazon_pay")] +#endif public PaymentMethodAmazonPay AmazonPay { get; set; } [JsonProperty("au_becs_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("au_becs_debit")] +#endif public PaymentMethodAuBecsDebit AuBecsDebit { get; set; } [JsonProperty("bacs_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bacs_debit")] +#endif public PaymentMethodBacsDebit BacsDebit { get; set; } [JsonProperty("bancontact")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bancontact")] +#endif public PaymentMethodBancontact Bancontact { get; set; } [JsonProperty("billing_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_details")] +#endif public PaymentMethodBillingDetails BillingDetails { get; set; } [JsonProperty("blik")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("blik")] +#endif public PaymentMethodBlik Blik { get; set; } [JsonProperty("boleto")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("boleto")] +#endif public PaymentMethodBoleto Boleto { get; set; } [JsonProperty("card")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card")] +#endif public PaymentMethodCard Card { get; set; } [JsonProperty("card_present")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card_present")] +#endif public PaymentMethodCardPresent CardPresent { get; set; } [JsonProperty("cashapp")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cashapp")] +#endif public PaymentMethodCashapp Cashapp { get; set; } /// @@ -90,6 +150,10 @@ public class PaymentMethod : StripeEntity, IHasId, IHasMetadata, /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; #region Expandable Customer @@ -100,6 +164,9 @@ public class PaymentMethod : StripeEntity, IHasId, IHasMetadata, /// the PaymentMethod has not been saved to a Customer. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string CustomerId { get => this.InternalCustomer?.Id; @@ -114,6 +181,9 @@ public string CustomerId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Customer Customer { get => this.InternalCustomer?.ExpandedObject; @@ -122,43 +192,83 @@ public Customer Customer [JsonProperty("customer")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalCustomer { get; set; } #endregion [JsonProperty("customer_balance")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_balance")] +#endif public PaymentMethodCustomerBalance CustomerBalance { get; set; } [JsonProperty("eps")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("eps")] +#endif public PaymentMethodEps Eps { get; set; } [JsonProperty("fpx")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fpx")] +#endif public PaymentMethodFpx Fpx { get; set; } [JsonProperty("giropay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("giropay")] +#endif public PaymentMethodGiropay Giropay { get; set; } [JsonProperty("grabpay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("grabpay")] +#endif public PaymentMethodGrabpay Grabpay { get; set; } [JsonProperty("ideal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ideal")] +#endif public PaymentMethodIdeal Ideal { get; set; } [JsonProperty("interac_present")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interac_present")] +#endif public PaymentMethodInteracPresent InteracPresent { get; set; } [JsonProperty("kakao_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("kakao_pay")] +#endif public PaymentMethodKakaoPay KakaoPay { get; set; } [JsonProperty("klarna")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("klarna")] +#endif public PaymentMethodKlarna Klarna { get; set; } [JsonProperty("konbini")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("konbini")] +#endif public PaymentMethodKonbini Konbini { get; set; } [JsonProperty("kr_card")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("kr_card")] +#endif public PaymentMethodKrCard KrCard { get; set; } [JsonProperty("link")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("link")] +#endif public PaymentMethodLink Link { get; set; } /// @@ -166,6 +276,9 @@ public Customer Customer /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// @@ -174,36 +287,69 @@ public Customer Customer /// object in a structured format. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } [JsonProperty("mobilepay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mobilepay")] +#endif public PaymentMethodMobilepay Mobilepay { get; set; } [JsonProperty("multibanco")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("multibanco")] +#endif public PaymentMethodMultibanco Multibanco { get; set; } [JsonProperty("naver_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("naver_pay")] +#endif public PaymentMethodNaverPay NaverPay { get; set; } [JsonProperty("oxxo")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("oxxo")] +#endif public PaymentMethodOxxo Oxxo { get; set; } [JsonProperty("p24")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("p24")] +#endif public PaymentMethodP24 P24 { get; set; } [JsonProperty("payco")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payco")] +#endif public PaymentMethodPayco Payco { get; set; } [JsonProperty("paynow")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("paynow")] +#endif public PaymentMethodPaynow Paynow { get; set; } [JsonProperty("paypal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("paypal")] +#endif public PaymentMethodPaypal Paypal { get; set; } [JsonProperty("pix")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("pix")] +#endif public PaymentMethodPix Pix { get; set; } [JsonProperty("promptpay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("promptpay")] +#endif public PaymentMethodPromptpay Promptpay { get; set; } /// @@ -212,24 +358,45 @@ public Customer Customer /// information. /// [JsonProperty("radar_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("radar_options")] +#endif public PaymentMethodRadarOptions RadarOptions { get; set; } [JsonProperty("revolut_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("revolut_pay")] +#endif public PaymentMethodRevolutPay RevolutPay { get; set; } [JsonProperty("samsung_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("samsung_pay")] +#endif public PaymentMethodSamsungPay SamsungPay { get; set; } [JsonProperty("sepa_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sepa_debit")] +#endif public PaymentMethodSepaDebit SepaDebit { get; set; } [JsonProperty("sofort")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sofort")] +#endif public PaymentMethodSofort Sofort { get; set; } [JsonProperty("swish")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("swish")] +#endif public PaymentMethodSwish Swish { get; set; } [JsonProperty("twint")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("twint")] +#endif public PaymentMethodTwint Twint { get; set; } /// @@ -248,15 +415,27 @@ public Customer Customer /// zip. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } [JsonProperty("us_bank_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("us_bank_account")] +#endif public PaymentMethodUsBankAccount UsBankAccount { get; set; } [JsonProperty("wechat_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("wechat_pay")] +#endif public PaymentMethodWechatPay WechatPay { get; set; } [JsonProperty("zip")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("zip")] +#endif public PaymentMethodZip Zip { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodAcssDebit.cs b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodAcssDebit.cs index b7eb555386..12a7c5e07f 100644 --- a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodAcssDebit.cs +++ b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodAcssDebit.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodAcssDebit : StripeEntity { @@ -9,6 +12,9 @@ public class PaymentMethodAcssDebit : StripeEntity /// Name of the bank associated with the bank account. /// [JsonProperty("bank_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_name")] +#endif public string BankName { get; set; } /// @@ -16,24 +22,36 @@ public class PaymentMethodAcssDebit : StripeEntity /// whether two bank accounts are the same. /// [JsonProperty("fingerprint")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fingerprint")] +#endif public string Fingerprint { get; set; } /// /// Institution number of the bank account. /// [JsonProperty("institution_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("institution_number")] +#endif public string InstitutionNumber { get; set; } /// /// Last four digits of the bank account number. /// [JsonProperty("last4")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last4")] +#endif public string Last4 { get; set; } /// /// Transit number of the bank account. /// [JsonProperty("transit_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transit_number")] +#endif public string TransitNumber { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodAuBecsDebit.cs b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodAuBecsDebit.cs index 04a4ede013..5ae9107400 100644 --- a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodAuBecsDebit.cs +++ b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodAuBecsDebit.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodAuBecsDebit : StripeEntity { @@ -9,6 +12,9 @@ public class PaymentMethodAuBecsDebit : StripeEntity /// Six-digit number identifying bank and branch associated with this bank account. /// [JsonProperty("bsb_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bsb_number")] +#endif public string BsbNumber { get; set; } /// @@ -16,12 +22,18 @@ public class PaymentMethodAuBecsDebit : StripeEntity /// whether two bank accounts are the same. /// [JsonProperty("fingerprint")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fingerprint")] +#endif public string Fingerprint { get; set; } /// /// Last four digits of the bank account number. /// [JsonProperty("last4")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last4")] +#endif public string Last4 { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodBacsDebit.cs b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodBacsDebit.cs index f592a79168..84c26f4d85 100644 --- a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodBacsDebit.cs +++ b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodBacsDebit.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodBacsDebit : StripeEntity { @@ -10,18 +13,27 @@ public class PaymentMethodBacsDebit : StripeEntity /// whether two bank accounts are the same. /// [JsonProperty("fingerprint")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fingerprint")] +#endif public string Fingerprint { get; set; } /// /// Last four digits of the bank account number. /// [JsonProperty("last4")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last4")] +#endif public string Last4 { get; set; } /// /// Sort code of the bank account. (e.g., 10-20-30). /// [JsonProperty("sort_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sort_code")] +#endif public string SortCode { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodBillingDetails.cs b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodBillingDetails.cs index d0dca77240..228dab5f56 100644 --- a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodBillingDetails.cs +++ b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodBillingDetails.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodBillingDetails : StripeEntity { @@ -9,24 +12,36 @@ public class PaymentMethodBillingDetails : StripeEntity [JsonProperty("address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address")] +#endif public Address Address { get; set; } /// /// Email address. /// [JsonProperty("email")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("email")] +#endif public string Email { get; set; } /// /// Full name. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } /// /// Billing phone number (including extension). /// [JsonProperty("phone")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("phone")] +#endif public string Phone { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodBoleto.cs b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodBoleto.cs index 83005f7dbf..110d43c194 100644 --- a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodBoleto.cs +++ b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodBoleto.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodBoleto : StripeEntity { @@ -9,6 +12,9 @@ public class PaymentMethodBoleto : StripeEntity /// Uniquely identifies the customer tax id (CNPJ or CPF). /// [JsonProperty("tax_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_id")] +#endif public string TaxId { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodCard.cs b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodCard.cs index 91e99aa601..bf99b72491 100644 --- a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodCard.cs +++ b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodCard.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodCard : StripeEntity { @@ -11,12 +14,18 @@ public class PaymentMethodCard : StripeEntity /// unknown. /// [JsonProperty("brand")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("brand")] +#endif public string Brand { get; set; } /// /// Checks on Card address and CVC if provided. /// [JsonProperty("checks")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("checks")] +#endif public PaymentMethodCardChecks Checks { get; set; } /// @@ -24,6 +33,9 @@ public class PaymentMethodCard : StripeEntity /// to get a sense of the international breakdown of cards you've collected. /// [JsonProperty("country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country")] +#endif public string Country { get; set; } /// @@ -31,6 +43,9 @@ public class PaymentMethodCard : StripeEntity /// only and not typically available in standard API requests.). /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// @@ -41,18 +56,27 @@ public class PaymentMethodCard : StripeEntity /// contain more values in the future. /// [JsonProperty("display_brand")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_brand")] +#endif public string DisplayBrand { get; set; } /// /// Two-digit number representing the card's expiration month. /// [JsonProperty("exp_month")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("exp_month")] +#endif public long ExpMonth { get; set; } /// /// Four-digit number representing the card's expiration year. /// [JsonProperty("exp_year")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("exp_year")] +#endif public long ExpYear { get; set; } /// @@ -65,6 +89,9 @@ public class PaymentMethodCard : StripeEntity /// fingerprints for the same card---one for India and one for the rest of the world.. /// [JsonProperty("fingerprint")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fingerprint")] +#endif public string Fingerprint { get; set; } /// @@ -72,12 +99,18 @@ public class PaymentMethodCard : StripeEntity /// unknown. /// [JsonProperty("funding")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("funding")] +#endif public string Funding { get; set; } /// /// Details of the original PaymentMethod that created this object. /// [JsonProperty("generated_from")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("generated_from")] +#endif public PaymentMethodCardGeneratedFrom GeneratedFrom { get; set; } /// @@ -85,6 +118,9 @@ public class PaymentMethodCard : StripeEntity /// available in standard API requests.). /// [JsonProperty("iin")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("iin")] +#endif public string Iin { get; set; } /// @@ -92,30 +128,45 @@ public class PaymentMethodCard : StripeEntity /// in standard API requests.). /// [JsonProperty("issuer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("issuer")] +#endif public string Issuer { get; set; } /// /// The last four digits of the card. /// [JsonProperty("last4")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last4")] +#endif public string Last4 { get; set; } /// /// Contains information about card networks that can be used to process the payment. /// [JsonProperty("networks")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("networks")] +#endif public PaymentMethodCardNetworks Networks { get; set; } /// /// Contains details on how this Card may be used for 3D Secure authentication. /// [JsonProperty("three_d_secure_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("three_d_secure_usage")] +#endif public PaymentMethodCardThreeDSecureUsage ThreeDSecureUsage { get; set; } /// /// If this Card is part of a card wallet, this contains the details of the card wallet. /// [JsonProperty("wallet")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("wallet")] +#endif public PaymentMethodCardWallet Wallet { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodCardChecks.cs b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodCardChecks.cs index 80c8bbf94b..7550788549 100644 --- a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodCardChecks.cs +++ b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodCardChecks.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodCardChecks : StripeEntity { @@ -10,6 +13,9 @@ public class PaymentMethodCardChecks : StripeEntity /// unavailable, or unchecked. /// [JsonProperty("address_line1_check")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_line1_check")] +#endif public string AddressLine1Check { get; set; } /// @@ -17,6 +23,9 @@ public class PaymentMethodCardChecks : StripeEntity /// fail, unavailable, or unchecked. /// [JsonProperty("address_postal_code_check")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_postal_code_check")] +#endif public string AddressPostalCodeCheck { get; set; } /// @@ -24,6 +33,9 @@ public class PaymentMethodCardChecks : StripeEntity /// unavailable, or unchecked. /// [JsonProperty("cvc_check")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cvc_check")] +#endif public string CvcCheck { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodCardGeneratedFrom.cs b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodCardGeneratedFrom.cs index b0797062cd..835d84970b 100644 --- a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodCardGeneratedFrom.cs +++ b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodCardGeneratedFrom.cs @@ -3,19 +3,31 @@ namespace Stripe { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class PaymentMethodCardGeneratedFrom : StripeEntity { /// /// The charge that created this object. /// [JsonProperty("charge")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("charge")] +#endif public string Charge { get; set; } /// /// Transaction-specific details of the payment method used in the payment. /// [JsonProperty("payment_method_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_details")] +#endif public PaymentMethodCardGeneratedFromPaymentMethodDetails PaymentMethodDetails { get; set; } #region Expandable SetupAttempt @@ -25,6 +37,9 @@ public class PaymentMethodCardGeneratedFrom : StripeEntity [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string SetupAttemptId { get => this.InternalSetupAttempt?.Id; @@ -38,6 +53,9 @@ public string SetupAttemptId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public SetupAttempt SetupAttempt { get => this.InternalSetupAttempt?.ExpandedObject; @@ -46,6 +64,10 @@ public SetupAttempt SetupAttempt [JsonProperty("setup_attempt")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_attempt")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalSetupAttempt { get; set; } #endregion } diff --git a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodCardGeneratedFromPaymentMethodDetails.cs b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodCardGeneratedFromPaymentMethodDetails.cs index 606a9da5d0..009ba1bb2e 100644 --- a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodCardGeneratedFromPaymentMethodDetails.cs +++ b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodCardGeneratedFromPaymentMethodDetails.cs @@ -2,10 +2,16 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodCardGeneratedFromPaymentMethodDetails : StripeEntity { [JsonProperty("card_present")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card_present")] +#endif public PaymentMethodCardGeneratedFromPaymentMethodDetailsCardPresent CardPresent { get; set; } /// @@ -13,6 +19,9 @@ public class PaymentMethodCardGeneratedFromPaymentMethodDetails : StripeEntity

card payment method. Always card_present. ///

[JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodCardGeneratedFromPaymentMethodDetailsCardPresent.cs b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodCardGeneratedFromPaymentMethodDetailsCardPresent.cs index 08d05b23f1..d35de92e4f 100644 --- a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodCardGeneratedFromPaymentMethodDetailsCardPresent.cs +++ b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodCardGeneratedFromPaymentMethodDetailsCardPresent.cs @@ -5,6 +5,9 @@ namespace Stripe using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodCardGeneratedFromPaymentMethodDetailsCardPresent : StripeEntity { @@ -12,6 +15,9 @@ public class PaymentMethodCardGeneratedFromPaymentMethodDetailsCardPresent : Str /// The authorized amount. /// [JsonProperty("amount_authorized")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_authorized")] +#endif public long? AmountAuthorized { get; set; } /// @@ -20,6 +26,9 @@ public class PaymentMethodCardGeneratedFromPaymentMethodDetailsCardPresent : Str /// unknown. /// [JsonProperty("brand")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("brand")] +#endif public string Brand { get; set; } /// @@ -27,6 +36,9 @@ public class PaymentMethodCardGeneratedFromPaymentMethodDetailsCardPresent : Str /// identifies the specific program or product associated with a card. /// [JsonProperty("brand_product")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("brand_product")] +#endif public string BrandProduct { get; set; } /// @@ -35,6 +47,10 @@ public class PaymentMethodCardGeneratedFromPaymentMethodDetailsCardPresent : Str /// [JsonProperty("capture_before")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("capture_before")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime CaptureBefore { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -46,6 +62,9 @@ public class PaymentMethodCardGeneratedFromPaymentMethodDetailsCardPresent : Str /// payments, such as those made with Apple Pay and Google Pay. /// [JsonProperty("cardholder_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cardholder_name")] +#endif public string CardholderName { get; set; } /// @@ -53,6 +72,9 @@ public class PaymentMethodCardGeneratedFromPaymentMethodDetailsCardPresent : Str /// to get a sense of the international breakdown of cards you've collected. /// [JsonProperty("country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country")] +#endif public string Country { get; set; } /// @@ -60,24 +82,36 @@ public class PaymentMethodCardGeneratedFromPaymentMethodDetailsCardPresent : Str /// only and not typically available in standard API requests.). /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// /// Authorization response cryptogram. /// [JsonProperty("emv_auth_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("emv_auth_data")] +#endif public string EmvAuthData { get; set; } /// /// Two-digit number representing the card's expiration month. /// [JsonProperty("exp_month")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("exp_month")] +#endif public long ExpMonth { get; set; } /// /// Four-digit number representing the card's expiration year. /// [JsonProperty("exp_year")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("exp_year")] +#endif public long ExpYear { get; set; } /// @@ -90,6 +124,9 @@ public class PaymentMethodCardGeneratedFromPaymentMethodDetailsCardPresent : Str /// fingerprints for the same card---one for India and one for the rest of the world.. /// [JsonProperty("fingerprint")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fingerprint")] +#endif public string Fingerprint { get; set; } /// @@ -97,6 +134,9 @@ public class PaymentMethodCardGeneratedFromPaymentMethodDetailsCardPresent : Str /// unknown. /// [JsonProperty("funding")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("funding")] +#endif public string Funding { get; set; } /// @@ -105,6 +145,9 @@ public class PaymentMethodCardGeneratedFromPaymentMethodDetailsCardPresent : Str /// generate a card PaymentMethod. /// [JsonProperty("generated_card")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("generated_card")] +#endif public string GeneratedCard { get; set; } /// @@ -112,6 +155,9 @@ public class PaymentMethodCardGeneratedFromPaymentMethodDetailsCardPresent : Str /// available in standard API requests.). /// [JsonProperty("iin")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("iin")] +#endif public string Iin { get; set; } /// @@ -120,6 +166,9 @@ public class PaymentMethodCardGeneratedFromPaymentMethodDetailsCardPresent : Str /// href="https://stripe.com/docs/api/payment_intents/create#create_payment_intent-payment_method_options-card_present-request_incremental_authorization_support">request_incremental_authorization_support. /// [JsonProperty("incremental_authorization_supported")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("incremental_authorization_supported")] +#endif public bool IncrementalAuthorizationSupported { get; set; } /// @@ -127,12 +176,18 @@ public class PaymentMethodCardGeneratedFromPaymentMethodDetailsCardPresent : Str /// in standard API requests.). /// [JsonProperty("issuer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("issuer")] +#endif public string Issuer { get; set; } /// /// The last four digits of the card. /// [JsonProperty("last4")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last4")] +#endif public string Last4 { get; set; } /// @@ -142,6 +197,9 @@ public class PaymentMethodCardGeneratedFromPaymentMethodDetailsCardPresent : Str /// visa, or unknown. /// [JsonProperty("network")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("network")] +#endif public string Network { get; set; } /// @@ -153,24 +211,36 @@ public class PaymentMethodCardGeneratedFromPaymentMethodDetailsCardPresent : Str /// American Express transactions and always null for other card brands. /// [JsonProperty("network_transaction_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("network_transaction_id")] +#endif public string NetworkTransactionId { get; set; } /// /// Details about payments collected offline. /// [JsonProperty("offline")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("offline")] +#endif public PaymentMethodCardGeneratedFromPaymentMethodDetailsCardPresentOffline Offline { get; set; } /// /// Defines whether the authorized amount can be over-captured or not. /// [JsonProperty("overcapture_supported")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("overcapture_supported")] +#endif public bool OvercaptureSupported { get; set; } /// /// EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. /// [JsonProperty("preferred_locales")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preferred_locales")] +#endif public List PreferredLocales { get; set; } /// @@ -179,6 +249,9 @@ public class PaymentMethodCardGeneratedFromPaymentMethodDetailsCardPresent : Str /// magnetic_stripe_fallback, or magnetic_stripe_track2. /// [JsonProperty("read_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("read_method")] +#endif public string ReadMethod { get; set; } /// @@ -186,9 +259,15 @@ public class PaymentMethodCardGeneratedFromPaymentMethodDetailsCardPresent : Str /// transactions. /// [JsonProperty("receipt")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("receipt")] +#endif public PaymentMethodCardGeneratedFromPaymentMethodDetailsCardPresentReceipt Receipt { get; set; } [JsonProperty("wallet")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("wallet")] +#endif public PaymentMethodCardGeneratedFromPaymentMethodDetailsCardPresentWallet Wallet { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodCardGeneratedFromPaymentMethodDetailsCardPresentOffline.cs b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodCardGeneratedFromPaymentMethodDetailsCardPresentOffline.cs index 514af823c5..7a2df4e577 100644 --- a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodCardGeneratedFromPaymentMethodDetailsCardPresentOffline.cs +++ b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodCardGeneratedFromPaymentMethodDetailsCardPresentOffline.cs @@ -4,6 +4,9 @@ namespace Stripe using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodCardGeneratedFromPaymentMethodDetailsCardPresentOffline : StripeEntity { @@ -12,12 +15,19 @@ public class PaymentMethodCardGeneratedFromPaymentMethodDetailsCardPresentOfflin /// [JsonProperty("stored_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("stored_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? StoredAt { get; set; } /// /// The method used to process this payment method offline. Only deferred is allowed. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodCardGeneratedFromPaymentMethodDetailsCardPresentReceipt.cs b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodCardGeneratedFromPaymentMethodDetailsCardPresentReceipt.cs index 8db4e16651..7854d1fd9c 100644 --- a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodCardGeneratedFromPaymentMethodDetailsCardPresentReceipt.cs +++ b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodCardGeneratedFromPaymentMethodDetailsCardPresentReceipt.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodCardGeneratedFromPaymentMethodDetailsCardPresentReceipt : StripeEntity { @@ -10,30 +13,45 @@ public class PaymentMethodCardGeneratedFromPaymentMethodDetailsCardPresentReceip /// One of: checking, credit, prepaid, or unknown. /// [JsonProperty("account_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_type")] +#endif public string AccountType { get; set; } /// /// EMV tag 9F26, cryptogram generated by the integrated circuit chip. /// [JsonProperty("application_cryptogram")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("application_cryptogram")] +#endif public string ApplicationCryptogram { get; set; } /// /// Mnenomic of the Application Identifier. /// [JsonProperty("application_preferred_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("application_preferred_name")] +#endif public string ApplicationPreferredName { get; set; } /// /// Identifier for this transaction. /// [JsonProperty("authorization_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("authorization_code")] +#endif public string AuthorizationCode { get; set; } /// /// EMV tag 8A. A code returned by the card issuer. /// [JsonProperty("authorization_response_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("authorization_response_code")] +#endif public string AuthorizationResponseCode { get; set; } /// @@ -42,24 +60,36 @@ public class PaymentMethodCardGeneratedFromPaymentMethodDetailsCardPresentReceip /// offline_pin_and_signature, online_pin, or signature. /// [JsonProperty("cardholder_verification_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cardholder_verification_method")] +#endif public string CardholderVerificationMethod { get; set; } /// /// EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. /// [JsonProperty("dedicated_file_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("dedicated_file_name")] +#endif public string DedicatedFileName { get; set; } /// /// The outcome of a series of EMV functions performed by the card reader. /// [JsonProperty("terminal_verification_results")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("terminal_verification_results")] +#endif public string TerminalVerificationResults { get; set; } /// /// An indication of various EMV functions performed during the transaction. /// [JsonProperty("transaction_status_information")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transaction_status_information")] +#endif public string TransactionStatusInformation { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodCardGeneratedFromPaymentMethodDetailsCardPresentWallet.cs b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodCardGeneratedFromPaymentMethodDetailsCardPresentWallet.cs index 9502f19aa2..54d502a3d7 100644 --- a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodCardGeneratedFromPaymentMethodDetailsCardPresentWallet.cs +++ b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodCardGeneratedFromPaymentMethodDetailsCardPresentWallet.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodCardGeneratedFromPaymentMethodDetailsCardPresentWallet : StripeEntity { @@ -11,6 +14,9 @@ public class PaymentMethodCardGeneratedFromPaymentMethodDetailsCardPresentWallet /// One of: apple_pay, google_pay, samsung_pay, or unknown. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodCardNetworks.cs b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodCardNetworks.cs index 67e9f89510..4a50e56813 100644 --- a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodCardNetworks.cs +++ b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodCardNetworks.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodCardNetworks : StripeEntity { @@ -10,6 +13,9 @@ public class PaymentMethodCardNetworks : StripeEntity /// All available networks for the card. /// [JsonProperty("available")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("available")] +#endif public List Available { get; set; } /// @@ -18,6 +24,9 @@ public class PaymentMethodCardNetworks : StripeEntity /// valid for the card. /// [JsonProperty("preferred")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preferred")] +#endif public string Preferred { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodCardPresent.cs b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodCardPresent.cs index bf253120d0..c790fff811 100644 --- a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodCardPresent.cs +++ b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodCardPresent.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodCardPresent : StripeEntity { @@ -12,6 +15,9 @@ public class PaymentMethodCardPresent : StripeEntity /// unknown. /// [JsonProperty("brand")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("brand")] +#endif public string Brand { get; set; } /// @@ -19,6 +25,9 @@ public class PaymentMethodCardPresent : StripeEntity /// identifies the specific program or product associated with a card. /// [JsonProperty("brand_product")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("brand_product")] +#endif public string BrandProduct { get; set; } /// @@ -30,6 +39,9 @@ public class PaymentMethodCardPresent : StripeEntity /// payments, such as those made with Apple Pay and Google Pay. /// [JsonProperty("cardholder_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cardholder_name")] +#endif public string CardholderName { get; set; } /// @@ -37,6 +49,9 @@ public class PaymentMethodCardPresent : StripeEntity /// to get a sense of the international breakdown of cards you've collected. /// [JsonProperty("country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country")] +#endif public string Country { get; set; } /// @@ -44,18 +59,27 @@ public class PaymentMethodCardPresent : StripeEntity /// only and not typically available in standard API requests.). /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// /// Two-digit number representing the card's expiration month. /// [JsonProperty("exp_month")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("exp_month")] +#endif public long ExpMonth { get; set; } /// /// Four-digit number representing the card's expiration year. /// [JsonProperty("exp_year")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("exp_year")] +#endif public long ExpYear { get; set; } /// @@ -68,6 +92,9 @@ public class PaymentMethodCardPresent : StripeEntity /// fingerprints for the same card---one for India and one for the rest of the world.. /// [JsonProperty("fingerprint")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fingerprint")] +#endif public string Fingerprint { get; set; } /// @@ -75,6 +102,9 @@ public class PaymentMethodCardPresent : StripeEntity /// unknown. /// [JsonProperty("funding")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("funding")] +#endif public string Funding { get; set; } /// @@ -82,6 +112,9 @@ public class PaymentMethodCardPresent : StripeEntity /// available in standard API requests.). /// [JsonProperty("iin")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("iin")] +#endif public string Iin { get; set; } /// @@ -89,30 +122,45 @@ public class PaymentMethodCardPresent : StripeEntity /// in standard API requests.). /// [JsonProperty("issuer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("issuer")] +#endif public string Issuer { get; set; } /// /// The last four digits of the card. /// [JsonProperty("last4")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last4")] +#endif public string Last4 { get; set; } /// /// Contains information about card networks that can be used to process the payment. /// [JsonProperty("networks")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("networks")] +#endif public PaymentMethodCardPresentNetworks Networks { get; set; } /// /// Details about payment methods collected offline. /// [JsonProperty("offline")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("offline")] +#endif public PaymentMethodCardPresentOffline Offline { get; set; } /// /// EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. /// [JsonProperty("preferred_locales")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preferred_locales")] +#endif public List PreferredLocales { get; set; } /// @@ -121,9 +169,15 @@ public class PaymentMethodCardPresent : StripeEntity /// magnetic_stripe_fallback, or magnetic_stripe_track2. /// [JsonProperty("read_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("read_method")] +#endif public string ReadMethod { get; set; } [JsonProperty("wallet")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("wallet")] +#endif public PaymentMethodCardPresentWallet Wallet { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodCardPresentNetworks.cs b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodCardPresentNetworks.cs index c74050c21d..66c7575e62 100644 --- a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodCardPresentNetworks.cs +++ b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodCardPresentNetworks.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodCardPresentNetworks : StripeEntity { @@ -10,12 +13,18 @@ public class PaymentMethodCardPresentNetworks : StripeEntity [JsonProperty("available")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("available")] +#endif public List Available { get; set; } /// /// The preferred network for the card. /// [JsonProperty("preferred")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preferred")] +#endif public string Preferred { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodCardPresentOffline.cs b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodCardPresentOffline.cs index d48b01ea9c..b2d341bcfa 100644 --- a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodCardPresentOffline.cs +++ b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodCardPresentOffline.cs @@ -4,6 +4,9 @@ namespace Stripe using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodCardPresentOffline : StripeEntity { @@ -12,12 +15,19 @@ public class PaymentMethodCardPresentOffline : StripeEntity [JsonProperty("stored_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("stored_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? StoredAt { get; set; } /// /// The method used to process this payment method offline. Only deferred is allowed. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodCardPresentWallet.cs b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodCardPresentWallet.cs index 8458ca9cc8..f6215d0fa9 100644 --- a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodCardPresentWallet.cs +++ b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodCardPresentWallet.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodCardPresentWallet : StripeEntity { @@ -11,6 +14,9 @@ public class PaymentMethodCardPresentWallet : StripeEntityapple_pay, google_pay, samsung_pay, or unknown. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodCardThreeDSecureUsage.cs b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodCardThreeDSecureUsage.cs index 1116d86d66..55f0418d3c 100644 --- a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodCardThreeDSecureUsage.cs +++ b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodCardThreeDSecureUsage.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodCardThreeDSecureUsage : StripeEntity { @@ -9,6 +12,9 @@ public class PaymentMethodCardThreeDSecureUsage : StripeEntity [JsonProperty("supported")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("supported")] +#endif public bool Supported { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodCardWallet.cs b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodCardWallet.cs index 9d51338552..4f39ed8027 100644 --- a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodCardWallet.cs +++ b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodCardWallet.cs @@ -2,31 +2,55 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodCardWallet : StripeEntity { [JsonProperty("amex_express_checkout")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amex_express_checkout")] +#endif public PaymentMethodCardWalletAmexExpressCheckout AmexExpressCheckout { get; set; } [JsonProperty("apple_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("apple_pay")] +#endif public PaymentMethodCardWalletApplePay ApplePay { get; set; } /// /// (For tokenized numbers only.) The last four digits of the device account number. /// [JsonProperty("dynamic_last4")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("dynamic_last4")] +#endif public string DynamicLast4 { get; set; } [JsonProperty("google_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("google_pay")] +#endif public PaymentMethodCardWalletGooglePay GooglePay { get; set; } [JsonProperty("link")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("link")] +#endif public PaymentMethodCardWalletLink Link { get; set; } [JsonProperty("masterpass")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("masterpass")] +#endif public PaymentMethodCardWalletMasterpass Masterpass { get; set; } [JsonProperty("samsung_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("samsung_pay")] +#endif public PaymentMethodCardWalletSamsungPay SamsungPay { get; set; } /// @@ -38,9 +62,15 @@ public class PaymentMethodCardWallet : StripeEntity /// masterpass, samsung_pay, or visa_checkout. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } [JsonProperty("visa_checkout")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("visa_checkout")] +#endif public PaymentMethodCardWalletVisaCheckout VisaCheckout { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodCardWalletMasterpass.cs b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodCardWalletMasterpass.cs index 9696982bca..ea2fb64c26 100644 --- a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodCardWalletMasterpass.cs +++ b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodCardWalletMasterpass.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodCardWalletMasterpass : StripeEntity { @@ -11,6 +14,9 @@ public class PaymentMethodCardWalletMasterpass : StripeEntity [JsonProperty("billing_address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_address")] +#endif public Address BillingAddress { get; set; } /// @@ -18,6 +24,9 @@ public class PaymentMethodCardWalletMasterpass : StripeEntity [JsonProperty("email")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("email")] +#endif public string Email { get; set; } /// @@ -25,6 +34,9 @@ public class PaymentMethodCardWalletMasterpass : StripeEntity [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } /// @@ -33,6 +45,9 @@ public class PaymentMethodCardWalletMasterpass : StripeEntity [JsonProperty("shipping_address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping_address")] +#endif public Address ShippingAddress { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodCardWalletVisaCheckout.cs b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodCardWalletVisaCheckout.cs index a777980a5b..b55012b770 100644 --- a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodCardWalletVisaCheckout.cs +++ b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodCardWalletVisaCheckout.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodCardWalletVisaCheckout : StripeEntity { @@ -11,6 +14,9 @@ public class PaymentMethodCardWalletVisaCheckout : StripeEntity [JsonProperty("billing_address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_address")] +#endif public Address BillingAddress { get; set; } /// @@ -18,6 +24,9 @@ public class PaymentMethodCardWalletVisaCheckout : StripeEntity [JsonProperty("email")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("email")] +#endif public string Email { get; set; } /// @@ -25,6 +34,9 @@ public class PaymentMethodCardWalletVisaCheckout : StripeEntity [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } /// @@ -33,6 +45,9 @@ public class PaymentMethodCardWalletVisaCheckout : StripeEntity [JsonProperty("shipping_address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping_address")] +#endif public Address ShippingAddress { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodCashapp.cs b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodCashapp.cs index 18e29e017a..f17923a4c3 100644 --- a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodCashapp.cs +++ b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodCashapp.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodCashapp : StripeEntity { @@ -9,12 +12,18 @@ public class PaymentMethodCashapp : StripeEntity /// A unique and immutable identifier assigned by Cash App to every buyer. /// [JsonProperty("buyer_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("buyer_id")] +#endif public string BuyerId { get; set; } /// /// A public identifier for buyers using Cash App. /// [JsonProperty("cashtag")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cashtag")] +#endif public string Cashtag { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodEps.cs b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodEps.cs index 0de658081f..d35fedbaa3 100644 --- a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodEps.cs +++ b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodEps.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodEps : StripeEntity { @@ -35,6 +38,9 @@ public class PaymentMethodEps : StripeEntity /// vr_bank_braunau. /// [JsonProperty("bank")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank")] +#endif public string Bank { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodFpx.cs b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodFpx.cs index 40bf5051c9..84d83b1cf8 100644 --- a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodFpx.cs +++ b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodFpx.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodFpx : StripeEntity { @@ -10,6 +13,9 @@ public class PaymentMethodFpx : StripeEntity /// One of: company, or individual. /// [JsonProperty("account_holder_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_holder_type")] +#endif public string AccountHolderType { get; set; } /// @@ -26,6 +32,9 @@ public class PaymentMethodFpx : StripeEntity /// public_bank, rhb, standard_chartered, or uob. /// [JsonProperty("bank")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank")] +#endif public string Bank { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodIdeal.cs b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodIdeal.cs index 0b7d4a8e28..5ece22fe11 100644 --- a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodIdeal.cs +++ b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodIdeal.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodIdeal : StripeEntity { @@ -16,6 +19,9 @@ public class PaymentMethodIdeal : StripeEntity /// yoursafe. /// [JsonProperty("bank")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank")] +#endif public string Bank { get; set; } /// @@ -26,6 +32,9 @@ public class PaymentMethodIdeal : StripeEntity /// REVOLT21, SNSBNL2A, or TRIONL2U. /// [JsonProperty("bic")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bic")] +#endif public string Bic { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodInteracPresent.cs b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodInteracPresent.cs index a799d02318..ded445fbb8 100644 --- a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodInteracPresent.cs +++ b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodInteracPresent.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodInteracPresent : StripeEntity { @@ -10,6 +13,9 @@ public class PaymentMethodInteracPresent : StripeEntityinterac, mastercard or visa. /// [JsonProperty("brand")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("brand")] +#endif public string Brand { get; set; } /// @@ -21,6 +27,9 @@ public class PaymentMethodInteracPresent : StripeEntity [JsonProperty("cardholder_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cardholder_name")] +#endif public string CardholderName { get; set; } /// @@ -28,6 +37,9 @@ public class PaymentMethodInteracPresent : StripeEntity [JsonProperty("country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country")] +#endif public string Country { get; set; } /// @@ -35,18 +47,27 @@ public class PaymentMethodInteracPresent : StripeEntity [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// /// Two-digit number representing the card's expiration month. /// [JsonProperty("exp_month")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("exp_month")] +#endif public long ExpMonth { get; set; } /// /// Four-digit number representing the card's expiration year. /// [JsonProperty("exp_year")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("exp_year")] +#endif public long ExpYear { get; set; } /// @@ -59,6 +80,9 @@ public class PaymentMethodInteracPresent : StripeEntity. /// [JsonProperty("fingerprint")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fingerprint")] +#endif public string Fingerprint { get; set; } /// @@ -66,6 +90,9 @@ public class PaymentMethodInteracPresent : StripeEntityunknown. /// [JsonProperty("funding")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("funding")] +#endif public string Funding { get; set; } /// @@ -73,6 +100,9 @@ public class PaymentMethodInteracPresent : StripeEntity [JsonProperty("iin")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("iin")] +#endif public string Iin { get; set; } /// @@ -80,24 +110,36 @@ public class PaymentMethodInteracPresent : StripeEntity [JsonProperty("issuer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("issuer")] +#endif public string Issuer { get; set; } /// /// The last four digits of the card. /// [JsonProperty("last4")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last4")] +#endif public string Last4 { get; set; } /// /// Contains information about card networks that can be used to process the payment. /// [JsonProperty("networks")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("networks")] +#endif public PaymentMethodInteracPresentNetworks Networks { get; set; } /// /// EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. /// [JsonProperty("preferred_locales")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preferred_locales")] +#endif public List PreferredLocales { get; set; } /// @@ -106,6 +148,9 @@ public class PaymentMethodInteracPresent : StripeEntitymagnetic_stripe_fallback, or magnetic_stripe_track2. /// [JsonProperty("read_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("read_method")] +#endif public string ReadMethod { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodInteracPresentNetworks.cs b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodInteracPresentNetworks.cs index a5b4795634..f960957f2a 100644 --- a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodInteracPresentNetworks.cs +++ b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodInteracPresentNetworks.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodInteracPresentNetworks : StripeEntity { @@ -10,12 +13,18 @@ public class PaymentMethodInteracPresentNetworks : StripeEntity [JsonProperty("available")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("available")] +#endif public List Available { get; set; } /// /// The preferred network for the card. /// [JsonProperty("preferred")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preferred")] +#endif public string Preferred { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodKlarna.cs b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodKlarna.cs index 1484d40bef..4222e5f3f1 100644 --- a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodKlarna.cs +++ b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodKlarna.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodKlarna : StripeEntity { @@ -9,6 +12,9 @@ public class PaymentMethodKlarna : StripeEntity /// The customer's date of birth, if provided. /// [JsonProperty("dob")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("dob")] +#endif public PaymentMethodKlarnaDob Dob { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodKlarnaDob.cs b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodKlarnaDob.cs index a51a7f84e6..511bc64d0f 100644 --- a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodKlarnaDob.cs +++ b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodKlarnaDob.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodKlarnaDob : StripeEntity { @@ -9,18 +12,27 @@ public class PaymentMethodKlarnaDob : StripeEntity /// The day of birth, between 1 and 31. /// [JsonProperty("day")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("day")] +#endif public long? Day { get; set; } /// /// The month of birth, between 1 and 12. /// [JsonProperty("month")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("month")] +#endif public long? Month { get; set; } /// /// The four-digit year of birth. /// [JsonProperty("year")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("year")] +#endif public long? Year { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodKrCard.cs b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodKrCard.cs index c6af1b13ae..ff47394871 100644 --- a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodKrCard.cs +++ b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodKrCard.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodKrCard : StripeEntity { @@ -14,12 +17,18 @@ public class PaymentMethodKrCard : StripeEntity /// woori. /// [JsonProperty("brand")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("brand")] +#endif public string Brand { get; set; } /// /// The last four digits of the card. This may not be present for American Express cards. /// [JsonProperty("last4")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last4")] +#endif public string Last4 { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodLink.cs b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodLink.cs index b08b1951f2..d42b1f750f 100644 --- a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodLink.cs +++ b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodLink.cs @@ -3,6 +3,9 @@ namespace Stripe { using System; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodLink : StripeEntity { @@ -10,6 +13,9 @@ public class PaymentMethodLink : StripeEntity /// Account owner's email address. /// [JsonProperty("email")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("email")] +#endif public string Email { get; set; } /// @@ -17,6 +23,9 @@ public class PaymentMethodLink : StripeEntity /// [Obsolete("This property is deprecated, please refer to the description for details.")] [JsonProperty("persistent_token")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("persistent_token")] +#endif public string PersistentToken { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodNaverPay.cs b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodNaverPay.cs index c35a11a1b2..6f2b2c1fc0 100644 --- a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodNaverPay.cs +++ b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodNaverPay.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodNaverPay : StripeEntity { @@ -10,6 +13,9 @@ public class PaymentMethodNaverPay : StripeEntity /// One of: card, or points. /// [JsonProperty("funding")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("funding")] +#endif public string Funding { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodP24.cs b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodP24.cs index fbe6a4f6c0..78433cc04b 100644 --- a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodP24.cs +++ b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodP24.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodP24 : StripeEntity { @@ -17,6 +20,9 @@ public class PaymentMethodP24 : StripeEntity /// volkswagen_bank. /// [JsonProperty("bank")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank")] +#endif public string Bank { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodPaypal.cs b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodPaypal.cs index ede6f39012..68f09c3c1d 100644 --- a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodPaypal.cs +++ b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodPaypal.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodPaypal : StripeEntity { @@ -10,12 +13,18 @@ public class PaymentMethodPaypal : StripeEntity /// authorization or settlement. They cannot be set or mutated. /// [JsonProperty("payer_email")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payer_email")] +#endif public string PayerEmail { get; set; } /// /// PayPal account PayerID. This identifier uniquely identifies the PayPal customer. /// [JsonProperty("payer_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payer_id")] +#endif public string PayerId { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodRadarOptions.cs b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodRadarOptions.cs index 09e55e31d6..9b9f4fb668 100644 --- a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodRadarOptions.cs +++ b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodRadarOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodRadarOptions : StripeEntity { @@ -11,6 +14,9 @@ public class PaymentMethodRadarOptions : StripeEntity /// predictions on your payments. /// [JsonProperty("session")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("session")] +#endif public string Session { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodSepaDebit.cs b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodSepaDebit.cs index 84bd0e71d5..d356242eb4 100644 --- a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodSepaDebit.cs +++ b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodSepaDebit.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodSepaDebit : StripeEntity { @@ -9,18 +12,27 @@ public class PaymentMethodSepaDebit : StripeEntity /// Bank code of bank associated with the bank account. /// [JsonProperty("bank_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_code")] +#endif public string BankCode { get; set; } /// /// Branch code of bank associated with the bank account. /// [JsonProperty("branch_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("branch_code")] +#endif public string BranchCode { get; set; } /// /// Two-letter ISO code representing the country the bank account is located in. /// [JsonProperty("country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country")] +#endif public string Country { get; set; } /// @@ -28,18 +40,27 @@ public class PaymentMethodSepaDebit : StripeEntity /// whether two bank accounts are the same. /// [JsonProperty("fingerprint")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fingerprint")] +#endif public string Fingerprint { get; set; } /// /// Information about the object that generated this PaymentMethod. /// [JsonProperty("generated_from")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("generated_from")] +#endif public PaymentMethodSepaDebitGeneratedFrom GeneratedFrom { get; set; } /// /// Last four characters of the IBAN. /// [JsonProperty("last4")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last4")] +#endif public string Last4 { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodSepaDebitGeneratedFrom.cs b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodSepaDebitGeneratedFrom.cs index daa43cd12c..a5b3953386 100644 --- a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodSepaDebitGeneratedFrom.cs +++ b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodSepaDebitGeneratedFrom.cs @@ -3,7 +3,13 @@ namespace Stripe { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class PaymentMethodSepaDebitGeneratedFrom : StripeEntity { #region Expandable Charge @@ -13,6 +19,9 @@ public class PaymentMethodSepaDebitGeneratedFrom : StripeEntity [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string ChargeId { get => this.InternalCharge?.Id; @@ -26,6 +35,9 @@ public string ChargeId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Charge Charge { get => this.InternalCharge?.ExpandedObject; @@ -34,6 +46,10 @@ public Charge Charge [JsonProperty("charge")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("charge")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalCharge { get; set; } #endregion @@ -44,6 +60,9 @@ public Charge Charge /// The ID of the SetupAttempt that generated this PaymentMethod, if any. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string SetupAttemptId { get => this.InternalSetupAttempt?.Id; @@ -57,6 +76,9 @@ public string SetupAttemptId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public SetupAttempt SetupAttempt { get => this.InternalSetupAttempt?.ExpandedObject; @@ -65,6 +87,10 @@ public SetupAttempt SetupAttempt [JsonProperty("setup_attempt")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_attempt")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalSetupAttempt { get; set; } #endregion } diff --git a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodSofort.cs b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodSofort.cs index b5326f2f2f..751a3c59a0 100644 --- a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodSofort.cs +++ b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodSofort.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodSofort : StripeEntity { @@ -9,6 +12,9 @@ public class PaymentMethodSofort : StripeEntity /// Two-letter ISO code representing the country the bank account is located in. /// [JsonProperty("country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country")] +#endif public string Country { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodUsBankAccount.cs b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodUsBankAccount.cs index b7b69e151b..accd63a214 100644 --- a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodUsBankAccount.cs +++ b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodUsBankAccount.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodUsBankAccount : StripeEntity { @@ -10,6 +13,9 @@ public class PaymentMethodUsBankAccount : StripeEntitycompany, or individual. /// [JsonProperty("account_holder_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_holder_type")] +#endif public string AccountHolderType { get; set; } /// @@ -17,18 +23,27 @@ public class PaymentMethodUsBankAccount : StripeEntitychecking, or savings. /// [JsonProperty("account_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_type")] +#endif public string AccountType { get; set; } /// /// The name of the bank. /// [JsonProperty("bank_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_name")] +#endif public string BankName { get; set; } /// /// The ID of the Financial Connections Account used to create the payment method. /// [JsonProperty("financial_connections_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("financial_connections_account")] +#endif public string FinancialConnectionsAccount { get; set; } /// @@ -36,30 +51,45 @@ public class PaymentMethodUsBankAccount : StripeEntity [JsonProperty("fingerprint")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fingerprint")] +#endif public string Fingerprint { get; set; } /// /// Last four digits of the bank account number. /// [JsonProperty("last4")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last4")] +#endif public string Last4 { get; set; } /// /// Contains information about US bank account networks that can be used. /// [JsonProperty("networks")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("networks")] +#endif public PaymentMethodUsBankAccountNetworks Networks { get; set; } /// /// Routing number of the bank account. /// [JsonProperty("routing_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("routing_number")] +#endif public string RoutingNumber { get; set; } /// /// Contains information about the future reusability of this PaymentMethod. /// [JsonProperty("status_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status_details")] +#endif public PaymentMethodUsBankAccountStatusDetails StatusDetails { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodUsBankAccountNetworks.cs b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodUsBankAccountNetworks.cs index 9f6c3a475b..6376e29bd9 100644 --- a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodUsBankAccountNetworks.cs +++ b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodUsBankAccountNetworks.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodUsBankAccountNetworks : StripeEntity { @@ -10,6 +13,9 @@ public class PaymentMethodUsBankAccountNetworks : StripeEntity [JsonProperty("preferred")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preferred")] +#endif public string Preferred { get; set; } /// @@ -17,6 +23,9 @@ public class PaymentMethodUsBankAccountNetworks : StripeEntityach, or us_domestic_wire. /// [JsonProperty("supported")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("supported")] +#endif public List Supported { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodUsBankAccountStatusDetails.cs b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodUsBankAccountStatusDetails.cs index 3ca488e6db..e882b8e721 100644 --- a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodUsBankAccountStatusDetails.cs +++ b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodUsBankAccountStatusDetails.cs @@ -2,10 +2,16 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodUsBankAccountStatusDetails : StripeEntity { [JsonProperty("blocked")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("blocked")] +#endif public PaymentMethodUsBankAccountStatusDetailsBlocked Blocked { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodUsBankAccountStatusDetailsBlocked.cs b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodUsBankAccountStatusDetailsBlocked.cs index 80970a25da..c575943be0 100644 --- a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodUsBankAccountStatusDetailsBlocked.cs +++ b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodUsBankAccountStatusDetailsBlocked.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodUsBankAccountStatusDetailsBlocked : StripeEntity { @@ -11,6 +14,9 @@ public class PaymentMethodUsBankAccountStatusDetailsBlocked : StripeEntityR10, R11, R16, R20, R29, or R31. /// [JsonProperty("network_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("network_code")] +#endif public string NetworkCode { get; set; } /// @@ -20,6 +26,9 @@ public class PaymentMethodUsBankAccountStatusDetailsBlocked : StripeEntitybank_account_unusable, or debit_not_authorized. /// [JsonProperty("reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reason")] +#endif public string Reason { get; set; } } } diff --git a/src/Stripe.net/Entities/Payouts/Payout.cs b/src/Stripe.net/Entities/Payouts/Payout.cs index 93976334ea..62620f3a5e 100644 --- a/src/Stripe.net/Entities/Payouts/Payout.cs +++ b/src/Stripe.net/Entities/Payouts/Payout.cs @@ -5,6 +5,9 @@ namespace Stripe using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// A Payout object is created when you receive funds from Stripe, or when you @@ -16,18 +19,27 @@ namespace Stripe /// /// Related guide: Receiving payouts. /// +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class Payout : StripeEntity, IHasId, IHasMetadata, IHasObject, IBalanceTransactionSource { /// /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// @@ -35,6 +47,9 @@ public class Payout : StripeEntity, IHasId, IHasMetadata, IHasObject, IB /// card. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long Amount { get; set; } #region Expandable ApplicationFee @@ -46,6 +61,9 @@ public class Payout : StripeEntity, IHasId, IHasMetadata, IHasObject, IB /// Connect documentation for details. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string ApplicationFeeId { get => this.InternalApplicationFee?.Id; @@ -61,6 +79,9 @@ public string ApplicationFeeId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public ApplicationFee ApplicationFee { get => this.InternalApplicationFee?.ExpandedObject; @@ -69,6 +90,10 @@ public ApplicationFee ApplicationFee [JsonProperty("application_fee")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("application_fee")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalApplicationFee { get; set; } #endregion @@ -78,6 +103,9 @@ public ApplicationFee ApplicationFee /// Connect documentation for details. /// [JsonProperty("application_fee_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("application_fee_amount")] +#endif public long? ApplicationFeeAmount { get; set; } /// @@ -86,6 +114,10 @@ public ApplicationFee ApplicationFee /// [JsonProperty("arrival_date")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("arrival_date")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime ArrivalDate { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -95,6 +127,9 @@ public ApplicationFee ApplicationFee /// manually. /// [JsonProperty("automatic")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("automatic")] +#endif public bool Automatic { get; set; } #region Expandable BalanceTransaction @@ -105,6 +140,9 @@ public ApplicationFee ApplicationFee /// balance. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string BalanceTransactionId { get => this.InternalBalanceTransaction?.Id; @@ -119,6 +157,9 @@ public string BalanceTransactionId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public BalanceTransaction BalanceTransaction { get => this.InternalBalanceTransaction?.ExpandedObject; @@ -127,6 +168,10 @@ public BalanceTransaction BalanceTransaction [JsonProperty("balance_transaction")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("balance_transaction")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalBalanceTransaction { get; set; } #endregion @@ -135,6 +180,10 @@ public BalanceTransaction BalanceTransaction /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -143,12 +192,18 @@ public BalanceTransaction BalanceTransaction /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// /// An arbitrary string attached to the object. Often useful for displaying to users. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } #region Expandable Destination @@ -158,6 +213,9 @@ public BalanceTransaction BalanceTransaction /// ID of the bank account or card the payout is sent to. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string DestinationId { get => this.InternalDestination?.Id; @@ -171,6 +229,9 @@ public string DestinationId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public IExternalAccount Destination { get => this.InternalDestination?.ExpandedObject; @@ -179,6 +240,10 @@ public IExternalAccount Destination [JsonProperty("destination")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("destination")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalDestination { get; set; } #endregion @@ -191,6 +256,9 @@ public IExternalAccount Destination /// your balance. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string FailureBalanceTransactionId { get => this.InternalFailureBalanceTransaction?.Id; @@ -206,6 +274,9 @@ public string FailureBalanceTransactionId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public BalanceTransaction FailureBalanceTransaction { get => this.InternalFailureBalanceTransaction?.ExpandedObject; @@ -214,6 +285,10 @@ public BalanceTransaction FailureBalanceTransaction [JsonProperty("failure_balance_transaction")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("failure_balance_transaction")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalFailureBalanceTransaction { get; set; } #endregion @@ -222,12 +297,18 @@ public BalanceTransaction FailureBalanceTransaction /// href="https://stripe.com/docs/api#payout_failures">list of failure codes. /// [JsonProperty("failure_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("failure_code")] +#endif public string FailureCode { get; set; } /// /// Message that provides the reason for a payout failure, if available. /// [JsonProperty("failure_message")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("failure_message")] +#endif public string FailureMessage { get; set; } /// @@ -235,6 +316,9 @@ public BalanceTransaction FailureBalanceTransaction /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// @@ -243,6 +327,9 @@ public BalanceTransaction FailureBalanceTransaction /// object in a structured format. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -253,6 +340,9 @@ public BalanceTransaction FailureBalanceTransaction /// Payouts. /// [JsonProperty("method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("method")] +#endif public string Method { get; set; } #region Expandable OriginalPayout @@ -262,6 +352,9 @@ public BalanceTransaction FailureBalanceTransaction /// If the payout reverses another, this is the ID of the original payout. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string OriginalPayoutId { get => this.InternalOriginalPayout?.Id; @@ -275,6 +368,9 @@ public string OriginalPayoutId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Payout OriginalPayout { get => this.InternalOriginalPayout?.ExpandedObject; @@ -283,6 +379,10 @@ public Payout OriginalPayout [JsonProperty("original_payout")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("original_payout")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalOriginalPayout { get; set; } #endregion @@ -293,6 +393,9 @@ public Payout OriginalPayout /// One of: completed, in_progress, or not_applicable. /// [JsonProperty("reconciliation_status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reconciliation_status")] +#endif public string ReconciliationStatus { get; set; } #region Expandable ReversedBy @@ -302,6 +405,9 @@ public Payout OriginalPayout /// If the payout reverses, this is the ID of the payout that reverses this payout. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string ReversedById { get => this.InternalReversedBy?.Id; @@ -315,6 +421,9 @@ public string ReversedById /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Payout ReversedBy { get => this.InternalReversedBy?.ExpandedObject; @@ -323,6 +432,10 @@ public Payout ReversedBy [JsonProperty("reversed_by")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reversed_by")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalReversedBy { get; set; } #endregion @@ -331,12 +444,18 @@ public Payout ReversedBy /// card, fpx, or bank_account. /// [JsonProperty("source_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("source_type")] +#endif public string SourceType { get; set; } /// /// Extra information about a payout that displays on the user's bank statement. /// [JsonProperty("statement_descriptor")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("statement_descriptor")] +#endif public string StatementDescriptor { get; set; } /// @@ -348,6 +467,9 @@ public Payout ReversedBy /// failed. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } /// @@ -355,6 +477,9 @@ public Payout ReversedBy /// with their bank. Banks might call this a "reference number" or something similar. /// [JsonProperty("trace_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("trace_id")] +#endif public PayoutTraceId TraceId { get; set; } /// @@ -362,6 +487,9 @@ public Payout ReversedBy /// One of: bank_account, or card. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Payouts/PayoutTraceId.cs b/src/Stripe.net/Entities/Payouts/PayoutTraceId.cs index 55112f418f..6370ac5dce 100644 --- a/src/Stripe.net/Entities/Payouts/PayoutTraceId.cs +++ b/src/Stripe.net/Entities/Payouts/PayoutTraceId.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PayoutTraceId : StripeEntity { @@ -14,12 +17,18 @@ public class PayoutTraceId : StripeEntity /// after arrival_date until transitioning to supported or unsupported. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } /// /// The trace ID value if trace_id.status is supported, otherwise nil. /// [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public string Value { get; set; } } } diff --git a/src/Stripe.net/Entities/Persons/Person.cs b/src/Stripe.net/Entities/Persons/Person.cs index 31918551a2..b57b58e190 100644 --- a/src/Stripe.net/Entities/Persons/Person.cs +++ b/src/Stripe.net/Entities/Persons/Person.cs @@ -5,6 +5,9 @@ namespace Stripe using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// This is an object representing a person associated with a Stripe account. @@ -27,36 +30,57 @@ public class Person : StripeEntity, IHasId, IHasMetadata, IHasObject /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// /// The account the person is associated with. /// [JsonProperty("account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account")] +#endif public string Account { get; set; } [JsonProperty("additional_tos_acceptances")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("additional_tos_acceptances")] +#endif public PersonAdditionalTosAcceptances AdditionalTosAcceptances { get; set; } [JsonProperty("address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address")] +#endif public Address Address { get; set; } /// /// The Kana variation of the person's address (Japan only). /// [JsonProperty("address_kana")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_kana")] +#endif public AddressJapan AddressKana { get; set; } /// /// The Kanji variation of the person's address (Japan only). /// [JsonProperty("address_kanji")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_kanji")] +#endif public AddressJapan AddressKanji { get; set; } /// @@ -64,45 +88,71 @@ public class Person : StripeEntity, IHasId, IHasMetadata, IHasObject /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// /// Whether this object is deleted or not. /// [JsonProperty("deleted", NullValueHandling = NullValueHandling.Ignore)] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("deleted")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] +#endif public bool? Deleted { get; set; } [JsonProperty("dob")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("dob")] +#endif public Dob Dob { get; set; } /// /// The person's email address. /// [JsonProperty("email")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("email")] +#endif public string Email { get; set; } /// /// The person's first name. /// [JsonProperty("first_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("first_name")] +#endif public string FirstName { get; set; } /// /// The Kana variation of the person's first name (Japan only). /// [JsonProperty("first_name_kana")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("first_name_kana")] +#endif public string FirstNameKana { get; set; } /// /// The Kanji variation of the person's first name (Japan only). /// [JsonProperty("first_name_kanji")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("first_name_kanji")] +#endif public string FirstNameKanji { get; set; } /// /// A list of alternate names or aliases that the person is known by. /// [JsonProperty("full_name_aliases")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("full_name_aliases")] +#endif public List FullNameAliases { get; set; } /// @@ -112,12 +162,18 @@ public class Person : StripeEntity, IHasId, IHasMetadata, IHasObject /// by when. /// [JsonProperty("future_requirements")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("future_requirements")] +#endif public PersonFutureRequirements FutureRequirements { get; set; } /// /// The person's gender. /// [JsonProperty("gender")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("gender")] +#endif public string Gender { get; set; } /// @@ -126,36 +182,54 @@ public class Person : StripeEntity, IHasId, IHasMetadata, IHasObject /// of an individual's SSN for the US indicated by ssn_last_4_provided). /// [JsonProperty("id_number_provided")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id_number_provided")] +#endif public bool IdNumberProvided { get; set; } /// /// Whether the person's id_number_secondary was provided. /// [JsonProperty("id_number_secondary_provided")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id_number_secondary_provided")] +#endif public bool IdNumberSecondaryProvided { get; set; } /// /// The person's last name. /// [JsonProperty("last_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last_name")] +#endif public string LastName { get; set; } /// /// The Kana variation of the person's last name (Japan only). /// [JsonProperty("last_name_kana")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last_name_kana")] +#endif public string LastNameKana { get; set; } /// /// The Kanji variation of the person's last name (Japan only). /// [JsonProperty("last_name_kanji")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last_name_kanji")] +#endif public string LastNameKanji { get; set; } /// /// The person's maiden name. /// [JsonProperty("maiden_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("maiden_name")] +#endif public string MaidenName { get; set; } /// @@ -164,18 +238,27 @@ public class Person : StripeEntity, IHasId, IHasMetadata, IHasObject /// object in a structured format. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// The country where the person is a national. /// [JsonProperty("nationality")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("nationality")] +#endif public string Nationality { get; set; } /// /// The person's phone number. /// [JsonProperty("phone")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("phone")] +#endif public string Phone { get; set; } /// @@ -185,12 +268,21 @@ public class Person : StripeEntity, IHasId, IHasMetadata, IHasObject /// One of: existing, or none. /// [JsonProperty("political_exposure")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("political_exposure")] +#endif public string PoliticalExposure { get; set; } [JsonProperty("registered_address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("registered_address")] +#endif public Address RegisteredAddress { get; set; } [JsonProperty("relationship")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("relationship")] +#endif public PersonRelationship Relationship { get; set; } /// @@ -198,6 +290,9 @@ public class Person : StripeEntity, IHasId, IHasMetadata, IHasObject /// be collected, and by when. /// [JsonProperty("requirements")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requirements")] +#endif public PersonRequirements Requirements { get; set; } /// @@ -205,9 +300,15 @@ public class Person : StripeEntity, IHasId, IHasMetadata, IHasObject /// (U.S. only). /// [JsonProperty("ssn_last_4_provided")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ssn_last_4_provided")] +#endif public bool SsnLast4Provided { get; set; } [JsonProperty("verification")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("verification")] +#endif public PersonVerification Verification { get; set; } } } diff --git a/src/Stripe.net/Entities/Persons/PersonAdditionalTosAcceptances.cs b/src/Stripe.net/Entities/Persons/PersonAdditionalTosAcceptances.cs index 85e6e7c9be..4b0924acdf 100644 --- a/src/Stripe.net/Entities/Persons/PersonAdditionalTosAcceptances.cs +++ b/src/Stripe.net/Entities/Persons/PersonAdditionalTosAcceptances.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PersonAdditionalTosAcceptances : StripeEntity { @@ -9,6 +12,9 @@ public class PersonAdditionalTosAcceptances : StripeEntity [JsonProperty("account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account")] +#endif public PersonAdditionalTosAcceptancesAccount Account { get; set; } } } diff --git a/src/Stripe.net/Entities/Persons/PersonAdditionalTosAcceptancesAccount.cs b/src/Stripe.net/Entities/Persons/PersonAdditionalTosAcceptancesAccount.cs index bf8a80feea..a63ccaf0dd 100644 --- a/src/Stripe.net/Entities/Persons/PersonAdditionalTosAcceptancesAccount.cs +++ b/src/Stripe.net/Entities/Persons/PersonAdditionalTosAcceptancesAccount.cs @@ -4,6 +4,9 @@ namespace Stripe using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PersonAdditionalTosAcceptancesAccount : StripeEntity { @@ -12,12 +15,19 @@ public class PersonAdditionalTosAcceptancesAccount : StripeEntity [JsonProperty("date")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("date")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? Date { get; set; } /// /// The IP address from which the legal guardian accepted the service agreement. /// [JsonProperty("ip")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ip")] +#endif public string Ip { get; set; } /// @@ -25,6 +35,9 @@ public class PersonAdditionalTosAcceptancesAccount : StripeEntity [JsonProperty("user_agent")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("user_agent")] +#endif public string UserAgent { get; set; } } } diff --git a/src/Stripe.net/Entities/Persons/PersonFutureRequirements.cs b/src/Stripe.net/Entities/Persons/PersonFutureRequirements.cs index 2712eb02a3..626b9d0544 100644 --- a/src/Stripe.net/Entities/Persons/PersonFutureRequirements.cs +++ b/src/Stripe.net/Entities/Persons/PersonFutureRequirements.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PersonFutureRequirements : StripeEntity { @@ -11,6 +14,9 @@ public class PersonFutureRequirements : StripeEntity /// fields instead. /// [JsonProperty("alternatives")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("alternatives")] +#endif public List Alternatives { get; set; } /// @@ -21,6 +27,9 @@ public class PersonFutureRequirements : StripeEntity /// account's enablement state prior to transition. /// [JsonProperty("currently_due")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currently_due")] +#endif public List CurrentlyDue { get; set; } /// @@ -28,6 +37,9 @@ public class PersonFutureRequirements : StripeEntity /// or verification failed. /// [JsonProperty("errors")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("errors")] +#endif public List Errors { get; set; } /// @@ -36,6 +48,9 @@ public class PersonFutureRequirements : StripeEntity /// future_requirements[current_deadline] becomes set. /// [JsonProperty("eventually_due")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("eventually_due")] +#endif public List EventuallyDue { get; set; } /// @@ -45,6 +60,9 @@ public class PersonFutureRequirements : StripeEntity /// requirements.past_due. /// [JsonProperty("past_due")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("past_due")] +#endif public List PastDue { get; set; } /// @@ -56,6 +74,9 @@ public class PersonFutureRequirements : StripeEntity /// pending. /// [JsonProperty("pending_verification")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("pending_verification")] +#endif public List PendingVerification { get; set; } } } diff --git a/src/Stripe.net/Entities/Persons/PersonFutureRequirementsAlternative.cs b/src/Stripe.net/Entities/Persons/PersonFutureRequirementsAlternative.cs index ff2dc474f6..8db365a11c 100644 --- a/src/Stripe.net/Entities/Persons/PersonFutureRequirementsAlternative.cs +++ b/src/Stripe.net/Entities/Persons/PersonFutureRequirementsAlternative.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PersonFutureRequirementsAlternative : StripeEntity { @@ -10,6 +13,9 @@ public class PersonFutureRequirementsAlternative : StripeEntityoriginal_fields_due. /// [JsonProperty("alternative_fields_due")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("alternative_fields_due")] +#endif public List AlternativeFieldsDue { get; set; } /// @@ -17,6 +23,9 @@ public class PersonFutureRequirementsAlternative : StripeEntityalternative_fields_due. /// [JsonProperty("original_fields_due")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("original_fields_due")] +#endif public List OriginalFieldsDue { get; set; } } } diff --git a/src/Stripe.net/Entities/Persons/PersonFutureRequirementsError.cs b/src/Stripe.net/Entities/Persons/PersonFutureRequirementsError.cs index abc2475873..212db3635a 100644 --- a/src/Stripe.net/Entities/Persons/PersonFutureRequirementsError.cs +++ b/src/Stripe.net/Entities/Persons/PersonFutureRequirementsError.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PersonFutureRequirementsError : StripeEntity { @@ -69,6 +72,9 @@ public class PersonFutureRequirementsError : StripeEntityverification_supportability. /// [JsonProperty("code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("code")] +#endif public string Code { get; set; } /// @@ -76,6 +82,9 @@ public class PersonFutureRequirementsError : StripeEntity [JsonProperty("reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reason")] +#endif public string Reason { get; set; } /// @@ -83,6 +92,9 @@ public class PersonFutureRequirementsError : StripeEntity [JsonProperty("requirement")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requirement")] +#endif public string Requirement { get; set; } } } diff --git a/src/Stripe.net/Entities/Persons/PersonRelationship.cs b/src/Stripe.net/Entities/Persons/PersonRelationship.cs index b968af1452..11f7e04e56 100644 --- a/src/Stripe.net/Entities/Persons/PersonRelationship.cs +++ b/src/Stripe.net/Entities/Persons/PersonRelationship.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PersonRelationship : StripeEntity { @@ -9,6 +12,9 @@ public class PersonRelationship : StripeEntity /// Whether the person is the authorizer of the account's representative. /// [JsonProperty("authorizer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("authorizer")] +#endif public bool? Authorizer { get; set; } /// @@ -17,6 +23,9 @@ public class PersonRelationship : StripeEntity /// meets its regulatory obligations. /// [JsonProperty("director")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("director")] +#endif public bool? Director { get; set; } /// @@ -24,24 +33,36 @@ public class PersonRelationship : StripeEntity /// organization. /// [JsonProperty("executive")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("executive")] +#endif public bool? Executive { get; set; } /// /// Whether the person is the legal guardian of the account's representative. /// [JsonProperty("legal_guardian")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("legal_guardian")] +#endif public bool? LegalGuardian { get; set; } /// /// Whether the person is an owner of the account’s legal entity. /// [JsonProperty("owner")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("owner")] +#endif public bool? Owner { get; set; } /// /// The percent owned by the person of the account's legal entity. /// [JsonProperty("percent_ownership")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("percent_ownership")] +#endif public decimal? PercentOwnership { get; set; } /// @@ -52,12 +73,18 @@ public class PersonRelationship : StripeEntity /// responsible for opening the account. /// [JsonProperty("representative")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("representative")] +#endif public bool? Representative { get; set; } /// /// The person's title (e.g., CEO, Support Engineer). /// [JsonProperty("title")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("title")] +#endif public string Title { get; set; } } } diff --git a/src/Stripe.net/Entities/Persons/PersonRequirements.cs b/src/Stripe.net/Entities/Persons/PersonRequirements.cs index edc07bfc03..591c8fa334 100644 --- a/src/Stripe.net/Entities/Persons/PersonRequirements.cs +++ b/src/Stripe.net/Entities/Persons/PersonRequirements.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PersonRequirements : StripeEntity { @@ -11,6 +14,9 @@ public class PersonRequirements : StripeEntity /// fields instead. /// [JsonProperty("alternatives")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("alternatives")] +#endif public List Alternatives { get; set; } /// @@ -19,6 +25,9 @@ public class PersonRequirements : StripeEntity /// well, and the account is disabled. /// [JsonProperty("currently_due")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currently_due")] +#endif public List CurrentlyDue { get; set; } /// @@ -26,6 +35,9 @@ public class PersonRequirements : StripeEntity /// or verification failed. /// [JsonProperty("errors")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("errors")] +#endif public List Errors { get; set; } /// @@ -34,6 +46,9 @@ public class PersonRequirements : StripeEntity /// current_deadline becomes set. /// [JsonProperty("eventually_due")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("eventually_due")] +#endif public List EventuallyDue { get; set; } /// @@ -41,6 +56,9 @@ public class PersonRequirements : StripeEntity /// need to be collected to enable the person's account. /// [JsonProperty("past_due")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("past_due")] +#endif public List PastDue { get; set; } /// @@ -52,6 +70,9 @@ public class PersonRequirements : StripeEntity /// verification is still pending. /// [JsonProperty("pending_verification")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("pending_verification")] +#endif public List PendingVerification { get; set; } } } diff --git a/src/Stripe.net/Entities/Persons/PersonRequirementsAlternative.cs b/src/Stripe.net/Entities/Persons/PersonRequirementsAlternative.cs index 7670ec3e76..ab7362517f 100644 --- a/src/Stripe.net/Entities/Persons/PersonRequirementsAlternative.cs +++ b/src/Stripe.net/Entities/Persons/PersonRequirementsAlternative.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PersonRequirementsAlternative : StripeEntity { @@ -10,6 +13,9 @@ public class PersonRequirementsAlternative : StripeEntityoriginal_fields_due. /// [JsonProperty("alternative_fields_due")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("alternative_fields_due")] +#endif public List AlternativeFieldsDue { get; set; } /// @@ -17,6 +23,9 @@ public class PersonRequirementsAlternative : StripeEntityalternative_fields_due. /// [JsonProperty("original_fields_due")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("original_fields_due")] +#endif public List OriginalFieldsDue { get; set; } } } diff --git a/src/Stripe.net/Entities/Persons/PersonRequirementsError.cs b/src/Stripe.net/Entities/Persons/PersonRequirementsError.cs index 6055ce9ca4..f510621d79 100644 --- a/src/Stripe.net/Entities/Persons/PersonRequirementsError.cs +++ b/src/Stripe.net/Entities/Persons/PersonRequirementsError.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PersonRequirementsError : StripeEntity { @@ -69,6 +72,9 @@ public class PersonRequirementsError : StripeEntity /// verification_supportability. /// [JsonProperty("code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("code")] +#endif public string Code { get; set; } /// @@ -76,6 +82,9 @@ public class PersonRequirementsError : StripeEntity /// about the error. /// [JsonProperty("reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reason")] +#endif public string Reason { get; set; } /// @@ -83,6 +92,9 @@ public class PersonRequirementsError : StripeEntity /// be resolved. /// [JsonProperty("requirement")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requirement")] +#endif public string Requirement { get; set; } } } diff --git a/src/Stripe.net/Entities/Persons/PersonVerification.cs b/src/Stripe.net/Entities/Persons/PersonVerification.cs index 7205e4e4b8..6c53aab1c8 100644 --- a/src/Stripe.net/Entities/Persons/PersonVerification.cs +++ b/src/Stripe.net/Entities/Persons/PersonVerification.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PersonVerification : StripeEntity { @@ -10,6 +13,9 @@ public class PersonVerification : StripeEntity /// well-known utility company. /// [JsonProperty("additional_document")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("additional_document")] +#endif public PersonVerificationAdditionalDocument AdditionalDocument { get; set; } /// @@ -17,6 +23,9 @@ public class PersonVerification : StripeEntity /// this may say "Provided identity information could not be verified". /// [JsonProperty("details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("details")] +#endif public string Details { get; set; } /// @@ -27,9 +36,15 @@ public class PersonVerification : StripeEntity /// the verification state for the person. /// [JsonProperty("details_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("details_code")] +#endif public string DetailsCode { get; set; } [JsonProperty("document")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("document")] +#endif public PersonVerificationDocument Document { get; set; } /// @@ -37,6 +52,9 @@ public class PersonVerification : StripeEntity /// pending, or verified. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } } } diff --git a/src/Stripe.net/Entities/Persons/PersonVerificationAdditionalDocument.cs b/src/Stripe.net/Entities/Persons/PersonVerificationAdditionalDocument.cs index 5422ce2c83..bfb507d080 100644 --- a/src/Stripe.net/Entities/Persons/PersonVerificationAdditionalDocument.cs +++ b/src/Stripe.net/Entities/Persons/PersonVerificationAdditionalDocument.cs @@ -3,7 +3,13 @@ namespace Stripe { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class PersonVerificationAdditionalDocument : StripeEntity { #region Expandable Back @@ -14,6 +20,9 @@ public class PersonVerificationAdditionalDocument : StripeEntity with a purpose value of identity_document. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string BackId { get => this.InternalBack?.Id; @@ -28,6 +37,9 @@ public string BackId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public File Back { get => this.InternalBack?.ExpandedObject; @@ -36,6 +48,10 @@ public File Back [JsonProperty("back")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("back")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalBack { get; set; } #endregion @@ -45,6 +61,9 @@ public File Back /// document is too unclear to read". /// [JsonProperty("details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("details")] +#endif public string Details { get; set; } /// @@ -59,6 +78,9 @@ public File Back /// verification state for this document. /// [JsonProperty("details_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("details_code")] +#endif public string DetailsCode { get; set; } #region Expandable Front @@ -69,6 +91,9 @@ public File Back /// upload with a purpose value of identity_document. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string FrontId { get => this.InternalFront?.Id; @@ -83,6 +108,9 @@ public string FrontId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public File Front { get => this.InternalFront?.ExpandedObject; @@ -91,6 +119,10 @@ public File Front [JsonProperty("front")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("front")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalFront { get; set; } #endregion } diff --git a/src/Stripe.net/Entities/Persons/PersonVerificationDocument.cs b/src/Stripe.net/Entities/Persons/PersonVerificationDocument.cs index 69531bf3f3..2ec40cd854 100644 --- a/src/Stripe.net/Entities/Persons/PersonVerificationDocument.cs +++ b/src/Stripe.net/Entities/Persons/PersonVerificationDocument.cs @@ -3,7 +3,13 @@ namespace Stripe { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class PersonVerificationDocument : StripeEntity { #region Expandable Back @@ -14,6 +20,9 @@ public class PersonVerificationDocument : StripeEntity with a purpose value of identity_document. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string BackId { get => this.InternalBack?.Id; @@ -28,6 +37,9 @@ public string BackId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public File Back { get => this.InternalBack?.ExpandedObject; @@ -36,6 +48,10 @@ public File Back [JsonProperty("back")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("back")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalBack { get; set; } #endregion @@ -45,6 +61,9 @@ public File Back /// document is too unclear to read". /// [JsonProperty("details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("details")] +#endif public string Details { get; set; } /// @@ -59,6 +78,9 @@ public File Back /// verification state for this document. /// [JsonProperty("details_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("details_code")] +#endif public string DetailsCode { get; set; } #region Expandable Front @@ -69,6 +91,9 @@ public File Back /// upload with a purpose value of identity_document. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string FrontId { get => this.InternalFront?.Id; @@ -83,6 +108,9 @@ public string FrontId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public File Front { get => this.InternalFront?.ExpandedObject; @@ -91,6 +119,10 @@ public File Front [JsonProperty("front")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("front")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalFront { get; set; } #endregion } diff --git a/src/Stripe.net/Entities/Plans/Plan.cs b/src/Stripe.net/Entities/Plans/Plan.cs index e839b952a9..e19839d6f4 100644 --- a/src/Stripe.net/Entities/Plans/Plan.cs +++ b/src/Stripe.net/Entities/Plans/Plan.cs @@ -5,6 +5,9 @@ namespace Stripe using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// You can now model subscriptions more flexibly using the and more about products and prices. /// +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class Plan : StripeEntity, IHasId, IHasMetadata, IHasObject { /// /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// /// Whether the plan can be used for new purchases. /// [JsonProperty("active")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("active")] +#endif public bool Active { get; set; } /// @@ -56,6 +71,9 @@ public class Plan : StripeEntity, IHasId, IHasMetadata, IHasObject /// One of: last_during_period, last_ever, max, or sum. /// [JsonProperty("aggregate_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("aggregate_usage")] +#endif public string AggregateUsage { get; set; } /// @@ -63,6 +81,9 @@ public class Plan : StripeEntity, IHasId, IHasMetadata, IHasObject /// integer if possible. Only set if billing_scheme=per_unit. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long? Amount { get; set; } /// @@ -70,6 +91,9 @@ public class Plan : StripeEntity, IHasId, IHasMetadata, IHasObject /// string with at most 12 decimal places. Only set if billing_scheme=per_unit. /// [JsonProperty("amount_decimal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_decimal")] +#endif public decimal? AmountDecimal { get; set; } /// @@ -82,6 +106,9 @@ public class Plan : StripeEntity, IHasId, IHasMetadata, IHasObject /// One of: per_unit, or tiered. /// [JsonProperty("billing_scheme")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_scheme")] +#endif public string BillingScheme { get; set; } /// @@ -89,6 +116,10 @@ public class Plan : StripeEntity, IHasId, IHasMetadata, IHasObject /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -97,12 +128,19 @@ public class Plan : StripeEntity, IHasId, IHasMetadata, IHasObject /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// /// Whether this object is deleted or not. /// [JsonProperty("deleted", NullValueHandling = NullValueHandling.Ignore)] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("deleted")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] +#endif public bool? Deleted { get; set; } /// @@ -111,6 +149,9 @@ public class Plan : StripeEntity, IHasId, IHasMetadata, IHasObject /// One of: day, month, week, or year. /// [JsonProperty("interval")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interval")] +#endif public string Interval { get; set; } /// @@ -119,6 +160,9 @@ public class Plan : StripeEntity, IHasId, IHasMetadata, IHasObject /// bills every 3 months. /// [JsonProperty("interval_count")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interval_count")] +#endif public long IntervalCount { get; set; } /// @@ -126,6 +170,9 @@ public class Plan : StripeEntity, IHasId, IHasMetadata, IHasObject /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// @@ -134,18 +181,27 @@ public class Plan : StripeEntity, IHasId, IHasMetadata, IHasObject /// object in a structured format. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// The meter tracking the usage of a metered price. /// [JsonProperty("meter")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("meter")] +#endif public string Meter { get; set; } /// /// A brief description of the plan, hidden from customers. /// [JsonProperty("nickname")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("nickname")] +#endif public string Nickname { get; set; } #region Expandable Product @@ -155,6 +211,9 @@ public class Plan : StripeEntity, IHasId, IHasMetadata, IHasObject /// The product whose pricing this plan determines. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string ProductId { get => this.InternalProduct?.Id; @@ -168,6 +227,9 @@ public string ProductId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Product Product { get => this.InternalProduct?.ExpandedObject; @@ -176,6 +238,10 @@ public Product Product [JsonProperty("product")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("product")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalProduct { get; set; } #endregion @@ -184,6 +250,9 @@ public Product Product /// be set to tiered. See also the documentation for billing_scheme. /// [JsonProperty("tiers")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tiers")] +#endif public List Tiers { get; set; } /// @@ -193,6 +262,9 @@ public Product Product /// One of: graduated, or volume. /// [JsonProperty("tiers_mode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tiers_mode")] +#endif public string TiersMode { get; set; } /// @@ -200,6 +272,9 @@ public Product Product /// billed. Cannot be combined with tiers. /// [JsonProperty("transform_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transform_usage")] +#endif public PlanTransformUsage TransformUsage { get; set; } /// @@ -207,6 +282,9 @@ public Product Product /// href="https://stripe.com/docs/api#create_subscription-trial_from_plan">trial_from_plan=true. /// [JsonProperty("trial_period_days")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("trial_period_days")] +#endif public long? TrialPeriodDays { get; set; } /// @@ -217,6 +295,9 @@ public Product Product /// One of: licensed, or metered. /// [JsonProperty("usage_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("usage_type")] +#endif public string UsageType { get; set; } } } diff --git a/src/Stripe.net/Entities/Plans/PlanTier.cs b/src/Stripe.net/Entities/Plans/PlanTier.cs index ca6e3e981d..323b055cdf 100644 --- a/src/Stripe.net/Entities/Plans/PlanTier.cs +++ b/src/Stripe.net/Entities/Plans/PlanTier.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PlanTier : StripeEntity { @@ -9,30 +12,45 @@ public class PlanTier : StripeEntity /// Price for the entire tier. /// [JsonProperty("flat_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("flat_amount")] +#endif public long? FlatAmount { get; set; } /// /// Same as flat_amount, but contains a decimal value with at most 12 decimal places. /// [JsonProperty("flat_amount_decimal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("flat_amount_decimal")] +#endif public decimal? FlatAmountDecimal { get; set; } /// /// Per unit price for units relevant to the tier. /// [JsonProperty("unit_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_amount")] +#endif public long? UnitAmount { get; set; } /// /// Same as unit_amount, but contains a decimal value with at most 12 decimal places. /// [JsonProperty("unit_amount_decimal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_amount_decimal")] +#endif public decimal? UnitAmountDecimal { get; set; } /// /// Up to and including to this quantity will be contained in the tier. /// [JsonProperty("up_to")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("up_to")] +#endif public long? UpTo { get; set; } } } diff --git a/src/Stripe.net/Entities/Plans/PlanTransformUsage.cs b/src/Stripe.net/Entities/Plans/PlanTransformUsage.cs index 9071b333ad..f95e9e3a2f 100644 --- a/src/Stripe.net/Entities/Plans/PlanTransformUsage.cs +++ b/src/Stripe.net/Entities/Plans/PlanTransformUsage.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PlanTransformUsage : StripeEntity { @@ -9,6 +12,9 @@ public class PlanTransformUsage : StripeEntity /// Divide usage by this number. /// [JsonProperty("divide_by")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("divide_by")] +#endif public long DivideBy { get; set; } /// @@ -16,6 +22,9 @@ public class PlanTransformUsage : StripeEntity /// One of: down, or up. /// [JsonProperty("round")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("round")] +#endif public string Round { get; set; } } } diff --git a/src/Stripe.net/Entities/Prices/Price.cs b/src/Stripe.net/Entities/Prices/Price.cs index 5ea7df5591..1528697c9a 100644 --- a/src/Stripe.net/Entities/Prices/Price.cs +++ b/src/Stripe.net/Entities/Prices/Price.cs @@ -5,6 +5,9 @@ namespace Stripe using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// Prices define the unit cost, currency, and (optional) billing cycle for both recurring @@ -24,24 +27,36 @@ namespace Stripe /// invoice, and more about products and prices. /// +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class Price : StripeEntity, IHasId, IHasMetadata, IHasObject { /// /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// /// Whether the price can be used for new purchases. /// [JsonProperty("active")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("active")] +#endif public bool Active { get; set; } /// @@ -55,6 +70,9 @@ public class Price : StripeEntity, IHasId, IHasMetadata, IHasObject /// One of: per_unit, or tiered. /// [JsonProperty("billing_scheme")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_scheme")] +#endif public string BillingScheme { get; set; } /// @@ -62,6 +80,10 @@ public class Price : StripeEntity, IHasId, IHasMetadata, IHasObject /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -70,6 +92,9 @@ public class Price : StripeEntity, IHasId, IHasMetadata, IHasObject /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// @@ -78,6 +103,9 @@ public class Price : StripeEntity, IHasId, IHasMetadata, IHasObject /// href="https://stripe.com/docs/currencies">supported currency. /// [JsonProperty("currency_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency_options")] +#endif public Dictionary CurrencyOptions { get; set; } /// @@ -85,12 +113,19 @@ public class Price : StripeEntity, IHasId, IHasMetadata, IHasObject /// Checkout Sessions and Payment Links. /// [JsonProperty("custom_unit_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("custom_unit_amount")] +#endif public PriceCustomUnitAmount CustomUnitAmount { get; set; } /// /// Whether this object is deleted or not. /// [JsonProperty("deleted", NullValueHandling = NullValueHandling.Ignore)] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("deleted")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] +#endif public bool? Deleted { get; set; } /// @@ -98,6 +133,9 @@ public class Price : StripeEntity, IHasId, IHasMetadata, IHasObject /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// @@ -105,6 +143,9 @@ public class Price : StripeEntity, IHasId, IHasMetadata, IHasObject /// 200 characters. /// [JsonProperty("lookup_key")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("lookup_key")] +#endif public string LookupKey { get; set; } /// @@ -113,12 +154,18 @@ public class Price : StripeEntity, IHasId, IHasMetadata, IHasObject /// object in a structured format. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// A brief description of the price, hidden from customers. /// [JsonProperty("nickname")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("nickname")] +#endif public string Nickname { get; set; } #region Expandable Product @@ -128,6 +175,9 @@ public class Price : StripeEntity, IHasId, IHasMetadata, IHasObject /// The ID of the product this price is associated with. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string ProductId { get => this.InternalProduct?.Id; @@ -141,6 +191,9 @@ public string ProductId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Product Product { get => this.InternalProduct?.ExpandedObject; @@ -149,6 +202,10 @@ public Product Product [JsonProperty("product")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("product")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalProduct { get; set; } #endregion @@ -156,6 +213,9 @@ public Product Product /// The recurring components of a price such as interval and usage_type. /// [JsonProperty("recurring")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("recurring")] +#endif public PriceRecurring Recurring { get; set; } /// @@ -168,6 +228,9 @@ public Product Product /// One of: exclusive, inclusive, or unspecified. /// [JsonProperty("tax_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_behavior")] +#endif public string TaxBehavior { get; set; } /// @@ -175,6 +238,9 @@ public Product Product /// be set to tiered. See also the documentation for billing_scheme. /// [JsonProperty("tiers")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tiers")] +#endif public List Tiers { get; set; } /// @@ -184,6 +250,9 @@ public Product Product /// One of: graduated, or volume. /// [JsonProperty("tiers_mode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tiers_mode")] +#endif public string TiersMode { get; set; } /// @@ -191,6 +260,9 @@ public Product Product /// billed. Cannot be combined with tiers. /// [JsonProperty("transform_quantity")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transform_quantity")] +#endif public PriceTransformQuantity TransformQuantity { get; set; } /// @@ -199,6 +271,9 @@ public Product Product /// One of: one_time, or recurring. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } /// @@ -206,6 +281,9 @@ public Product Product /// integer if possible. Only set if billing_scheme=per_unit. /// [JsonProperty("unit_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_amount")] +#endif public long? UnitAmount { get; set; } /// @@ -213,6 +291,9 @@ public Product Product /// string with at most 12 decimal places. Only set if billing_scheme=per_unit. /// [JsonProperty("unit_amount_decimal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_amount_decimal")] +#endif public decimal? UnitAmountDecimal { get; set; } } } diff --git a/src/Stripe.net/Entities/Prices/PriceCurrencyOptions.cs b/src/Stripe.net/Entities/Prices/PriceCurrencyOptions.cs index 99f3dc6664..ffc5fe4635 100644 --- a/src/Stripe.net/Entities/Prices/PriceCurrencyOptions.cs +++ b/src/Stripe.net/Entities/Prices/PriceCurrencyOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PriceCurrencyOptions : StripeEntity { @@ -11,6 +14,9 @@ public class PriceCurrencyOptions : StripeEntity /// Checkout Sessions and Payment Links. /// [JsonProperty("custom_unit_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("custom_unit_amount")] +#endif public PriceCurrencyOptionsCustomUnitAmount CustomUnitAmount { get; set; } /// @@ -23,6 +29,9 @@ public class PriceCurrencyOptions : StripeEntity /// One of: exclusive, inclusive, or unspecified. /// [JsonProperty("tax_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_behavior")] +#endif public string TaxBehavior { get; set; } /// @@ -30,6 +39,9 @@ public class PriceCurrencyOptions : StripeEntity /// be set to tiered. See also the documentation for billing_scheme. /// [JsonProperty("tiers")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tiers")] +#endif public List Tiers { get; set; } /// @@ -37,6 +49,9 @@ public class PriceCurrencyOptions : StripeEntity /// integer if possible. Only set if billing_scheme=per_unit. /// [JsonProperty("unit_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_amount")] +#endif public long? UnitAmount { get; set; } /// @@ -44,6 +59,9 @@ public class PriceCurrencyOptions : StripeEntity /// string with at most 12 decimal places. Only set if billing_scheme=per_unit. /// [JsonProperty("unit_amount_decimal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_amount_decimal")] +#endif public decimal? UnitAmountDecimal { get; set; } } } diff --git a/src/Stripe.net/Entities/Prices/PriceCurrencyOptionsCustomUnitAmount.cs b/src/Stripe.net/Entities/Prices/PriceCurrencyOptionsCustomUnitAmount.cs index ebcfc4a905..c0ff134a0b 100644 --- a/src/Stripe.net/Entities/Prices/PriceCurrencyOptionsCustomUnitAmount.cs +++ b/src/Stripe.net/Entities/Prices/PriceCurrencyOptionsCustomUnitAmount.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PriceCurrencyOptionsCustomUnitAmount : StripeEntity { @@ -9,6 +12,9 @@ public class PriceCurrencyOptionsCustomUnitAmount : StripeEntity [JsonProperty("maximum")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("maximum")] +#endif public long? Maximum { get; set; } /// @@ -16,12 +22,18 @@ public class PriceCurrencyOptionsCustomUnitAmount : StripeEntity [JsonProperty("minimum")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("minimum")] +#endif public long? Minimum { get; set; } /// /// The starting unit amount which can be updated by the customer. /// [JsonProperty("preset")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preset")] +#endif public long? Preset { get; set; } } } diff --git a/src/Stripe.net/Entities/Prices/PriceCurrencyOptionsTier.cs b/src/Stripe.net/Entities/Prices/PriceCurrencyOptionsTier.cs index a9cd57d872..2f649cad74 100644 --- a/src/Stripe.net/Entities/Prices/PriceCurrencyOptionsTier.cs +++ b/src/Stripe.net/Entities/Prices/PriceCurrencyOptionsTier.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PriceCurrencyOptionsTier : StripeEntity { @@ -9,30 +12,45 @@ public class PriceCurrencyOptionsTier : StripeEntity /// Price for the entire tier. /// [JsonProperty("flat_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("flat_amount")] +#endif public long? FlatAmount { get; set; } /// /// Same as flat_amount, but contains a decimal value with at most 12 decimal places. /// [JsonProperty("flat_amount_decimal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("flat_amount_decimal")] +#endif public decimal? FlatAmountDecimal { get; set; } /// /// Per unit price for units relevant to the tier. /// [JsonProperty("unit_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_amount")] +#endif public long? UnitAmount { get; set; } /// /// Same as unit_amount, but contains a decimal value with at most 12 decimal places. /// [JsonProperty("unit_amount_decimal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_amount_decimal")] +#endif public decimal? UnitAmountDecimal { get; set; } /// /// Up to and including to this quantity will be contained in the tier. /// [JsonProperty("up_to")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("up_to")] +#endif public long? UpTo { get; set; } } } diff --git a/src/Stripe.net/Entities/Prices/PriceCustomUnitAmount.cs b/src/Stripe.net/Entities/Prices/PriceCustomUnitAmount.cs index ab48410b43..ba5a83d5d2 100644 --- a/src/Stripe.net/Entities/Prices/PriceCustomUnitAmount.cs +++ b/src/Stripe.net/Entities/Prices/PriceCustomUnitAmount.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PriceCustomUnitAmount : StripeEntity { @@ -9,6 +12,9 @@ public class PriceCustomUnitAmount : StripeEntity /// The maximum unit amount the customer can specify for this item. /// [JsonProperty("maximum")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("maximum")] +#endif public long? Maximum { get; set; } /// @@ -16,12 +22,18 @@ public class PriceCustomUnitAmount : StripeEntity /// minimum charge amount. /// [JsonProperty("minimum")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("minimum")] +#endif public long? Minimum { get; set; } /// /// The starting unit amount which can be updated by the customer. /// [JsonProperty("preset")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preset")] +#endif public long? Preset { get; set; } } } diff --git a/src/Stripe.net/Entities/Prices/PriceRecurring.cs b/src/Stripe.net/Entities/Prices/PriceRecurring.cs index ac736f9691..2ecf132afe 100644 --- a/src/Stripe.net/Entities/Prices/PriceRecurring.cs +++ b/src/Stripe.net/Entities/Prices/PriceRecurring.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PriceRecurring : StripeEntity { @@ -11,6 +14,9 @@ public class PriceRecurring : StripeEntity /// One of: last_during_period, last_ever, max, or sum. /// [JsonProperty("aggregate_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("aggregate_usage")] +#endif public string AggregateUsage { get; set; } /// @@ -19,6 +25,9 @@ public class PriceRecurring : StripeEntity /// One of: day, month, week, or year. /// [JsonProperty("interval")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interval")] +#endif public string Interval { get; set; } /// @@ -27,12 +36,18 @@ public class PriceRecurring : StripeEntity /// bills every 3 months. /// [JsonProperty("interval_count")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interval_count")] +#endif public long IntervalCount { get; set; } /// /// The meter tracking the usage of a metered price. /// [JsonProperty("meter")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("meter")] +#endif public string Meter { get; set; } /// @@ -40,6 +55,9 @@ public class PriceRecurring : StripeEntity /// href="https://stripe.com/docs/api#create_subscription-trial_from_plan">trial_from_plan=true. /// [JsonProperty("trial_period_days")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("trial_period_days")] +#endif public long? TrialPeriodDays { get; set; } /// @@ -50,6 +68,9 @@ public class PriceRecurring : StripeEntity /// One of: licensed, or metered. /// [JsonProperty("usage_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("usage_type")] +#endif public string UsageType { get; set; } } } diff --git a/src/Stripe.net/Entities/Prices/PriceTier.cs b/src/Stripe.net/Entities/Prices/PriceTier.cs index 614f3f0d01..254f64cd77 100644 --- a/src/Stripe.net/Entities/Prices/PriceTier.cs +++ b/src/Stripe.net/Entities/Prices/PriceTier.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PriceTier : StripeEntity { @@ -9,30 +12,45 @@ public class PriceTier : StripeEntity /// Price for the entire tier. /// [JsonProperty("flat_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("flat_amount")] +#endif public long? FlatAmount { get; set; } /// /// Same as flat_amount, but contains a decimal value with at most 12 decimal places. /// [JsonProperty("flat_amount_decimal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("flat_amount_decimal")] +#endif public decimal? FlatAmountDecimal { get; set; } /// /// Per unit price for units relevant to the tier. /// [JsonProperty("unit_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_amount")] +#endif public long? UnitAmount { get; set; } /// /// Same as unit_amount, but contains a decimal value with at most 12 decimal places. /// [JsonProperty("unit_amount_decimal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_amount_decimal")] +#endif public decimal? UnitAmountDecimal { get; set; } /// /// Up to and including to this quantity will be contained in the tier. /// [JsonProperty("up_to")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("up_to")] +#endif public long? UpTo { get; set; } } } diff --git a/src/Stripe.net/Entities/Prices/PriceTransformQuantity.cs b/src/Stripe.net/Entities/Prices/PriceTransformQuantity.cs index fc373e128d..b26b4e2cb2 100644 --- a/src/Stripe.net/Entities/Prices/PriceTransformQuantity.cs +++ b/src/Stripe.net/Entities/Prices/PriceTransformQuantity.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PriceTransformQuantity : StripeEntity { @@ -9,6 +12,9 @@ public class PriceTransformQuantity : StripeEntity /// Divide usage by this number. /// [JsonProperty("divide_by")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("divide_by")] +#endif public long DivideBy { get; set; } /// @@ -16,6 +22,9 @@ public class PriceTransformQuantity : StripeEntity /// One of: down, or up. /// [JsonProperty("round")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("round")] +#endif public string Round { get; set; } } } diff --git a/src/Stripe.net/Entities/ProductFeatures/ProductFeature.cs b/src/Stripe.net/Entities/ProductFeatures/ProductFeature.cs index 8b7afa9561..debc620aa8 100644 --- a/src/Stripe.net/Entities/ProductFeatures/ProductFeature.cs +++ b/src/Stripe.net/Entities/ProductFeatures/ProductFeature.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// A product_feature represents an attachment between a feature and a product. When a @@ -14,18 +17,28 @@ public class ProductFeature : StripeEntity, IHasId, IHasObject /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// /// Whether this object is deleted or not. /// [JsonProperty("deleted", NullValueHandling = NullValueHandling.Ignore)] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("deleted")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] +#endif public bool? Deleted { get; set; } /// @@ -34,6 +47,9 @@ public class ProductFeature : StripeEntity, IHasId, IHasObject /// entitlement to the feature for the purchasing customer. /// [JsonProperty("entitlement_feature")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("entitlement_feature")] +#endif public Entitlements.Feature EntitlementFeature { get; set; } /// @@ -41,6 +57,9 @@ public class ProductFeature : StripeEntity, IHasId, IHasObject /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } } } diff --git a/src/Stripe.net/Entities/Products/Product.cs b/src/Stripe.net/Entities/Products/Product.cs index fa48aea2f8..44249cdc64 100644 --- a/src/Stripe.net/Entities/Products/Product.cs +++ b/src/Stripe.net/Entities/Products/Product.cs @@ -5,6 +5,9 @@ namespace Stripe using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// Products describe the specific goods or services you offer to your customers. For @@ -21,24 +24,36 @@ namespace Stripe /// payments with Checkout, and more about Products and Prices. /// +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class Product : StripeEntity, IHasId, IHasMetadata, IHasObject { /// /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// /// Whether the product is currently available for purchase. /// [JsonProperty("active")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("active")] +#endif public bool Active { get; set; } /// @@ -46,6 +61,10 @@ public class Product : StripeEntity, IHasId, IHasMetadata, IHasObject /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; #region Expandable DefaultPrice @@ -56,6 +75,9 @@ public class Product : StripeEntity, IHasId, IHasMetadata, IHasObject /// default price for this product. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string DefaultPriceId { get => this.InternalDefaultPrice?.Id; @@ -70,6 +92,9 @@ public string DefaultPriceId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Price DefaultPrice { get => this.InternalDefaultPrice?.ExpandedObject; @@ -78,6 +103,10 @@ public Price DefaultPrice [JsonProperty("default_price")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("default_price")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalDefaultPrice { get; set; } #endregion @@ -85,6 +114,10 @@ public Price DefaultPrice /// Whether this object is deleted or not. /// [JsonProperty("deleted", NullValueHandling = NullValueHandling.Ignore)] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("deleted")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] +#endif public bool? Deleted { get; set; } /// @@ -93,6 +126,9 @@ public Price DefaultPrice /// rendering purposes. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// @@ -100,6 +136,9 @@ public Price DefaultPrice /// customer. /// [JsonProperty("images")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("images")] +#endif public List Images { get; set; } /// @@ -107,6 +146,9 @@ public Price DefaultPrice /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// @@ -114,6 +156,9 @@ public Price DefaultPrice /// href="https://stripe.com/docs/payments/checkout/pricing-table">pricing tables. /// [JsonProperty("marketing_features")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("marketing_features")] +#endif public List MarketingFeatures { get; set; } /// @@ -122,24 +167,36 @@ public Price DefaultPrice /// object in a structured format. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// The product's name, meant to be displayable to the customer. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } /// /// The dimensions of this product for shipping purposes. /// [JsonProperty("package_dimensions")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("package_dimensions")] +#endif public ProductPackageDimensions PackageDimensions { get; set; } /// /// Whether this product is shipped (i.e., physical goods). /// [JsonProperty("shippable")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shippable")] +#endif public bool? Shippable { get; set; } /// @@ -148,6 +205,9 @@ public Price DefaultPrice /// descriptor will be used. Only used for subscription payments. /// [JsonProperty("statement_descriptor")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("statement_descriptor")] +#endif public string StatementDescriptor { get; set; } #region Expandable TaxCode @@ -157,6 +217,9 @@ public Price DefaultPrice /// A tax code ID. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string TaxCodeId { get => this.InternalTaxCode?.Id; @@ -170,6 +233,9 @@ public string TaxCodeId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public TaxCode TaxCode { get => this.InternalTaxCode?.ExpandedObject; @@ -178,6 +244,10 @@ public TaxCode TaxCode [JsonProperty("tax_code")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_code")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalTaxCode { get; set; } #endregion @@ -188,6 +258,9 @@ public TaxCode TaxCode /// One of: good, or service. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } /// @@ -195,6 +268,9 @@ public TaxCode TaxCode /// customers' receipts, invoices, Checkout, and the customer portal. /// [JsonProperty("unit_label")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_label")] +#endif public string UnitLabel { get; set; } /// @@ -202,12 +278,19 @@ public TaxCode TaxCode /// [JsonProperty("updated")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("updated")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Updated { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// /// A URL of a publicly-accessible webpage for this product. /// [JsonProperty("url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("url")] +#endif public string Url { get; set; } } } diff --git a/src/Stripe.net/Entities/Products/ProductMarketingFeature.cs b/src/Stripe.net/Entities/Products/ProductMarketingFeature.cs index f69d98bc02..684b8669a7 100644 --- a/src/Stripe.net/Entities/Products/ProductMarketingFeature.cs +++ b/src/Stripe.net/Entities/Products/ProductMarketingFeature.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ProductMarketingFeature : StripeEntity { @@ -9,6 +12,9 @@ public class ProductMarketingFeature : StripeEntity /// The marketing feature name. Up to 80 characters long. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } } } diff --git a/src/Stripe.net/Entities/Products/ProductPackageDimensions.cs b/src/Stripe.net/Entities/Products/ProductPackageDimensions.cs index 0fad504b2f..2cb2a075f7 100644 --- a/src/Stripe.net/Entities/Products/ProductPackageDimensions.cs +++ b/src/Stripe.net/Entities/Products/ProductPackageDimensions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ProductPackageDimensions : StripeEntity { @@ -9,24 +12,36 @@ public class ProductPackageDimensions : StripeEntity /// Height, in inches. /// [JsonProperty("height")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("height")] +#endif public decimal Height { get; set; } /// /// Length, in inches. /// [JsonProperty("length")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("length")] +#endif public decimal Length { get; set; } /// /// Weight, in ounces. /// [JsonProperty("weight")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("weight")] +#endif public decimal Weight { get; set; } /// /// Width, in inches. /// [JsonProperty("width")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("width")] +#endif public decimal Width { get; set; } } } diff --git a/src/Stripe.net/Entities/PromotionCodes/PromotionCode.cs b/src/Stripe.net/Entities/PromotionCodes/PromotionCode.cs index fcb5d8dfe0..193fa0de69 100644 --- a/src/Stripe.net/Entities/PromotionCodes/PromotionCode.cs +++ b/src/Stripe.net/Entities/PromotionCodes/PromotionCode.cs @@ -5,24 +5,36 @@ namespace Stripe using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// A Promotion Code represents a customer-redeemable code for a coupon. It can be used to create multiple /// codes for a single coupon. /// +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class PromotionCode : StripeEntity, IHasId, IHasMetadata, IHasObject { /// /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// @@ -30,6 +42,9 @@ public class PromotionCode : StripeEntity, IHasId, IHasMetadata, /// coupon is also valid. /// [JsonProperty("active")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("active")] +#endif public bool Active { get; set; } /// @@ -38,6 +53,9 @@ public class PromotionCode : StripeEntity, IHasId, IHasMetadata, /// case letters (A-Z), and digits (0-9). /// [JsonProperty("code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("code")] +#endif public string Code { get; set; } /// @@ -51,6 +69,9 @@ public class PromotionCode : StripeEntity, IHasId, IHasMetadata, /// payment intents. /// [JsonProperty("coupon")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("coupon")] +#endif public Coupon Coupon { get; set; } /// @@ -58,6 +79,10 @@ public class PromotionCode : StripeEntity, IHasId, IHasMetadata, /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; #region Expandable Customer @@ -67,6 +92,9 @@ public class PromotionCode : StripeEntity, IHasId, IHasMetadata, /// The customer that this promotion code can be used by. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string CustomerId { get => this.InternalCustomer?.Id; @@ -80,6 +108,9 @@ public string CustomerId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Customer Customer { get => this.InternalCustomer?.ExpandedObject; @@ -88,6 +119,10 @@ public Customer Customer [JsonProperty("customer")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalCustomer { get; set; } #endregion @@ -96,6 +131,10 @@ public Customer Customer /// [JsonProperty("expires_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("expires_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? ExpiresAt { get; set; } /// @@ -103,12 +142,18 @@ public Customer Customer /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// /// Maximum number of times this promotion code can be redeemed. /// [JsonProperty("max_redemptions")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("max_redemptions")] +#endif public long? MaxRedemptions { get; set; } /// @@ -117,15 +162,24 @@ public Customer Customer /// object in a structured format. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } [JsonProperty("restrictions")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("restrictions")] +#endif public PromotionCodeRestrictions Restrictions { get; set; } /// /// Number of times this promotion code has been used. /// [JsonProperty("times_redeemed")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("times_redeemed")] +#endif public long TimesRedeemed { get; set; } } } diff --git a/src/Stripe.net/Entities/PromotionCodes/PromotionCodeRestrictions.cs b/src/Stripe.net/Entities/PromotionCodes/PromotionCodeRestrictions.cs index 7256e76feb..cf9b46702a 100644 --- a/src/Stripe.net/Entities/PromotionCodes/PromotionCodeRestrictions.cs +++ b/src/Stripe.net/Entities/PromotionCodes/PromotionCodeRestrictions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PromotionCodeRestrictions : StripeEntity { @@ -12,6 +15,9 @@ public class PromotionCodeRestrictions : StripeEntity /// code and a supported currency. /// [JsonProperty("currency_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency_options")] +#endif public Dictionary CurrencyOptions { get; set; } /// @@ -19,6 +25,9 @@ public class PromotionCodeRestrictions : StripeEntity /// any successful payments or invoices. /// [JsonProperty("first_time_transaction")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("first_time_transaction")] +#endif public bool FirstTimeTransaction { get; set; } /// @@ -26,6 +35,9 @@ public class PromotionCodeRestrictions : StripeEntity /// must be $100 or more to work). /// [JsonProperty("minimum_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("minimum_amount")] +#endif public long? MinimumAmount { get; set; } /// @@ -33,6 +45,9 @@ public class PromotionCodeRestrictions : StripeEntity /// minimum_amount. /// [JsonProperty("minimum_amount_currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("minimum_amount_currency")] +#endif public string MinimumAmountCurrency { get; set; } } } diff --git a/src/Stripe.net/Entities/PromotionCodes/PromotionCodeRestrictionsCurrencyOptions.cs b/src/Stripe.net/Entities/PromotionCodes/PromotionCodeRestrictionsCurrencyOptions.cs index 2835af6f87..01833565ff 100644 --- a/src/Stripe.net/Entities/PromotionCodes/PromotionCodeRestrictionsCurrencyOptions.cs +++ b/src/Stripe.net/Entities/PromotionCodes/PromotionCodeRestrictionsCurrencyOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PromotionCodeRestrictionsCurrencyOptions : StripeEntity { @@ -10,6 +13,9 @@ public class PromotionCodeRestrictionsCurrencyOptions : StripeEntity [JsonProperty("minimum_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("minimum_amount")] +#endif public long MinimumAmount { get; set; } } } diff --git a/src/Stripe.net/Entities/Quotes/Quote.cs b/src/Stripe.net/Entities/Quotes/Quote.cs index d3953325cd..16130ca8bb 100644 --- a/src/Stripe.net/Entities/Quotes/Quote.cs +++ b/src/Stripe.net/Entities/Quotes/Quote.cs @@ -6,36 +6,54 @@ namespace Stripe using System.Linq; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// A Quote is a way to model prices that you'd like to provide to a customer. Once /// accepted, it will automatically create an invoice, subscription or subscription /// schedule. /// +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class Quote : StripeEntity, IHasId, IHasMetadata, IHasObject { /// /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// /// Total before any discounts or taxes are applied. /// [JsonProperty("amount_subtotal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_subtotal")] +#endif public long AmountSubtotal { get; set; } /// /// Total after discounts and taxes are applied. /// [JsonProperty("amount_total")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_total")] +#endif public long AmountTotal { get; set; } #region Expandable Application @@ -45,6 +63,9 @@ public class Quote : StripeEntity, IHasId, IHasMetadata, IHasObject /// ID of the Connect Application that created the quote. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string ApplicationId { get => this.InternalApplication?.Id; @@ -58,6 +79,9 @@ public string ApplicationId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Application Application { get => this.InternalApplication?.ExpandedObject; @@ -66,6 +90,10 @@ public Application Application [JsonProperty("application")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("application")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalApplication { get; set; } #endregion @@ -75,6 +103,9 @@ public Application Application /// there are no line items with recurring prices on the quote. /// [JsonProperty("application_fee_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("application_fee_amount")] +#endif public long? ApplicationFeeAmount { get; set; } /// @@ -84,9 +115,15 @@ public Application Application /// recurring prices on the quote. /// [JsonProperty("application_fee_percent")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("application_fee_percent")] +#endif public decimal? ApplicationFeePercent { get; set; } [JsonProperty("automatic_tax")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("automatic_tax")] +#endif public QuoteAutomaticTax AutomaticTax { get; set; } /// @@ -99,9 +136,15 @@ public Application Application /// One of: charge_automatically, or send_invoice. /// [JsonProperty("collection_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("collection_method")] +#endif public string CollectionMethod { get; set; } [JsonProperty("computed")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("computed")] +#endif public QuoteComputed Computed { get; set; } /// @@ -109,6 +152,10 @@ public Application Application /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -117,6 +164,9 @@ public Application Application /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } #region Expandable Customer @@ -127,6 +177,9 @@ public Application Application /// quote. Once specified, it cannot be changed. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string CustomerId { get => this.InternalCustomer?.Id; @@ -141,6 +194,9 @@ public string CustomerId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Customer Customer { get => this.InternalCustomer?.ExpandedObject; @@ -149,6 +205,10 @@ public Customer Customer [JsonProperty("customer")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalCustomer { get; set; } #endregion @@ -159,6 +219,9 @@ public Customer Customer /// The tax rates applied to this quote. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public List DefaultTaxRateIds { get => this.InternalDefaultTaxRates?.Select((x) => x.Id).ToList(); @@ -172,6 +235,9 @@ public List DefaultTaxRateIds /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public List DefaultTaxRates { get => this.InternalDefaultTaxRates?.Select((x) => x.ExpandedObject).ToList(); @@ -179,6 +245,9 @@ public List DefaultTaxRates } [JsonProperty("default_tax_rates", ItemConverterType = typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("default_tax_rates")] +#endif internal List> InternalDefaultTaxRates { get; set; } #endregion @@ -186,6 +255,9 @@ public List DefaultTaxRates /// A description that will be displayed on the quote PDF. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } #region Expandable Discounts @@ -195,6 +267,9 @@ public List DefaultTaxRates /// The discounts applied to this quote. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public List DiscountIds { get => this.InternalDiscounts?.Select((x) => x.Id).ToList(); @@ -208,6 +283,9 @@ public List DiscountIds /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public List Discounts { get => this.InternalDiscounts?.Select((x) => x.ExpandedObject).ToList(); @@ -215,6 +293,9 @@ public List Discounts } [JsonProperty("discounts", ItemConverterType = typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discounts")] +#endif internal List> InternalDiscounts { get; set; } #endregion @@ -224,12 +305,19 @@ public List Discounts /// [JsonProperty("expires_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("expires_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime ExpiresAt { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// /// A footer that will be displayed on the quote PDF. /// [JsonProperty("footer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("footer")] +#endif public string Footer { get; set; } /// @@ -237,12 +325,18 @@ public List Discounts /// href="https://stripe.com/docs/quotes/clone">cloning documentation for more details. /// [JsonProperty("from_quote")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("from_quote")] +#endif public QuoteFromQuote FromQuote { get; set; } /// /// A header that will be displayed on the quote PDF. /// [JsonProperty("header")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("header")] +#endif public string Header { get; set; } #region Expandable Invoice @@ -252,6 +346,9 @@ public List Discounts /// The invoice that was created from this quote. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string InvoiceId { get => this.InternalInvoice?.Id; @@ -265,6 +362,9 @@ public string InvoiceId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Invoice Invoice { get => this.InternalInvoice?.ExpandedObject; @@ -273,16 +373,26 @@ public Invoice Invoice [JsonProperty("invoice")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("invoice")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalInvoice { get; set; } #endregion [JsonProperty("invoice_settings")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("invoice_settings")] +#endif public QuoteInvoiceSettings InvoiceSettings { get; set; } /// /// A list of items the customer is being quoted for. /// [JsonProperty("line_items")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("line_items")] +#endif public StripeList LineItems { get; set; } /// @@ -290,6 +400,9 @@ public Invoice Invoice /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// @@ -298,6 +411,9 @@ public Invoice Invoice /// object in a structured format. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -305,6 +421,9 @@ public Invoice Invoice /// quote is finalized. /// [JsonProperty("number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("number")] +#endif public string Number { get; set; } #region Expandable OnBehalfOf @@ -316,6 +435,9 @@ public Invoice Invoice /// documentation for details. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string OnBehalfOfId { get => this.InternalOnBehalfOf?.Id; @@ -331,6 +453,9 @@ public string OnBehalfOfId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Account OnBehalfOf { get => this.InternalOnBehalfOf?.ExpandedObject; @@ -339,6 +464,10 @@ public Account OnBehalfOf [JsonProperty("on_behalf_of")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("on_behalf_of")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalOnBehalfOf { get; set; } #endregion @@ -347,9 +476,15 @@ public Account OnBehalfOf /// One of: accepted, canceled, draft, or open. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } [JsonProperty("status_transitions")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status_transitions")] +#endif public QuoteStatusTransitions StatusTransitions { get; set; } #region Expandable Subscription @@ -359,6 +494,9 @@ public Account OnBehalfOf /// The subscription that was created or updated from this quote. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string SubscriptionId { get => this.InternalSubscription?.Id; @@ -372,6 +510,9 @@ public string SubscriptionId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Subscription Subscription { get => this.InternalSubscription?.ExpandedObject; @@ -380,10 +521,17 @@ public Subscription Subscription [JsonProperty("subscription")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("subscription")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalSubscription { get; set; } #endregion [JsonProperty("subscription_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("subscription_data")] +#endif public QuoteSubscriptionData SubscriptionData { get; set; } #region Expandable SubscriptionSchedule @@ -393,6 +541,9 @@ public Subscription Subscription /// The subscription schedule that was created or updated from this quote. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string SubscriptionScheduleId { get => this.InternalSubscriptionSchedule?.Id; @@ -406,6 +557,9 @@ public string SubscriptionScheduleId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public SubscriptionSchedule SubscriptionSchedule { get => this.InternalSubscriptionSchedule?.ExpandedObject; @@ -414,6 +568,10 @@ public SubscriptionSchedule SubscriptionSchedule [JsonProperty("subscription_schedule")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("subscription_schedule")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalSubscriptionSchedule { get; set; } #endregion @@ -424,6 +582,9 @@ public SubscriptionSchedule SubscriptionSchedule /// ID of the test clock this quote belongs to. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string TestClockId { get => this.InternalTestClock?.Id; @@ -437,6 +598,9 @@ public string TestClockId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public TestHelpers.TestClock TestClock { get => this.InternalTestClock?.ExpandedObject; @@ -445,10 +609,17 @@ public TestHelpers.TestClock TestClock [JsonProperty("test_clock")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("test_clock")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalTestClock { get; set; } #endregion [JsonProperty("total_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("total_details")] +#endif public QuoteTotalDetails TotalDetails { get; set; } /// @@ -456,6 +627,9 @@ public TestHelpers.TestClock TestClock /// funds from each payment will be transferred to for each of the invoices. /// [JsonProperty("transfer_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transfer_data")] +#endif public QuoteTransferData TransferData { get; set; } } } diff --git a/src/Stripe.net/Entities/Quotes/QuoteAutomaticTax.cs b/src/Stripe.net/Entities/Quotes/QuoteAutomaticTax.cs index 2ec005658f..14510fa376 100644 --- a/src/Stripe.net/Entities/Quotes/QuoteAutomaticTax.cs +++ b/src/Stripe.net/Entities/Quotes/QuoteAutomaticTax.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class QuoteAutomaticTax : StripeEntity { @@ -9,6 +12,9 @@ public class QuoteAutomaticTax : StripeEntity /// Automatically calculate taxes. /// [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool Enabled { get; set; } /// @@ -17,6 +23,9 @@ public class QuoteAutomaticTax : StripeEntity /// transaction is returned in the report of the connected account. /// [JsonProperty("liability")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("liability")] +#endif public QuoteAutomaticTaxLiability Liability { get; set; } /// @@ -24,6 +33,9 @@ public class QuoteAutomaticTax : StripeEntity /// One of: complete, failed, or requires_location_inputs. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } } } diff --git a/src/Stripe.net/Entities/Quotes/QuoteAutomaticTaxLiability.cs b/src/Stripe.net/Entities/Quotes/QuoteAutomaticTaxLiability.cs index 36c0615b1f..b59e447b95 100644 --- a/src/Stripe.net/Entities/Quotes/QuoteAutomaticTaxLiability.cs +++ b/src/Stripe.net/Entities/Quotes/QuoteAutomaticTaxLiability.cs @@ -3,7 +3,13 @@ namespace Stripe { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class QuoteAutomaticTaxLiability : StripeEntity { #region Expandable Account @@ -13,6 +19,9 @@ public class QuoteAutomaticTaxLiability : StripeEntitytype is account. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string AccountId { get => this.InternalAccount?.Id; @@ -26,6 +35,9 @@ public string AccountId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Account Account { get => this.InternalAccount?.ExpandedObject; @@ -34,6 +46,10 @@ public Account Account [JsonProperty("account")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalAccount { get; set; } #endregion @@ -42,6 +58,9 @@ public Account Account /// One of: account, or self. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Quotes/QuoteComputed.cs b/src/Stripe.net/Entities/Quotes/QuoteComputed.cs index 1aa6dacb69..02ae2a0ce2 100644 --- a/src/Stripe.net/Entities/Quotes/QuoteComputed.cs +++ b/src/Stripe.net/Entities/Quotes/QuoteComputed.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class QuoteComputed : StripeEntity { @@ -12,9 +15,15 @@ public class QuoteComputed : StripeEntity /// with recurring prices. /// [JsonProperty("recurring")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("recurring")] +#endif public QuoteComputedRecurring Recurring { get; set; } [JsonProperty("upfront")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("upfront")] +#endif public QuoteComputedUpfront Upfront { get; set; } } } diff --git a/src/Stripe.net/Entities/Quotes/QuoteComputedRecurring.cs b/src/Stripe.net/Entities/Quotes/QuoteComputedRecurring.cs index 036d6a61fa..05bc5520dc 100644 --- a/src/Stripe.net/Entities/Quotes/QuoteComputedRecurring.cs +++ b/src/Stripe.net/Entities/Quotes/QuoteComputedRecurring.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class QuoteComputedRecurring : StripeEntity { @@ -9,12 +12,18 @@ public class QuoteComputedRecurring : StripeEntity /// Total before any discounts or taxes are applied. /// [JsonProperty("amount_subtotal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_subtotal")] +#endif public long AmountSubtotal { get; set; } /// /// Total after discounts and taxes are applied. /// [JsonProperty("amount_total")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_total")] +#endif public long AmountTotal { get; set; } /// @@ -23,6 +32,9 @@ public class QuoteComputedRecurring : StripeEntity /// One of: day, month, week, or year. /// [JsonProperty("interval")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interval")] +#endif public string Interval { get; set; } /// @@ -31,9 +43,15 @@ public class QuoteComputedRecurring : StripeEntity /// bills every 3 months. /// [JsonProperty("interval_count")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interval_count")] +#endif public long IntervalCount { get; set; } [JsonProperty("total_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("total_details")] +#endif public QuoteComputedRecurringTotalDetails TotalDetails { get; set; } } } diff --git a/src/Stripe.net/Entities/Quotes/QuoteComputedRecurringTotalDetails.cs b/src/Stripe.net/Entities/Quotes/QuoteComputedRecurringTotalDetails.cs index 9a4cab9308..d322459f23 100644 --- a/src/Stripe.net/Entities/Quotes/QuoteComputedRecurringTotalDetails.cs +++ b/src/Stripe.net/Entities/Quotes/QuoteComputedRecurringTotalDetails.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class QuoteComputedRecurringTotalDetails : StripeEntity { @@ -9,21 +12,33 @@ public class QuoteComputedRecurringTotalDetails : StripeEntity [JsonProperty("amount_discount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_discount")] +#endif public long AmountDiscount { get; set; } /// /// This is the sum of all the shipping amounts. /// [JsonProperty("amount_shipping")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_shipping")] +#endif public long? AmountShipping { get; set; } /// /// This is the sum of all the tax amounts. /// [JsonProperty("amount_tax")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_tax")] +#endif public long AmountTax { get; set; } [JsonProperty("breakdown")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("breakdown")] +#endif public QuoteComputedRecurringTotalDetailsBreakdown Breakdown { get; set; } } } diff --git a/src/Stripe.net/Entities/Quotes/QuoteComputedRecurringTotalDetailsBreakdown.cs b/src/Stripe.net/Entities/Quotes/QuoteComputedRecurringTotalDetailsBreakdown.cs index 72164b36e0..55316bed10 100644 --- a/src/Stripe.net/Entities/Quotes/QuoteComputedRecurringTotalDetailsBreakdown.cs +++ b/src/Stripe.net/Entities/Quotes/QuoteComputedRecurringTotalDetailsBreakdown.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class QuoteComputedRecurringTotalDetailsBreakdown : StripeEntity { @@ -10,12 +13,18 @@ public class QuoteComputedRecurringTotalDetailsBreakdown : StripeEntity [JsonProperty("discounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discounts")] +#endif public List Discounts { get; set; } /// /// The aggregated tax amounts by rate. /// [JsonProperty("taxes")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("taxes")] +#endif public List Taxes { get; set; } } } diff --git a/src/Stripe.net/Entities/Quotes/QuoteComputedRecurringTotalDetailsBreakdownDiscount.cs b/src/Stripe.net/Entities/Quotes/QuoteComputedRecurringTotalDetailsBreakdownDiscount.cs index 32af6716fe..fffce513c2 100644 --- a/src/Stripe.net/Entities/Quotes/QuoteComputedRecurringTotalDetailsBreakdownDiscount.cs +++ b/src/Stripe.net/Entities/Quotes/QuoteComputedRecurringTotalDetailsBreakdownDiscount.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class QuoteComputedRecurringTotalDetailsBreakdownDiscount : StripeEntity { @@ -9,6 +12,9 @@ public class QuoteComputedRecurringTotalDetailsBreakdownDiscount : StripeEntity< /// The amount discounted. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long Amount { get; set; } /// @@ -22,6 +28,9 @@ public class QuoteComputedRecurringTotalDetailsBreakdownDiscount : StripeEntity< /// subscriptions. /// [JsonProperty("discount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discount")] +#endif public Discount Discount { get; set; } } } diff --git a/src/Stripe.net/Entities/Quotes/QuoteComputedRecurringTotalDetailsBreakdownTax.cs b/src/Stripe.net/Entities/Quotes/QuoteComputedRecurringTotalDetailsBreakdownTax.cs index 972710cee9..768cb6d5da 100644 --- a/src/Stripe.net/Entities/Quotes/QuoteComputedRecurringTotalDetailsBreakdownTax.cs +++ b/src/Stripe.net/Entities/Quotes/QuoteComputedRecurringTotalDetailsBreakdownTax.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class QuoteComputedRecurringTotalDetailsBreakdownTax : StripeEntity { @@ -9,6 +12,9 @@ public class QuoteComputedRecurringTotalDetailsBreakdownTax : StripeEntity [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long Amount { get; set; } /// @@ -21,6 +27,9 @@ public class QuoteComputedRecurringTotalDetailsBreakdownTax : StripeEntityTax rates. /// [JsonProperty("rate")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("rate")] +#endif public TaxRate Rate { get; set; } /// @@ -33,12 +42,18 @@ public class QuoteComputedRecurringTotalDetailsBreakdownTax : StripeEntitystandard_rated, taxable_basis_reduced, or zero_rated. /// [JsonProperty("taxability_reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("taxability_reason")] +#endif public string TaxabilityReason { get; set; } /// /// The amount on which tax is calculated, in cents (or local equivalent). /// [JsonProperty("taxable_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("taxable_amount")] +#endif public long? TaxableAmount { get; set; } } } diff --git a/src/Stripe.net/Entities/Quotes/QuoteComputedUpfront.cs b/src/Stripe.net/Entities/Quotes/QuoteComputedUpfront.cs index 4a4cedc5c9..384d593318 100644 --- a/src/Stripe.net/Entities/Quotes/QuoteComputedUpfront.cs +++ b/src/Stripe.net/Entities/Quotes/QuoteComputedUpfront.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class QuoteComputedUpfront : StripeEntity { @@ -9,12 +12,18 @@ public class QuoteComputedUpfront : StripeEntity /// Total before any discounts or taxes are applied. /// [JsonProperty("amount_subtotal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_subtotal")] +#endif public long AmountSubtotal { get; set; } /// /// Total after discounts and taxes are applied. /// [JsonProperty("amount_total")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_total")] +#endif public long AmountTotal { get; set; } /// @@ -23,9 +32,15 @@ public class QuoteComputedUpfront : StripeEntity /// included in the next invoice. /// [JsonProperty("line_items")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("line_items")] +#endif public StripeList LineItems { get; set; } [JsonProperty("total_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("total_details")] +#endif public QuoteComputedUpfrontTotalDetails TotalDetails { get; set; } } } diff --git a/src/Stripe.net/Entities/Quotes/QuoteComputedUpfrontTotalDetails.cs b/src/Stripe.net/Entities/Quotes/QuoteComputedUpfrontTotalDetails.cs index 59a76fac12..b323b38e1b 100644 --- a/src/Stripe.net/Entities/Quotes/QuoteComputedUpfrontTotalDetails.cs +++ b/src/Stripe.net/Entities/Quotes/QuoteComputedUpfrontTotalDetails.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class QuoteComputedUpfrontTotalDetails : StripeEntity { @@ -9,21 +12,33 @@ public class QuoteComputedUpfrontTotalDetails : StripeEntity [JsonProperty("amount_discount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_discount")] +#endif public long AmountDiscount { get; set; } /// /// This is the sum of all the shipping amounts. /// [JsonProperty("amount_shipping")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_shipping")] +#endif public long? AmountShipping { get; set; } /// /// This is the sum of all the tax amounts. /// [JsonProperty("amount_tax")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_tax")] +#endif public long AmountTax { get; set; } [JsonProperty("breakdown")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("breakdown")] +#endif public QuoteComputedUpfrontTotalDetailsBreakdown Breakdown { get; set; } } } diff --git a/src/Stripe.net/Entities/Quotes/QuoteComputedUpfrontTotalDetailsBreakdown.cs b/src/Stripe.net/Entities/Quotes/QuoteComputedUpfrontTotalDetailsBreakdown.cs index 6e0e2a7c1c..b4e9b8845a 100644 --- a/src/Stripe.net/Entities/Quotes/QuoteComputedUpfrontTotalDetailsBreakdown.cs +++ b/src/Stripe.net/Entities/Quotes/QuoteComputedUpfrontTotalDetailsBreakdown.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class QuoteComputedUpfrontTotalDetailsBreakdown : StripeEntity { @@ -10,12 +13,18 @@ public class QuoteComputedUpfrontTotalDetailsBreakdown : StripeEntity [JsonProperty("discounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discounts")] +#endif public List Discounts { get; set; } /// /// The aggregated tax amounts by rate. /// [JsonProperty("taxes")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("taxes")] +#endif public List Taxes { get; set; } } } diff --git a/src/Stripe.net/Entities/Quotes/QuoteComputedUpfrontTotalDetailsBreakdownDiscount.cs b/src/Stripe.net/Entities/Quotes/QuoteComputedUpfrontTotalDetailsBreakdownDiscount.cs index 1710e64cdd..ef042a7a43 100644 --- a/src/Stripe.net/Entities/Quotes/QuoteComputedUpfrontTotalDetailsBreakdownDiscount.cs +++ b/src/Stripe.net/Entities/Quotes/QuoteComputedUpfrontTotalDetailsBreakdownDiscount.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class QuoteComputedUpfrontTotalDetailsBreakdownDiscount : StripeEntity { @@ -9,6 +12,9 @@ public class QuoteComputedUpfrontTotalDetailsBreakdownDiscount : StripeEntity [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long Amount { get; set; } /// @@ -22,6 +28,9 @@ public class QuoteComputedUpfrontTotalDetailsBreakdownDiscount : StripeEntity. /// [JsonProperty("discount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discount")] +#endif public Discount Discount { get; set; } } } diff --git a/src/Stripe.net/Entities/Quotes/QuoteComputedUpfrontTotalDetailsBreakdownTax.cs b/src/Stripe.net/Entities/Quotes/QuoteComputedUpfrontTotalDetailsBreakdownTax.cs index 547c4881ed..fb26d0940f 100644 --- a/src/Stripe.net/Entities/Quotes/QuoteComputedUpfrontTotalDetailsBreakdownTax.cs +++ b/src/Stripe.net/Entities/Quotes/QuoteComputedUpfrontTotalDetailsBreakdownTax.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class QuoteComputedUpfrontTotalDetailsBreakdownTax : StripeEntity { @@ -9,6 +12,9 @@ public class QuoteComputedUpfrontTotalDetailsBreakdownTax : StripeEntity [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long Amount { get; set; } /// @@ -21,6 +27,9 @@ public class QuoteComputedUpfrontTotalDetailsBreakdownTax : StripeEntityTax rates. /// [JsonProperty("rate")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("rate")] +#endif public TaxRate Rate { get; set; } /// @@ -33,12 +42,18 @@ public class QuoteComputedUpfrontTotalDetailsBreakdownTax : StripeEntitystandard_rated, taxable_basis_reduced, or zero_rated. /// [JsonProperty("taxability_reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("taxability_reason")] +#endif public string TaxabilityReason { get; set; } /// /// The amount on which tax is calculated, in cents (or local equivalent). /// [JsonProperty("taxable_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("taxable_amount")] +#endif public long? TaxableAmount { get; set; } } } diff --git a/src/Stripe.net/Entities/Quotes/QuoteFromQuote.cs b/src/Stripe.net/Entities/Quotes/QuoteFromQuote.cs index 1b4a316a4d..835145a070 100644 --- a/src/Stripe.net/Entities/Quotes/QuoteFromQuote.cs +++ b/src/Stripe.net/Entities/Quotes/QuoteFromQuote.cs @@ -3,13 +3,22 @@ namespace Stripe { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class QuoteFromQuote : StripeEntity { /// /// Whether this quote is a revision of a different quote. /// [JsonProperty("is_revision")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("is_revision")] +#endif public bool IsRevision { get; set; } #region Expandable Quote @@ -19,6 +28,9 @@ public class QuoteFromQuote : StripeEntity /// The quote that was cloned. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string QuoteId { get => this.InternalQuote?.Id; @@ -32,6 +44,9 @@ public string QuoteId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Quote Quote { get => this.InternalQuote?.ExpandedObject; @@ -40,6 +55,10 @@ public Quote Quote [JsonProperty("quote")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("quote")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalQuote { get; set; } #endregion } diff --git a/src/Stripe.net/Entities/Quotes/QuoteInvoiceSettings.cs b/src/Stripe.net/Entities/Quotes/QuoteInvoiceSettings.cs index f56fc357d0..df775f0484 100644 --- a/src/Stripe.net/Entities/Quotes/QuoteInvoiceSettings.cs +++ b/src/Stripe.net/Entities/Quotes/QuoteInvoiceSettings.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class QuoteInvoiceSettings : StripeEntity { @@ -11,9 +14,15 @@ public class QuoteInvoiceSettings : StripeEntity /// collection_method=charge_automatically. /// [JsonProperty("days_until_due")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("days_until_due")] +#endif public long? DaysUntilDue { get; set; } [JsonProperty("issuer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("issuer")] +#endif public QuoteInvoiceSettingsIssuer Issuer { get; set; } } } diff --git a/src/Stripe.net/Entities/Quotes/QuoteInvoiceSettingsIssuer.cs b/src/Stripe.net/Entities/Quotes/QuoteInvoiceSettingsIssuer.cs index 5f715dc3a9..5f395228ae 100644 --- a/src/Stripe.net/Entities/Quotes/QuoteInvoiceSettingsIssuer.cs +++ b/src/Stripe.net/Entities/Quotes/QuoteInvoiceSettingsIssuer.cs @@ -3,7 +3,13 @@ namespace Stripe { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class QuoteInvoiceSettingsIssuer : StripeEntity { #region Expandable Account @@ -13,6 +19,9 @@ public class QuoteInvoiceSettingsIssuer : StripeEntitytype is account. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string AccountId { get => this.InternalAccount?.Id; @@ -26,6 +35,9 @@ public string AccountId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Account Account { get => this.InternalAccount?.ExpandedObject; @@ -34,6 +46,10 @@ public Account Account [JsonProperty("account")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalAccount { get; set; } #endregion @@ -42,6 +58,9 @@ public Account Account /// One of: account, or self. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Quotes/QuoteStatusTransitions.cs b/src/Stripe.net/Entities/Quotes/QuoteStatusTransitions.cs index 030f074c40..061deb9b07 100644 --- a/src/Stripe.net/Entities/Quotes/QuoteStatusTransitions.cs +++ b/src/Stripe.net/Entities/Quotes/QuoteStatusTransitions.cs @@ -4,6 +4,9 @@ namespace Stripe using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class QuoteStatusTransitions : StripeEntity { @@ -12,6 +15,10 @@ public class QuoteStatusTransitions : StripeEntity /// [JsonProperty("accepted_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("accepted_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? AcceptedAt { get; set; } /// @@ -19,6 +26,10 @@ public class QuoteStatusTransitions : StripeEntity /// [JsonProperty("canceled_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("canceled_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? CanceledAt { get; set; } /// @@ -26,6 +37,10 @@ public class QuoteStatusTransitions : StripeEntity /// [JsonProperty("finalized_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("finalized_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? FinalizedAt { get; set; } } } diff --git a/src/Stripe.net/Entities/Quotes/QuoteSubscriptionData.cs b/src/Stripe.net/Entities/Quotes/QuoteSubscriptionData.cs index fb7a9e3dec..8e56e01ac2 100644 --- a/src/Stripe.net/Entities/Quotes/QuoteSubscriptionData.cs +++ b/src/Stripe.net/Entities/Quotes/QuoteSubscriptionData.cs @@ -5,6 +5,9 @@ namespace Stripe using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class QuoteSubscriptionData : StripeEntity, IHasMetadata { @@ -14,6 +17,9 @@ public class QuoteSubscriptionData : StripeEntity, IHasMe /// and certain local payment methods UIs. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// @@ -23,6 +29,10 @@ public class QuoteSubscriptionData : StripeEntity, IHasMe /// [JsonProperty("effective_date")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("effective_date")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? EffectiveDate { get; set; } /// @@ -35,6 +45,9 @@ public class QuoteSubscriptionData : StripeEntity, IHasMe /// metadata, this field is declarative. Updates will clear prior values. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -42,6 +55,9 @@ public class QuoteSubscriptionData : StripeEntity, IHasMe /// the first time. /// [JsonProperty("trial_period_days")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("trial_period_days")] +#endif public long? TrialPeriodDays { get; set; } } } diff --git a/src/Stripe.net/Entities/Quotes/QuoteTotalDetails.cs b/src/Stripe.net/Entities/Quotes/QuoteTotalDetails.cs index 19f40a5c59..82f4a493ff 100644 --- a/src/Stripe.net/Entities/Quotes/QuoteTotalDetails.cs +++ b/src/Stripe.net/Entities/Quotes/QuoteTotalDetails.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class QuoteTotalDetails : StripeEntity { @@ -9,21 +12,33 @@ public class QuoteTotalDetails : StripeEntity /// This is the sum of all the discounts. /// [JsonProperty("amount_discount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_discount")] +#endif public long AmountDiscount { get; set; } /// /// This is the sum of all the shipping amounts. /// [JsonProperty("amount_shipping")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_shipping")] +#endif public long? AmountShipping { get; set; } /// /// This is the sum of all the tax amounts. /// [JsonProperty("amount_tax")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_tax")] +#endif public long AmountTax { get; set; } [JsonProperty("breakdown")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("breakdown")] +#endif public QuoteTotalDetailsBreakdown Breakdown { get; set; } } } diff --git a/src/Stripe.net/Entities/Quotes/QuoteTotalDetailsBreakdown.cs b/src/Stripe.net/Entities/Quotes/QuoteTotalDetailsBreakdown.cs index 83a45c74b1..7c5e646dc6 100644 --- a/src/Stripe.net/Entities/Quotes/QuoteTotalDetailsBreakdown.cs +++ b/src/Stripe.net/Entities/Quotes/QuoteTotalDetailsBreakdown.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class QuoteTotalDetailsBreakdown : StripeEntity { @@ -10,12 +13,18 @@ public class QuoteTotalDetailsBreakdown : StripeEntity [JsonProperty("discounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discounts")] +#endif public List Discounts { get; set; } /// /// The aggregated tax amounts by rate. /// [JsonProperty("taxes")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("taxes")] +#endif public List Taxes { get; set; } } } diff --git a/src/Stripe.net/Entities/Quotes/QuoteTotalDetailsBreakdownDiscount.cs b/src/Stripe.net/Entities/Quotes/QuoteTotalDetailsBreakdownDiscount.cs index 779cfa7a2f..11357b0343 100644 --- a/src/Stripe.net/Entities/Quotes/QuoteTotalDetailsBreakdownDiscount.cs +++ b/src/Stripe.net/Entities/Quotes/QuoteTotalDetailsBreakdownDiscount.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class QuoteTotalDetailsBreakdownDiscount : StripeEntity { @@ -9,6 +12,9 @@ public class QuoteTotalDetailsBreakdownDiscount : StripeEntity [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long Amount { get; set; } /// @@ -22,6 +28,9 @@ public class QuoteTotalDetailsBreakdownDiscount : StripeEntity. /// [JsonProperty("discount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discount")] +#endif public Discount Discount { get; set; } } } diff --git a/src/Stripe.net/Entities/Quotes/QuoteTotalDetailsBreakdownTax.cs b/src/Stripe.net/Entities/Quotes/QuoteTotalDetailsBreakdownTax.cs index fc3107563d..8010d81fd0 100644 --- a/src/Stripe.net/Entities/Quotes/QuoteTotalDetailsBreakdownTax.cs +++ b/src/Stripe.net/Entities/Quotes/QuoteTotalDetailsBreakdownTax.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class QuoteTotalDetailsBreakdownTax : StripeEntity { @@ -9,6 +12,9 @@ public class QuoteTotalDetailsBreakdownTax : StripeEntity [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long Amount { get; set; } /// @@ -21,6 +27,9 @@ public class QuoteTotalDetailsBreakdownTax : StripeEntityTax rates. /// [JsonProperty("rate")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("rate")] +#endif public TaxRate Rate { get; set; } /// @@ -33,12 +42,18 @@ public class QuoteTotalDetailsBreakdownTax : StripeEntitystandard_rated, taxable_basis_reduced, or zero_rated. /// [JsonProperty("taxability_reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("taxability_reason")] +#endif public string TaxabilityReason { get; set; } /// /// The amount on which tax is calculated, in cents (or local equivalent). /// [JsonProperty("taxable_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("taxable_amount")] +#endif public long? TaxableAmount { get; set; } } } diff --git a/src/Stripe.net/Entities/Quotes/QuoteTransferData.cs b/src/Stripe.net/Entities/Quotes/QuoteTransferData.cs index b5eea2ed66..8ee7b0d229 100644 --- a/src/Stripe.net/Entities/Quotes/QuoteTransferData.cs +++ b/src/Stripe.net/Entities/Quotes/QuoteTransferData.cs @@ -3,7 +3,13 @@ namespace Stripe { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class QuoteTransferData : StripeEntity { /// @@ -12,6 +18,9 @@ public class QuoteTransferData : StripeEntity /// destination. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long? Amount { get; set; } /// @@ -21,6 +30,9 @@ public class QuoteTransferData : StripeEntity /// destination. /// [JsonProperty("amount_percent")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_percent")] +#endif public decimal? AmountPercent { get; set; } #region Expandable Destination @@ -30,6 +42,9 @@ public class QuoteTransferData : StripeEntity /// The account where funds from the payment will be transferred to upon payment success. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string DestinationId { get => this.InternalDestination?.Id; @@ -43,6 +58,9 @@ public string DestinationId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Account Destination { get => this.InternalDestination?.ExpandedObject; @@ -51,6 +69,10 @@ public Account Destination [JsonProperty("destination")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("destination")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalDestination { get; set; } #endregion } diff --git a/src/Stripe.net/Entities/Radar/EarlyFraudWarnings/EarlyFraudWarning.cs b/src/Stripe.net/Entities/Radar/EarlyFraudWarnings/EarlyFraudWarning.cs index 348a8cfef9..9e1b020dfe 100644 --- a/src/Stripe.net/Entities/Radar/EarlyFraudWarnings/EarlyFraudWarning.cs +++ b/src/Stripe.net/Entities/Radar/EarlyFraudWarnings/EarlyFraudWarning.cs @@ -4,6 +4,9 @@ namespace Stripe.Radar using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// An early fraud warning indicates that the card issuer has notified us that a charge may @@ -13,18 +16,27 @@ namespace Stripe.Radar /// href="https://stripe.com/docs/disputes/measuring#early-fraud-warnings">Early fraud /// warnings. /// +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class EarlyFraudWarning : StripeEntity, IHasId, IHasObject { /// /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// @@ -33,6 +45,9 @@ public class EarlyFraudWarning : StripeEntity, IHasId, IHasOb /// receiving a dispute later. /// [JsonProperty("actionable")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("actionable")] +#endif public bool Actionable { get; set; } #region Expandable Charge @@ -42,6 +57,9 @@ public class EarlyFraudWarning : StripeEntity, IHasId, IHasOb /// ID of the charge this early fraud warning is for, optionally expanded. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string ChargeId { get => this.InternalCharge?.Id; @@ -55,6 +73,9 @@ public string ChargeId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Charge Charge { get => this.InternalCharge?.ExpandedObject; @@ -63,6 +84,10 @@ public Charge Charge [JsonProperty("charge")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("charge")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalCharge { get; set; } #endregion @@ -71,6 +96,10 @@ public Charge Charge /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -80,6 +109,9 @@ public Charge Charge /// unauthorized_use_of_card. /// [JsonProperty("fraud_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fraud_type")] +#endif public string FraudType { get; set; } /// @@ -87,6 +119,9 @@ public Charge Charge /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } #region Expandable PaymentIntent @@ -96,6 +131,9 @@ public Charge Charge /// ID of the Payment Intent this early fraud warning is for, optionally expanded. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string PaymentIntentId { get => this.InternalPaymentIntent?.Id; @@ -109,6 +147,9 @@ public string PaymentIntentId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public PaymentIntent PaymentIntent { get => this.InternalPaymentIntent?.ExpandedObject; @@ -117,6 +158,10 @@ public PaymentIntent PaymentIntent [JsonProperty("payment_intent")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_intent")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalPaymentIntent { get; set; } #endregion } diff --git a/src/Stripe.net/Entities/Radar/ValueListItems/ValueListItem.cs b/src/Stripe.net/Entities/Radar/ValueListItems/ValueListItem.cs index 3ece9f4d28..c2939b706e 100644 --- a/src/Stripe.net/Entities/Radar/ValueListItems/ValueListItem.cs +++ b/src/Stripe.net/Entities/Radar/ValueListItems/ValueListItem.cs @@ -4,6 +4,9 @@ namespace Stripe.Radar using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// Value list items allow you to add specific values to a given Radar value list, which can @@ -18,12 +21,18 @@ public class ValueListItem : StripeEntity, IHasId, IHasObject /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// @@ -31,18 +40,29 @@ public class ValueListItem : StripeEntity, IHasId, IHasObject /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// /// The name or email address of the user who added this item to the value list. /// [JsonProperty("created_by")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created_by")] +#endif public string CreatedBy { get; set; } /// /// Whether this object is deleted or not. /// [JsonProperty("deleted", NullValueHandling = NullValueHandling.Ignore)] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("deleted")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] +#endif public bool? Deleted { get; set; } /// @@ -50,18 +70,27 @@ public class ValueListItem : StripeEntity, IHasId, IHasObject /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// /// The value of the item. /// [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public string Value { get; set; } /// /// The identifier of the value list this item belongs to. /// [JsonProperty("value_list")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value_list")] +#endif public string ValueList { get; set; } } } diff --git a/src/Stripe.net/Entities/Radar/ValueLists/ValueList.cs b/src/Stripe.net/Entities/Radar/ValueLists/ValueList.cs index c53611a348..c1a988c485 100644 --- a/src/Stripe.net/Entities/Radar/ValueLists/ValueList.cs +++ b/src/Stripe.net/Entities/Radar/ValueLists/ValueList.cs @@ -5,6 +5,9 @@ namespace Stripe.Radar using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// Value lists allow you to group values together which can then be referenced in rules. @@ -18,18 +21,27 @@ public class ValueList : StripeEntity, IHasId, IHasMetadata, IHasObje /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// /// The name of the value list for use in rules. /// [JsonProperty("alias")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("alias")] +#endif public string Alias { get; set; } /// @@ -37,18 +49,29 @@ public class ValueList : StripeEntity, IHasId, IHasMetadata, IHasObje /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// /// The name or email address of the user who created this value list. /// [JsonProperty("created_by")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created_by")] +#endif public string CreatedBy { get; set; } /// /// Whether this object is deleted or not. /// [JsonProperty("deleted", NullValueHandling = NullValueHandling.Ignore)] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("deleted")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] +#endif public bool? Deleted { get; set; } /// @@ -61,12 +84,18 @@ public class ValueList : StripeEntity, IHasId, IHasMetadata, IHasObje /// sepa_debit_fingerprint, string, or us_bank_account_fingerprint. /// [JsonProperty("item_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("item_type")] +#endif public string ItemType { get; set; } /// /// List of items contained within this value list. /// [JsonProperty("list_items")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("list_items")] +#endif public StripeList ListItems { get; set; } /// @@ -74,6 +103,9 @@ public class ValueList : StripeEntity, IHasId, IHasMetadata, IHasObje /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// @@ -82,12 +114,18 @@ public class ValueList : StripeEntity, IHasId, IHasMetadata, IHasObje /// object in a structured format. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// The name of the value list. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } } } diff --git a/src/Stripe.net/Entities/Refunds/Refund.cs b/src/Stripe.net/Entities/Refunds/Refund.cs index d244df43cb..82098c259b 100644 --- a/src/Stripe.net/Entities/Refunds/Refund.cs +++ b/src/Stripe.net/Entities/Refunds/Refund.cs @@ -5,6 +5,9 @@ namespace Stripe using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// Refund objects allow you to refund a previously created charge that isn't refunded yet. @@ -12,24 +15,36 @@ namespace Stripe /// /// Related guide: Refunds. /// +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class Refund : StripeEntity, IHasId, IHasMetadata, IHasObject, IBalanceTransactionSource { /// /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// /// Amount, in cents (or local equivalent). /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long Amount { get; set; } #region Expandable BalanceTransaction @@ -39,6 +54,9 @@ public class Refund : StripeEntity, IHasId, IHasMetadata, IHasObject, IB /// Balance transaction that describes the impact on your account balance. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string BalanceTransactionId { get => this.InternalBalanceTransaction?.Id; @@ -52,6 +70,9 @@ public string BalanceTransactionId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public BalanceTransaction BalanceTransaction { get => this.InternalBalanceTransaction?.ExpandedObject; @@ -60,6 +81,10 @@ public BalanceTransaction BalanceTransaction [JsonProperty("balance_transaction")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("balance_transaction")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalBalanceTransaction { get; set; } #endregion @@ -70,6 +95,9 @@ public BalanceTransaction BalanceTransaction /// ID of the charge that's refunded. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string ChargeId { get => this.InternalCharge?.Id; @@ -83,6 +111,9 @@ public string ChargeId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Charge Charge { get => this.InternalCharge?.ExpandedObject; @@ -91,6 +122,10 @@ public Charge Charge [JsonProperty("charge")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("charge")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalCharge { get; set; } #endregion @@ -99,6 +134,10 @@ public Charge Charge /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -107,6 +146,9 @@ public Charge Charge /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// @@ -114,9 +156,15 @@ public Charge Charge /// (available on non-card refunds only). /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } [JsonProperty("destination_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("destination_details")] +#endif public RefundDestinationDetails DestinationDetails { get; set; } #region Expandable FailureBalanceTransaction @@ -127,6 +175,9 @@ public Charge Charge /// account balance that reverses the initial balance transaction. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string FailureBalanceTransactionId { get => this.InternalFailureBalanceTransaction?.Id; @@ -141,6 +192,9 @@ public string FailureBalanceTransactionId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public BalanceTransaction FailureBalanceTransaction { get => this.InternalFailureBalanceTransaction?.ExpandedObject; @@ -149,6 +203,10 @@ public BalanceTransaction FailureBalanceTransaction [JsonProperty("failure_balance_transaction")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("failure_balance_transaction")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalFailureBalanceTransaction { get; set; } #endregion @@ -159,6 +217,9 @@ public BalanceTransaction FailureBalanceTransaction /// merchant_request, or unknown. /// [JsonProperty("failure_reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("failure_reason")] +#endif public string FailureReason { get; set; } /// @@ -166,6 +227,9 @@ public BalanceTransaction FailureBalanceTransaction /// provide an email address for the customer to receive refund instructions. /// [JsonProperty("instructions_email")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("instructions_email")] +#endif public string InstructionsEmail { get; set; } /// @@ -174,9 +238,15 @@ public BalanceTransaction FailureBalanceTransaction /// object in a structured format. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } [JsonProperty("next_action")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("next_action")] +#endif public RefundNextAction NextAction { get; set; } #region Expandable PaymentIntent @@ -186,6 +256,9 @@ public BalanceTransaction FailureBalanceTransaction /// ID of the PaymentIntent that's refunded. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string PaymentIntentId { get => this.InternalPaymentIntent?.Id; @@ -199,6 +272,9 @@ public string PaymentIntentId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public PaymentIntent PaymentIntent { get => this.InternalPaymentIntent?.ExpandedObject; @@ -207,6 +283,10 @@ public PaymentIntent PaymentIntent [JsonProperty("payment_intent")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_intent")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalPaymentIntent { get; set; } #endregion @@ -218,12 +298,18 @@ public PaymentIntent PaymentIntent /// requested_by_customer. /// [JsonProperty("reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reason")] +#endif public string Reason { get; set; } /// /// This is the transaction number that appears on email receipts sent for this refund. /// [JsonProperty("receipt_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("receipt_number")] +#endif public string ReceiptNumber { get; set; } #region Expandable SourceTransferReversal @@ -234,6 +320,9 @@ public PaymentIntent PaymentIntent /// from another Stripe account. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string SourceTransferReversalId { get => this.InternalSourceTransferReversal?.Id; @@ -248,6 +337,9 @@ public string SourceTransferReversalId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public TransferReversal SourceTransferReversal { get => this.InternalSourceTransferReversal?.ExpandedObject; @@ -256,6 +348,10 @@ public TransferReversal SourceTransferReversal [JsonProperty("source_transfer_reversal")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("source_transfer_reversal")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalSourceTransferReversal { get; set; } #endregion @@ -265,6 +361,9 @@ public TransferReversal SourceTransferReversal /// href="https://stripe.com/docs/refunds#failed-refunds">failed refunds. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } #region Expandable TransferReversal @@ -275,6 +374,9 @@ public TransferReversal SourceTransferReversal /// is only applicable if the charge was created using the destination parameter. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string TransferReversalId { get => this.InternalTransferReversal?.Id; @@ -289,6 +391,9 @@ public string TransferReversalId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public TransferReversal TransferReversal { get => this.InternalTransferReversal?.ExpandedObject; @@ -297,6 +402,10 @@ public TransferReversal TransferReversal [JsonProperty("transfer_reversal")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transfer_reversal")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalTransferReversal { get; set; } #endregion } diff --git a/src/Stripe.net/Entities/Refunds/RefundDestinationDetails.cs b/src/Stripe.net/Entities/Refunds/RefundDestinationDetails.cs index 45256df34d..4c695543ef 100644 --- a/src/Stripe.net/Entities/Refunds/RefundDestinationDetails.cs +++ b/src/Stripe.net/Entities/Refunds/RefundDestinationDetails.cs @@ -2,91 +2,178 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RefundDestinationDetails : StripeEntity { [JsonProperty("affirm")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("affirm")] +#endif public RefundDestinationDetailsAffirm Affirm { get; set; } [JsonProperty("afterpay_clearpay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("afterpay_clearpay")] +#endif public RefundDestinationDetailsAfterpayClearpay AfterpayClearpay { get; set; } [JsonProperty("alipay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("alipay")] +#endif public RefundDestinationDetailsAlipay Alipay { get; set; } [JsonProperty("alma")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("alma")] +#endif public RefundDestinationDetailsAlma Alma { get; set; } [JsonProperty("amazon_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amazon_pay")] +#endif public RefundDestinationDetailsAmazonPay AmazonPay { get; set; } [JsonProperty("au_bank_transfer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("au_bank_transfer")] +#endif public RefundDestinationDetailsAuBankTransfer AuBankTransfer { get; set; } [JsonProperty("blik")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("blik")] +#endif public RefundDestinationDetailsBlik Blik { get; set; } [JsonProperty("br_bank_transfer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("br_bank_transfer")] +#endif public RefundDestinationDetailsBrBankTransfer BrBankTransfer { get; set; } [JsonProperty("card")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card")] +#endif public RefundDestinationDetailsCard Card { get; set; } [JsonProperty("cashapp")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cashapp")] +#endif public RefundDestinationDetailsCashapp Cashapp { get; set; } [JsonProperty("customer_cash_balance")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_cash_balance")] +#endif public RefundDestinationDetailsCustomerCashBalance CustomerCashBalance { get; set; } [JsonProperty("eps")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("eps")] +#endif public RefundDestinationDetailsEps Eps { get; set; } [JsonProperty("eu_bank_transfer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("eu_bank_transfer")] +#endif public RefundDestinationDetailsEuBankTransfer EuBankTransfer { get; set; } [JsonProperty("gb_bank_transfer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("gb_bank_transfer")] +#endif public RefundDestinationDetailsGbBankTransfer GbBankTransfer { get; set; } [JsonProperty("giropay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("giropay")] +#endif public RefundDestinationDetailsGiropay Giropay { get; set; } [JsonProperty("grabpay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("grabpay")] +#endif public RefundDestinationDetailsGrabpay Grabpay { get; set; } [JsonProperty("jp_bank_transfer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("jp_bank_transfer")] +#endif public RefundDestinationDetailsJpBankTransfer JpBankTransfer { get; set; } [JsonProperty("klarna")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("klarna")] +#endif public RefundDestinationDetailsKlarna Klarna { get; set; } [JsonProperty("multibanco")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("multibanco")] +#endif public RefundDestinationDetailsMultibanco Multibanco { get; set; } [JsonProperty("mx_bank_transfer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mx_bank_transfer")] +#endif public RefundDestinationDetailsMxBankTransfer MxBankTransfer { get; set; } [JsonProperty("p24")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("p24")] +#endif public RefundDestinationDetailsP24 P24 { get; set; } [JsonProperty("paynow")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("paynow")] +#endif public RefundDestinationDetailsPaynow Paynow { get; set; } [JsonProperty("paypal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("paypal")] +#endif public RefundDestinationDetailsPaypal Paypal { get; set; } [JsonProperty("pix")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("pix")] +#endif public RefundDestinationDetailsPix Pix { get; set; } [JsonProperty("revolut")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("revolut")] +#endif public RefundDestinationDetailsRevolut Revolut { get; set; } [JsonProperty("sofort")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sofort")] +#endif public RefundDestinationDetailsSofort Sofort { get; set; } [JsonProperty("swish")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("swish")] +#endif public RefundDestinationDetailsSwish Swish { get; set; } [JsonProperty("th_bank_transfer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("th_bank_transfer")] +#endif public RefundDestinationDetailsThBankTransfer ThBankTransfer { get; set; } /// @@ -95,15 +182,27 @@ public class RefundDestinationDetails : StripeEntity /// matching this value. It contains information specific to the refund transaction. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } [JsonProperty("us_bank_transfer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("us_bank_transfer")] +#endif public RefundDestinationDetailsUsBankTransfer UsBankTransfer { get; set; } [JsonProperty("wechat_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("wechat_pay")] +#endif public RefundDestinationDetailsWechatPay WechatPay { get; set; } [JsonProperty("zip")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("zip")] +#endif public RefundDestinationDetailsZip Zip { get; set; } } } diff --git a/src/Stripe.net/Entities/Refunds/RefundDestinationDetailsBlik.cs b/src/Stripe.net/Entities/Refunds/RefundDestinationDetailsBlik.cs index d8e7de1f67..36659a4817 100644 --- a/src/Stripe.net/Entities/Refunds/RefundDestinationDetailsBlik.cs +++ b/src/Stripe.net/Entities/Refunds/RefundDestinationDetailsBlik.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RefundDestinationDetailsBlik : StripeEntity { @@ -10,12 +13,18 @@ public class RefundDestinationDetailsBlik : StripeEntity [JsonProperty("network_decline_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("network_decline_code")] +#endif public string NetworkDeclineCode { get; set; } /// /// The reference assigned to the refund. /// [JsonProperty("reference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reference")] +#endif public string Reference { get; set; } /// @@ -23,6 +32,9 @@ public class RefundDestinationDetailsBlik : StripeEntityunavailable. /// [JsonProperty("reference_status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reference_status")] +#endif public string ReferenceStatus { get; set; } } } diff --git a/src/Stripe.net/Entities/Refunds/RefundDestinationDetailsBrBankTransfer.cs b/src/Stripe.net/Entities/Refunds/RefundDestinationDetailsBrBankTransfer.cs index f9b40e7af7..ad390921cb 100644 --- a/src/Stripe.net/Entities/Refunds/RefundDestinationDetailsBrBankTransfer.cs +++ b/src/Stripe.net/Entities/Refunds/RefundDestinationDetailsBrBankTransfer.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RefundDestinationDetailsBrBankTransfer : StripeEntity { @@ -9,6 +12,9 @@ public class RefundDestinationDetailsBrBankTransfer : StripeEntity [JsonProperty("reference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reference")] +#endif public string Reference { get; set; } /// @@ -16,6 +22,9 @@ public class RefundDestinationDetailsBrBankTransfer : StripeEntityunavailable. /// [JsonProperty("reference_status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reference_status")] +#endif public string ReferenceStatus { get; set; } } } diff --git a/src/Stripe.net/Entities/Refunds/RefundDestinationDetailsCard.cs b/src/Stripe.net/Entities/Refunds/RefundDestinationDetailsCard.cs index 609c9e2a6d..a6b7e78c9d 100644 --- a/src/Stripe.net/Entities/Refunds/RefundDestinationDetailsCard.cs +++ b/src/Stripe.net/Entities/Refunds/RefundDestinationDetailsCard.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RefundDestinationDetailsCard : StripeEntity { @@ -9,6 +12,9 @@ public class RefundDestinationDetailsCard : StripeEntity [JsonProperty("reference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reference")] +#endif public string Reference { get; set; } /// @@ -16,12 +22,18 @@ public class RefundDestinationDetailsCard : StripeEntityavailable or unavailable. /// [JsonProperty("reference_status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reference_status")] +#endif public string ReferenceStatus { get; set; } /// /// Type of the reference number assigned to the refund. /// [JsonProperty("reference_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reference_type")] +#endif public string ReferenceType { get; set; } /// @@ -29,6 +41,9 @@ public class RefundDestinationDetailsCard : StripeEntitypending, refund, or reversal. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Refunds/RefundDestinationDetailsEuBankTransfer.cs b/src/Stripe.net/Entities/Refunds/RefundDestinationDetailsEuBankTransfer.cs index fbfcee6ab9..9d03117822 100644 --- a/src/Stripe.net/Entities/Refunds/RefundDestinationDetailsEuBankTransfer.cs +++ b/src/Stripe.net/Entities/Refunds/RefundDestinationDetailsEuBankTransfer.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RefundDestinationDetailsEuBankTransfer : StripeEntity { @@ -9,6 +12,9 @@ public class RefundDestinationDetailsEuBankTransfer : StripeEntity [JsonProperty("reference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reference")] +#endif public string Reference { get; set; } /// @@ -16,6 +22,9 @@ public class RefundDestinationDetailsEuBankTransfer : StripeEntityunavailable. /// [JsonProperty("reference_status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reference_status")] +#endif public string ReferenceStatus { get; set; } } } diff --git a/src/Stripe.net/Entities/Refunds/RefundDestinationDetailsGbBankTransfer.cs b/src/Stripe.net/Entities/Refunds/RefundDestinationDetailsGbBankTransfer.cs index 7b7fcc696b..7ca057ff60 100644 --- a/src/Stripe.net/Entities/Refunds/RefundDestinationDetailsGbBankTransfer.cs +++ b/src/Stripe.net/Entities/Refunds/RefundDestinationDetailsGbBankTransfer.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RefundDestinationDetailsGbBankTransfer : StripeEntity { @@ -9,6 +12,9 @@ public class RefundDestinationDetailsGbBankTransfer : StripeEntity [JsonProperty("reference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reference")] +#endif public string Reference { get; set; } /// @@ -16,6 +22,9 @@ public class RefundDestinationDetailsGbBankTransfer : StripeEntityunavailable. /// [JsonProperty("reference_status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reference_status")] +#endif public string ReferenceStatus { get; set; } } } diff --git a/src/Stripe.net/Entities/Refunds/RefundDestinationDetailsJpBankTransfer.cs b/src/Stripe.net/Entities/Refunds/RefundDestinationDetailsJpBankTransfer.cs index c7a0e3f8e5..456d902ca2 100644 --- a/src/Stripe.net/Entities/Refunds/RefundDestinationDetailsJpBankTransfer.cs +++ b/src/Stripe.net/Entities/Refunds/RefundDestinationDetailsJpBankTransfer.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RefundDestinationDetailsJpBankTransfer : StripeEntity { @@ -9,6 +12,9 @@ public class RefundDestinationDetailsJpBankTransfer : StripeEntity [JsonProperty("reference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reference")] +#endif public string Reference { get; set; } /// @@ -16,6 +22,9 @@ public class RefundDestinationDetailsJpBankTransfer : StripeEntityunavailable. /// [JsonProperty("reference_status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reference_status")] +#endif public string ReferenceStatus { get; set; } } } diff --git a/src/Stripe.net/Entities/Refunds/RefundDestinationDetailsMultibanco.cs b/src/Stripe.net/Entities/Refunds/RefundDestinationDetailsMultibanco.cs index 0c53a308c8..8f5b4ad019 100644 --- a/src/Stripe.net/Entities/Refunds/RefundDestinationDetailsMultibanco.cs +++ b/src/Stripe.net/Entities/Refunds/RefundDestinationDetailsMultibanco.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RefundDestinationDetailsMultibanco : StripeEntity { @@ -9,6 +12,9 @@ public class RefundDestinationDetailsMultibanco : StripeEntity [JsonProperty("reference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reference")] +#endif public string Reference { get; set; } /// @@ -16,6 +22,9 @@ public class RefundDestinationDetailsMultibanco : StripeEntityunavailable. /// [JsonProperty("reference_status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reference_status")] +#endif public string ReferenceStatus { get; set; } } } diff --git a/src/Stripe.net/Entities/Refunds/RefundDestinationDetailsMxBankTransfer.cs b/src/Stripe.net/Entities/Refunds/RefundDestinationDetailsMxBankTransfer.cs index 00ad74a121..be72cb891b 100644 --- a/src/Stripe.net/Entities/Refunds/RefundDestinationDetailsMxBankTransfer.cs +++ b/src/Stripe.net/Entities/Refunds/RefundDestinationDetailsMxBankTransfer.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RefundDestinationDetailsMxBankTransfer : StripeEntity { @@ -9,6 +12,9 @@ public class RefundDestinationDetailsMxBankTransfer : StripeEntity [JsonProperty("reference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reference")] +#endif public string Reference { get; set; } /// @@ -16,6 +22,9 @@ public class RefundDestinationDetailsMxBankTransfer : StripeEntityunavailable. /// [JsonProperty("reference_status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reference_status")] +#endif public string ReferenceStatus { get; set; } } } diff --git a/src/Stripe.net/Entities/Refunds/RefundDestinationDetailsP24.cs b/src/Stripe.net/Entities/Refunds/RefundDestinationDetailsP24.cs index 910d30a03b..ac3310cf34 100644 --- a/src/Stripe.net/Entities/Refunds/RefundDestinationDetailsP24.cs +++ b/src/Stripe.net/Entities/Refunds/RefundDestinationDetailsP24.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RefundDestinationDetailsP24 : StripeEntity { @@ -9,6 +12,9 @@ public class RefundDestinationDetailsP24 : StripeEntity [JsonProperty("reference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reference")] +#endif public string Reference { get; set; } /// @@ -16,6 +22,9 @@ public class RefundDestinationDetailsP24 : StripeEntityunavailable. /// [JsonProperty("reference_status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reference_status")] +#endif public string ReferenceStatus { get; set; } } } diff --git a/src/Stripe.net/Entities/Refunds/RefundDestinationDetailsSwish.cs b/src/Stripe.net/Entities/Refunds/RefundDestinationDetailsSwish.cs index 23153a439f..77fa352c67 100644 --- a/src/Stripe.net/Entities/Refunds/RefundDestinationDetailsSwish.cs +++ b/src/Stripe.net/Entities/Refunds/RefundDestinationDetailsSwish.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RefundDestinationDetailsSwish : StripeEntity { @@ -10,12 +13,18 @@ public class RefundDestinationDetailsSwish : StripeEntity [JsonProperty("network_decline_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("network_decline_code")] +#endif public string NetworkDeclineCode { get; set; } /// /// The reference assigned to the refund. /// [JsonProperty("reference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reference")] +#endif public string Reference { get; set; } /// @@ -23,6 +32,9 @@ public class RefundDestinationDetailsSwish : StripeEntityunavailable. /// [JsonProperty("reference_status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reference_status")] +#endif public string ReferenceStatus { get; set; } } } diff --git a/src/Stripe.net/Entities/Refunds/RefundDestinationDetailsThBankTransfer.cs b/src/Stripe.net/Entities/Refunds/RefundDestinationDetailsThBankTransfer.cs index d49f70055a..693e656f86 100644 --- a/src/Stripe.net/Entities/Refunds/RefundDestinationDetailsThBankTransfer.cs +++ b/src/Stripe.net/Entities/Refunds/RefundDestinationDetailsThBankTransfer.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RefundDestinationDetailsThBankTransfer : StripeEntity { @@ -9,6 +12,9 @@ public class RefundDestinationDetailsThBankTransfer : StripeEntity [JsonProperty("reference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reference")] +#endif public string Reference { get; set; } /// @@ -16,6 +22,9 @@ public class RefundDestinationDetailsThBankTransfer : StripeEntityunavailable. /// [JsonProperty("reference_status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reference_status")] +#endif public string ReferenceStatus { get; set; } } } diff --git a/src/Stripe.net/Entities/Refunds/RefundDestinationDetailsUsBankTransfer.cs b/src/Stripe.net/Entities/Refunds/RefundDestinationDetailsUsBankTransfer.cs index 0602822c8c..d96690c10d 100644 --- a/src/Stripe.net/Entities/Refunds/RefundDestinationDetailsUsBankTransfer.cs +++ b/src/Stripe.net/Entities/Refunds/RefundDestinationDetailsUsBankTransfer.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RefundDestinationDetailsUsBankTransfer : StripeEntity { @@ -9,6 +12,9 @@ public class RefundDestinationDetailsUsBankTransfer : StripeEntity [JsonProperty("reference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reference")] +#endif public string Reference { get; set; } /// @@ -16,6 +22,9 @@ public class RefundDestinationDetailsUsBankTransfer : StripeEntityunavailable. /// [JsonProperty("reference_status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reference_status")] +#endif public string ReferenceStatus { get; set; } } } diff --git a/src/Stripe.net/Entities/Refunds/RefundNextAction.cs b/src/Stripe.net/Entities/Refunds/RefundNextAction.cs index 25ea6c51a7..46894890c0 100644 --- a/src/Stripe.net/Entities/Refunds/RefundNextAction.cs +++ b/src/Stripe.net/Entities/Refunds/RefundNextAction.cs @@ -2,16 +2,25 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RefundNextAction : StripeEntity { [JsonProperty("display_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_details")] +#endif public RefundNextActionDisplayDetails DisplayDetails { get; set; } /// /// Type of the next action to perform. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Refunds/RefundNextActionDisplayDetails.cs b/src/Stripe.net/Entities/Refunds/RefundNextActionDisplayDetails.cs index a5d5b43ea7..66cc946cf9 100644 --- a/src/Stripe.net/Entities/Refunds/RefundNextActionDisplayDetails.cs +++ b/src/Stripe.net/Entities/Refunds/RefundNextActionDisplayDetails.cs @@ -4,10 +4,16 @@ namespace Stripe using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RefundNextActionDisplayDetails : StripeEntity { [JsonProperty("email_sent")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("email_sent")] +#endif public RefundNextActionDisplayDetailsEmailSent EmailSent { get; set; } /// @@ -15,6 +21,10 @@ public class RefundNextActionDisplayDetails : StripeEntity [JsonProperty("expires_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("expires_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime ExpiresAt { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; } } diff --git a/src/Stripe.net/Entities/Refunds/RefundNextActionDisplayDetailsEmailSent.cs b/src/Stripe.net/Entities/Refunds/RefundNextActionDisplayDetailsEmailSent.cs index 1f1aa3c0c3..2bc0799851 100644 --- a/src/Stripe.net/Entities/Refunds/RefundNextActionDisplayDetailsEmailSent.cs +++ b/src/Stripe.net/Entities/Refunds/RefundNextActionDisplayDetailsEmailSent.cs @@ -4,6 +4,9 @@ namespace Stripe using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RefundNextActionDisplayDetailsEmailSent : StripeEntity { @@ -12,12 +15,19 @@ public class RefundNextActionDisplayDetailsEmailSent : StripeEntity [JsonProperty("email_sent_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("email_sent_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime EmailSentAt { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// /// The recipient's email address. /// [JsonProperty("email_sent_to")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("email_sent_to")] +#endif public string EmailSentTo { get; set; } } } diff --git a/src/Stripe.net/Entities/Reporting/ReportRuns/ReportRun.cs b/src/Stripe.net/Entities/Reporting/ReportRuns/ReportRun.cs index ca8a2f0ca3..3eded5df34 100644 --- a/src/Stripe.net/Entities/Reporting/ReportRuns/ReportRun.cs +++ b/src/Stripe.net/Entities/Reporting/ReportRuns/ReportRun.cs @@ -4,6 +4,9 @@ namespace Stripe.Reporting using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// The Report Run object represents an instance of a report type generated with specific @@ -22,12 +25,18 @@ public class ReportRun : StripeEntity, IHasId, IHasObject /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// @@ -35,6 +44,10 @@ public class ReportRun : StripeEntity, IHasId, IHasObject /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -42,6 +55,9 @@ public class ReportRun : StripeEntity, IHasId, IHasObject /// status=failed). /// [JsonProperty("error")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("error")] +#endif public string Error { get; set; } /// @@ -49,9 +65,15 @@ public class ReportRun : StripeEntity, IHasId, IHasObject /// mode data. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } [JsonProperty("parameters")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("parameters")] +#endif public ReportRunParameters Parameters { get; set; } /// @@ -59,6 +81,9 @@ public class ReportRun : StripeEntity, IHasId, IHasObject /// run, such as "balance.summary.1". /// [JsonProperty("report_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("report_type")] +#endif public string ReportType { get; set; } /// @@ -66,6 +91,9 @@ public class ReportRun : StripeEntity, IHasId, IHasObject /// status=succeeded). /// [JsonProperty("result")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("result")] +#endif public File Result { get; set; } /// @@ -75,6 +103,9 @@ public class ReportRun : StripeEntity, IHasId, IHasObject /// this will be set to failed and the error field will be populated. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } /// @@ -83,6 +114,10 @@ public class ReportRun : StripeEntity, IHasId, IHasObject /// [JsonProperty("succeeded_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("succeeded_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? SucceededAt { get; set; } } } diff --git a/src/Stripe.net/Entities/Reporting/ReportRuns/ReportRunParameters.cs b/src/Stripe.net/Entities/Reporting/ReportRuns/ReportRunParameters.cs index 101ac1ccb0..cf5095fc4c 100644 --- a/src/Stripe.net/Entities/Reporting/ReportRuns/ReportRunParameters.cs +++ b/src/Stripe.net/Entities/Reporting/ReportRuns/ReportRunParameters.cs @@ -5,6 +5,9 @@ namespace Stripe.Reporting using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ReportRunParameters : StripeEntity { @@ -12,18 +15,27 @@ public class ReportRunParameters : StripeEntity /// The set of output columns requested for inclusion in the report run. /// [JsonProperty("columns")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("columns")] +#endif public List Columns { get; set; } /// /// Connected account ID by which to filter the report run. /// [JsonProperty("connected_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("connected_account")] +#endif public string ConnectedAccount { get; set; } /// /// Currency of objects to be included in the report run. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// @@ -33,6 +45,10 @@ public class ReportRunParameters : StripeEntity /// [JsonProperty("interval_end")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interval_end")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime IntervalEnd { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -42,18 +58,28 @@ public class ReportRunParameters : StripeEntity /// [JsonProperty("interval_start")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interval_start")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime IntervalStart { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// /// Payout ID by which to filter the report run. /// [JsonProperty("payout")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payout")] +#endif public string Payout { get; set; } /// /// Category of balance transactions to be included in the report run. /// [JsonProperty("reporting_category")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reporting_category")] +#endif public string ReportingCategory { get; set; } /// @@ -63,6 +89,9 @@ public class ReportRunParameters : StripeEntity /// interval_start or interval_end. /// [JsonProperty("timezone")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("timezone")] +#endif public string Timezone { get; set; } } } diff --git a/src/Stripe.net/Entities/Reporting/ReportTypes/ReportType.cs b/src/Stripe.net/Entities/Reporting/ReportTypes/ReportType.cs index 809510202d..4df5fef142 100644 --- a/src/Stripe.net/Entities/Reporting/ReportTypes/ReportType.cs +++ b/src/Stripe.net/Entities/Reporting/ReportTypes/ReportType.cs @@ -5,6 +5,9 @@ namespace Stripe.Reporting using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// The Report Type resource corresponds to a particular type of report, such as the @@ -25,12 +28,18 @@ public class ReportType : StripeEntity, IHasId, IHasObject /// of the Report Type, such as balance.summary.1. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// @@ -39,6 +48,10 @@ public class ReportType : StripeEntity, IHasId, IHasObject /// [JsonProperty("data_available_end")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("data_available_end")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime DataAvailableEnd { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -47,6 +60,10 @@ public class ReportType : StripeEntity, IHasId, IHasObject /// [JsonProperty("data_available_start")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("data_available_start")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime DataAvailableStart { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -54,6 +71,9 @@ public class ReportType : StripeEntity, IHasId, IHasObject /// the Report Type doesn't support the columns parameter, this will be null.). /// [JsonProperty("default_columns")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("default_columns")] +#endif public List DefaultColumns { get; set; } /// @@ -61,12 +81,18 @@ public class ReportType : StripeEntity, IHasId, IHasObject /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// /// Human-readable name of the Report Type. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } /// @@ -74,6 +100,10 @@ public class ReportType : StripeEntity, IHasId, IHasObject /// [JsonProperty("updated")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("updated")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Updated { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -81,6 +111,9 @@ public class ReportType : StripeEntity, IHasId, IHasObject /// same purpose, but may take different run parameters or have different result schemas. /// [JsonProperty("version")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("version")] +#endif public long Version { get; set; } } } diff --git a/src/Stripe.net/Entities/ReserveTransactions/ReserveTransaction.cs b/src/Stripe.net/Entities/ReserveTransactions/ReserveTransaction.cs index 3ffad2f69c..bad1464d73 100644 --- a/src/Stripe.net/Entities/ReserveTransactions/ReserveTransaction.cs +++ b/src/Stripe.net/Entities/ReserveTransactions/ReserveTransaction.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ReserveTransaction : StripeEntity, IHasId, IHasObject, IBalanceTransactionSource { @@ -9,15 +12,24 @@ public class ReserveTransaction : StripeEntity, IHasId, IHas /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long Amount { get; set; } /// @@ -26,12 +38,18 @@ public class ReserveTransaction : StripeEntity, IHasId, IHas /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// /// An arbitrary string attached to the object. Often useful for displaying to users. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } } } diff --git a/src/Stripe.net/Entities/Reviews/Review.cs b/src/Stripe.net/Entities/Reviews/Review.cs index fd414b63c4..54b80129bb 100644 --- a/src/Stripe.net/Entities/Reviews/Review.cs +++ b/src/Stripe.net/Entities/Reviews/Review.cs @@ -4,6 +4,9 @@ namespace Stripe using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// Reviews can be used to supplement automated fraud detection with human expertise. @@ -11,24 +14,36 @@ namespace Stripe /// Learn more about Radar and reviewing payments here. /// +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class Review : StripeEntity, IHasId, IHasObject { /// /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// /// The ZIP or postal code of the card used, if applicable. /// [JsonProperty("billing_zip")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_zip")] +#endif public string BillingZip { get; set; } #region Expandable Charge @@ -38,6 +53,9 @@ public class Review : StripeEntity, IHasId, IHasObject /// The charge associated with this review. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string ChargeId { get => this.InternalCharge?.Id; @@ -51,6 +69,9 @@ public string ChargeId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Charge Charge { get => this.InternalCharge?.ExpandedObject; @@ -59,6 +80,10 @@ public Charge Charge [JsonProperty("charge")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("charge")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalCharge { get; set; } #endregion @@ -70,6 +95,9 @@ public Charge Charge /// refunded_as_fraud. /// [JsonProperty("closed_reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("closed_reason")] +#endif public string ClosedReason { get; set; } /// @@ -77,12 +105,19 @@ public Charge Charge /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// /// The IP address where the payment originated. /// [JsonProperty("ip_address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ip_address")] +#endif public string IpAddress { get; set; } /// @@ -91,6 +126,9 @@ public Charge Charge /// used to determine a specific address. /// [JsonProperty("ip_address_location")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ip_address_location")] +#endif public ReviewLocation IpAddressLocation { get; set; } /// @@ -98,12 +136,18 @@ public Charge Charge /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// /// If true, the review needs action. /// [JsonProperty("open")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("open")] +#endif public bool Open { get; set; } /// @@ -111,6 +155,9 @@ public Charge Charge /// One of: manual, or rule. /// [JsonProperty("opened_reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("opened_reason")] +#endif public string OpenedReason { get; set; } #region Expandable PaymentIntent @@ -120,6 +167,9 @@ public Charge Charge /// The PaymentIntent ID associated with this review, if one exists. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string PaymentIntentId { get => this.InternalPaymentIntent?.Id; @@ -133,6 +183,9 @@ public string PaymentIntentId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public PaymentIntent PaymentIntent { get => this.InternalPaymentIntent?.ExpandedObject; @@ -141,6 +194,10 @@ public PaymentIntent PaymentIntent [JsonProperty("payment_intent")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_intent")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalPaymentIntent { get; set; } #endregion @@ -150,12 +207,18 @@ public PaymentIntent PaymentIntent /// redacted. /// [JsonProperty("reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reason")] +#endif public string Reason { get; set; } /// /// Information related to the browsing session of the user who initiated the payment. /// [JsonProperty("session")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("session")] +#endif public ReviewSession Session { get; set; } } } diff --git a/src/Stripe.net/Entities/Reviews/ReviewSession.cs b/src/Stripe.net/Entities/Reviews/ReviewSession.cs index 600ed838aa..6fafa533ed 100644 --- a/src/Stripe.net/Entities/Reviews/ReviewSession.cs +++ b/src/Stripe.net/Entities/Reviews/ReviewSession.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ReviewSession : StripeEntity { @@ -9,6 +12,9 @@ public class ReviewSession : StripeEntity /// The browser used in this browser session (e.g., Chrome). /// [JsonProperty("browser")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("browser")] +#endif public string Browser { get; set; } /// @@ -16,18 +22,27 @@ public class ReviewSession : StripeEntity /// SM-G930T). /// [JsonProperty("device")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("device")] +#endif public string Device { get; set; } /// /// The platform for the browser session (e.g., Macintosh). /// [JsonProperty("platform")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("platform")] +#endif public string Platform { get; set; } /// /// The version for the browser session (e.g., 61.0.3163.100). /// [JsonProperty("version")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("version")] +#endif public string Version { get; set; } } } diff --git a/src/Stripe.net/Entities/SetupAttempts/SetupAttempt.cs b/src/Stripe.net/Entities/SetupAttempts/SetupAttempt.cs index ec2813bad2..dcced0520f 100644 --- a/src/Stripe.net/Entities/SetupAttempts/SetupAttempt.cs +++ b/src/Stripe.net/Entities/SetupAttempts/SetupAttempt.cs @@ -5,24 +5,36 @@ namespace Stripe using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// A SetupAttempt describes one attempted confirmation of a SetupIntent, whether that /// confirmation is successful or unsuccessful. You can use SetupAttempts to inspect details /// of a specific attempt at setting up a payment method using a SetupIntent. /// +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class SetupAttempt : StripeEntity, IHasId, IHasObject { /// /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } #region Expandable Application @@ -34,6 +46,9 @@ public class SetupAttempt : StripeEntity, IHasId, IHasObject /// on the SetupIntent at the time of this confirmation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string ApplicationId { get => this.InternalApplication?.Id; @@ -49,6 +64,9 @@ public string ApplicationId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Application Application { get => this.InternalApplication?.ExpandedObject; @@ -57,6 +75,10 @@ public Application Application [JsonProperty("application")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("application")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalApplication { get; set; } #endregion @@ -70,6 +92,9 @@ public Application Application /// Customer. /// [JsonProperty("attach_to_self")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("attach_to_self")] +#endif public bool AttachToSelf { get; set; } /// @@ -77,6 +102,10 @@ public Application Application /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; #region Expandable Customer @@ -88,6 +117,9 @@ public Application Application /// on the SetupIntent at the time of this confirmation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string CustomerId { get => this.InternalCustomer?.Id; @@ -103,6 +135,9 @@ public string CustomerId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Customer Customer { get => this.InternalCustomer?.ExpandedObject; @@ -111,6 +146,10 @@ public Customer Customer [JsonProperty("customer")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalCustomer { get; set; } #endregion @@ -125,6 +164,9 @@ public Customer Customer /// One of: inbound, or outbound. /// [JsonProperty("flow_directions")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("flow_directions")] +#endif public List FlowDirections { get; set; } /// @@ -132,6 +174,9 @@ public Customer Customer /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } #region Expandable OnBehalfOf @@ -143,6 +188,9 @@ public Customer Customer /// on the SetupIntent at the time of this confirmation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string OnBehalfOfId { get => this.InternalOnBehalfOf?.Id; @@ -158,6 +206,9 @@ public string OnBehalfOfId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Account OnBehalfOf { get => this.InternalOnBehalfOf?.ExpandedObject; @@ -166,6 +217,10 @@ public Account OnBehalfOf [JsonProperty("on_behalf_of")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("on_behalf_of")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalOnBehalfOf { get; set; } #endregion @@ -176,6 +231,9 @@ public Account OnBehalfOf /// ID of the payment method used with this SetupAttempt. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string PaymentMethodId { get => this.InternalPaymentMethod?.Id; @@ -189,6 +247,9 @@ public string PaymentMethodId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public PaymentMethod PaymentMethod { get => this.InternalPaymentMethod?.ExpandedObject; @@ -197,16 +258,26 @@ public PaymentMethod PaymentMethod [JsonProperty("payment_method")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalPaymentMethod { get; set; } #endregion [JsonProperty("payment_method_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_details")] +#endif public SetupAttemptPaymentMethodDetails PaymentMethodDetails { get; set; } /// /// The error encountered during this attempt to confirm the SetupIntent, if any. /// [JsonProperty("setup_error")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_error")] +#endif public StripeError SetupError { get; set; } #region Expandable SetupIntent @@ -216,6 +287,9 @@ public PaymentMethod PaymentMethod /// ID of the SetupIntent that this attempt belongs to. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string SetupIntentId { get => this.InternalSetupIntent?.Id; @@ -229,6 +303,9 @@ public string SetupIntentId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public SetupIntent SetupIntent { get => this.InternalSetupIntent?.ExpandedObject; @@ -237,6 +314,10 @@ public SetupIntent SetupIntent [JsonProperty("setup_intent")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_intent")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalSetupIntent { get; set; } #endregion @@ -246,6 +327,9 @@ public SetupIntent SetupIntent /// abandoned. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } /// @@ -255,6 +339,9 @@ public SetupIntent SetupIntent /// on_session. /// [JsonProperty("usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("usage")] +#endif public string Usage { get; set; } } } diff --git a/src/Stripe.net/Entities/SetupAttempts/SetupAttemptPaymentMethodDetails.cs b/src/Stripe.net/Entities/SetupAttempts/SetupAttemptPaymentMethodDetails.cs index fec1094590..1f4f06da67 100644 --- a/src/Stripe.net/Entities/SetupAttempts/SetupAttemptPaymentMethodDetails.cs +++ b/src/Stripe.net/Entities/SetupAttempts/SetupAttemptPaymentMethodDetails.cs @@ -2,61 +2,118 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SetupAttemptPaymentMethodDetails : StripeEntity { [JsonProperty("acss_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("acss_debit")] +#endif public SetupAttemptPaymentMethodDetailsAcssDebit AcssDebit { get; set; } [JsonProperty("amazon_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amazon_pay")] +#endif public SetupAttemptPaymentMethodDetailsAmazonPay AmazonPay { get; set; } [JsonProperty("au_becs_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("au_becs_debit")] +#endif public SetupAttemptPaymentMethodDetailsAuBecsDebit AuBecsDebit { get; set; } [JsonProperty("bacs_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bacs_debit")] +#endif public SetupAttemptPaymentMethodDetailsBacsDebit BacsDebit { get; set; } [JsonProperty("bancontact")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bancontact")] +#endif public SetupAttemptPaymentMethodDetailsBancontact Bancontact { get; set; } [JsonProperty("boleto")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("boleto")] +#endif public SetupAttemptPaymentMethodDetailsBoleto Boleto { get; set; } [JsonProperty("card")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card")] +#endif public SetupAttemptPaymentMethodDetailsCard Card { get; set; } [JsonProperty("card_present")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card_present")] +#endif public SetupAttemptPaymentMethodDetailsCardPresent CardPresent { get; set; } [JsonProperty("cashapp")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cashapp")] +#endif public SetupAttemptPaymentMethodDetailsCashapp Cashapp { get; set; } [JsonProperty("ideal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ideal")] +#endif public SetupAttemptPaymentMethodDetailsIdeal Ideal { get; set; } [JsonProperty("kakao_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("kakao_pay")] +#endif public SetupAttemptPaymentMethodDetailsKakaoPay KakaoPay { get; set; } [JsonProperty("klarna")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("klarna")] +#endif public SetupAttemptPaymentMethodDetailsKlarna Klarna { get; set; } [JsonProperty("kr_card")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("kr_card")] +#endif public SetupAttemptPaymentMethodDetailsKrCard KrCard { get; set; } [JsonProperty("link")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("link")] +#endif public SetupAttemptPaymentMethodDetailsLink Link { get; set; } [JsonProperty("paypal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("paypal")] +#endif public SetupAttemptPaymentMethodDetailsPaypal Paypal { get; set; } [JsonProperty("revolut_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("revolut_pay")] +#endif public SetupAttemptPaymentMethodDetailsRevolutPay RevolutPay { get; set; } [JsonProperty("sepa_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sepa_debit")] +#endif public SetupAttemptPaymentMethodDetailsSepaDebit SepaDebit { get; set; } [JsonProperty("sofort")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sofort")] +#endif public SetupAttemptPaymentMethodDetailsSofort Sofort { get; set; } /// @@ -65,9 +122,15 @@ public class SetupAttemptPaymentMethodDetails : StripeEntity [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } [JsonProperty("us_bank_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("us_bank_account")] +#endif public SetupAttemptPaymentMethodDetailsUsBankAccount UsBankAccount { get; set; } } } diff --git a/src/Stripe.net/Entities/SetupAttempts/SetupAttemptPaymentMethodDetailsBancontact.cs b/src/Stripe.net/Entities/SetupAttempts/SetupAttemptPaymentMethodDetailsBancontact.cs index 57ee427f63..0c94372217 100644 --- a/src/Stripe.net/Entities/SetupAttempts/SetupAttemptPaymentMethodDetailsBancontact.cs +++ b/src/Stripe.net/Entities/SetupAttempts/SetupAttemptPaymentMethodDetailsBancontact.cs @@ -3,25 +3,40 @@ namespace Stripe { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class SetupAttemptPaymentMethodDetailsBancontact : StripeEntity { /// /// Bank code of bank associated with the bank account. /// [JsonProperty("bank_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_code")] +#endif public string BankCode { get; set; } /// /// Name of the bank associated with the bank account. /// [JsonProperty("bank_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_name")] +#endif public string BankName { get; set; } /// /// Bank Identifier Code of the bank associated with the bank account. /// [JsonProperty("bic")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bic")] +#endif public string Bic { get; set; } #region Expandable GeneratedSepaDebit @@ -31,6 +46,9 @@ public class SetupAttemptPaymentMethodDetailsBancontact : StripeEntity [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string GeneratedSepaDebitId { get => this.InternalGeneratedSepaDebit?.Id; @@ -44,6 +62,9 @@ public string GeneratedSepaDebitId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public PaymentMethod GeneratedSepaDebit { get => this.InternalGeneratedSepaDebit?.ExpandedObject; @@ -52,6 +73,10 @@ public PaymentMethod GeneratedSepaDebit [JsonProperty("generated_sepa_debit")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("generated_sepa_debit")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalGeneratedSepaDebit { get; set; } #endregion @@ -63,6 +88,9 @@ public PaymentMethod GeneratedSepaDebit /// SetupAttempt. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string GeneratedSepaDebitMandateId { get => this.InternalGeneratedSepaDebitMandate?.Id; @@ -77,6 +105,9 @@ public string GeneratedSepaDebitMandateId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Mandate GeneratedSepaDebitMandate { get => this.InternalGeneratedSepaDebitMandate?.ExpandedObject; @@ -85,6 +116,10 @@ public Mandate GeneratedSepaDebitMandate [JsonProperty("generated_sepa_debit_mandate")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("generated_sepa_debit_mandate")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalGeneratedSepaDebitMandate { get; set; } #endregion @@ -92,6 +127,9 @@ public Mandate GeneratedSepaDebitMandate /// Last four characters of the IBAN. /// [JsonProperty("iban_last4")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("iban_last4")] +#endif public string IbanLast4 { get; set; } /// @@ -100,6 +138,9 @@ public Mandate GeneratedSepaDebitMandate /// One of: de, en, fr, or nl. /// [JsonProperty("preferred_language")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preferred_language")] +#endif public string PreferredLanguage { get; set; } /// @@ -107,6 +148,9 @@ public Mandate GeneratedSepaDebitMandate /// supported) at the time of authorization or settlement. They cannot be set or mutated. /// [JsonProperty("verified_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("verified_name")] +#endif public string VerifiedName { get; set; } } } diff --git a/src/Stripe.net/Entities/SetupAttempts/SetupAttemptPaymentMethodDetailsCard.cs b/src/Stripe.net/Entities/SetupAttempts/SetupAttemptPaymentMethodDetailsCard.cs index 79b0adcb48..15c2cd61d8 100644 --- a/src/Stripe.net/Entities/SetupAttempts/SetupAttemptPaymentMethodDetailsCard.cs +++ b/src/Stripe.net/Entities/SetupAttempts/SetupAttemptPaymentMethodDetailsCard.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SetupAttemptPaymentMethodDetailsCard : StripeEntity { @@ -11,12 +14,18 @@ public class SetupAttemptPaymentMethodDetailsCard : StripeEntityunknown. /// [JsonProperty("brand")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("brand")] +#endif public string Brand { get; set; } /// /// Check results by Card networks on Card address and CVC at the time of authorization. /// [JsonProperty("checks")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("checks")] +#endif public SetupAttemptPaymentMethodDetailsCardChecks Checks { get; set; } /// @@ -24,6 +33,9 @@ public class SetupAttemptPaymentMethodDetailsCard : StripeEntity [JsonProperty("country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country")] +#endif public string Country { get; set; } /// @@ -31,18 +43,27 @@ public class SetupAttemptPaymentMethodDetailsCard : StripeEntity [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// /// Two-digit number representing the card's expiration month. /// [JsonProperty("exp_month")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("exp_month")] +#endif public long? ExpMonth { get; set; } /// /// Four-digit number representing the card's expiration year. /// [JsonProperty("exp_year")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("exp_year")] +#endif public long? ExpYear { get; set; } /// @@ -55,6 +76,9 @@ public class SetupAttemptPaymentMethodDetailsCard : StripeEntity. /// [JsonProperty("fingerprint")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fingerprint")] +#endif public string Fingerprint { get; set; } /// @@ -62,6 +86,9 @@ public class SetupAttemptPaymentMethodDetailsCard : StripeEntityunknown. /// [JsonProperty("funding")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("funding")] +#endif public string Funding { get; set; } /// @@ -69,6 +96,9 @@ public class SetupAttemptPaymentMethodDetailsCard : StripeEntity [JsonProperty("iin")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("iin")] +#endif public string Iin { get; set; } /// @@ -76,12 +106,18 @@ public class SetupAttemptPaymentMethodDetailsCard : StripeEntity [JsonProperty("issuer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("issuer")] +#endif public string Issuer { get; set; } /// /// The last four digits of the card. /// [JsonProperty("last4")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last4")] +#endif public string Last4 { get; set; } /// @@ -91,18 +127,27 @@ public class SetupAttemptPaymentMethodDetailsCard : StripeEntityvisa, or unknown. /// [JsonProperty("network")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("network")] +#endif public string Network { get; set; } /// /// Populated if this authorization used 3D Secure authentication. /// [JsonProperty("three_d_secure")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("three_d_secure")] +#endif public SetupAttemptPaymentMethodDetailsCardThreeDSecure ThreeDSecure { get; set; } /// /// If this Card is part of a card wallet, this contains the details of the card wallet. /// [JsonProperty("wallet")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("wallet")] +#endif public SetupAttemptPaymentMethodDetailsCardWallet Wallet { get; set; } } } diff --git a/src/Stripe.net/Entities/SetupAttempts/SetupAttemptPaymentMethodDetailsCardChecks.cs b/src/Stripe.net/Entities/SetupAttempts/SetupAttemptPaymentMethodDetailsCardChecks.cs index 93fea37676..f6127fb144 100644 --- a/src/Stripe.net/Entities/SetupAttempts/SetupAttemptPaymentMethodDetailsCardChecks.cs +++ b/src/Stripe.net/Entities/SetupAttempts/SetupAttemptPaymentMethodDetailsCardChecks.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SetupAttemptPaymentMethodDetailsCardChecks : StripeEntity { @@ -10,6 +13,9 @@ public class SetupAttemptPaymentMethodDetailsCardChecks : StripeEntityunavailable, or unchecked. /// [JsonProperty("address_line1_check")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_line1_check")] +#endif public string AddressLine1Check { get; set; } /// @@ -17,6 +23,9 @@ public class SetupAttemptPaymentMethodDetailsCardChecks : StripeEntityfail, unavailable, or unchecked. /// [JsonProperty("address_postal_code_check")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_postal_code_check")] +#endif public string AddressPostalCodeCheck { get; set; } /// @@ -24,6 +33,9 @@ public class SetupAttemptPaymentMethodDetailsCardChecks : StripeEntityunavailable, or unchecked. /// [JsonProperty("cvc_check")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cvc_check")] +#endif public string CvcCheck { get; set; } } } diff --git a/src/Stripe.net/Entities/SetupAttempts/SetupAttemptPaymentMethodDetailsCardPresent.cs b/src/Stripe.net/Entities/SetupAttempts/SetupAttemptPaymentMethodDetailsCardPresent.cs index dfb583afa9..9b519f1f61 100644 --- a/src/Stripe.net/Entities/SetupAttempts/SetupAttemptPaymentMethodDetailsCardPresent.cs +++ b/src/Stripe.net/Entities/SetupAttempts/SetupAttemptPaymentMethodDetailsCardPresent.cs @@ -3,7 +3,13 @@ namespace Stripe { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class SetupAttemptPaymentMethodDetailsCardPresent : StripeEntity { #region Expandable GeneratedCard @@ -13,6 +19,9 @@ public class SetupAttemptPaymentMethodDetailsCardPresent : StripeEntity [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string GeneratedCardId { get => this.InternalGeneratedCard?.Id; @@ -26,6 +35,9 @@ public string GeneratedCardId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public PaymentMethod GeneratedCard { get => this.InternalGeneratedCard?.ExpandedObject; @@ -34,6 +46,10 @@ public PaymentMethod GeneratedCard [JsonProperty("generated_card")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("generated_card")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalGeneratedCard { get; set; } #endregion @@ -41,6 +57,9 @@ public PaymentMethod GeneratedCard /// Details about payments collected offline. /// [JsonProperty("offline")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("offline")] +#endif public SetupAttemptPaymentMethodDetailsCardPresentOffline Offline { get; set; } } } diff --git a/src/Stripe.net/Entities/SetupAttempts/SetupAttemptPaymentMethodDetailsCardPresentOffline.cs b/src/Stripe.net/Entities/SetupAttempts/SetupAttemptPaymentMethodDetailsCardPresentOffline.cs index b4dba25e96..b22b5d3472 100644 --- a/src/Stripe.net/Entities/SetupAttempts/SetupAttemptPaymentMethodDetailsCardPresentOffline.cs +++ b/src/Stripe.net/Entities/SetupAttempts/SetupAttemptPaymentMethodDetailsCardPresentOffline.cs @@ -4,6 +4,9 @@ namespace Stripe using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SetupAttemptPaymentMethodDetailsCardPresentOffline : StripeEntity { @@ -12,12 +15,19 @@ public class SetupAttemptPaymentMethodDetailsCardPresentOffline : StripeEntity [JsonProperty("stored_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("stored_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? StoredAt { get; set; } /// /// The method used to process this payment method offline. Only deferred is allowed. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/SetupAttempts/SetupAttemptPaymentMethodDetailsCardThreeDSecure.cs b/src/Stripe.net/Entities/SetupAttempts/SetupAttemptPaymentMethodDetailsCardThreeDSecure.cs index b514c1947a..55c77b668b 100644 --- a/src/Stripe.net/Entities/SetupAttempts/SetupAttemptPaymentMethodDetailsCardThreeDSecure.cs +++ b/src/Stripe.net/Entities/SetupAttempts/SetupAttemptPaymentMethodDetailsCardThreeDSecure.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SetupAttemptPaymentMethodDetailsCardThreeDSecure : StripeEntity { @@ -10,6 +13,9 @@ public class SetupAttemptPaymentMethodDetailsCardThreeDSecure : StripeEntitychallenge, or frictionless. /// [JsonProperty("authentication_flow")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("authentication_flow")] +#endif public string AuthenticationFlow { get; set; } /// @@ -18,6 +24,9 @@ public class SetupAttemptPaymentMethodDetailsCardThreeDSecure : StripeEntity01, 02, 05, 06, or 07. /// [JsonProperty("electronic_commerce_indicator")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("electronic_commerce_indicator")] +#endif public string ElectronicCommerceIndicator { get; set; } /// @@ -26,6 +35,9 @@ public class SetupAttemptPaymentMethodDetailsCardThreeDSecure : StripeEntityfailed, not_supported, or processing_error. /// [JsonProperty("result")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("result")] +#endif public string Result { get; set; } /// @@ -35,6 +47,9 @@ public class SetupAttemptPaymentMethodDetailsCardThreeDSecure : StripeEntitynetwork_not_supported, protocol_error, or rejected. /// [JsonProperty("result_reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("result_reason")] +#endif public string ResultReason { get; set; } /// @@ -42,6 +57,9 @@ public class SetupAttemptPaymentMethodDetailsCardThreeDSecure : StripeEntity [JsonProperty("transaction_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transaction_id")] +#endif public string TransactionId { get; set; } /// @@ -49,6 +67,9 @@ public class SetupAttemptPaymentMethodDetailsCardThreeDSecure : StripeEntity1.0.2, 2.1.0, or 2.2.0. /// [JsonProperty("version")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("version")] +#endif public string Version { get; set; } } } diff --git a/src/Stripe.net/Entities/SetupAttempts/SetupAttemptPaymentMethodDetailsCardWallet.cs b/src/Stripe.net/Entities/SetupAttempts/SetupAttemptPaymentMethodDetailsCardWallet.cs index 3edd47cc32..b16da097e8 100644 --- a/src/Stripe.net/Entities/SetupAttempts/SetupAttemptPaymentMethodDetailsCardWallet.cs +++ b/src/Stripe.net/Entities/SetupAttempts/SetupAttemptPaymentMethodDetailsCardWallet.cs @@ -2,13 +2,22 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SetupAttemptPaymentMethodDetailsCardWallet : StripeEntity { [JsonProperty("apple_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("apple_pay")] +#endif public SetupAttemptPaymentMethodDetailsCardWalletApplePay ApplePay { get; set; } [JsonProperty("google_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("google_pay")] +#endif public SetupAttemptPaymentMethodDetailsCardWalletGooglePay GooglePay { get; set; } /// @@ -18,6 +27,9 @@ public class SetupAttemptPaymentMethodDetailsCardWallet : StripeEntityapple_pay, google_pay, or link. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/SetupAttempts/SetupAttemptPaymentMethodDetailsIdeal.cs b/src/Stripe.net/Entities/SetupAttempts/SetupAttemptPaymentMethodDetailsIdeal.cs index 4495fed7db..b5cb955132 100644 --- a/src/Stripe.net/Entities/SetupAttempts/SetupAttemptPaymentMethodDetailsIdeal.cs +++ b/src/Stripe.net/Entities/SetupAttempts/SetupAttemptPaymentMethodDetailsIdeal.cs @@ -3,7 +3,13 @@ namespace Stripe { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class SetupAttemptPaymentMethodDetailsIdeal : StripeEntity { /// @@ -17,6 +23,9 @@ public class SetupAttemptPaymentMethodDetailsIdeal : StripeEntityyoursafe. /// [JsonProperty("bank")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank")] +#endif public string Bank { get; set; } /// @@ -27,6 +36,9 @@ public class SetupAttemptPaymentMethodDetailsIdeal : StripeEntityREVOLT21, SNSBNL2A, or TRIONL2U. /// [JsonProperty("bic")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bic")] +#endif public string Bic { get; set; } #region Expandable GeneratedSepaDebit @@ -36,6 +48,9 @@ public class SetupAttemptPaymentMethodDetailsIdeal : StripeEntity [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string GeneratedSepaDebitId { get => this.InternalGeneratedSepaDebit?.Id; @@ -49,6 +64,9 @@ public string GeneratedSepaDebitId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public PaymentMethod GeneratedSepaDebit { get => this.InternalGeneratedSepaDebit?.ExpandedObject; @@ -57,6 +75,10 @@ public PaymentMethod GeneratedSepaDebit [JsonProperty("generated_sepa_debit")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("generated_sepa_debit")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalGeneratedSepaDebit { get; set; } #endregion @@ -68,6 +90,9 @@ public PaymentMethod GeneratedSepaDebit /// SetupAttempt. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string GeneratedSepaDebitMandateId { get => this.InternalGeneratedSepaDebitMandate?.Id; @@ -82,6 +107,9 @@ public string GeneratedSepaDebitMandateId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Mandate GeneratedSepaDebitMandate { get => this.InternalGeneratedSepaDebitMandate?.ExpandedObject; @@ -90,6 +118,10 @@ public Mandate GeneratedSepaDebitMandate [JsonProperty("generated_sepa_debit_mandate")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("generated_sepa_debit_mandate")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalGeneratedSepaDebitMandate { get; set; } #endregion @@ -97,6 +129,9 @@ public Mandate GeneratedSepaDebitMandate /// Last four characters of the IBAN. /// [JsonProperty("iban_last4")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("iban_last4")] +#endif public string IbanLast4 { get; set; } /// @@ -104,6 +139,9 @@ public Mandate GeneratedSepaDebitMandate /// supported) at the time of authorization or settlement. They cannot be set or mutated. /// [JsonProperty("verified_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("verified_name")] +#endif public string VerifiedName { get; set; } } } diff --git a/src/Stripe.net/Entities/SetupAttempts/SetupAttemptPaymentMethodDetailsSofort.cs b/src/Stripe.net/Entities/SetupAttempts/SetupAttemptPaymentMethodDetailsSofort.cs index 0080e2ce3c..be73a642bd 100644 --- a/src/Stripe.net/Entities/SetupAttempts/SetupAttemptPaymentMethodDetailsSofort.cs +++ b/src/Stripe.net/Entities/SetupAttempts/SetupAttemptPaymentMethodDetailsSofort.cs @@ -3,25 +3,40 @@ namespace Stripe { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class SetupAttemptPaymentMethodDetailsSofort : StripeEntity { /// /// Bank code of bank associated with the bank account. /// [JsonProperty("bank_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_code")] +#endif public string BankCode { get; set; } /// /// Name of the bank associated with the bank account. /// [JsonProperty("bank_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_name")] +#endif public string BankName { get; set; } /// /// Bank Identifier Code of the bank associated with the bank account. /// [JsonProperty("bic")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bic")] +#endif public string Bic { get; set; } #region Expandable GeneratedSepaDebit @@ -31,6 +46,9 @@ public class SetupAttemptPaymentMethodDetailsSofort : StripeEntity [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string GeneratedSepaDebitId { get => this.InternalGeneratedSepaDebit?.Id; @@ -44,6 +62,9 @@ public string GeneratedSepaDebitId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public PaymentMethod GeneratedSepaDebit { get => this.InternalGeneratedSepaDebit?.ExpandedObject; @@ -52,6 +73,10 @@ public PaymentMethod GeneratedSepaDebit [JsonProperty("generated_sepa_debit")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("generated_sepa_debit")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalGeneratedSepaDebit { get; set; } #endregion @@ -63,6 +88,9 @@ public PaymentMethod GeneratedSepaDebit /// SetupAttempt. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string GeneratedSepaDebitMandateId { get => this.InternalGeneratedSepaDebitMandate?.Id; @@ -77,6 +105,9 @@ public string GeneratedSepaDebitMandateId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Mandate GeneratedSepaDebitMandate { get => this.InternalGeneratedSepaDebitMandate?.ExpandedObject; @@ -85,6 +116,10 @@ public Mandate GeneratedSepaDebitMandate [JsonProperty("generated_sepa_debit_mandate")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("generated_sepa_debit_mandate")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalGeneratedSepaDebitMandate { get; set; } #endregion @@ -92,6 +127,9 @@ public Mandate GeneratedSepaDebitMandate /// Last four characters of the IBAN. /// [JsonProperty("iban_last4")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("iban_last4")] +#endif public string IbanLast4 { get; set; } /// @@ -100,6 +138,9 @@ public Mandate GeneratedSepaDebitMandate /// One of: de, en, fr, or nl. /// [JsonProperty("preferred_language")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preferred_language")] +#endif public string PreferredLanguage { get; set; } /// @@ -107,6 +148,9 @@ public Mandate GeneratedSepaDebitMandate /// supported) at the time of authorization or settlement. They cannot be set or mutated. /// [JsonProperty("verified_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("verified_name")] +#endif public string VerifiedName { get; set; } } } diff --git a/src/Stripe.net/Entities/SetupIntents/SetupIntent.cs b/src/Stripe.net/Entities/SetupIntents/SetupIntent.cs index 70369dcdc5..5a44fe5e1b 100644 --- a/src/Stripe.net/Entities/SetupIntents/SetupIntent.cs +++ b/src/Stripe.net/Entities/SetupIntents/SetupIntent.cs @@ -5,6 +5,9 @@ namespace Stripe using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// A SetupIntent guides you through the process of setting up and saving a customer's @@ -40,18 +43,27 @@ namespace Stripe /// Related guide: Setup Intents /// API. /// +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class SetupIntent : StripeEntity, IHasId, IHasMetadata, IHasObject { /// /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } #region Expandable Application @@ -61,6 +73,9 @@ public class SetupIntent : StripeEntity, IHasId, IHasMetadata, IHas /// ID of the Connect application that created the SetupIntent. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string ApplicationId { get => this.InternalApplication?.Id; @@ -74,6 +89,9 @@ public string ApplicationId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Application Application { get => this.InternalApplication?.ExpandedObject; @@ -82,6 +100,10 @@ public Application Application [JsonProperty("application")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("application")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalApplication { get; set; } #endregion @@ -95,12 +117,18 @@ public Application Application /// Customer. /// [JsonProperty("attach_to_self")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("attach_to_self")] +#endif public bool AttachToSelf { get; set; } /// /// Settings for dynamic payment methods compatible with this Setup Intent. /// [JsonProperty("automatic_payment_methods")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("automatic_payment_methods")] +#endif public SetupIntentAutomaticPaymentMethods AutomaticPaymentMethods { get; set; } /// @@ -109,6 +137,9 @@ public Application Application /// One of: abandoned, duplicate, or requested_by_customer. /// [JsonProperty("cancellation_reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cancellation_reason")] +#endif public string CancellationReason { get; set; } /// @@ -120,6 +151,9 @@ public Application Application /// have TLS enabled on any page that includes the client secret. /// [JsonProperty("client_secret")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("client_secret")] +#endif public string ClientSecret { get; set; } /// @@ -127,6 +161,10 @@ public Application Application /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; #region Expandable Customer @@ -140,6 +178,9 @@ public Application Application /// SetupIntent. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string CustomerId { get => this.InternalCustomer?.Id; @@ -157,6 +198,9 @@ public string CustomerId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Customer Customer { get => this.InternalCustomer?.ExpandedObject; @@ -165,6 +209,10 @@ public Customer Customer [JsonProperty("customer")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalCustomer { get; set; } #endregion @@ -172,6 +220,9 @@ public Customer Customer /// An arbitrary string attached to the object. Often useful for displaying to users. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// @@ -185,12 +236,18 @@ public Customer Customer /// One of: inbound, or outbound. /// [JsonProperty("flow_directions")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("flow_directions")] +#endif public List FlowDirections { get; set; } /// /// The error encountered in the previous SetupIntent confirmation. /// [JsonProperty("last_setup_error")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last_setup_error")] +#endif public StripeError LastSetupError { get; set; } #region Expandable LatestAttempt @@ -200,6 +257,9 @@ public Customer Customer /// The most recent SetupAttempt for this SetupIntent. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string LatestAttemptId { get => this.InternalLatestAttempt?.Id; @@ -213,6 +273,9 @@ public string LatestAttemptId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public SetupAttempt LatestAttempt { get => this.InternalLatestAttempt?.ExpandedObject; @@ -221,6 +284,10 @@ public SetupAttempt LatestAttempt [JsonProperty("latest_attempt")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("latest_attempt")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalLatestAttempt { get; set; } #endregion @@ -229,6 +296,9 @@ public SetupAttempt LatestAttempt /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } #region Expandable Mandate @@ -238,6 +308,9 @@ public SetupAttempt LatestAttempt /// ID of the multi use Mandate generated by the SetupIntent. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string MandateId { get => this.InternalMandate?.Id; @@ -251,6 +324,9 @@ public string MandateId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Mandate Mandate { get => this.InternalMandate?.ExpandedObject; @@ -259,6 +335,10 @@ public Mandate Mandate [JsonProperty("mandate")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mandate")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalMandate { get; set; } #endregion @@ -268,6 +348,9 @@ public Mandate Mandate /// object in a structured format. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -275,6 +358,9 @@ public Mandate Mandate /// customer to continue payment setup. /// [JsonProperty("next_action")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("next_action")] +#endif public SetupIntentNextAction NextAction { get; set; } #region Expandable OnBehalfOf @@ -284,6 +370,9 @@ public Mandate Mandate /// The account (if any) for which the setup is intended. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string OnBehalfOfId { get => this.InternalOnBehalfOf?.Id; @@ -297,6 +386,9 @@ public string OnBehalfOfId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Account OnBehalfOf { get => this.InternalOnBehalfOf?.ExpandedObject; @@ -305,6 +397,10 @@ public Account OnBehalfOf [JsonProperty("on_behalf_of")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("on_behalf_of")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalOnBehalfOf { get; set; } #endregion @@ -318,6 +414,9 @@ public Account OnBehalfOf /// associated with the latest_attempt is attached to the Customer instead. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string PaymentMethodId { get => this.InternalPaymentMethod?.Id; @@ -334,6 +433,9 @@ public string PaymentMethodId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public PaymentMethod PaymentMethod { get => this.InternalPaymentMethod?.ExpandedObject; @@ -342,6 +444,10 @@ public PaymentMethod PaymentMethod [JsonProperty("payment_method")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalPaymentMethod { get; set; } #endregion @@ -351,18 +457,27 @@ public PaymentMethod PaymentMethod /// configuration used for this Setup Intent. /// [JsonProperty("payment_method_configuration_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_configuration_details")] +#endif public SetupIntentPaymentMethodConfigurationDetails PaymentMethodConfigurationDetails { get; set; } /// /// Payment method-specific configuration for this SetupIntent. /// [JsonProperty("payment_method_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_options")] +#endif public SetupIntentPaymentMethodOptions PaymentMethodOptions { get; set; } /// /// The list of payment method types (e.g. card) that this SetupIntent is allowed to set up. /// [JsonProperty("payment_method_types")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_types")] +#endif public List PaymentMethodTypes { get; set; } #region Expandable SingleUseMandate @@ -372,6 +487,9 @@ public PaymentMethod PaymentMethod /// ID of the single_use Mandate generated by the SetupIntent. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string SingleUseMandateId { get => this.InternalSingleUseMandate?.Id; @@ -385,6 +503,9 @@ public string SingleUseMandateId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Mandate SingleUseMandate { get => this.InternalSingleUseMandate?.ExpandedObject; @@ -393,6 +514,10 @@ public Mandate SingleUseMandate [JsonProperty("single_use_mandate")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("single_use_mandate")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalSingleUseMandate { get; set; } #endregion @@ -404,6 +529,9 @@ public Mandate SingleUseMandate /// requires_confirmation, requires_payment_method, or succeeded. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } /// @@ -414,6 +542,9 @@ public Mandate SingleUseMandate /// your checkout flow. If not provided, this value defaults to off_session. /// [JsonProperty("usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("usage")] +#endif public string Usage { get; set; } } } diff --git a/src/Stripe.net/Entities/SetupIntents/SetupIntentAutomaticPaymentMethods.cs b/src/Stripe.net/Entities/SetupIntents/SetupIntentAutomaticPaymentMethods.cs index 54c6aa257d..c4a5b81352 100644 --- a/src/Stripe.net/Entities/SetupIntents/SetupIntentAutomaticPaymentMethods.cs +++ b/src/Stripe.net/Entities/SetupIntents/SetupIntentAutomaticPaymentMethods.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SetupIntentAutomaticPaymentMethods : StripeEntity { @@ -16,12 +19,18 @@ public class SetupIntentAutomaticPaymentMethods : StripeEntityalways, or never. /// [JsonProperty("allow_redirects")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("allow_redirects")] +#endif public string AllowRedirects { get; set; } /// /// Automatically calculates compatible payment methods. /// [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool? Enabled { get; set; } } } diff --git a/src/Stripe.net/Entities/SetupIntents/SetupIntentNextAction.cs b/src/Stripe.net/Entities/SetupIntents/SetupIntentNextAction.cs index aba0018871..fc038a83c5 100644 --- a/src/Stripe.net/Entities/SetupIntents/SetupIntentNextAction.cs +++ b/src/Stripe.net/Entities/SetupIntents/SetupIntentNextAction.cs @@ -2,13 +2,22 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SetupIntentNextAction : StripeEntity { [JsonProperty("cashapp_handle_redirect_or_display_qr_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cashapp_handle_redirect_or_display_qr_code")] +#endif public SetupIntentNextActionCashappHandleRedirectOrDisplayQrCode CashappHandleRedirectOrDisplayQrCode { get; set; } [JsonProperty("redirect_to_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("redirect_to_url")] +#endif public SetupIntentNextActionRedirectToUrl RedirectToUrl { get; set; } /// @@ -17,6 +26,9 @@ public class SetupIntentNextAction : StripeEntity /// verify_with_microdeposits. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } /// @@ -25,9 +37,15 @@ public class SetupIntentNextAction : StripeEntity /// change and is only intended to be used by Stripe.js. /// [JsonProperty("use_stripe_sdk")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("use_stripe_sdk")] +#endif public SetupIntentNextActionUseStripeSdk UseStripeSdk { get; set; } [JsonProperty("verify_with_microdeposits")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("verify_with_microdeposits")] +#endif public SetupIntentNextActionVerifyWithMicrodeposits VerifyWithMicrodeposits { get; set; } } } diff --git a/src/Stripe.net/Entities/SetupIntents/SetupIntentNextActionCashappHandleRedirectOrDisplayQrCode.cs b/src/Stripe.net/Entities/SetupIntents/SetupIntentNextActionCashappHandleRedirectOrDisplayQrCode.cs index d2f9fd2716..74a970f600 100644 --- a/src/Stripe.net/Entities/SetupIntents/SetupIntentNextActionCashappHandleRedirectOrDisplayQrCode.cs +++ b/src/Stripe.net/Entities/SetupIntents/SetupIntentNextActionCashappHandleRedirectOrDisplayQrCode.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SetupIntentNextActionCashappHandleRedirectOrDisplayQrCode : StripeEntity { @@ -10,15 +13,24 @@ public class SetupIntentNextActionCashappHandleRedirectOrDisplayQrCode : StripeE /// QR code, and supports QR code refreshing on expiration. /// [JsonProperty("hosted_instructions_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("hosted_instructions_url")] +#endif public string HostedInstructionsUrl { get; set; } /// /// The url for mobile redirect based auth. /// [JsonProperty("mobile_auth_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mobile_auth_url")] +#endif public string MobileAuthUrl { get; set; } [JsonProperty("qr_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("qr_code")] +#endif public SetupIntentNextActionCashappHandleRedirectOrDisplayQrCodeQrCode QrCode { get; set; } } } diff --git a/src/Stripe.net/Entities/SetupIntents/SetupIntentNextActionCashappHandleRedirectOrDisplayQrCodeQrCode.cs b/src/Stripe.net/Entities/SetupIntents/SetupIntentNextActionCashappHandleRedirectOrDisplayQrCodeQrCode.cs index 3f0e2facb3..c1ea63cb44 100644 --- a/src/Stripe.net/Entities/SetupIntents/SetupIntentNextActionCashappHandleRedirectOrDisplayQrCodeQrCode.cs +++ b/src/Stripe.net/Entities/SetupIntents/SetupIntentNextActionCashappHandleRedirectOrDisplayQrCodeQrCode.cs @@ -4,6 +4,9 @@ namespace Stripe using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SetupIntentNextActionCashappHandleRedirectOrDisplayQrCodeQrCode : StripeEntity { @@ -12,18 +15,28 @@ public class SetupIntentNextActionCashappHandleRedirectOrDisplayQrCodeQrCode : S /// [JsonProperty("expires_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("expires_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime ExpiresAt { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// /// The image_url_png string used to render QR code. /// [JsonProperty("image_url_png")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("image_url_png")] +#endif public string ImageUrlPng { get; set; } /// /// The image_url_svg string used to render QR code. /// [JsonProperty("image_url_svg")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("image_url_svg")] +#endif public string ImageUrlSvg { get; set; } } } diff --git a/src/Stripe.net/Entities/SetupIntents/SetupIntentNextActionRedirectToUrl.cs b/src/Stripe.net/Entities/SetupIntents/SetupIntentNextActionRedirectToUrl.cs index f599166c34..881a4c7889 100644 --- a/src/Stripe.net/Entities/SetupIntents/SetupIntentNextActionRedirectToUrl.cs +++ b/src/Stripe.net/Entities/SetupIntents/SetupIntentNextActionRedirectToUrl.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SetupIntentNextActionRedirectToUrl : StripeEntity { @@ -10,12 +13,18 @@ public class SetupIntentNextActionRedirectToUrl : StripeEntity [JsonProperty("return_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("return_url")] +#endif public string ReturnUrl { get; set; } /// /// The URL you must redirect your customer to in order to authenticate. /// [JsonProperty("url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("url")] +#endif public string Url { get; set; } } } diff --git a/src/Stripe.net/Entities/SetupIntents/SetupIntentNextActionVerifyWithMicrodeposits.cs b/src/Stripe.net/Entities/SetupIntents/SetupIntentNextActionVerifyWithMicrodeposits.cs index d6554c1a79..7debcea80e 100644 --- a/src/Stripe.net/Entities/SetupIntents/SetupIntentNextActionVerifyWithMicrodeposits.cs +++ b/src/Stripe.net/Entities/SetupIntents/SetupIntentNextActionVerifyWithMicrodeposits.cs @@ -4,6 +4,9 @@ namespace Stripe using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SetupIntentNextActionVerifyWithMicrodeposits : StripeEntity { @@ -12,6 +15,10 @@ public class SetupIntentNextActionVerifyWithMicrodeposits : StripeEntity [JsonProperty("arrival_date")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("arrival_date")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime ArrivalDate { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -19,6 +26,9 @@ public class SetupIntentNextActionVerifyWithMicrodeposits : StripeEntity [JsonProperty("hosted_verification_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("hosted_verification_url")] +#endif public string HostedVerificationUrl { get; set; } /// @@ -27,6 +37,9 @@ public class SetupIntentNextActionVerifyWithMicrodeposits : StripeEntityamounts, or descriptor_code. /// [JsonProperty("microdeposit_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("microdeposit_type")] +#endif public string MicrodepositType { get; set; } } } diff --git a/src/Stripe.net/Entities/SetupIntents/SetupIntentPaymentMethodConfigurationDetails.cs b/src/Stripe.net/Entities/SetupIntents/SetupIntentPaymentMethodConfigurationDetails.cs index b3379637c5..a32979d753 100644 --- a/src/Stripe.net/Entities/SetupIntents/SetupIntentPaymentMethodConfigurationDetails.cs +++ b/src/Stripe.net/Entities/SetupIntents/SetupIntentPaymentMethodConfigurationDetails.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SetupIntentPaymentMethodConfigurationDetails : StripeEntity, IHasId { @@ -9,12 +12,18 @@ public class SetupIntentPaymentMethodConfigurationDetails : StripeEntity [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// ID of the parent payment method configuration used. /// [JsonProperty("parent")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("parent")] +#endif public string Parent { get; set; } } } diff --git a/src/Stripe.net/Entities/SetupIntents/SetupIntentPaymentMethodOptions.cs b/src/Stripe.net/Entities/SetupIntents/SetupIntentPaymentMethodOptions.cs index 29225e54e0..f64347a85f 100644 --- a/src/Stripe.net/Entities/SetupIntents/SetupIntentPaymentMethodOptions.cs +++ b/src/Stripe.net/Entities/SetupIntents/SetupIntentPaymentMethodOptions.cs @@ -2,34 +2,64 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SetupIntentPaymentMethodOptions : StripeEntity { [JsonProperty("acss_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("acss_debit")] +#endif public SetupIntentPaymentMethodOptionsAcssDebit AcssDebit { get; set; } [JsonProperty("amazon_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amazon_pay")] +#endif public SetupIntentPaymentMethodOptionsAmazonPay AmazonPay { get; set; } [JsonProperty("bacs_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bacs_debit")] +#endif public SetupIntentPaymentMethodOptionsBacsDebit BacsDebit { get; set; } [JsonProperty("card")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card")] +#endif public SetupIntentPaymentMethodOptionsCard Card { get; set; } [JsonProperty("card_present")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card_present")] +#endif public SetupIntentPaymentMethodOptionsCardPresent CardPresent { get; set; } [JsonProperty("link")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("link")] +#endif public SetupIntentPaymentMethodOptionsLink Link { get; set; } [JsonProperty("paypal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("paypal")] +#endif public SetupIntentPaymentMethodOptionsPaypal Paypal { get; set; } [JsonProperty("sepa_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sepa_debit")] +#endif public SetupIntentPaymentMethodOptionsSepaDebit SepaDebit { get; set; } [JsonProperty("us_bank_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("us_bank_account")] +#endif public SetupIntentPaymentMethodOptionsUsBankAccount UsBankAccount { get; set; } } } diff --git a/src/Stripe.net/Entities/SetupIntents/SetupIntentPaymentMethodOptionsAcssDebit.cs b/src/Stripe.net/Entities/SetupIntents/SetupIntentPaymentMethodOptionsAcssDebit.cs index f9b2488ac5..cd6a46ebe0 100644 --- a/src/Stripe.net/Entities/SetupIntents/SetupIntentPaymentMethodOptionsAcssDebit.cs +++ b/src/Stripe.net/Entities/SetupIntents/SetupIntentPaymentMethodOptionsAcssDebit.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SetupIntentPaymentMethodOptionsAcssDebit : StripeEntity { @@ -10,9 +13,15 @@ public class SetupIntentPaymentMethodOptionsAcssDebit : StripeEntitycad, or usd. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } [JsonProperty("mandate_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mandate_options")] +#endif public SetupIntentPaymentMethodOptionsAcssDebitMandateOptions MandateOptions { get; set; } /// @@ -20,6 +29,9 @@ public class SetupIntentPaymentMethodOptionsAcssDebit : StripeEntityautomatic, instant, or microdeposits. /// [JsonProperty("verification_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("verification_method")] +#endif public string VerificationMethod { get; set; } } } diff --git a/src/Stripe.net/Entities/SetupIntents/SetupIntentPaymentMethodOptionsAcssDebitMandateOptions.cs b/src/Stripe.net/Entities/SetupIntents/SetupIntentPaymentMethodOptionsAcssDebitMandateOptions.cs index a054db87f3..9cc471c4cc 100644 --- a/src/Stripe.net/Entities/SetupIntents/SetupIntentPaymentMethodOptionsAcssDebitMandateOptions.cs +++ b/src/Stripe.net/Entities/SetupIntents/SetupIntentPaymentMethodOptionsAcssDebitMandateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SetupIntentPaymentMethodOptionsAcssDebitMandateOptions : StripeEntity { @@ -10,6 +13,9 @@ public class SetupIntentPaymentMethodOptionsAcssDebitMandateOptions : StripeEnti /// A URL for custom mandate text. /// [JsonProperty("custom_mandate_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("custom_mandate_url")] +#endif public string CustomMandateUrl { get; set; } /// @@ -17,6 +23,9 @@ public class SetupIntentPaymentMethodOptionsAcssDebitMandateOptions : StripeEnti /// One of: invoice, or subscription. /// [JsonProperty("default_for")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("default_for")] +#endif public List DefaultFor { get; set; } /// @@ -24,6 +33,9 @@ public class SetupIntentPaymentMethodOptionsAcssDebitMandateOptions : StripeEnti /// 'interval' or 'combined'. /// [JsonProperty("interval_description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interval_description")] +#endif public string IntervalDescription { get; set; } /// @@ -31,6 +43,9 @@ public class SetupIntentPaymentMethodOptionsAcssDebitMandateOptions : StripeEnti /// One of: combined, interval, or sporadic. /// [JsonProperty("payment_schedule")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_schedule")] +#endif public string PaymentSchedule { get; set; } /// @@ -38,6 +53,9 @@ public class SetupIntentPaymentMethodOptionsAcssDebitMandateOptions : StripeEnti /// One of: business, or personal. /// [JsonProperty("transaction_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transaction_type")] +#endif public string TransactionType { get; set; } } } diff --git a/src/Stripe.net/Entities/SetupIntents/SetupIntentPaymentMethodOptionsBacsDebit.cs b/src/Stripe.net/Entities/SetupIntents/SetupIntentPaymentMethodOptionsBacsDebit.cs index 776d70153f..425f941b7a 100644 --- a/src/Stripe.net/Entities/SetupIntents/SetupIntentPaymentMethodOptionsBacsDebit.cs +++ b/src/Stripe.net/Entities/SetupIntents/SetupIntentPaymentMethodOptionsBacsDebit.cs @@ -2,10 +2,16 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SetupIntentPaymentMethodOptionsBacsDebit : StripeEntity { [JsonProperty("mandate_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mandate_options")] +#endif public SetupIntentPaymentMethodOptionsBacsDebitMandateOptions MandateOptions { get; set; } } } diff --git a/src/Stripe.net/Entities/SetupIntents/SetupIntentPaymentMethodOptionsCard.cs b/src/Stripe.net/Entities/SetupIntents/SetupIntentPaymentMethodOptionsCard.cs index a67cccc298..1c298ac3e7 100644 --- a/src/Stripe.net/Entities/SetupIntents/SetupIntentPaymentMethodOptionsCard.cs +++ b/src/Stripe.net/Entities/SetupIntents/SetupIntentPaymentMethodOptionsCard.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SetupIntentPaymentMethodOptionsCard : StripeEntity { @@ -9,6 +12,9 @@ public class SetupIntentPaymentMethodOptionsCard : StripeEntity [JsonProperty("mandate_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mandate_options")] +#endif public SetupIntentPaymentMethodOptionsCardMandateOptions MandateOptions { get; set; } /// @@ -19,6 +25,9 @@ public class SetupIntentPaymentMethodOptionsCard : StripeEntitymastercard, unionpay, unknown, or visa. /// [JsonProperty("network")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("network")] +#endif public string Network { get; set; } /// @@ -34,6 +43,9 @@ public class SetupIntentPaymentMethodOptionsCard : StripeEntityany, automatic, or challenge. /// [JsonProperty("request_three_d_secure")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("request_three_d_secure")] +#endif public string RequestThreeDSecure { get; set; } } } diff --git a/src/Stripe.net/Entities/SetupIntents/SetupIntentPaymentMethodOptionsCardMandateOptions.cs b/src/Stripe.net/Entities/SetupIntents/SetupIntentPaymentMethodOptionsCardMandateOptions.cs index f626a46284..862102506c 100644 --- a/src/Stripe.net/Entities/SetupIntents/SetupIntentPaymentMethodOptionsCardMandateOptions.cs +++ b/src/Stripe.net/Entities/SetupIntents/SetupIntentPaymentMethodOptionsCardMandateOptions.cs @@ -5,6 +5,9 @@ namespace Stripe using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SetupIntentPaymentMethodOptionsCardMandateOptions : StripeEntity { @@ -12,6 +15,9 @@ public class SetupIntentPaymentMethodOptionsCardMandateOptions : StripeEntity [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long Amount { get; set; } /// @@ -21,6 +27,9 @@ public class SetupIntentPaymentMethodOptionsCardMandateOptions : StripeEntityfixed, or maximum. /// [JsonProperty("amount_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_type")] +#endif public string AmountType { get; set; } /// @@ -29,6 +38,9 @@ public class SetupIntentPaymentMethodOptionsCardMandateOptions : StripeEntity. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// @@ -36,6 +48,9 @@ public class SetupIntentPaymentMethodOptionsCardMandateOptions : StripeEntity [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// @@ -44,6 +59,10 @@ public class SetupIntentPaymentMethodOptionsCardMandateOptions : StripeEntity [JsonProperty("end_date")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("end_date")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? EndDate { get; set; } /// @@ -52,6 +71,9 @@ public class SetupIntentPaymentMethodOptionsCardMandateOptions : StripeEntityday, month, sporadic, week, or year. /// [JsonProperty("interval")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interval")] +#endif public string Interval { get; set; } /// @@ -61,12 +83,18 @@ public class SetupIntentPaymentMethodOptionsCardMandateOptions : StripeEntityinterval=sporadic. /// [JsonProperty("interval_count")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interval_count")] +#endif public long? IntervalCount { get; set; } /// /// Unique identifier for the mandate or subscription. /// [JsonProperty("reference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reference")] +#endif public string Reference { get; set; } /// @@ -75,12 +103,19 @@ public class SetupIntentPaymentMethodOptionsCardMandateOptions : StripeEntity [JsonProperty("start_date")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("start_date")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime StartDate { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// /// Specifies the type of mandates supported. Possible values are india. /// [JsonProperty("supported_types")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("supported_types")] +#endif public List SupportedTypes { get; set; } } } diff --git a/src/Stripe.net/Entities/SetupIntents/SetupIntentPaymentMethodOptionsLink.cs b/src/Stripe.net/Entities/SetupIntents/SetupIntentPaymentMethodOptionsLink.cs index 0d97af784c..6890517aa0 100644 --- a/src/Stripe.net/Entities/SetupIntents/SetupIntentPaymentMethodOptionsLink.cs +++ b/src/Stripe.net/Entities/SetupIntents/SetupIntentPaymentMethodOptionsLink.cs @@ -3,6 +3,9 @@ namespace Stripe { using System; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SetupIntentPaymentMethodOptionsLink : StripeEntity { @@ -11,6 +14,9 @@ public class SetupIntentPaymentMethodOptionsLink : StripeEntity [Obsolete("This property is deprecated, please refer to the description for details.")] [JsonProperty("persistent_token")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("persistent_token")] +#endif public string PersistentToken { get; set; } } } diff --git a/src/Stripe.net/Entities/SetupIntents/SetupIntentPaymentMethodOptionsPaypal.cs b/src/Stripe.net/Entities/SetupIntents/SetupIntentPaymentMethodOptionsPaypal.cs index 48dcdbf1ae..542dd536cb 100644 --- a/src/Stripe.net/Entities/SetupIntents/SetupIntentPaymentMethodOptionsPaypal.cs +++ b/src/Stripe.net/Entities/SetupIntents/SetupIntentPaymentMethodOptionsPaypal.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SetupIntentPaymentMethodOptionsPaypal : StripeEntity { @@ -10,6 +13,9 @@ public class SetupIntentPaymentMethodOptionsPaypal : StripeEntity [JsonProperty("billing_agreement_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_agreement_id")] +#endif public string BillingAgreementId { get; set; } } } diff --git a/src/Stripe.net/Entities/SetupIntents/SetupIntentPaymentMethodOptionsSepaDebit.cs b/src/Stripe.net/Entities/SetupIntents/SetupIntentPaymentMethodOptionsSepaDebit.cs index 2006d61335..db8938868d 100644 --- a/src/Stripe.net/Entities/SetupIntents/SetupIntentPaymentMethodOptionsSepaDebit.cs +++ b/src/Stripe.net/Entities/SetupIntents/SetupIntentPaymentMethodOptionsSepaDebit.cs @@ -2,10 +2,16 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SetupIntentPaymentMethodOptionsSepaDebit : StripeEntity { [JsonProperty("mandate_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mandate_options")] +#endif public SetupIntentPaymentMethodOptionsSepaDebitMandateOptions MandateOptions { get; set; } } } diff --git a/src/Stripe.net/Entities/SetupIntents/SetupIntentPaymentMethodOptionsUsBankAccount.cs b/src/Stripe.net/Entities/SetupIntents/SetupIntentPaymentMethodOptionsUsBankAccount.cs index 72feafd62b..5890f3e6e2 100644 --- a/src/Stripe.net/Entities/SetupIntents/SetupIntentPaymentMethodOptionsUsBankAccount.cs +++ b/src/Stripe.net/Entities/SetupIntents/SetupIntentPaymentMethodOptionsUsBankAccount.cs @@ -2,13 +2,22 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SetupIntentPaymentMethodOptionsUsBankAccount : StripeEntity { [JsonProperty("financial_connections")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("financial_connections")] +#endif public SetupIntentPaymentMethodOptionsUsBankAccountFinancialConnections FinancialConnections { get; set; } [JsonProperty("mandate_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mandate_options")] +#endif public SetupIntentPaymentMethodOptionsUsBankAccountMandateOptions MandateOptions { get; set; } /// @@ -16,6 +25,9 @@ public class SetupIntentPaymentMethodOptionsUsBankAccount : StripeEntityautomatic, instant, or microdeposits. /// [JsonProperty("verification_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("verification_method")] +#endif public string VerificationMethod { get; set; } } } diff --git a/src/Stripe.net/Entities/SetupIntents/SetupIntentPaymentMethodOptionsUsBankAccountFinancialConnections.cs b/src/Stripe.net/Entities/SetupIntents/SetupIntentPaymentMethodOptionsUsBankAccountFinancialConnections.cs index 963a60435f..403b4c9d72 100644 --- a/src/Stripe.net/Entities/SetupIntents/SetupIntentPaymentMethodOptionsUsBankAccountFinancialConnections.cs +++ b/src/Stripe.net/Entities/SetupIntents/SetupIntentPaymentMethodOptionsUsBankAccountFinancialConnections.cs @@ -3,10 +3,16 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SetupIntentPaymentMethodOptionsUsBankAccountFinancialConnections : StripeEntity { [JsonProperty("filters")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("filters")] +#endif public SetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters Filters { get; set; } /// @@ -16,6 +22,9 @@ public class SetupIntentPaymentMethodOptionsUsBankAccountFinancialConnections : /// transactions. /// [JsonProperty("permissions")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("permissions")] +#endif public List Permissions { get; set; } /// @@ -23,6 +32,9 @@ public class SetupIntentPaymentMethodOptionsUsBankAccountFinancialConnections : /// One of: balances, ownership, or transactions. /// [JsonProperty("prefetch")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("prefetch")] +#endif public List Prefetch { get; set; } /// @@ -30,6 +42,9 @@ public class SetupIntentPaymentMethodOptionsUsBankAccountFinancialConnections : /// user will be redirected to this URL to return to your app. /// [JsonProperty("return_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("return_url")] +#endif public string ReturnUrl { get; set; } } } diff --git a/src/Stripe.net/Entities/SetupIntents/SetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters.cs b/src/Stripe.net/Entities/SetupIntents/SetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters.cs index 3ec6d981ea..3aa5d39c79 100644 --- a/src/Stripe.net/Entities/SetupIntents/SetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters.cs +++ b/src/Stripe.net/Entities/SetupIntents/SetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters : StripeEntity { @@ -12,6 +15,9 @@ public class SetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsFil /// One of: checking, or savings. /// [JsonProperty("account_subcategories")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_subcategories")] +#endif public List AccountSubcategories { get; set; } } } diff --git a/src/Stripe.net/Entities/SetupIntents/SetupIntentPaymentMethodOptionsUsBankAccountMandateOptions.cs b/src/Stripe.net/Entities/SetupIntents/SetupIntentPaymentMethodOptionsUsBankAccountMandateOptions.cs index d151f9be97..8e2a256b68 100644 --- a/src/Stripe.net/Entities/SetupIntents/SetupIntentPaymentMethodOptionsUsBankAccountMandateOptions.cs +++ b/src/Stripe.net/Entities/SetupIntents/SetupIntentPaymentMethodOptionsUsBankAccountMandateOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SetupIntentPaymentMethodOptionsUsBankAccountMandateOptions : StripeEntity { @@ -9,6 +12,9 @@ public class SetupIntentPaymentMethodOptionsUsBankAccountMandateOptions : Stripe /// Mandate collection method. /// [JsonProperty("collection_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("collection_method")] +#endif public string CollectionMethod { get; set; } } } diff --git a/src/Stripe.net/Entities/ShippingRates/ShippingRate.cs b/src/Stripe.net/Entities/ShippingRates/ShippingRate.cs index 3fe2b8c01d..9c19eca253 100644 --- a/src/Stripe.net/Entities/ShippingRates/ShippingRate.cs +++ b/src/Stripe.net/Entities/ShippingRates/ShippingRate.cs @@ -5,6 +5,9 @@ namespace Stripe using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// Shipping rates describe the price of shipping presented to your customers and applied to @@ -12,24 +15,36 @@ namespace Stripe /// href="https://stripe.com/docs/payments/during-payment/charge-shipping">Charge for /// shipping. /// +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class ShippingRate : StripeEntity, IHasId, IHasMetadata, IHasObject { /// /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// /// Whether the shipping rate can be used for new purchases. Defaults to true. /// [JsonProperty("active")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("active")] +#endif public bool Active { get; set; } /// @@ -37,6 +52,10 @@ public class ShippingRate : StripeEntity, IHasId, IHasMetadata, IH /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -44,6 +63,9 @@ public class ShippingRate : StripeEntity, IHasId, IHasMetadata, IH /// customer. This will appear on CheckoutSessions. /// [JsonProperty("delivery_estimate")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("delivery_estimate")] +#endif public ShippingRateDeliveryEstimate DeliveryEstimate { get; set; } /// @@ -51,9 +73,15 @@ public class ShippingRate : StripeEntity, IHasId, IHasMetadata, IH /// on CheckoutSessions. /// [JsonProperty("display_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_name")] +#endif public string DisplayName { get; set; } [JsonProperty("fixed_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fixed_amount")] +#endif public ShippingRateFixedAmount FixedAmount { get; set; } /// @@ -61,6 +89,9 @@ public class ShippingRate : StripeEntity, IHasId, IHasMetadata, IH /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// @@ -69,6 +100,9 @@ public class ShippingRate : StripeEntity, IHasId, IHasMetadata, IH /// object in a structured format. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -77,6 +111,9 @@ public class ShippingRate : StripeEntity, IHasId, IHasMetadata, IH /// One of: exclusive, inclusive, or unspecified. /// [JsonProperty("tax_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_behavior")] +#endif public string TaxBehavior { get; set; } #region Expandable TaxCode @@ -87,6 +124,9 @@ public class ShippingRate : StripeEntity, IHasId, IHasMetadata, IH /// code is txcd_92010001. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string TaxCodeId { get => this.InternalTaxCode?.Id; @@ -101,6 +141,9 @@ public string TaxCodeId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public TaxCode TaxCode { get => this.InternalTaxCode?.ExpandedObject; @@ -109,6 +152,10 @@ public TaxCode TaxCode [JsonProperty("tax_code")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_code")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalTaxCode { get; set; } #endregion @@ -116,6 +163,9 @@ public TaxCode TaxCode /// The type of calculation to use on the shipping rate. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/ShippingRates/ShippingRateDeliveryEstimate.cs b/src/Stripe.net/Entities/ShippingRates/ShippingRateDeliveryEstimate.cs index 4dc72adecd..10c5dc5180 100644 --- a/src/Stripe.net/Entities/ShippingRates/ShippingRateDeliveryEstimate.cs +++ b/src/Stripe.net/Entities/ShippingRates/ShippingRateDeliveryEstimate.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ShippingRateDeliveryEstimate : StripeEntity { @@ -10,12 +13,18 @@ public class ShippingRateDeliveryEstimate : StripeEntity [JsonProperty("maximum")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("maximum")] +#endif public ShippingRateDeliveryEstimateMaximum Maximum { get; set; } /// /// The lower bound of the estimated range. If empty, represents no lower bound. /// [JsonProperty("minimum")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("minimum")] +#endif public ShippingRateDeliveryEstimateMinimum Minimum { get; set; } } } diff --git a/src/Stripe.net/Entities/ShippingRates/ShippingRateDeliveryEstimateMaximum.cs b/src/Stripe.net/Entities/ShippingRates/ShippingRateDeliveryEstimateMaximum.cs index 53e02ad545..79a2e3e6bb 100644 --- a/src/Stripe.net/Entities/ShippingRates/ShippingRateDeliveryEstimateMaximum.cs +++ b/src/Stripe.net/Entities/ShippingRates/ShippingRateDeliveryEstimateMaximum.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ShippingRateDeliveryEstimateMaximum : StripeEntity { @@ -10,12 +13,18 @@ public class ShippingRateDeliveryEstimateMaximum : StripeEntitybusiness_day, day, hour, month, or week. /// [JsonProperty("unit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit")] +#endif public string Unit { get; set; } /// /// Must be greater than 0. /// [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public long Value { get; set; } } } diff --git a/src/Stripe.net/Entities/ShippingRates/ShippingRateDeliveryEstimateMinimum.cs b/src/Stripe.net/Entities/ShippingRates/ShippingRateDeliveryEstimateMinimum.cs index f629619814..7829baf0ba 100644 --- a/src/Stripe.net/Entities/ShippingRates/ShippingRateDeliveryEstimateMinimum.cs +++ b/src/Stripe.net/Entities/ShippingRates/ShippingRateDeliveryEstimateMinimum.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ShippingRateDeliveryEstimateMinimum : StripeEntity { @@ -10,12 +13,18 @@ public class ShippingRateDeliveryEstimateMinimum : StripeEntitybusiness_day, day, hour, month, or week. /// [JsonProperty("unit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit")] +#endif public string Unit { get; set; } /// /// Must be greater than 0. /// [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public long Value { get; set; } } } diff --git a/src/Stripe.net/Entities/ShippingRates/ShippingRateFixedAmount.cs b/src/Stripe.net/Entities/ShippingRates/ShippingRateFixedAmount.cs index 8ea07f932c..6dbdb690b3 100644 --- a/src/Stripe.net/Entities/ShippingRates/ShippingRateFixedAmount.cs +++ b/src/Stripe.net/Entities/ShippingRates/ShippingRateFixedAmount.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ShippingRateFixedAmount : StripeEntity { @@ -10,6 +13,9 @@ public class ShippingRateFixedAmount : StripeEntity /// A non-negative integer in cents representing how much to charge. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long Amount { get; set; } /// @@ -18,6 +24,9 @@ public class ShippingRateFixedAmount : StripeEntity /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// @@ -26,6 +35,9 @@ public class ShippingRateFixedAmount : StripeEntity /// code and a supported currency. /// [JsonProperty("currency_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency_options")] +#endif public Dictionary CurrencyOptions { get; set; } } } diff --git a/src/Stripe.net/Entities/ShippingRates/ShippingRateFixedAmountCurrencyOptions.cs b/src/Stripe.net/Entities/ShippingRates/ShippingRateFixedAmountCurrencyOptions.cs index 4696f74dd9..7ca29be39f 100644 --- a/src/Stripe.net/Entities/ShippingRates/ShippingRateFixedAmountCurrencyOptions.cs +++ b/src/Stripe.net/Entities/ShippingRates/ShippingRateFixedAmountCurrencyOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ShippingRateFixedAmountCurrencyOptions : StripeEntity { @@ -9,6 +12,9 @@ public class ShippingRateFixedAmountCurrencyOptions : StripeEntity [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long Amount { get; set; } /// @@ -17,6 +23,9 @@ public class ShippingRateFixedAmountCurrencyOptions : StripeEntityexclusive, inclusive, or unspecified. /// [JsonProperty("tax_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_behavior")] +#endif public string TaxBehavior { get; set; } } } diff --git a/src/Stripe.net/Entities/Sigma/ScheduledQueryRuns/ScheduledQueryRun.cs b/src/Stripe.net/Entities/Sigma/ScheduledQueryRuns/ScheduledQueryRun.cs index 7ec11380d1..271946988a 100644 --- a/src/Stripe.net/Entities/Sigma/ScheduledQueryRuns/ScheduledQueryRun.cs +++ b/src/Stripe.net/Entities/Sigma/ScheduledQueryRuns/ScheduledQueryRun.cs @@ -4,6 +4,9 @@ namespace Stripe.Sigma using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// If you have scheduled a Sigma @@ -17,12 +20,18 @@ public class ScheduledQueryRun : StripeEntity, IHasId, IHasOb /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// @@ -30,6 +39,10 @@ public class ScheduledQueryRun : StripeEntity, IHasId, IHasOb /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -37,15 +50,25 @@ public class ScheduledQueryRun : StripeEntity, IHasId, IHasOb /// [JsonProperty("data_load_time")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("data_load_time")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime DataLoadTime { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; [JsonProperty("error")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("error")] +#endif public ScheduledQueryRunError Error { get; set; } /// /// The file object representing the results of the query. /// [JsonProperty("file")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("file")] +#endif public File File { get; set; } /// @@ -53,6 +76,9 @@ public class ScheduledQueryRun : StripeEntity, IHasId, IHasOb /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// @@ -60,12 +86,19 @@ public class ScheduledQueryRun : StripeEntity, IHasId, IHasOb /// [JsonProperty("result_available_until")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("result_available_until")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime ResultAvailableUntil { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// /// SQL for the query. /// [JsonProperty("sql")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sql")] +#endif public string Sql { get; set; } /// @@ -73,12 +106,18 @@ public class ScheduledQueryRun : StripeEntity, IHasId, IHasOb /// canceled, failed, or timed_out otherwise. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } /// /// Title of the query. /// [JsonProperty("title")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("title")] +#endif public string Title { get; set; } } } diff --git a/src/Stripe.net/Entities/Sigma/ScheduledQueryRuns/ScheduledQueryRunError.cs b/src/Stripe.net/Entities/Sigma/ScheduledQueryRuns/ScheduledQueryRunError.cs index f050348a02..fc6eeb3157 100644 --- a/src/Stripe.net/Entities/Sigma/ScheduledQueryRuns/ScheduledQueryRunError.cs +++ b/src/Stripe.net/Entities/Sigma/ScheduledQueryRuns/ScheduledQueryRunError.cs @@ -2,6 +2,9 @@ namespace Stripe.Sigma { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ScheduledQueryRunError : StripeEntity { @@ -9,6 +12,9 @@ public class ScheduledQueryRunError : StripeEntity /// Information about the run failure. /// [JsonProperty("message")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("message")] +#endif public string Message { get; set; } } } diff --git a/src/Stripe.net/Entities/SourceMandateNotifications/SourceMandateNotification.cs b/src/Stripe.net/Entities/SourceMandateNotifications/SourceMandateNotification.cs index b32ac55166..8e6a979e30 100644 --- a/src/Stripe.net/Entities/SourceMandateNotifications/SourceMandateNotification.cs +++ b/src/Stripe.net/Entities/SourceMandateNotifications/SourceMandateNotification.cs @@ -4,6 +4,9 @@ namespace Stripe using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// Source mandate notifications should be created when a notification related to a source @@ -16,15 +19,24 @@ public class SourceMandateNotification : StripeEntity /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } [JsonProperty("acss_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("acss_debit")] +#endif public SourceMandateNotificationAcssDebit AcssDebit { get; set; } /// @@ -34,9 +46,15 @@ public class SourceMandateNotification : StripeEntity /// source. Required if the notification type is debit_initiated. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long? Amount { get; set; } [JsonProperty("bacs_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bacs_debit")] +#endif public SourceMandateNotificationBacsDebit BacsDebit { get; set; } /// @@ -44,6 +62,10 @@ public class SourceMandateNotification : StripeEntity /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -51,6 +73,9 @@ public class SourceMandateNotification : StripeEntity /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// @@ -58,9 +83,15 @@ public class SourceMandateNotification : StripeEntity /// debit_initiated. /// [JsonProperty("reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reason")] +#endif public string Reason { get; set; } [JsonProperty("sepa_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sepa_debit")] +#endif public SourceMandateNotificationSepaDebit SepaDebit { get; set; } /// @@ -78,6 +109,9 @@ public class SourceMandateNotification : StripeEntity /// href="https://stripe.com/docs/sources/customers">Sources & Customers. /// [JsonProperty("source")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("source")] +#endif public Source Source { get; set; } /// @@ -85,6 +119,9 @@ public class SourceMandateNotification : StripeEntity /// submitted. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } /// @@ -92,6 +129,9 @@ public class SourceMandateNotification : StripeEntity /// identifier code for the payment method, such as three_d_secure. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/SourceMandateNotifications/SourceMandateNotificationAcssDebit.cs b/src/Stripe.net/Entities/SourceMandateNotifications/SourceMandateNotificationAcssDebit.cs index e72f19ab70..cfdcecc8e2 100644 --- a/src/Stripe.net/Entities/SourceMandateNotifications/SourceMandateNotificationAcssDebit.cs +++ b/src/Stripe.net/Entities/SourceMandateNotifications/SourceMandateNotificationAcssDebit.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SourceMandateNotificationAcssDebit : StripeEntity { @@ -9,6 +12,9 @@ public class SourceMandateNotificationAcssDebit : StripeEntity [JsonProperty("statement_descriptor")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("statement_descriptor")] +#endif public string StatementDescriptor { get; set; } } } diff --git a/src/Stripe.net/Entities/SourceMandateNotifications/SourceMandateNotificationBacsDebit.cs b/src/Stripe.net/Entities/SourceMandateNotifications/SourceMandateNotificationBacsDebit.cs index 9e8fe46153..91a4c5a63b 100644 --- a/src/Stripe.net/Entities/SourceMandateNotifications/SourceMandateNotificationBacsDebit.cs +++ b/src/Stripe.net/Entities/SourceMandateNotifications/SourceMandateNotificationBacsDebit.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SourceMandateNotificationBacsDebit : StripeEntity { @@ -9,6 +12,9 @@ public class SourceMandateNotificationBacsDebit : StripeEntity [JsonProperty("last4")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last4")] +#endif public string Last4 { get; set; } } } diff --git a/src/Stripe.net/Entities/SourceMandateNotifications/SourceMandateNotificationSepaDebit.cs b/src/Stripe.net/Entities/SourceMandateNotifications/SourceMandateNotificationSepaDebit.cs index ec2fbc14b7..d84c89bc84 100644 --- a/src/Stripe.net/Entities/SourceMandateNotifications/SourceMandateNotificationSepaDebit.cs +++ b/src/Stripe.net/Entities/SourceMandateNotifications/SourceMandateNotificationSepaDebit.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SourceMandateNotificationSepaDebit : StripeEntity { @@ -9,18 +12,27 @@ public class SourceMandateNotificationSepaDebit : StripeEntity [JsonProperty("creditor_identifier")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("creditor_identifier")] +#endif public string CreditorIdentifier { get; set; } /// /// Last 4 digits of the account number associated with the debit. /// [JsonProperty("last4")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last4")] +#endif public string Last4 { get; set; } /// /// Mandate reference associated with the debit. /// [JsonProperty("mandate_reference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mandate_reference")] +#endif public string MandateReference { get; set; } } } diff --git a/src/Stripe.net/Entities/SourceTransactions/SourceTransaction.cs b/src/Stripe.net/Entities/SourceTransactions/SourceTransaction.cs index 8bc39c2fec..967ba2c173 100644 --- a/src/Stripe.net/Entities/SourceTransactions/SourceTransaction.cs +++ b/src/Stripe.net/Entities/SourceTransactions/SourceTransaction.cs @@ -4,6 +4,9 @@ namespace Stripe using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// Some payment methods have no required amount that a customer must send. Customers can be @@ -16,15 +19,24 @@ public class SourceTransaction : StripeEntity, IHasId, IHasOb /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } [JsonProperty("ach_credit_transfer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ach_credit_transfer")] +#endif public SourceTransactionAchCreditTransfer AchCreditTransfer { get; set; } /// @@ -33,9 +45,15 @@ public class SourceTransaction : StripeEntity, IHasId, IHasOb /// has pushed to the receiver. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long Amount { get; set; } [JsonProperty("chf_credit_transfer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("chf_credit_transfer")] +#endif public SourceTransactionChfCreditTransfer ChfCreditTransfer { get; set; } /// @@ -43,6 +61,10 @@ public class SourceTransaction : StripeEntity, IHasId, IHasOb /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -51,9 +73,15 @@ public class SourceTransaction : StripeEntity, IHasId, IHasOb /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } [JsonProperty("gbp_credit_transfer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("gbp_credit_transfer")] +#endif public SourceTransactionGbpCreditTransfer GbpCreditTransfer { get; set; } /// @@ -61,18 +89,30 @@ public class SourceTransaction : StripeEntity, IHasId, IHasOb /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } [JsonProperty("paper_check")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("paper_check")] +#endif public SourceTransactionPaperCheck PaperCheck { get; set; } [JsonProperty("sepa_credit_transfer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sepa_credit_transfer")] +#endif public SourceTransactionSepaCreditTransfer SepaCreditTransfer { get; set; } /// /// The ID of the source this transaction is attached to. /// [JsonProperty("source")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("source")] +#endif public string Source { get; set; } /// @@ -80,6 +120,9 @@ public class SourceTransaction : StripeEntity, IHasId, IHasOb /// failed. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } /// @@ -90,6 +133,9 @@ public class SourceTransaction : StripeEntity, IHasId, IHasOb /// three_d_secure, or wechat. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/SourceTransactions/SourceTransactionAchCreditTransfer.cs b/src/Stripe.net/Entities/SourceTransactions/SourceTransactionAchCreditTransfer.cs index a629a21d9f..255599380d 100644 --- a/src/Stripe.net/Entities/SourceTransactions/SourceTransactionAchCreditTransfer.cs +++ b/src/Stripe.net/Entities/SourceTransactions/SourceTransactionAchCreditTransfer.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SourceTransactionAchCreditTransfer : StripeEntity { @@ -9,24 +12,36 @@ public class SourceTransactionAchCreditTransfer : StripeEntity [JsonProperty("customer_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_data")] +#endif public string CustomerData { get; set; } /// /// Bank account fingerprint associated with the transfer. /// [JsonProperty("fingerprint")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fingerprint")] +#endif public string Fingerprint { get; set; } /// /// Last 4 digits of the account number associated with the transfer. /// [JsonProperty("last4")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last4")] +#endif public string Last4 { get; set; } /// /// Routing number associated with the transfer. /// [JsonProperty("routing_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("routing_number")] +#endif public string RoutingNumber { get; set; } } } diff --git a/src/Stripe.net/Entities/SourceTransactions/SourceTransactionChfCreditTransfer.cs b/src/Stripe.net/Entities/SourceTransactions/SourceTransactionChfCreditTransfer.cs index 75dd2884ae..aa9aac718d 100644 --- a/src/Stripe.net/Entities/SourceTransactions/SourceTransactionChfCreditTransfer.cs +++ b/src/Stripe.net/Entities/SourceTransactions/SourceTransactionChfCreditTransfer.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SourceTransactionChfCreditTransfer : StripeEntity { @@ -9,30 +12,45 @@ public class SourceTransactionChfCreditTransfer : StripeEntity [JsonProperty("reference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reference")] +#endif public string Reference { get; set; } /// /// Sender's country address. /// [JsonProperty("sender_address_country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sender_address_country")] +#endif public string SenderAddressCountry { get; set; } /// /// Sender's line 1 address. /// [JsonProperty("sender_address_line1")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sender_address_line1")] +#endif public string SenderAddressLine1 { get; set; } /// /// Sender's bank account IBAN. /// [JsonProperty("sender_iban")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sender_iban")] +#endif public string SenderIban { get; set; } /// /// Sender's name. /// [JsonProperty("sender_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sender_name")] +#endif public string SenderName { get; set; } } } diff --git a/src/Stripe.net/Entities/SourceTransactions/SourceTransactionGbpCreditTransfer.cs b/src/Stripe.net/Entities/SourceTransactions/SourceTransactionGbpCreditTransfer.cs index e28a92adf0..278a5c0a2f 100644 --- a/src/Stripe.net/Entities/SourceTransactions/SourceTransactionGbpCreditTransfer.cs +++ b/src/Stripe.net/Entities/SourceTransactions/SourceTransactionGbpCreditTransfer.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SourceTransactionGbpCreditTransfer : StripeEntity { @@ -10,6 +13,9 @@ public class SourceTransactionGbpCreditTransfer : StripeEntity [JsonProperty("fingerprint")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fingerprint")] +#endif public string Fingerprint { get; set; } /// @@ -18,36 +24,54 @@ public class SourceTransactionGbpCreditTransfer : StripeEntity [JsonProperty("funding_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("funding_method")] +#endif public string FundingMethod { get; set; } /// /// Last 4 digits of sender account number associated with the transfer. /// [JsonProperty("last4")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last4")] +#endif public string Last4 { get; set; } /// /// Sender entered arbitrary information about the transfer. /// [JsonProperty("reference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reference")] +#endif public string Reference { get; set; } /// /// Sender account number associated with the transfer. /// [JsonProperty("sender_account_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sender_account_number")] +#endif public string SenderAccountNumber { get; set; } /// /// Sender name associated with the transfer. /// [JsonProperty("sender_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sender_name")] +#endif public string SenderName { get; set; } /// /// Sender sort code associated with the transfer. /// [JsonProperty("sender_sort_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sender_sort_code")] +#endif public string SenderSortCode { get; set; } } } diff --git a/src/Stripe.net/Entities/SourceTransactions/SourceTransactionPaperCheck.cs b/src/Stripe.net/Entities/SourceTransactions/SourceTransactionPaperCheck.cs index 5b86fb01e6..d3878dd6b7 100644 --- a/src/Stripe.net/Entities/SourceTransactions/SourceTransactionPaperCheck.cs +++ b/src/Stripe.net/Entities/SourceTransactions/SourceTransactionPaperCheck.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SourceTransactionPaperCheck : StripeEntity { @@ -10,12 +13,18 @@ public class SourceTransactionPaperCheck : StripeEntity [JsonProperty("available_at")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("available_at")] +#endif public string AvailableAt { get; set; } /// /// Comma-separated list of invoice IDs associated with the paper check. /// [JsonProperty("invoices")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("invoices")] +#endif public string Invoices { get; set; } } } diff --git a/src/Stripe.net/Entities/SourceTransactions/SourceTransactionSepaCreditTransfer.cs b/src/Stripe.net/Entities/SourceTransactions/SourceTransactionSepaCreditTransfer.cs index 90411f075c..82e288cd6a 100644 --- a/src/Stripe.net/Entities/SourceTransactions/SourceTransactionSepaCreditTransfer.cs +++ b/src/Stripe.net/Entities/SourceTransactions/SourceTransactionSepaCreditTransfer.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SourceTransactionSepaCreditTransfer : StripeEntity { @@ -9,18 +12,27 @@ public class SourceTransactionSepaCreditTransfer : StripeEntity [JsonProperty("reference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reference")] +#endif public string Reference { get; set; } /// /// Sender's bank account IBAN. /// [JsonProperty("sender_iban")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sender_iban")] +#endif public string SenderIban { get; set; } /// /// Sender's name. /// [JsonProperty("sender_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sender_name")] +#endif public string SenderName { get; set; } } } diff --git a/src/Stripe.net/Entities/Sources/Source.cs b/src/Stripe.net/Entities/Sources/Source.cs index 140eb6a79b..74f0dbe410 100644 --- a/src/Stripe.net/Entities/Sources/Source.cs +++ b/src/Stripe.net/Entities/Sources/Source.cs @@ -5,6 +5,9 @@ namespace Stripe using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// Source objects allow you to accept a variety of payment methods. They represent a @@ -26,24 +29,42 @@ public class Source : StripeEntity, IHasId, IHasMetadata, IHasObject, IP /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } [JsonProperty("ach_credit_transfer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ach_credit_transfer")] +#endif public SourceAchCreditTransfer AchCreditTransfer { get; set; } [JsonProperty("ach_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ach_debit")] +#endif public SourceAchDebit AchDebit { get; set; } [JsonProperty("acss_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("acss_debit")] +#endif public SourceAcssDebit AcssDebit { get; set; } [JsonProperty("alipay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("alipay")] +#endif public SourceAlipay Alipay { get; set; } /// @@ -53,27 +74,48 @@ public class Source : StripeEntity, IHasId, IHasMetadata, IHasObject, IP /// Required for single_use sources. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long? Amount { get; set; } [JsonProperty("au_becs_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("au_becs_debit")] +#endif public SourceAuBecsDebit AuBecsDebit { get; set; } [JsonProperty("bancontact")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bancontact")] +#endif public SourceBancontact Bancontact { get; set; } [JsonProperty("card")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card")] +#endif public SourceCard Card { get; set; } [JsonProperty("card_present")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card_present")] +#endif public SourceCardPresent CardPresent { get; set; } /// /// The client secret of the source. Used for client-side retrieval using a publishable key. /// [JsonProperty("client_secret")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("client_secret")] +#endif public string ClientSecret { get; set; } [JsonProperty("code_verification")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("code_verification")] +#endif public SourceCodeVerification CodeVerification { get; set; } /// @@ -81,6 +123,10 @@ public class Source : StripeEntity, IHasId, IHasMetadata, IHasObject, IP /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -89,6 +135,9 @@ public class Source : StripeEntity, IHasId, IHasMetadata, IHasObject, IP /// once ready. Required for single_use sources. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// @@ -96,9 +145,15 @@ public class Source : StripeEntity, IHasId, IHasMetadata, IHasObject, IP /// the source has not been attached to a customer. /// [JsonProperty("customer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] +#endif public string Customer { get; set; } [JsonProperty("eps")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("eps")] +#endif public SourceEps Eps { get; set; } /// @@ -106,15 +161,27 @@ public class Source : StripeEntity, IHasId, IHasMetadata, IHasObject, IP /// receiver, code_verification, none. /// [JsonProperty("flow")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("flow")] +#endif public string Flow { get; set; } [JsonProperty("giropay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("giropay")] +#endif public SourceGiropay Giropay { get; set; } [JsonProperty("ideal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ideal")] +#endif public SourceIdeal Ideal { get; set; } [JsonProperty("klarna")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("klarna")] +#endif public SourceKlarna Klarna { get; set; } /// @@ -122,6 +189,9 @@ public class Source : StripeEntity, IHasId, IHasMetadata, IHasObject, IP /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// @@ -130,9 +200,15 @@ public class Source : StripeEntity, IHasId, IHasMetadata, IHasObject, IP /// object in a structured format. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } [JsonProperty("multibanco")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("multibanco")] +#endif public SourceMultibanco Multibanco { get; set; } /// @@ -140,27 +216,51 @@ public class Source : StripeEntity, IHasId, IHasMetadata, IHasObject, IP /// particular source types. /// [JsonProperty("owner")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("owner")] +#endif public SourceOwner Owner { get; set; } [JsonProperty("p24")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("p24")] +#endif public SourceP24 P24 { get; set; } [JsonProperty("receiver")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("receiver")] +#endif public SourceReceiver Receiver { get; set; } [JsonProperty("redirect")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("redirect")] +#endif public SourceRedirect Redirect { get; set; } [JsonProperty("sepa_credit_transfer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sepa_credit_transfer")] +#endif public SourceSepaCreditTransfer SepaCreditTransfer { get; set; } [JsonProperty("sepa_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sepa_debit")] +#endif public SourceSepaDebit SepaDebit { get; set; } [JsonProperty("sofort")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sofort")] +#endif public SourceSofort Sofort { get; set; } [JsonProperty("source_order")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("source_order")] +#endif public SourceSourceOrder SourceOrder { get; set; } /// @@ -168,6 +268,9 @@ public class Source : StripeEntity, IHasId, IHasMetadata, IHasObject, IP /// time you charge the source. /// [JsonProperty("statement_descriptor")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("statement_descriptor")] +#endif public string StatementDescriptor { get; set; } /// @@ -176,9 +279,15 @@ public class Source : StripeEntity, IHasId, IHasMetadata, IHasObject, IP /// charge. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } [JsonProperty("three_d_secure")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("three_d_secure")] +#endif public SourceThreeDSecure ThreeDSecure { get; set; } /// @@ -196,6 +305,9 @@ public class Source : StripeEntity, IHasId, IHasMetadata, IHasObject, IP /// wechat. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } /// @@ -205,9 +317,15 @@ public class Source : StripeEntity, IHasId, IHasMetadata, IHasObject, IP /// returned. /// [JsonProperty("usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("usage")] +#endif public string Usage { get; set; } [JsonProperty("wechat")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("wechat")] +#endif public SourceWechat Wechat { get; set; } } } diff --git a/src/Stripe.net/Entities/Sources/SourceAchCreditTransfer.cs b/src/Stripe.net/Entities/Sources/SourceAchCreditTransfer.cs index e7ad400418..b550015b52 100644 --- a/src/Stripe.net/Entities/Sources/SourceAchCreditTransfer.cs +++ b/src/Stripe.net/Entities/Sources/SourceAchCreditTransfer.cs @@ -2,31 +2,58 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SourceAchCreditTransfer : StripeEntity { [JsonProperty("account_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_number")] +#endif public string AccountNumber { get; set; } [JsonProperty("bank_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_name")] +#endif public string BankName { get; set; } [JsonProperty("fingerprint")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fingerprint")] +#endif public string Fingerprint { get; set; } [JsonProperty("refund_account_holder_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("refund_account_holder_name")] +#endif public string RefundAccountHolderName { get; set; } [JsonProperty("refund_account_holder_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("refund_account_holder_type")] +#endif public string RefundAccountHolderType { get; set; } [JsonProperty("refund_routing_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("refund_routing_number")] +#endif public string RefundRoutingNumber { get; set; } [JsonProperty("routing_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("routing_number")] +#endif public string RoutingNumber { get; set; } [JsonProperty("swift_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("swift_code")] +#endif public string SwiftCode { get; set; } } } diff --git a/src/Stripe.net/Entities/Sources/SourceAchDebit.cs b/src/Stripe.net/Entities/Sources/SourceAchDebit.cs index 842bad1c4f..8029f363db 100644 --- a/src/Stripe.net/Entities/Sources/SourceAchDebit.cs +++ b/src/Stripe.net/Entities/Sources/SourceAchDebit.cs @@ -2,25 +2,46 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SourceAchDebit : StripeEntity { [JsonProperty("bank_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_name")] +#endif public string BankName { get; set; } [JsonProperty("country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country")] +#endif public string Country { get; set; } [JsonProperty("fingerprint")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fingerprint")] +#endif public string Fingerprint { get; set; } [JsonProperty("last4")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last4")] +#endif public string Last4 { get; set; } [JsonProperty("routing_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("routing_number")] +#endif public string RoutingNumber { get; set; } [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Sources/SourceAcssDebit.cs b/src/Stripe.net/Entities/Sources/SourceAcssDebit.cs index 76a6ec6b75..c66b6ac15d 100644 --- a/src/Stripe.net/Entities/Sources/SourceAcssDebit.cs +++ b/src/Stripe.net/Entities/Sources/SourceAcssDebit.cs @@ -2,37 +2,70 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SourceAcssDebit : StripeEntity { [JsonProperty("bank_address_city")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_address_city")] +#endif public string BankAddressCity { get; set; } [JsonProperty("bank_address_line_1")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_address_line_1")] +#endif public string BankAddressLine1 { get; set; } [JsonProperty("bank_address_line_2")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_address_line_2")] +#endif public string BankAddressLine2 { get; set; } [JsonProperty("bank_address_postal_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_address_postal_code")] +#endif public string BankAddressPostalCode { get; set; } [JsonProperty("bank_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_name")] +#endif public string BankName { get; set; } [JsonProperty("category")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("category")] +#endif public string Category { get; set; } [JsonProperty("country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country")] +#endif public string Country { get; set; } [JsonProperty("fingerprint")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fingerprint")] +#endif public string Fingerprint { get; set; } [JsonProperty("last4")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last4")] +#endif public string Last4 { get; set; } [JsonProperty("routing_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("routing_number")] +#endif public string RoutingNumber { get; set; } } } diff --git a/src/Stripe.net/Entities/Sources/SourceAlipay.cs b/src/Stripe.net/Entities/Sources/SourceAlipay.cs index 9180ba6794..dbe2ec05de 100644 --- a/src/Stripe.net/Entities/Sources/SourceAlipay.cs +++ b/src/Stripe.net/Entities/Sources/SourceAlipay.cs @@ -2,16 +2,28 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SourceAlipay : StripeEntity { [JsonProperty("data_string")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("data_string")] +#endif public string DataString { get; set; } [JsonProperty("native_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("native_url")] +#endif public string NativeUrl { get; set; } [JsonProperty("statement_descriptor")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("statement_descriptor")] +#endif public string StatementDescriptor { get; set; } } } diff --git a/src/Stripe.net/Entities/Sources/SourceAuBecsDebit.cs b/src/Stripe.net/Entities/Sources/SourceAuBecsDebit.cs index 841d3186b7..6148cff9ac 100644 --- a/src/Stripe.net/Entities/Sources/SourceAuBecsDebit.cs +++ b/src/Stripe.net/Entities/Sources/SourceAuBecsDebit.cs @@ -2,16 +2,28 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SourceAuBecsDebit : StripeEntity { [JsonProperty("bsb_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bsb_number")] +#endif public string BsbNumber { get; set; } [JsonProperty("fingerprint")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fingerprint")] +#endif public string Fingerprint { get; set; } [JsonProperty("last4")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last4")] +#endif public string Last4 { get; set; } } } diff --git a/src/Stripe.net/Entities/Sources/SourceBancontact.cs b/src/Stripe.net/Entities/Sources/SourceBancontact.cs index c7196b1d75..9d1fa01774 100644 --- a/src/Stripe.net/Entities/Sources/SourceBancontact.cs +++ b/src/Stripe.net/Entities/Sources/SourceBancontact.cs @@ -2,25 +2,46 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SourceBancontact : StripeEntity { [JsonProperty("bank_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_code")] +#endif public string BankCode { get; set; } [JsonProperty("bank_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_name")] +#endif public string BankName { get; set; } [JsonProperty("bic")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bic")] +#endif public string Bic { get; set; } [JsonProperty("iban_last4")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("iban_last4")] +#endif public string IbanLast4 { get; set; } [JsonProperty("preferred_language")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preferred_language")] +#endif public string PreferredLanguage { get; set; } [JsonProperty("statement_descriptor")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("statement_descriptor")] +#endif public string StatementDescriptor { get; set; } } } diff --git a/src/Stripe.net/Entities/Sources/SourceCard.cs b/src/Stripe.net/Entities/Sources/SourceCard.cs index fef6d88e02..92fd1ec541 100644 --- a/src/Stripe.net/Entities/Sources/SourceCard.cs +++ b/src/Stripe.net/Entities/Sources/SourceCard.cs @@ -2,58 +2,112 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SourceCard : StripeEntity { [JsonProperty("address_line1_check")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_line1_check")] +#endif public string AddressLine1Check { get; set; } [JsonProperty("address_zip_check")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_zip_check")] +#endif public string AddressZipCheck { get; set; } [JsonProperty("brand")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("brand")] +#endif public string Brand { get; set; } [JsonProperty("country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country")] +#endif public string Country { get; set; } [JsonProperty("cvc_check")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cvc_check")] +#endif public string CvcCheck { get; set; } [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } [JsonProperty("dynamic_last4")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("dynamic_last4")] +#endif public string DynamicLast4 { get; set; } [JsonProperty("exp_month")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("exp_month")] +#endif public long ExpMonth { get; set; } [JsonProperty("exp_year")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("exp_year")] +#endif public long ExpYear { get; set; } [JsonProperty("fingerprint")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fingerprint")] +#endif public string Fingerprint { get; set; } [JsonProperty("funding")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("funding")] +#endif public string Funding { get; set; } [JsonProperty("iin")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("iin")] +#endif public string Iin { get; set; } [JsonProperty("issuer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("issuer")] +#endif public string Issuer { get; set; } [JsonProperty("last4")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last4")] +#endif public string Last4 { get; set; } [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } [JsonProperty("three_d_secure")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("three_d_secure")] +#endif public string ThreeDSecure { get; set; } [JsonProperty("tokenization_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tokenization_method")] +#endif public string TokenizationMethod { get; set; } } } diff --git a/src/Stripe.net/Entities/Sources/SourceCardPresent.cs b/src/Stripe.net/Entities/Sources/SourceCardPresent.cs index 4ddadefe12..03f4a6e7d2 100644 --- a/src/Stripe.net/Entities/Sources/SourceCardPresent.cs +++ b/src/Stripe.net/Entities/Sources/SourceCardPresent.cs @@ -2,85 +2,166 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SourceCardPresent : StripeEntity { [JsonProperty("application_cryptogram")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("application_cryptogram")] +#endif public string ApplicationCryptogram { get; set; } [JsonProperty("application_preferred_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("application_preferred_name")] +#endif public string ApplicationPreferredName { get; set; } [JsonProperty("authorization_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("authorization_code")] +#endif public string AuthorizationCode { get; set; } [JsonProperty("authorization_response_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("authorization_response_code")] +#endif public string AuthorizationResponseCode { get; set; } [JsonProperty("brand")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("brand")] +#endif public string Brand { get; set; } [JsonProperty("country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country")] +#endif public string Country { get; set; } [JsonProperty("cvm_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cvm_type")] +#endif public string CvmType { get; set; } [JsonProperty("data_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("data_type")] +#endif public string DataType { get; set; } [JsonProperty("dedicated_file_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("dedicated_file_name")] +#endif public string DedicatedFileName { get; set; } [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } [JsonProperty("emv_auth_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("emv_auth_data")] +#endif public string EmvAuthData { get; set; } [JsonProperty("evidence_customer_signature")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("evidence_customer_signature")] +#endif public string EvidenceCustomerSignature { get; set; } [JsonProperty("evidence_transaction_certificate")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("evidence_transaction_certificate")] +#endif public string EvidenceTransactionCertificate { get; set; } [JsonProperty("exp_month")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("exp_month")] +#endif public long? ExpMonth { get; set; } [JsonProperty("exp_year")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("exp_year")] +#endif public long? ExpYear { get; set; } [JsonProperty("fingerprint")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fingerprint")] +#endif public string Fingerprint { get; set; } [JsonProperty("funding")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("funding")] +#endif public string Funding { get; set; } [JsonProperty("iin")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("iin")] +#endif public string Iin { get; set; } [JsonProperty("issuer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("issuer")] +#endif public string Issuer { get; set; } [JsonProperty("last4")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last4")] +#endif public string Last4 { get; set; } [JsonProperty("pos_device_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("pos_device_id")] +#endif public string PosDeviceId { get; set; } [JsonProperty("pos_entry_mode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("pos_entry_mode")] +#endif public string PosEntryMode { get; set; } [JsonProperty("read_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("read_method")] +#endif public string ReadMethod { get; set; } [JsonProperty("reader")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reader")] +#endif public string Reader { get; set; } [JsonProperty("terminal_verification_results")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("terminal_verification_results")] +#endif public string TerminalVerificationResults { get; set; } [JsonProperty("transaction_status_information")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transaction_status_information")] +#endif public string TransactionStatusInformation { get; set; } } } diff --git a/src/Stripe.net/Entities/Sources/SourceCodeVerification.cs b/src/Stripe.net/Entities/Sources/SourceCodeVerification.cs index 2708e3821f..c27cda6855 100644 --- a/src/Stripe.net/Entities/Sources/SourceCodeVerification.cs +++ b/src/Stripe.net/Entities/Sources/SourceCodeVerification.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SourceCodeVerification : StripeEntity { @@ -10,6 +13,9 @@ public class SourceCodeVerification : StripeEntity /// code. /// [JsonProperty("attempts_remaining")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("attempts_remaining")] +#endif public long AttemptsRemaining { get; set; } /// @@ -19,6 +25,9 @@ public class SourceCodeVerification : StripeEntity /// attempts_remaining should be 0). /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } } } diff --git a/src/Stripe.net/Entities/Sources/SourceEps.cs b/src/Stripe.net/Entities/Sources/SourceEps.cs index 9a5207595d..c2b08766e5 100644 --- a/src/Stripe.net/Entities/Sources/SourceEps.cs +++ b/src/Stripe.net/Entities/Sources/SourceEps.cs @@ -2,13 +2,22 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SourceEps : StripeEntity { [JsonProperty("reference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reference")] +#endif public string Reference { get; set; } [JsonProperty("statement_descriptor")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("statement_descriptor")] +#endif public string StatementDescriptor { get; set; } } } diff --git a/src/Stripe.net/Entities/Sources/SourceGiropay.cs b/src/Stripe.net/Entities/Sources/SourceGiropay.cs index a407d90d49..958a4d9a17 100644 --- a/src/Stripe.net/Entities/Sources/SourceGiropay.cs +++ b/src/Stripe.net/Entities/Sources/SourceGiropay.cs @@ -2,19 +2,34 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SourceGiropay : StripeEntity { [JsonProperty("bank_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_code")] +#endif public string BankCode { get; set; } [JsonProperty("bank_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_name")] +#endif public string BankName { get; set; } [JsonProperty("bic")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bic")] +#endif public string Bic { get; set; } [JsonProperty("statement_descriptor")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("statement_descriptor")] +#endif public string StatementDescriptor { get; set; } } } diff --git a/src/Stripe.net/Entities/Sources/SourceIdeal.cs b/src/Stripe.net/Entities/Sources/SourceIdeal.cs index 693d0f2c5e..54d945a7c4 100644 --- a/src/Stripe.net/Entities/Sources/SourceIdeal.cs +++ b/src/Stripe.net/Entities/Sources/SourceIdeal.cs @@ -2,19 +2,34 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SourceIdeal : StripeEntity { [JsonProperty("bank")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank")] +#endif public string Bank { get; set; } [JsonProperty("bic")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bic")] +#endif public string Bic { get; set; } [JsonProperty("iban_last4")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("iban_last4")] +#endif public string IbanLast4 { get; set; } [JsonProperty("statement_descriptor")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("statement_descriptor")] +#endif public string StatementDescriptor { get; set; } } } diff --git a/src/Stripe.net/Entities/Sources/SourceKlarna.cs b/src/Stripe.net/Entities/Sources/SourceKlarna.cs index 650bc9093b..75e0a2327d 100644 --- a/src/Stripe.net/Entities/Sources/SourceKlarna.cs +++ b/src/Stripe.net/Entities/Sources/SourceKlarna.cs @@ -2,85 +2,166 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SourceKlarna : StripeEntity { [JsonProperty("background_image_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("background_image_url")] +#endif public string BackgroundImageUrl { get; set; } [JsonProperty("client_token")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("client_token")] +#endif public string ClientToken { get; set; } [JsonProperty("first_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("first_name")] +#endif public string FirstName { get; set; } [JsonProperty("last_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last_name")] +#endif public string LastName { get; set; } [JsonProperty("locale")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("locale")] +#endif public string Locale { get; set; } [JsonProperty("logo_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("logo_url")] +#endif public string LogoUrl { get; set; } [JsonProperty("page_title")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("page_title")] +#endif public string PageTitle { get; set; } [JsonProperty("pay_later_asset_urls_descriptive")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("pay_later_asset_urls_descriptive")] +#endif public string PayLaterAssetUrlsDescriptive { get; set; } [JsonProperty("pay_later_asset_urls_standard")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("pay_later_asset_urls_standard")] +#endif public string PayLaterAssetUrlsStandard { get; set; } [JsonProperty("pay_later_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("pay_later_name")] +#endif public string PayLaterName { get; set; } [JsonProperty("pay_later_redirect_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("pay_later_redirect_url")] +#endif public string PayLaterRedirectUrl { get; set; } [JsonProperty("pay_now_asset_urls_descriptive")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("pay_now_asset_urls_descriptive")] +#endif public string PayNowAssetUrlsDescriptive { get; set; } [JsonProperty("pay_now_asset_urls_standard")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("pay_now_asset_urls_standard")] +#endif public string PayNowAssetUrlsStandard { get; set; } [JsonProperty("pay_now_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("pay_now_name")] +#endif public string PayNowName { get; set; } [JsonProperty("pay_now_redirect_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("pay_now_redirect_url")] +#endif public string PayNowRedirectUrl { get; set; } [JsonProperty("pay_over_time_asset_urls_descriptive")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("pay_over_time_asset_urls_descriptive")] +#endif public string PayOverTimeAssetUrlsDescriptive { get; set; } [JsonProperty("pay_over_time_asset_urls_standard")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("pay_over_time_asset_urls_standard")] +#endif public string PayOverTimeAssetUrlsStandard { get; set; } [JsonProperty("pay_over_time_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("pay_over_time_name")] +#endif public string PayOverTimeName { get; set; } [JsonProperty("pay_over_time_redirect_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("pay_over_time_redirect_url")] +#endif public string PayOverTimeRedirectUrl { get; set; } [JsonProperty("payment_method_categories")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_categories")] +#endif public string PaymentMethodCategories { get; set; } [JsonProperty("purchase_country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("purchase_country")] +#endif public string PurchaseCountry { get; set; } [JsonProperty("purchase_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("purchase_type")] +#endif public string PurchaseType { get; set; } [JsonProperty("redirect_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("redirect_url")] +#endif public string RedirectUrl { get; set; } [JsonProperty("shipping_delay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping_delay")] +#endif public long ShippingDelay { get; set; } [JsonProperty("shipping_first_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping_first_name")] +#endif public string ShippingFirstName { get; set; } [JsonProperty("shipping_last_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping_last_name")] +#endif public string ShippingLastName { get; set; } } } diff --git a/src/Stripe.net/Entities/Sources/SourceMultibanco.cs b/src/Stripe.net/Entities/Sources/SourceMultibanco.cs index 899cfbb2e2..e9df90a8c9 100644 --- a/src/Stripe.net/Entities/Sources/SourceMultibanco.cs +++ b/src/Stripe.net/Entities/Sources/SourceMultibanco.cs @@ -2,37 +2,70 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SourceMultibanco : StripeEntity { [JsonProperty("entity")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("entity")] +#endif public string Entity { get; set; } [JsonProperty("reference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reference")] +#endif public string Reference { get; set; } [JsonProperty("refund_account_holder_address_city")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("refund_account_holder_address_city")] +#endif public string RefundAccountHolderAddressCity { get; set; } [JsonProperty("refund_account_holder_address_country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("refund_account_holder_address_country")] +#endif public string RefundAccountHolderAddressCountry { get; set; } [JsonProperty("refund_account_holder_address_line1")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("refund_account_holder_address_line1")] +#endif public string RefundAccountHolderAddressLine1 { get; set; } [JsonProperty("refund_account_holder_address_line2")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("refund_account_holder_address_line2")] +#endif public string RefundAccountHolderAddressLine2 { get; set; } [JsonProperty("refund_account_holder_address_postal_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("refund_account_holder_address_postal_code")] +#endif public string RefundAccountHolderAddressPostalCode { get; set; } [JsonProperty("refund_account_holder_address_state")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("refund_account_holder_address_state")] +#endif public string RefundAccountHolderAddressState { get; set; } [JsonProperty("refund_account_holder_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("refund_account_holder_name")] +#endif public string RefundAccountHolderName { get; set; } [JsonProperty("refund_iban")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("refund_iban")] +#endif public string RefundIban { get; set; } } } diff --git a/src/Stripe.net/Entities/Sources/SourceOwner.cs b/src/Stripe.net/Entities/Sources/SourceOwner.cs index 8ab0904804..ad88a24397 100644 --- a/src/Stripe.net/Entities/Sources/SourceOwner.cs +++ b/src/Stripe.net/Entities/Sources/SourceOwner.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SourceOwner : StripeEntity { @@ -9,24 +12,36 @@ public class SourceOwner : StripeEntity /// Owner's address. /// [JsonProperty("address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address")] +#endif public Address Address { get; set; } /// /// Owner's email address. /// [JsonProperty("email")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("email")] +#endif public string Email { get; set; } /// /// Owner's full name. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } /// /// Owner's phone number (including extension). /// [JsonProperty("phone")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("phone")] +#endif public string Phone { get; set; } /// @@ -35,6 +50,9 @@ public class SourceOwner : StripeEntity /// set or mutated. /// [JsonProperty("verified_address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("verified_address")] +#endif public Address VerifiedAddress { get; set; } /// @@ -43,6 +61,9 @@ public class SourceOwner : StripeEntity /// cannot be set or mutated. /// [JsonProperty("verified_email")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("verified_email")] +#endif public string VerifiedEmail { get; set; } /// @@ -51,6 +72,9 @@ public class SourceOwner : StripeEntity /// cannot be set or mutated. /// [JsonProperty("verified_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("verified_name")] +#endif public string VerifiedName { get; set; } /// @@ -59,6 +83,9 @@ public class SourceOwner : StripeEntity /// or settlement. They cannot be set or mutated. /// [JsonProperty("verified_phone")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("verified_phone")] +#endif public string VerifiedPhone { get; set; } } } diff --git a/src/Stripe.net/Entities/Sources/SourceP24.cs b/src/Stripe.net/Entities/Sources/SourceP24.cs index 14f10d4979..865a7b63ae 100644 --- a/src/Stripe.net/Entities/Sources/SourceP24.cs +++ b/src/Stripe.net/Entities/Sources/SourceP24.cs @@ -2,10 +2,16 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SourceP24 : StripeEntity { [JsonProperty("reference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reference")] +#endif public string Reference { get; set; } } } diff --git a/src/Stripe.net/Entities/Sources/SourceReceiver.cs b/src/Stripe.net/Entities/Sources/SourceReceiver.cs index a61779da83..54edb5fbc3 100644 --- a/src/Stripe.net/Entities/Sources/SourceReceiver.cs +++ b/src/Stripe.net/Entities/Sources/SourceReceiver.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SourceReceiver : StripeEntity { @@ -10,6 +13,9 @@ public class SourceReceiver : StripeEntity /// customer to send their funds to. /// [JsonProperty("address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address")] +#endif public string Address { get; set; } /// @@ -19,6 +25,9 @@ public class SourceReceiver : StripeEntity /// well. The amount charged is expressed in the source's currency. /// [JsonProperty("amount_charged")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_charged")] +#endif public long AmountCharged { get; set; } /// @@ -27,6 +36,9 @@ public class SourceReceiver : StripeEntity /// funds. The amount received is expressed in the source's currency. /// [JsonProperty("amount_received")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_received")] +#endif public long AmountReceived { get; set; } /// @@ -34,12 +46,18 @@ public class SourceReceiver : StripeEntity /// the source's currency. /// [JsonProperty("amount_returned")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_returned")] +#endif public long AmountReturned { get; set; } /// /// Type of refund attribute method, one of email, manual, or none. /// [JsonProperty("refund_attributes_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("refund_attributes_method")] +#endif public string RefundAttributesMethod { get; set; } /// @@ -47,6 +65,9 @@ public class SourceReceiver : StripeEntity /// available. /// [JsonProperty("refund_attributes_status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("refund_attributes_status")] +#endif public string RefundAttributesStatus { get; set; } } } diff --git a/src/Stripe.net/Entities/Sources/SourceRedirect.cs b/src/Stripe.net/Entities/Sources/SourceRedirect.cs index b3be37b307..13216edafb 100644 --- a/src/Stripe.net/Entities/Sources/SourceRedirect.cs +++ b/src/Stripe.net/Entities/Sources/SourceRedirect.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SourceRedirect : StripeEntity { @@ -12,12 +15,18 @@ public class SourceRedirect : StripeEntity /// technical error). Present only if the redirect status is failed. /// [JsonProperty("failure_reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("failure_reason")] +#endif public string FailureReason { get; set; } /// /// The URL you provide to redirect the customer to after they authenticated their payment. /// [JsonProperty("return_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("return_url")] +#endif public string ReturnUrl { get; set; } /// @@ -27,6 +36,9 @@ public class SourceRedirect : StripeEntity /// authentication, cannot be reused). /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } /// @@ -34,6 +46,9 @@ public class SourceRedirect : StripeEntity /// authentication flow. /// [JsonProperty("url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("url")] +#endif public string Url { get; set; } } } diff --git a/src/Stripe.net/Entities/Sources/SourceSepaCreditTransfer.cs b/src/Stripe.net/Entities/Sources/SourceSepaCreditTransfer.cs index 5eb9fb85bb..3a27c292d8 100644 --- a/src/Stripe.net/Entities/Sources/SourceSepaCreditTransfer.cs +++ b/src/Stripe.net/Entities/Sources/SourceSepaCreditTransfer.cs @@ -2,40 +2,76 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SourceSepaCreditTransfer : StripeEntity { [JsonProperty("bank_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_name")] +#endif public string BankName { get; set; } [JsonProperty("bic")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bic")] +#endif public string Bic { get; set; } [JsonProperty("iban")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("iban")] +#endif public string Iban { get; set; } [JsonProperty("refund_account_holder_address_city")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("refund_account_holder_address_city")] +#endif public string RefundAccountHolderAddressCity { get; set; } [JsonProperty("refund_account_holder_address_country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("refund_account_holder_address_country")] +#endif public string RefundAccountHolderAddressCountry { get; set; } [JsonProperty("refund_account_holder_address_line1")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("refund_account_holder_address_line1")] +#endif public string RefundAccountHolderAddressLine1 { get; set; } [JsonProperty("refund_account_holder_address_line2")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("refund_account_holder_address_line2")] +#endif public string RefundAccountHolderAddressLine2 { get; set; } [JsonProperty("refund_account_holder_address_postal_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("refund_account_holder_address_postal_code")] +#endif public string RefundAccountHolderAddressPostalCode { get; set; } [JsonProperty("refund_account_holder_address_state")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("refund_account_holder_address_state")] +#endif public string RefundAccountHolderAddressState { get; set; } [JsonProperty("refund_account_holder_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("refund_account_holder_name")] +#endif public string RefundAccountHolderName { get; set; } [JsonProperty("refund_iban")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("refund_iban")] +#endif public string RefundIban { get; set; } } } diff --git a/src/Stripe.net/Entities/Sources/SourceSepaDebit.cs b/src/Stripe.net/Entities/Sources/SourceSepaDebit.cs index ff687ffd98..01b8f8665f 100644 --- a/src/Stripe.net/Entities/Sources/SourceSepaDebit.cs +++ b/src/Stripe.net/Entities/Sources/SourceSepaDebit.cs @@ -2,28 +2,52 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SourceSepaDebit : StripeEntity { [JsonProperty("bank_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_code")] +#endif public string BankCode { get; set; } [JsonProperty("branch_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("branch_code")] +#endif public string BranchCode { get; set; } [JsonProperty("country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country")] +#endif public string Country { get; set; } [JsonProperty("fingerprint")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fingerprint")] +#endif public string Fingerprint { get; set; } [JsonProperty("last4")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last4")] +#endif public string Last4 { get; set; } [JsonProperty("mandate_reference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mandate_reference")] +#endif public string MandateReference { get; set; } [JsonProperty("mandate_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mandate_url")] +#endif public string MandateUrl { get; set; } } } diff --git a/src/Stripe.net/Entities/Sources/SourceSofort.cs b/src/Stripe.net/Entities/Sources/SourceSofort.cs index 94d5c7bdc9..518a07b135 100644 --- a/src/Stripe.net/Entities/Sources/SourceSofort.cs +++ b/src/Stripe.net/Entities/Sources/SourceSofort.cs @@ -2,28 +2,52 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SourceSofort : StripeEntity { [JsonProperty("bank_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_code")] +#endif public string BankCode { get; set; } [JsonProperty("bank_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_name")] +#endif public string BankName { get; set; } [JsonProperty("bic")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bic")] +#endif public string Bic { get; set; } [JsonProperty("country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country")] +#endif public string Country { get; set; } [JsonProperty("iban_last4")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("iban_last4")] +#endif public string IbanLast4 { get; set; } [JsonProperty("preferred_language")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preferred_language")] +#endif public string PreferredLanguage { get; set; } [JsonProperty("statement_descriptor")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("statement_descriptor")] +#endif public string StatementDescriptor { get; set; } } } diff --git a/src/Stripe.net/Entities/Sources/SourceSourceOrder.cs b/src/Stripe.net/Entities/Sources/SourceSourceOrder.cs index 6f89d63bc7..ebd2c79c35 100644 --- a/src/Stripe.net/Entities/Sources/SourceSourceOrder.cs +++ b/src/Stripe.net/Entities/Sources/SourceSourceOrder.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SourceSourceOrder : StripeEntity { @@ -12,6 +15,9 @@ public class SourceSourceOrder : StripeEntity /// order. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long Amount { get; set; } /// @@ -20,21 +26,33 @@ public class SourceSourceOrder : StripeEntity /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// /// The email address of the customer placing the order. /// [JsonProperty("email")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("email")] +#endif public string Email { get; set; } /// /// List of items constituting the order. /// [JsonProperty("items")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("items")] +#endif public List Items { get; set; } [JsonProperty("shipping")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping")] +#endif public Shipping Shipping { get; set; } } } diff --git a/src/Stripe.net/Entities/Sources/SourceSourceOrderItem.cs b/src/Stripe.net/Entities/Sources/SourceSourceOrderItem.cs index fdc2915579..f515c9b856 100644 --- a/src/Stripe.net/Entities/Sources/SourceSourceOrderItem.cs +++ b/src/Stripe.net/Entities/Sources/SourceSourceOrderItem.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SourceSourceOrderItem : StripeEntity { @@ -9,18 +12,27 @@ public class SourceSourceOrderItem : StripeEntity /// The amount (price) for this order item. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long? Amount { get; set; } /// /// This currency of this order item. Required when amount is present. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// /// Human-readable description for this order item. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// @@ -28,6 +40,9 @@ public class SourceSourceOrderItem : StripeEntity /// expandable to a SKU). /// [JsonProperty("parent")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("parent")] +#endif public string Parent { get; set; } /// @@ -35,12 +50,18 @@ public class SourceSourceOrderItem : StripeEntity /// instances of the SKU to be ordered. /// [JsonProperty("quantity")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("quantity")] +#endif public long Quantity { get; set; } /// /// The type of this order item. Must be sku, tax, or shipping. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Sources/SourceThreeDSecure.cs b/src/Stripe.net/Entities/Sources/SourceThreeDSecure.cs index 20ea8347ca..76111b4a17 100644 --- a/src/Stripe.net/Entities/Sources/SourceThreeDSecure.cs +++ b/src/Stripe.net/Entities/Sources/SourceThreeDSecure.cs @@ -2,67 +2,130 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SourceThreeDSecure : StripeEntity { [JsonProperty("address_line1_check")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_line1_check")] +#endif public string AddressLine1Check { get; set; } [JsonProperty("address_zip_check")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_zip_check")] +#endif public string AddressZipCheck { get; set; } [JsonProperty("authenticated")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("authenticated")] +#endif public bool? Authenticated { get; set; } [JsonProperty("brand")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("brand")] +#endif public string Brand { get; set; } [JsonProperty("card")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card")] +#endif public string Card { get; set; } [JsonProperty("country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country")] +#endif public string Country { get; set; } [JsonProperty("customer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] +#endif public string Customer { get; set; } [JsonProperty("cvc_check")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cvc_check")] +#endif public string CvcCheck { get; set; } [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } [JsonProperty("dynamic_last4")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("dynamic_last4")] +#endif public string DynamicLast4 { get; set; } [JsonProperty("exp_month")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("exp_month")] +#endif public long? ExpMonth { get; set; } [JsonProperty("exp_year")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("exp_year")] +#endif public long? ExpYear { get; set; } [JsonProperty("fingerprint")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fingerprint")] +#endif public string Fingerprint { get; set; } [JsonProperty("funding")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("funding")] +#endif public string Funding { get; set; } [JsonProperty("iin")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("iin")] +#endif public string Iin { get; set; } [JsonProperty("issuer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("issuer")] +#endif public string Issuer { get; set; } [JsonProperty("last4")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last4")] +#endif public string Last4 { get; set; } [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } [JsonProperty("three_d_secure")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("three_d_secure")] +#endif public string ThreeDSecure { get; set; } [JsonProperty("tokenization_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tokenization_method")] +#endif public string TokenizationMethod { get; set; } } } diff --git a/src/Stripe.net/Entities/Sources/SourceWechat.cs b/src/Stripe.net/Entities/Sources/SourceWechat.cs index 406eca115e..4ba29a3811 100644 --- a/src/Stripe.net/Entities/Sources/SourceWechat.cs +++ b/src/Stripe.net/Entities/Sources/SourceWechat.cs @@ -2,16 +2,28 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SourceWechat : StripeEntity { [JsonProperty("prepay_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("prepay_id")] +#endif public string PrepayId { get; set; } [JsonProperty("qr_code_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("qr_code_url")] +#endif public string QrCodeUrl { get; set; } [JsonProperty("statement_descriptor")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("statement_descriptor")] +#endif public string StatementDescriptor { get; set; } } } diff --git a/src/Stripe.net/Entities/SubscriptionItems/SubscriptionItem.cs b/src/Stripe.net/Entities/SubscriptionItems/SubscriptionItem.cs index 868c759914..816d03d3f4 100644 --- a/src/Stripe.net/Entities/SubscriptionItems/SubscriptionItem.cs +++ b/src/Stripe.net/Entities/SubscriptionItems/SubscriptionItem.cs @@ -6,23 +6,35 @@ namespace Stripe using System.Linq; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// Subscription items allow you to create customer subscriptions with more than one plan, /// making it easy to represent complex billing relationships. /// +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class SubscriptionItem : StripeEntity, IHasId, IHasMetadata, IHasObject { /// /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// @@ -30,6 +42,9 @@ public class SubscriptionItem : StripeEntity, IHasId, IHasMeta /// advanced to a new billing period. /// [JsonProperty("billing_thresholds")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_thresholds")] +#endif public SubscriptionItemBillingThresholds BillingThresholds { get; set; } /// @@ -37,12 +52,20 @@ public class SubscriptionItem : StripeEntity, IHasId, IHasMeta /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// /// Whether this object is deleted or not. /// [JsonProperty("deleted", NullValueHandling = NullValueHandling.Ignore)] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("deleted")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] +#endif public bool? Deleted { get; set; } #region Expandable Discounts @@ -53,6 +76,9 @@ public class SubscriptionItem : StripeEntity, IHasId, IHasMeta /// before subscription discounts. Use expand[]=discounts to expand each discount. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public List DiscountIds { get => this.InternalDiscounts?.Select((x) => x.Id).ToList(); @@ -67,6 +93,9 @@ public List DiscountIds /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public List Discounts { get => this.InternalDiscounts?.Select((x) => x.ExpandedObject).ToList(); @@ -74,6 +103,9 @@ public List Discounts } [JsonProperty("discounts", ItemConverterType = typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discounts")] +#endif internal List> InternalDiscounts { get; set; } #endregion @@ -83,6 +115,9 @@ public List Discounts /// object in a structured format. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -106,6 +141,9 @@ public List Discounts /// href="https://stripe.com/docs/products-prices/overview">products and prices. /// [JsonProperty("plan")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("plan")] +#endif public Plan Plan { get; set; } /// @@ -127,6 +165,9 @@ public List Discounts /// href="https://stripe.com/docs/products-prices/overview">products and prices. /// [JsonProperty("price")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("price")] +#endif public Price Price { get; set; } /// @@ -134,12 +175,18 @@ public List Discounts /// to which the customer should be subscribed. /// [JsonProperty("quantity")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("quantity")] +#endif public long Quantity { get; set; } /// /// The subscription this subscription_item belongs to. /// [JsonProperty("subscription")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("subscription")] +#endif public string Subscription { get; set; } /// @@ -148,6 +195,9 @@ public List Discounts /// subscription_item. /// [JsonProperty("tax_rates")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_rates")] +#endif public List TaxRates { get; set; } } } diff --git a/src/Stripe.net/Entities/SubscriptionItems/SubscriptionItemBillingThresholds.cs b/src/Stripe.net/Entities/SubscriptionItems/SubscriptionItemBillingThresholds.cs index 6d689bb511..6e5501e26b 100644 --- a/src/Stripe.net/Entities/SubscriptionItems/SubscriptionItemBillingThresholds.cs +++ b/src/Stripe.net/Entities/SubscriptionItems/SubscriptionItemBillingThresholds.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionItemBillingThresholds : StripeEntity { @@ -9,6 +12,9 @@ public class SubscriptionItemBillingThresholds : StripeEntity [JsonProperty("usage_gte")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("usage_gte")] +#endif public long? UsageGte { get; set; } } } diff --git a/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedule.cs b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedule.cs index be1ceb4147..1f8f3edd6e 100644 --- a/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedule.cs +++ b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedule.cs @@ -5,6 +5,9 @@ namespace Stripe using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// A subscription schedule allows you to create and manage the lifecycle of a subscription @@ -14,18 +17,27 @@ namespace Stripe /// href="https://stripe.com/docs/billing/subscriptions/subscription-schedules">Subscription /// schedules. /// +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class SubscriptionSchedule : StripeEntity, IHasId, IHasMetadata, IHasObject { /// /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } #region Expandable Application @@ -35,6 +47,9 @@ public class SubscriptionSchedule : StripeEntity, IHasId, /// ID of the Connect Application that created the schedule. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string ApplicationId { get => this.InternalApplication?.Id; @@ -48,6 +63,9 @@ public string ApplicationId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Application Application { get => this.InternalApplication?.ExpandedObject; @@ -56,6 +74,10 @@ public Application Application [JsonProperty("application")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("application")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalApplication { get; set; } #endregion @@ -65,6 +87,10 @@ public Application Application /// [JsonProperty("canceled_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("canceled_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? CanceledAt { get; set; } /// @@ -73,6 +99,10 @@ public Application Application /// [JsonProperty("completed_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("completed_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? CompletedAt { get; set; } /// @@ -80,6 +110,10 @@ public Application Application /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -87,6 +121,9 @@ public Application Application /// schedule, if it is active. /// [JsonProperty("current_phase")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("current_phase")] +#endif public SubscriptionScheduleCurrentPhase CurrentPhase { get; set; } #region Expandable Customer @@ -96,6 +133,9 @@ public Application Application /// ID of the customer who owns the subscription schedule. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string CustomerId { get => this.InternalCustomer?.Id; @@ -109,6 +149,9 @@ public string CustomerId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Customer Customer { get => this.InternalCustomer?.ExpandedObject; @@ -117,10 +160,17 @@ public Customer Customer [JsonProperty("customer")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalCustomer { get; set; } #endregion [JsonProperty("default_settings")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("default_settings")] +#endif public SubscriptionScheduleDefaultSettings DefaultSettings { get; set; } /// @@ -132,6 +182,9 @@ public Customer Customer /// One of: cancel, none, release, or renew. /// [JsonProperty("end_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("end_behavior")] +#endif public string EndBehavior { get; set; } /// @@ -139,6 +192,9 @@ public Customer Customer /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// @@ -147,12 +203,18 @@ public Customer Customer /// object in a structured format. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// Configuration for the subscription schedule's phases. /// [JsonProperty("phases")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("phases")] +#endif public List Phases { get; set; } /// @@ -161,12 +223,19 @@ public Customer Customer /// [JsonProperty("released_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("released_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? ReleasedAt { get; set; } /// /// ID of the subscription once managed by the subscription schedule (if it is released). /// [JsonProperty("released_subscription")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("released_subscription")] +#endif public string ReleasedSubscription { get; set; } /// @@ -179,6 +248,9 @@ public Customer Customer /// released. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } #region Expandable Subscription @@ -188,6 +260,9 @@ public Customer Customer /// ID of the subscription managed by the subscription schedule. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string SubscriptionId { get => this.InternalSubscription?.Id; @@ -201,6 +276,9 @@ public string SubscriptionId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Subscription Subscription { get => this.InternalSubscription?.ExpandedObject; @@ -209,6 +287,10 @@ public Subscription Subscription [JsonProperty("subscription")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("subscription")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalSubscription { get; set; } #endregion @@ -219,6 +301,9 @@ public Subscription Subscription /// ID of the test clock this subscription schedule belongs to. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string TestClockId { get => this.InternalTestClock?.Id; @@ -232,6 +317,9 @@ public string TestClockId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public TestHelpers.TestClock TestClock { get => this.InternalTestClock?.ExpandedObject; @@ -240,6 +328,10 @@ public TestHelpers.TestClock TestClock [JsonProperty("test_clock")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("test_clock")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalTestClock { get; set; } #endregion } diff --git a/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleCurrentPhase.cs b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleCurrentPhase.cs index 458596e4b3..ee53f65e94 100644 --- a/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleCurrentPhase.cs +++ b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleCurrentPhase.cs @@ -4,6 +4,9 @@ namespace Stripe using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionScheduleCurrentPhase : StripeEntity { @@ -12,6 +15,10 @@ public class SubscriptionScheduleCurrentPhase : StripeEntity [JsonProperty("end_date")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("end_date")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? EndDate { get; set; } /// @@ -19,6 +26,10 @@ public class SubscriptionScheduleCurrentPhase : StripeEntity [JsonProperty("start_date")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("start_date")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? StartDate { get; set; } } } diff --git a/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleDefaultSettings.cs b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleDefaultSettings.cs index 553c30d076..35459e069a 100644 --- a/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleDefaultSettings.cs +++ b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleDefaultSettings.cs @@ -3,7 +3,13 @@ namespace Stripe { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class SubscriptionScheduleDefaultSettings : StripeEntity { /// @@ -12,9 +18,15 @@ public class SubscriptionScheduleDefaultSettings : StripeEntity [JsonProperty("application_fee_percent")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("application_fee_percent")] +#endif public decimal? ApplicationFeePercent { get; set; } [JsonProperty("automatic_tax")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("automatic_tax")] +#endif public SubscriptionScheduleDefaultSettingsAutomaticTax AutomaticTax { get; set; } /// @@ -26,6 +38,9 @@ public class SubscriptionScheduleDefaultSettings : StripeEntityautomatic, or phase_start. /// [JsonProperty("billing_cycle_anchor")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_cycle_anchor")] +#endif public string BillingCycleAnchor { get; set; } /// @@ -33,6 +48,9 @@ public class SubscriptionScheduleDefaultSettings : StripeEntity [JsonProperty("billing_thresholds")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_thresholds")] +#endif public SubscriptionScheduleDefaultSettingsBillingThresholds BillingThresholds { get; set; } /// @@ -44,6 +62,9 @@ public class SubscriptionScheduleDefaultSettings : StripeEntitycharge_automatically, or send_invoice. /// [JsonProperty("collection_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("collection_method")] +#endif public string CollectionMethod { get; set; } #region Expandable DefaultPaymentMethod @@ -54,6 +75,9 @@ public class SubscriptionScheduleDefaultSettings : StripeEntity [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string DefaultPaymentMethodId { get => this.InternalDefaultPaymentMethod?.Id; @@ -68,6 +92,9 @@ public string DefaultPaymentMethodId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public PaymentMethod DefaultPaymentMethod { get => this.InternalDefaultPaymentMethod?.ExpandedObject; @@ -76,6 +103,10 @@ public PaymentMethod DefaultPaymentMethod [JsonProperty("default_payment_method")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("default_payment_method")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalDefaultPaymentMethod { get; set; } #endregion @@ -85,9 +116,15 @@ public PaymentMethod DefaultPaymentMethod /// certain local payment methods UIs. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } [JsonProperty("invoice_settings")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("invoice_settings")] +#endif public SubscriptionScheduleDefaultSettingsInvoiceSettings InvoiceSettings { get; set; } #region Expandable OnBehalfOf @@ -98,6 +135,9 @@ public PaymentMethod DefaultPaymentMethod /// schedule's subscription. See the Connect documentation for details. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string OnBehalfOfId { get => this.InternalOnBehalfOf?.Id; @@ -112,6 +152,9 @@ public string OnBehalfOfId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Account OnBehalfOf { get => this.InternalOnBehalfOf?.ExpandedObject; @@ -120,6 +163,10 @@ public Account OnBehalfOf [JsonProperty("on_behalf_of")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("on_behalf_of")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalOnBehalfOf { get; set; } #endregion @@ -129,6 +176,9 @@ public Account OnBehalfOf /// subscription's invoices. /// [JsonProperty("transfer_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transfer_data")] +#endif public SubscriptionScheduleDefaultSettingsTransferData TransferData { get; set; } } } diff --git a/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleDefaultSettingsAutomaticTax.cs b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleDefaultSettingsAutomaticTax.cs index 60e4aebe7f..813836aa19 100644 --- a/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleDefaultSettingsAutomaticTax.cs +++ b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleDefaultSettingsAutomaticTax.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionScheduleDefaultSettingsAutomaticTax : StripeEntity { @@ -9,6 +12,9 @@ public class SubscriptionScheduleDefaultSettingsAutomaticTax : StripeEntity [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool Enabled { get; set; } /// @@ -17,6 +23,9 @@ public class SubscriptionScheduleDefaultSettingsAutomaticTax : StripeEntity [JsonProperty("liability")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("liability")] +#endif public SubscriptionScheduleDefaultSettingsAutomaticTaxLiability Liability { get; set; } } } diff --git a/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleDefaultSettingsAutomaticTaxLiability.cs b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleDefaultSettingsAutomaticTaxLiability.cs index 8e7741a70c..7d9449821c 100644 --- a/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleDefaultSettingsAutomaticTaxLiability.cs +++ b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleDefaultSettingsAutomaticTaxLiability.cs @@ -3,7 +3,13 @@ namespace Stripe { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class SubscriptionScheduleDefaultSettingsAutomaticTaxLiability : StripeEntity { #region Expandable Account @@ -13,6 +19,9 @@ public class SubscriptionScheduleDefaultSettingsAutomaticTaxLiability : StripeEn /// The connected account being referenced when type is account. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string AccountId { get => this.InternalAccount?.Id; @@ -26,6 +35,9 @@ public string AccountId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Account Account { get => this.InternalAccount?.ExpandedObject; @@ -34,6 +46,10 @@ public Account Account [JsonProperty("account")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalAccount { get; set; } #endregion @@ -42,6 +58,9 @@ public Account Account /// One of: account, or self. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleDefaultSettingsBillingThresholds.cs b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleDefaultSettingsBillingThresholds.cs index dcd7c0c6d3..c2f87dbce4 100644 --- a/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleDefaultSettingsBillingThresholds.cs +++ b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleDefaultSettingsBillingThresholds.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionScheduleDefaultSettingsBillingThresholds : StripeEntity { @@ -9,6 +12,9 @@ public class SubscriptionScheduleDefaultSettingsBillingThresholds : StripeEntity /// Monetary threshold that triggers the subscription to create an invoice. /// [JsonProperty("amount_gte")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_gte")] +#endif public long? AmountGte { get; set; } /// @@ -19,6 +25,9 @@ public class SubscriptionScheduleDefaultSettingsBillingThresholds : StripeEntity /// aggregate_usage=last_ever. /// [JsonProperty("reset_billing_cycle_anchor")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reset_billing_cycle_anchor")] +#endif public bool? ResetBillingCycleAnchor { get; set; } } } diff --git a/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleDefaultSettingsInvoiceSettings.cs b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleDefaultSettingsInvoiceSettings.cs index 54837abdad..3c7805fee8 100644 --- a/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleDefaultSettingsInvoiceSettings.cs +++ b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleDefaultSettingsInvoiceSettings.cs @@ -5,7 +5,13 @@ namespace Stripe using System.Linq; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class SubscriptionScheduleDefaultSettingsInvoiceSettings : StripeEntity { #region Expandable AccountTaxIds @@ -16,6 +22,9 @@ public class SubscriptionScheduleDefaultSettingsInvoiceSettings : StripeEntity [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public List AccountTaxIdIds { get => this.InternalAccountTaxIds?.Select((x) => x.Id).ToList(); @@ -30,6 +39,9 @@ public List AccountTaxIdIds /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public List AccountTaxIds { get => this.InternalAccountTaxIds?.Select((x) => x.ExpandedObject).ToList(); @@ -37,6 +49,9 @@ public List AccountTaxIds } [JsonProperty("account_tax_ids", ItemConverterType = typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_tax_ids")] +#endif internal List> InternalAccountTaxIds { get; set; } #endregion @@ -46,9 +61,15 @@ public List AccountTaxIds /// billing=charge_automatically. /// [JsonProperty("days_until_due")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("days_until_due")] +#endif public long? DaysUntilDue { get; set; } [JsonProperty("issuer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("issuer")] +#endif public SubscriptionScheduleDefaultSettingsInvoiceSettingsIssuer Issuer { get; set; } } } diff --git a/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleDefaultSettingsInvoiceSettingsIssuer.cs b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleDefaultSettingsInvoiceSettingsIssuer.cs index 96706166ae..6d1d8160b9 100644 --- a/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleDefaultSettingsInvoiceSettingsIssuer.cs +++ b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleDefaultSettingsInvoiceSettingsIssuer.cs @@ -3,7 +3,13 @@ namespace Stripe { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class SubscriptionScheduleDefaultSettingsInvoiceSettingsIssuer : StripeEntity { #region Expandable Account @@ -13,6 +19,9 @@ public class SubscriptionScheduleDefaultSettingsInvoiceSettingsIssuer : StripeEn /// The connected account being referenced when type is account. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string AccountId { get => this.InternalAccount?.Id; @@ -26,6 +35,9 @@ public string AccountId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Account Account { get => this.InternalAccount?.ExpandedObject; @@ -34,6 +46,10 @@ public Account Account [JsonProperty("account")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalAccount { get; set; } #endregion @@ -42,6 +58,9 @@ public Account Account /// One of: account, or self. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleDefaultSettingsTransferData.cs b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleDefaultSettingsTransferData.cs index 4b50b9883a..5ceff2dd40 100644 --- a/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleDefaultSettingsTransferData.cs +++ b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleDefaultSettingsTransferData.cs @@ -3,7 +3,13 @@ namespace Stripe { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class SubscriptionScheduleDefaultSettingsTransferData : StripeEntity { /// @@ -13,6 +19,9 @@ public class SubscriptionScheduleDefaultSettingsTransferData : StripeEntity [JsonProperty("amount_percent")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_percent")] +#endif public decimal? AmountPercent { get; set; } #region Expandable Destination @@ -22,6 +31,9 @@ public class SubscriptionScheduleDefaultSettingsTransferData : StripeEntity [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string DestinationId { get => this.InternalDestination?.Id; @@ -35,6 +47,9 @@ public string DestinationId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Account Destination { get => this.InternalDestination?.ExpandedObject; @@ -43,6 +58,10 @@ public Account Destination [JsonProperty("destination")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("destination")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalDestination { get; set; } #endregion } diff --git a/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedulePhase.cs b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedulePhase.cs index 26c81f0b5a..62e7b3c62e 100644 --- a/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedulePhase.cs +++ b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedulePhase.cs @@ -5,7 +5,13 @@ namespace Stripe using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class SubscriptionSchedulePhase : StripeEntity, IHasMetadata { /// @@ -13,6 +19,9 @@ public class SubscriptionSchedulePhase : StripeEntity /// invoice for this phase. /// [JsonProperty("add_invoice_items")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("add_invoice_items")] +#endif public List AddInvoiceItems { get; set; } /// @@ -21,9 +30,15 @@ public class SubscriptionSchedulePhase : StripeEntity /// the application owner's Stripe account during this phase of the schedule. /// [JsonProperty("application_fee_percent")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("application_fee_percent")] +#endif public decimal? ApplicationFeePercent { get; set; } [JsonProperty("automatic_tax")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("automatic_tax")] +#endif public SubscriptionSchedulePhaseAutomaticTax AutomaticTax { get; set; } /// @@ -35,6 +50,9 @@ public class SubscriptionSchedulePhase : StripeEntity /// One of: automatic, or phase_start. /// [JsonProperty("billing_cycle_anchor")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_cycle_anchor")] +#endif public string BillingCycleAnchor { get; set; } /// @@ -42,6 +60,9 @@ public class SubscriptionSchedulePhase : StripeEntity /// new billing period. /// [JsonProperty("billing_thresholds")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_thresholds")] +#endif public SubscriptionSchedulePhaseBillingThresholds BillingThresholds { get; set; } /// @@ -53,6 +74,9 @@ public class SubscriptionSchedulePhase : StripeEntity /// One of: charge_automatically, or send_invoice. /// [JsonProperty("collection_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("collection_method")] +#endif public string CollectionMethod { get; set; } #region Expandable Coupon @@ -62,6 +86,9 @@ public class SubscriptionSchedulePhase : StripeEntity /// ID of the coupon to use during this phase of the subscription schedule. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string CouponId { get => this.InternalCoupon?.Id; @@ -75,6 +102,9 @@ public string CouponId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Coupon Coupon { get => this.InternalCoupon?.ExpandedObject; @@ -83,6 +113,10 @@ public Coupon Coupon [JsonProperty("coupon")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("coupon")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalCoupon { get; set; } #endregion @@ -92,6 +126,9 @@ public Coupon Coupon /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } #region Expandable DefaultPaymentMethod @@ -103,6 +140,9 @@ public Coupon Coupon /// default payment method in the customer's invoice settings. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string DefaultPaymentMethodId { get => this.InternalDefaultPaymentMethod?.Id; @@ -118,6 +158,9 @@ public string DefaultPaymentMethodId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public PaymentMethod DefaultPaymentMethod { get => this.InternalDefaultPaymentMethod?.ExpandedObject; @@ -126,6 +169,10 @@ public PaymentMethod DefaultPaymentMethod [JsonProperty("default_payment_method")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("default_payment_method")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalDefaultPaymentMethod { get; set; } #endregion @@ -134,6 +181,9 @@ public PaymentMethod DefaultPaymentMethod /// schedule. /// [JsonProperty("default_tax_rates")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("default_tax_rates")] +#endif public List DefaultTaxRates { get; set; } /// @@ -142,6 +192,9 @@ public PaymentMethod DefaultPaymentMethod /// certain local payment methods UIs. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// @@ -149,6 +202,9 @@ public PaymentMethod DefaultPaymentMethod /// Subscription item discounts are applied before subscription discounts. /// [JsonProperty("discounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discounts")] +#endif public List Discounts { get; set; } /// @@ -156,12 +212,19 @@ public PaymentMethod DefaultPaymentMethod /// [JsonProperty("end_date")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("end_date")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime EndDate { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// /// The invoice settings applicable during this phase. /// [JsonProperty("invoice_settings")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("invoice_settings")] +#endif public SubscriptionSchedulePhaseInvoiceSettings InvoiceSettings { get; set; } /// @@ -169,6 +232,9 @@ public PaymentMethod DefaultPaymentMethod /// subscription schedule. /// [JsonProperty("items")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("items")] +#endif public List Items { get; set; } /// @@ -179,6 +245,9 @@ public PaymentMethod DefaultPaymentMethod /// metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } #region Expandable OnBehalfOf @@ -189,6 +258,9 @@ public PaymentMethod DefaultPaymentMethod /// schedule's subscription. See the Connect documentation for details. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string OnBehalfOfId { get => this.InternalOnBehalfOf?.Id; @@ -203,6 +275,9 @@ public string OnBehalfOfId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Account OnBehalfOf { get => this.InternalOnBehalfOf?.ExpandedObject; @@ -211,6 +286,10 @@ public Account OnBehalfOf [JsonProperty("on_behalf_of")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("on_behalf_of")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalOnBehalfOf { get; set; } #endregion @@ -220,6 +299,9 @@ public Account OnBehalfOf /// One of: always_invoice, create_prorations, or none. /// [JsonProperty("proration_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("proration_behavior")] +#endif public string ProrationBehavior { get; set; } /// @@ -227,6 +309,10 @@ public Account OnBehalfOf /// [JsonProperty("start_date")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("start_date")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime StartDate { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -235,6 +321,9 @@ public Account OnBehalfOf /// subscription's invoices. /// [JsonProperty("transfer_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transfer_data")] +#endif public SubscriptionSchedulePhaseTransferData TransferData { get; set; } /// @@ -242,6 +331,10 @@ public Account OnBehalfOf /// [JsonProperty("trial_end")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("trial_end")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? TrialEnd { get; set; } } } diff --git a/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedulePhaseAddInvoiceItem.cs b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedulePhaseAddInvoiceItem.cs index c6feea04ce..c8c9a7d2b9 100644 --- a/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedulePhaseAddInvoiceItem.cs +++ b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedulePhaseAddInvoiceItem.cs @@ -4,13 +4,22 @@ namespace Stripe using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class SubscriptionSchedulePhaseAddInvoiceItem : StripeEntity { /// /// The stackable discounts that will be applied to the item. /// [JsonProperty("discounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discounts")] +#endif public List Discounts { get; set; } #region Expandable Price @@ -20,6 +29,9 @@ public class SubscriptionSchedulePhaseAddInvoiceItem : StripeEntity [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string PriceId { get => this.InternalPrice?.Id; @@ -33,6 +45,9 @@ public string PriceId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Price Price { get => this.InternalPrice?.ExpandedObject; @@ -41,6 +56,10 @@ public Price Price [JsonProperty("price")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("price")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalPrice { get; set; } #endregion @@ -48,6 +67,9 @@ public Price Price /// The quantity of the invoice item. /// [JsonProperty("quantity")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("quantity")] +#endif public long? Quantity { get; set; } /// @@ -55,6 +77,9 @@ public Price Price /// apply to this item. /// [JsonProperty("tax_rates")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_rates")] +#endif public List TaxRates { get; set; } } } diff --git a/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedulePhaseAddInvoiceItemDiscount.cs b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedulePhaseAddInvoiceItemDiscount.cs index 473a1c611f..e119c71b0b 100644 --- a/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedulePhaseAddInvoiceItemDiscount.cs +++ b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedulePhaseAddInvoiceItemDiscount.cs @@ -3,7 +3,13 @@ namespace Stripe { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class SubscriptionSchedulePhaseAddInvoiceItemDiscount : StripeEntity { #region Expandable Coupon @@ -13,6 +19,9 @@ public class SubscriptionSchedulePhaseAddInvoiceItemDiscount : StripeEntity [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string CouponId { get => this.InternalCoupon?.Id; @@ -26,6 +35,9 @@ public string CouponId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Coupon Coupon { get => this.InternalCoupon?.ExpandedObject; @@ -34,6 +46,10 @@ public Coupon Coupon [JsonProperty("coupon")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("coupon")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalCoupon { get; set; } #endregion @@ -44,6 +60,9 @@ public Coupon Coupon /// ID of an existing discount on the object (or one of its ancestors) to reuse. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string DiscountId { get => this.InternalDiscount?.Id; @@ -57,6 +76,9 @@ public string DiscountId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Discount Discount { get => this.InternalDiscount?.ExpandedObject; @@ -65,6 +87,10 @@ public Discount Discount [JsonProperty("discount")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discount")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalDiscount { get; set; } #endregion @@ -75,6 +101,9 @@ public Discount Discount /// ID of the promotion code to create a new discount for. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string PromotionCodeId { get => this.InternalPromotionCode?.Id; @@ -88,6 +117,9 @@ public string PromotionCodeId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public PromotionCode PromotionCode { get => this.InternalPromotionCode?.ExpandedObject; @@ -96,6 +128,10 @@ public PromotionCode PromotionCode [JsonProperty("promotion_code")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("promotion_code")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalPromotionCode { get; set; } #endregion } diff --git a/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedulePhaseAutomaticTax.cs b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedulePhaseAutomaticTax.cs index f59a708da2..485763e06a 100644 --- a/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedulePhaseAutomaticTax.cs +++ b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedulePhaseAutomaticTax.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionSchedulePhaseAutomaticTax : StripeEntity { @@ -9,6 +12,9 @@ public class SubscriptionSchedulePhaseAutomaticTax : StripeEntity [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool Enabled { get; set; } /// @@ -17,6 +23,9 @@ public class SubscriptionSchedulePhaseAutomaticTax : StripeEntity [JsonProperty("liability")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("liability")] +#endif public SubscriptionSchedulePhaseAutomaticTaxLiability Liability { get; set; } } } diff --git a/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedulePhaseAutomaticTaxLiability.cs b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedulePhaseAutomaticTaxLiability.cs index af1c6c2df0..b707007819 100644 --- a/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedulePhaseAutomaticTaxLiability.cs +++ b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedulePhaseAutomaticTaxLiability.cs @@ -3,7 +3,13 @@ namespace Stripe { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class SubscriptionSchedulePhaseAutomaticTaxLiability : StripeEntity { #region Expandable Account @@ -13,6 +19,9 @@ public class SubscriptionSchedulePhaseAutomaticTaxLiability : StripeEntitytype is account. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string AccountId { get => this.InternalAccount?.Id; @@ -26,6 +35,9 @@ public string AccountId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Account Account { get => this.InternalAccount?.ExpandedObject; @@ -34,6 +46,10 @@ public Account Account [JsonProperty("account")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalAccount { get; set; } #endregion @@ -42,6 +58,9 @@ public Account Account /// One of: account, or self. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedulePhaseBillingThresholds.cs b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedulePhaseBillingThresholds.cs index 58bcfd0706..c55587d44e 100644 --- a/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedulePhaseBillingThresholds.cs +++ b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedulePhaseBillingThresholds.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionSchedulePhaseBillingThresholds : StripeEntity { @@ -9,6 +12,9 @@ public class SubscriptionSchedulePhaseBillingThresholds : StripeEntity [JsonProperty("amount_gte")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_gte")] +#endif public long? AmountGte { get; set; } /// @@ -19,6 +25,9 @@ public class SubscriptionSchedulePhaseBillingThresholds : StripeEntityaggregate_usage=last_ever. /// [JsonProperty("reset_billing_cycle_anchor")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reset_billing_cycle_anchor")] +#endif public bool? ResetBillingCycleAnchor { get; set; } } } diff --git a/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedulePhaseDiscount.cs b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedulePhaseDiscount.cs index cc5a2a6db1..5cce8fd0bc 100644 --- a/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedulePhaseDiscount.cs +++ b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedulePhaseDiscount.cs @@ -3,7 +3,13 @@ namespace Stripe { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class SubscriptionSchedulePhaseDiscount : StripeEntity { #region Expandable Coupon @@ -13,6 +19,9 @@ public class SubscriptionSchedulePhaseDiscount : StripeEntity [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string CouponId { get => this.InternalCoupon?.Id; @@ -26,6 +35,9 @@ public string CouponId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Coupon Coupon { get => this.InternalCoupon?.ExpandedObject; @@ -34,6 +46,10 @@ public Coupon Coupon [JsonProperty("coupon")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("coupon")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalCoupon { get; set; } #endregion @@ -44,6 +60,9 @@ public Coupon Coupon /// ID of an existing discount on the object (or one of its ancestors) to reuse. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string DiscountId { get => this.InternalDiscount?.Id; @@ -57,6 +76,9 @@ public string DiscountId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Discount Discount { get => this.InternalDiscount?.ExpandedObject; @@ -65,6 +87,10 @@ public Discount Discount [JsonProperty("discount")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discount")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalDiscount { get; set; } #endregion @@ -75,6 +101,9 @@ public Discount Discount /// ID of the promotion code to create a new discount for. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string PromotionCodeId { get => this.InternalPromotionCode?.Id; @@ -88,6 +117,9 @@ public string PromotionCodeId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public PromotionCode PromotionCode { get => this.InternalPromotionCode?.ExpandedObject; @@ -96,6 +128,10 @@ public PromotionCode PromotionCode [JsonProperty("promotion_code")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("promotion_code")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalPromotionCode { get; set; } #endregion } diff --git a/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedulePhaseInvoiceSettings.cs b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedulePhaseInvoiceSettings.cs index 5a524b8688..a15bb869a6 100644 --- a/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedulePhaseInvoiceSettings.cs +++ b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedulePhaseInvoiceSettings.cs @@ -5,7 +5,13 @@ namespace Stripe using System.Linq; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class SubscriptionSchedulePhaseInvoiceSettings : StripeEntity { #region Expandable AccountTaxIds @@ -16,6 +22,9 @@ public class SubscriptionSchedulePhaseInvoiceSettings : StripeEntity [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public List AccountTaxIdIds { get => this.InternalAccountTaxIds?.Select((x) => x.Id).ToList(); @@ -30,6 +39,9 @@ public List AccountTaxIdIds /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public List AccountTaxIds { get => this.InternalAccountTaxIds?.Select((x) => x.ExpandedObject).ToList(); @@ -37,6 +49,9 @@ public List AccountTaxIds } [JsonProperty("account_tax_ids", ItemConverterType = typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_tax_ids")] +#endif internal List> InternalAccountTaxIds { get; set; } #endregion @@ -46,6 +61,9 @@ public List AccountTaxIds /// billing=charge_automatically. /// [JsonProperty("days_until_due")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("days_until_due")] +#endif public long? DaysUntilDue { get; set; } /// @@ -53,6 +71,9 @@ public List AccountTaxIds /// branding and support information of the specified account. /// [JsonProperty("issuer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("issuer")] +#endif public SubscriptionSchedulePhaseInvoiceSettingsIssuer Issuer { get; set; } } } diff --git a/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedulePhaseInvoiceSettingsIssuer.cs b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedulePhaseInvoiceSettingsIssuer.cs index c162ac5ea1..1177bb395e 100644 --- a/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedulePhaseInvoiceSettingsIssuer.cs +++ b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedulePhaseInvoiceSettingsIssuer.cs @@ -3,7 +3,13 @@ namespace Stripe { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class SubscriptionSchedulePhaseInvoiceSettingsIssuer : StripeEntity { #region Expandable Account @@ -13,6 +19,9 @@ public class SubscriptionSchedulePhaseInvoiceSettingsIssuer : StripeEntitytype is account. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string AccountId { get => this.InternalAccount?.Id; @@ -26,6 +35,9 @@ public string AccountId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Account Account { get => this.InternalAccount?.ExpandedObject; @@ -34,6 +46,10 @@ public Account Account [JsonProperty("account")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalAccount { get; set; } #endregion @@ -42,6 +58,9 @@ public Account Account /// One of: account, or self. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedulePhaseItem.cs b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedulePhaseItem.cs index b7729c1ce4..ebb0013de2 100644 --- a/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedulePhaseItem.cs +++ b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedulePhaseItem.cs @@ -4,7 +4,13 @@ namespace Stripe using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class SubscriptionSchedulePhaseItem : StripeEntity, IHasMetadata { /// @@ -12,6 +18,9 @@ public class SubscriptionSchedulePhaseItem : StripeEntity [JsonProperty("billing_thresholds")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_thresholds")] +#endif public SubscriptionSchedulePhaseItemBillingThresholds BillingThresholds { get; set; } /// @@ -19,6 +28,9 @@ public class SubscriptionSchedulePhaseItem : StripeEntityexpand[]=discounts to expand each discount. /// [JsonProperty("discounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discounts")] +#endif public List Discounts { get; set; } /// @@ -27,6 +39,9 @@ public class SubscriptionSchedulePhaseItem : StripeEntitymetadata when the phase is entered. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } #region Expandable Plan @@ -36,6 +51,9 @@ public class SubscriptionSchedulePhaseItem : StripeEntity [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string PlanId { get => this.InternalPlan?.Id; @@ -49,6 +67,9 @@ public string PlanId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Plan Plan { get => this.InternalPlan?.ExpandedObject; @@ -57,6 +78,10 @@ public Plan Plan [JsonProperty("plan")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("plan")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalPlan { get; set; } #endregion @@ -67,6 +92,9 @@ public Plan Plan /// ID of the price to which the customer should be subscribed. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string PriceId { get => this.InternalPrice?.Id; @@ -80,6 +108,9 @@ public string PriceId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Price Price { get => this.InternalPrice?.ExpandedObject; @@ -88,6 +119,10 @@ public Price Price [JsonProperty("price")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("price")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalPrice { get; set; } #endregion @@ -95,6 +130,9 @@ public Price Price /// Quantity of the plan to which the customer should be subscribed. /// [JsonProperty("quantity")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("quantity")] +#endif public long Quantity { get; set; } /// @@ -102,6 +140,9 @@ public Price Price /// default_tax_rates on the phase do not apply to this phase_item. /// [JsonProperty("tax_rates")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_rates")] +#endif public List TaxRates { get; set; } } } diff --git a/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedulePhaseItemBillingThresholds.cs b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedulePhaseItemBillingThresholds.cs index 56adb1bc43..8a25fdb981 100644 --- a/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedulePhaseItemBillingThresholds.cs +++ b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedulePhaseItemBillingThresholds.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionSchedulePhaseItemBillingThresholds : StripeEntity { @@ -9,6 +12,9 @@ public class SubscriptionSchedulePhaseItemBillingThresholds : StripeEntity [JsonProperty("usage_gte")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("usage_gte")] +#endif public long? UsageGte { get; set; } } } diff --git a/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedulePhaseItemDiscount.cs b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedulePhaseItemDiscount.cs index 5e512e3c45..1329eee78e 100644 --- a/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedulePhaseItemDiscount.cs +++ b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedulePhaseItemDiscount.cs @@ -3,7 +3,13 @@ namespace Stripe { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class SubscriptionSchedulePhaseItemDiscount : StripeEntity { #region Expandable Coupon @@ -13,6 +19,9 @@ public class SubscriptionSchedulePhaseItemDiscount : StripeEntity [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string CouponId { get => this.InternalCoupon?.Id; @@ -26,6 +35,9 @@ public string CouponId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Coupon Coupon { get => this.InternalCoupon?.ExpandedObject; @@ -34,6 +46,10 @@ public Coupon Coupon [JsonProperty("coupon")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("coupon")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalCoupon { get; set; } #endregion @@ -44,6 +60,9 @@ public Coupon Coupon /// ID of an existing discount on the object (or one of its ancestors) to reuse. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string DiscountId { get => this.InternalDiscount?.Id; @@ -57,6 +76,9 @@ public string DiscountId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Discount Discount { get => this.InternalDiscount?.ExpandedObject; @@ -65,6 +87,10 @@ public Discount Discount [JsonProperty("discount")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discount")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalDiscount { get; set; } #endregion @@ -75,6 +101,9 @@ public Discount Discount /// ID of the promotion code to create a new discount for. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string PromotionCodeId { get => this.InternalPromotionCode?.Id; @@ -88,6 +117,9 @@ public string PromotionCodeId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public PromotionCode PromotionCode { get => this.InternalPromotionCode?.ExpandedObject; @@ -96,6 +128,10 @@ public PromotionCode PromotionCode [JsonProperty("promotion_code")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("promotion_code")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalPromotionCode { get; set; } #endregion } diff --git a/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedulePhaseTransferData.cs b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedulePhaseTransferData.cs index ebe99f9069..9d33011f39 100644 --- a/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedulePhaseTransferData.cs +++ b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedulePhaseTransferData.cs @@ -3,7 +3,13 @@ namespace Stripe { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class SubscriptionSchedulePhaseTransferData : StripeEntity { /// @@ -13,6 +19,9 @@ public class SubscriptionSchedulePhaseTransferData : StripeEntity [JsonProperty("amount_percent")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_percent")] +#endif public decimal? AmountPercent { get; set; } #region Expandable Destination @@ -22,6 +31,9 @@ public class SubscriptionSchedulePhaseTransferData : StripeEntity [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string DestinationId { get => this.InternalDestination?.Id; @@ -35,6 +47,9 @@ public string DestinationId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Account Destination { get => this.InternalDestination?.ExpandedObject; @@ -43,6 +58,10 @@ public Account Destination [JsonProperty("destination")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("destination")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalDestination { get; set; } #endregion } diff --git a/src/Stripe.net/Entities/Subscriptions/Subscription.cs b/src/Stripe.net/Entities/Subscriptions/Subscription.cs index bf804b962b..5f7dd7f283 100644 --- a/src/Stripe.net/Entities/Subscriptions/Subscription.cs +++ b/src/Stripe.net/Entities/Subscriptions/Subscription.cs @@ -6,6 +6,9 @@ namespace Stripe using System.Linq; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// Subscriptions allow you to charge a customer on a recurring basis. @@ -13,18 +16,27 @@ namespace Stripe /// Related guide: Creating /// subscriptions. /// +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class Subscription : StripeEntity, IHasId, IHasMetadata, IHasObject { /// /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } #region Expandable Application @@ -34,6 +46,9 @@ public class Subscription : StripeEntity, IHasId, IHasMetadata, IH /// ID of the Connect Application that created the subscription. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string ApplicationId { get => this.InternalApplication?.Id; @@ -47,6 +62,9 @@ public string ApplicationId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Application Application { get => this.InternalApplication?.ExpandedObject; @@ -55,6 +73,10 @@ public Application Application [JsonProperty("application")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("application")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalApplication { get; set; } #endregion @@ -64,9 +86,15 @@ public Application Application /// the application owner's Stripe account. /// [JsonProperty("application_fee_percent")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("application_fee_percent")] +#endif public decimal? ApplicationFeePercent { get; set; } [JsonProperty("automatic_tax")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("automatic_tax")] +#endif public SubscriptionAutomaticTax AutomaticTax { get; set; } /// @@ -78,12 +106,19 @@ public Application Application /// [JsonProperty("billing_cycle_anchor")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_cycle_anchor")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime BillingCycleAnchor { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// /// The fixed values used to calculate the billing_cycle_anchor. /// [JsonProperty("billing_cycle_anchor_config")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_cycle_anchor_config")] +#endif public SubscriptionBillingCycleAnchorConfig BillingCycleAnchorConfig { get; set; } /// @@ -91,6 +126,9 @@ public Application Application /// new billing period. /// [JsonProperty("billing_thresholds")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_thresholds")] +#endif public SubscriptionBillingThresholds BillingThresholds { get; set; } /// @@ -98,6 +136,10 @@ public Application Application /// [JsonProperty("cancel_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cancel_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? CancelAt { get; set; } /// @@ -105,6 +147,9 @@ public Application Application /// status=canceled) cancel at the end of the current billing period. /// [JsonProperty("cancel_at_period_end")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cancel_at_period_end")] +#endif public bool CancelAtPeriodEnd { get; set; } /// @@ -115,12 +160,19 @@ public Application Application /// [JsonProperty("canceled_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("canceled_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? CanceledAt { get; set; } /// /// Details about why this subscription was cancelled. /// [JsonProperty("cancellation_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cancellation_details")] +#endif public SubscriptionCancellationDetails CancellationDetails { get; set; } /// @@ -132,6 +184,9 @@ public Application Application /// One of: charge_automatically, or send_invoice. /// [JsonProperty("collection_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("collection_method")] +#endif public string CollectionMethod { get; set; } /// @@ -139,6 +194,10 @@ public Application Application /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -147,6 +206,9 @@ public Application Application /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// @@ -155,6 +217,10 @@ public Application Application /// [JsonProperty("current_period_end")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("current_period_end")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime CurrentPeriodEnd { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -162,6 +228,10 @@ public Application Application /// [JsonProperty("current_period_start")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("current_period_start")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime CurrentPeriodStart { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; #region Expandable Customer @@ -171,6 +241,9 @@ public Application Application /// ID of the customer who owns the subscription. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string CustomerId { get => this.InternalCustomer?.Id; @@ -184,6 +257,9 @@ public string CustomerId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Customer Customer { get => this.InternalCustomer?.ExpandedObject; @@ -192,6 +268,10 @@ public Customer Customer [JsonProperty("customer")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalCustomer { get; set; } #endregion @@ -201,6 +281,9 @@ public Customer Customer /// collection_method=charge_automatically. /// [JsonProperty("days_until_due")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("days_until_due")] +#endif public long? DaysUntilDue { get; set; } #region Expandable DefaultPaymentMethod @@ -215,6 +298,9 @@ public Customer Customer /// href="https://stripe.com/docs/api/customers/object#customer_object-default_source">default_source. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string DefaultPaymentMethodId { get => this.InternalDefaultPaymentMethod?.Id; @@ -233,6 +319,9 @@ public string DefaultPaymentMethodId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public PaymentMethod DefaultPaymentMethod { get => this.InternalDefaultPaymentMethod?.ExpandedObject; @@ -241,6 +330,10 @@ public PaymentMethod DefaultPaymentMethod [JsonProperty("default_payment_method")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("default_payment_method")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalDefaultPaymentMethod { get; set; } #endregion @@ -257,6 +350,9 @@ public PaymentMethod DefaultPaymentMethod /// href="https://stripe.com/docs/api/customers/object#customer_object-default_source">default_source. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string DefaultSourceId { get => this.InternalDefaultSource?.Id; @@ -276,6 +372,9 @@ public string DefaultSourceId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public IPaymentSource DefaultSource { get => this.InternalDefaultSource?.ExpandedObject; @@ -284,6 +383,10 @@ public IPaymentSource DefaultSource [JsonProperty("default_source")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("default_source")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalDefaultSource { get; set; } #endregion @@ -293,6 +396,9 @@ public IPaymentSource DefaultSource /// populated from the subscription. /// [JsonProperty("default_tax_rates")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("default_tax_rates")] +#endif public List DefaultTaxRates { get; set; } /// @@ -301,6 +407,9 @@ public IPaymentSource DefaultSource /// and certain local payment methods UIs. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// @@ -310,6 +419,9 @@ public IPaymentSource DefaultSource /// version. Use discounts instead. /// [JsonProperty("discount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discount")] +#endif public Discount Discount { get; set; } #region Expandable Discounts @@ -320,6 +432,9 @@ public IPaymentSource DefaultSource /// before subscription discounts. Use expand[]=discounts to expand each discount. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public List DiscountIds { get => this.InternalDiscounts?.Select((x) => x.Id).ToList(); @@ -334,6 +449,9 @@ public List DiscountIds /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public List Discounts { get => this.InternalDiscounts?.Select((x) => x.ExpandedObject).ToList(); @@ -341,6 +459,9 @@ public List Discounts } [JsonProperty("discounts", ItemConverterType = typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discounts")] +#endif internal List> InternalDiscounts { get; set; } #endregion @@ -349,15 +470,25 @@ public List Discounts /// [JsonProperty("ended_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ended_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? EndedAt { get; set; } [JsonProperty("invoice_settings")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("invoice_settings")] +#endif public SubscriptionInvoiceSettings InvoiceSettings { get; set; } /// /// List of subscription items, each with an attached price. /// [JsonProperty("items")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("items")] +#endif public StripeList Items { get; set; } #region Expandable LatestInvoice @@ -367,6 +498,9 @@ public List Discounts /// The most recent invoice this subscription has generated. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string LatestInvoiceId { get => this.InternalLatestInvoice?.Id; @@ -380,6 +514,9 @@ public string LatestInvoiceId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Invoice LatestInvoice { get => this.InternalLatestInvoice?.ExpandedObject; @@ -388,6 +525,10 @@ public Invoice LatestInvoice [JsonProperty("latest_invoice")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("latest_invoice")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalLatestInvoice { get; set; } #endregion @@ -396,6 +537,9 @@ public Invoice LatestInvoice /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// @@ -404,6 +548,9 @@ public Invoice LatestInvoice /// object in a structured format. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -412,6 +559,10 @@ public Invoice LatestInvoice /// [JsonProperty("next_pending_invoice_item_invoice")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("next_pending_invoice_item_invoice")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? NextPendingInvoiceItemInvoice { get; set; } #region Expandable OnBehalfOf @@ -422,6 +573,9 @@ public Invoice LatestInvoice /// subscription. See the Connect documentation for details. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string OnBehalfOfId { get => this.InternalOnBehalfOf?.Id; @@ -436,6 +590,9 @@ public string OnBehalfOfId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Account OnBehalfOf { get => this.InternalOnBehalfOf?.ExpandedObject; @@ -444,6 +601,10 @@ public Account OnBehalfOf [JsonProperty("on_behalf_of")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("on_behalf_of")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalOnBehalfOf { get; set; } #endregion @@ -454,12 +615,18 @@ public Account OnBehalfOf /// collection. /// [JsonProperty("pause_collection")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("pause_collection")] +#endif public SubscriptionPauseCollection PauseCollection { get; set; } /// /// Payment settings passed on to invoices created by the subscription. /// [JsonProperty("payment_settings")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_settings")] +#endif public SubscriptionPaymentSettings PaymentSettings { get; set; } /// @@ -468,6 +635,9 @@ public Account OnBehalfOf /// invoice for the given subscription at the specified interval. /// [JsonProperty("pending_invoice_item_interval")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("pending_invoice_item_interval")] +#endif public SubscriptionPendingInvoiceItemInterval PendingInvoiceItemInterval { get; set; } #region Expandable PendingSetupIntent @@ -482,6 +652,9 @@ public Account OnBehalfOf /// Migration Guide. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string PendingSetupIntentId { get => this.InternalPendingSetupIntent?.Id; @@ -500,6 +673,9 @@ public string PendingSetupIntentId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public SetupIntent PendingSetupIntent { get => this.InternalPendingSetupIntent?.ExpandedObject; @@ -508,6 +684,10 @@ public SetupIntent PendingSetupIntent [JsonProperty("pending_setup_intent")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("pending_setup_intent")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalPendingSetupIntent { get; set; } #endregion @@ -517,6 +697,9 @@ public SetupIntent PendingSetupIntent /// that will be applied to the subscription once the latest_invoice has been paid. /// [JsonProperty("pending_update")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("pending_update")] +#endif public SubscriptionPendingUpdate PendingUpdate { get; set; } #region Expandable Schedule @@ -526,6 +709,9 @@ public SetupIntent PendingSetupIntent /// The schedule attached to the subscription. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string ScheduleId { get => this.InternalSchedule?.Id; @@ -539,6 +725,9 @@ public string ScheduleId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public SubscriptionSchedule Schedule { get => this.InternalSchedule?.ExpandedObject; @@ -547,6 +736,10 @@ public SubscriptionSchedule Schedule [JsonProperty("schedule")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("schedule")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalSchedule { get; set; } #endregion @@ -556,6 +749,10 @@ public SubscriptionSchedule Schedule /// [JsonProperty("start_date")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("start_date")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime StartDate { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -597,6 +794,9 @@ public SubscriptionSchedule Schedule /// past_due, paused, trialing, or unpaid. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } #region Expandable TestClock @@ -606,6 +806,9 @@ public SubscriptionSchedule Schedule /// ID of the test clock this subscription belongs to. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string TestClockId { get => this.InternalTestClock?.Id; @@ -619,6 +822,9 @@ public string TestClockId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public TestHelpers.TestClock TestClock { get => this.InternalTestClock?.ExpandedObject; @@ -627,6 +833,10 @@ public TestHelpers.TestClock TestClock [JsonProperty("test_clock")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("test_clock")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalTestClock { get; set; } #endregion @@ -636,6 +846,9 @@ public TestHelpers.TestClock TestClock /// subscription's invoices. /// [JsonProperty("transfer_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transfer_data")] +#endif public SubscriptionTransferData TransferData { get; set; } /// @@ -643,12 +856,19 @@ public TestHelpers.TestClock TestClock /// [JsonProperty("trial_end")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("trial_end")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? TrialEnd { get; set; } /// /// Settings related to subscription trials. /// [JsonProperty("trial_settings")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("trial_settings")] +#endif public SubscriptionTrialSettings TrialSettings { get; set; } /// @@ -656,6 +876,10 @@ public TestHelpers.TestClock TestClock /// [JsonProperty("trial_start")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("trial_start")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? TrialStart { get; set; } } } diff --git a/src/Stripe.net/Entities/Subscriptions/SubscriptionAutomaticTax.cs b/src/Stripe.net/Entities/Subscriptions/SubscriptionAutomaticTax.cs index d23638bf11..73ad336424 100644 --- a/src/Stripe.net/Entities/Subscriptions/SubscriptionAutomaticTax.cs +++ b/src/Stripe.net/Entities/Subscriptions/SubscriptionAutomaticTax.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionAutomaticTax : StripeEntity { @@ -9,6 +12,9 @@ public class SubscriptionAutomaticTax : StripeEntity /// Whether Stripe automatically computes tax on this subscription. /// [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool Enabled { get; set; } /// @@ -17,6 +23,9 @@ public class SubscriptionAutomaticTax : StripeEntity /// transaction is returned in the report of the connected account. /// [JsonProperty("liability")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("liability")] +#endif public SubscriptionAutomaticTaxLiability Liability { get; set; } } } diff --git a/src/Stripe.net/Entities/Subscriptions/SubscriptionAutomaticTaxLiability.cs b/src/Stripe.net/Entities/Subscriptions/SubscriptionAutomaticTaxLiability.cs index 564725c680..abe7e574ea 100644 --- a/src/Stripe.net/Entities/Subscriptions/SubscriptionAutomaticTaxLiability.cs +++ b/src/Stripe.net/Entities/Subscriptions/SubscriptionAutomaticTaxLiability.cs @@ -3,7 +3,13 @@ namespace Stripe { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class SubscriptionAutomaticTaxLiability : StripeEntity { #region Expandable Account @@ -13,6 +19,9 @@ public class SubscriptionAutomaticTaxLiability : StripeEntitytype is account. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string AccountId { get => this.InternalAccount?.Id; @@ -26,6 +35,9 @@ public string AccountId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Account Account { get => this.InternalAccount?.ExpandedObject; @@ -34,6 +46,10 @@ public Account Account [JsonProperty("account")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalAccount { get; set; } #endregion @@ -42,6 +58,9 @@ public Account Account /// One of: account, or self. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Subscriptions/SubscriptionBillingCycleAnchorConfig.cs b/src/Stripe.net/Entities/Subscriptions/SubscriptionBillingCycleAnchorConfig.cs index 767eba1328..833601c523 100644 --- a/src/Stripe.net/Entities/Subscriptions/SubscriptionBillingCycleAnchorConfig.cs +++ b/src/Stripe.net/Entities/Subscriptions/SubscriptionBillingCycleAnchorConfig.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionBillingCycleAnchorConfig : StripeEntity { @@ -9,30 +12,45 @@ public class SubscriptionBillingCycleAnchorConfig : StripeEntity [JsonProperty("day_of_month")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("day_of_month")] +#endif public long DayOfMonth { get; set; } /// /// The hour of the day of the billing_cycle_anchor. /// [JsonProperty("hour")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("hour")] +#endif public long? Hour { get; set; } /// /// The minute of the hour of the billing_cycle_anchor. /// [JsonProperty("minute")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("minute")] +#endif public long? Minute { get; set; } /// /// The month to start full cycle billing periods. /// [JsonProperty("month")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("month")] +#endif public long? Month { get; set; } /// /// The second of the minute of the billing_cycle_anchor. /// [JsonProperty("second")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("second")] +#endif public long? Second { get; set; } } } diff --git a/src/Stripe.net/Entities/Subscriptions/SubscriptionBillingThresholds.cs b/src/Stripe.net/Entities/Subscriptions/SubscriptionBillingThresholds.cs index c84f8d89b4..b243bff262 100644 --- a/src/Stripe.net/Entities/Subscriptions/SubscriptionBillingThresholds.cs +++ b/src/Stripe.net/Entities/Subscriptions/SubscriptionBillingThresholds.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionBillingThresholds : StripeEntity { @@ -9,6 +12,9 @@ public class SubscriptionBillingThresholds : StripeEntity [JsonProperty("amount_gte")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_gte")] +#endif public long? AmountGte { get; set; } /// @@ -19,6 +25,9 @@ public class SubscriptionBillingThresholds : StripeEntityaggregate_usage=last_ever. /// [JsonProperty("reset_billing_cycle_anchor")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reset_billing_cycle_anchor")] +#endif public bool? ResetBillingCycleAnchor { get; set; } } } diff --git a/src/Stripe.net/Entities/Subscriptions/SubscriptionCancellationDetails.cs b/src/Stripe.net/Entities/Subscriptions/SubscriptionCancellationDetails.cs index 428b03b445..0932e208bc 100644 --- a/src/Stripe.net/Entities/Subscriptions/SubscriptionCancellationDetails.cs +++ b/src/Stripe.net/Entities/Subscriptions/SubscriptionCancellationDetails.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionCancellationDetails : StripeEntity { @@ -10,6 +13,9 @@ public class SubscriptionCancellationDetails : StripeEntity [JsonProperty("comment")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("comment")] +#endif public string Comment { get; set; } /// @@ -20,6 +26,9 @@ public class SubscriptionCancellationDetails : StripeEntityunused. /// [JsonProperty("feedback")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("feedback")] +#endif public string Feedback { get; set; } /// @@ -28,6 +37,9 @@ public class SubscriptionCancellationDetails : StripeEntitypayment_failed. /// [JsonProperty("reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reason")] +#endif public string Reason { get; set; } } } diff --git a/src/Stripe.net/Entities/Subscriptions/SubscriptionInvoiceSettings.cs b/src/Stripe.net/Entities/Subscriptions/SubscriptionInvoiceSettings.cs index 458f6f1ea8..323de92da1 100644 --- a/src/Stripe.net/Entities/Subscriptions/SubscriptionInvoiceSettings.cs +++ b/src/Stripe.net/Entities/Subscriptions/SubscriptionInvoiceSettings.cs @@ -5,7 +5,13 @@ namespace Stripe using System.Linq; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class SubscriptionInvoiceSettings : StripeEntity { #region Expandable AccountTaxIds @@ -16,6 +22,9 @@ public class SubscriptionInvoiceSettings : StripeEntity [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public List AccountTaxIdIds { get => this.InternalAccountTaxIds?.Select((x) => x.Id).ToList(); @@ -30,6 +39,9 @@ public List AccountTaxIdIds /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public List AccountTaxIds { get => this.InternalAccountTaxIds?.Select((x) => x.ExpandedObject).ToList(); @@ -37,10 +49,16 @@ public List AccountTaxIds } [JsonProperty("account_tax_ids", ItemConverterType = typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_tax_ids")] +#endif internal List> InternalAccountTaxIds { get; set; } #endregion [JsonProperty("issuer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("issuer")] +#endif public SubscriptionInvoiceSettingsIssuer Issuer { get; set; } } } diff --git a/src/Stripe.net/Entities/Subscriptions/SubscriptionInvoiceSettingsIssuer.cs b/src/Stripe.net/Entities/Subscriptions/SubscriptionInvoiceSettingsIssuer.cs index 0f95aca601..3fdf82300a 100644 --- a/src/Stripe.net/Entities/Subscriptions/SubscriptionInvoiceSettingsIssuer.cs +++ b/src/Stripe.net/Entities/Subscriptions/SubscriptionInvoiceSettingsIssuer.cs @@ -3,7 +3,13 @@ namespace Stripe { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class SubscriptionInvoiceSettingsIssuer : StripeEntity { #region Expandable Account @@ -13,6 +19,9 @@ public class SubscriptionInvoiceSettingsIssuer : StripeEntitytype is account. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string AccountId { get => this.InternalAccount?.Id; @@ -26,6 +35,9 @@ public string AccountId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Account Account { get => this.InternalAccount?.ExpandedObject; @@ -34,6 +46,10 @@ public Account Account [JsonProperty("account")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalAccount { get; set; } #endregion @@ -42,6 +58,9 @@ public Account Account /// One of: account, or self. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Subscriptions/SubscriptionPauseCollection.cs b/src/Stripe.net/Entities/Subscriptions/SubscriptionPauseCollection.cs index 71c2f6a480..015308fec8 100644 --- a/src/Stripe.net/Entities/Subscriptions/SubscriptionPauseCollection.cs +++ b/src/Stripe.net/Entities/Subscriptions/SubscriptionPauseCollection.cs @@ -4,6 +4,9 @@ namespace Stripe using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionPauseCollection : StripeEntity { @@ -13,6 +16,9 @@ public class SubscriptionPauseCollection : StripeEntitykeep_as_draft, mark_uncollectible, or void. /// [JsonProperty("behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("behavior")] +#endif public string Behavior { get; set; } /// @@ -20,6 +26,10 @@ public class SubscriptionPauseCollection : StripeEntity [JsonProperty("resumes_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("resumes_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? ResumesAt { get; set; } } } diff --git a/src/Stripe.net/Entities/Subscriptions/SubscriptionPaymentSettings.cs b/src/Stripe.net/Entities/Subscriptions/SubscriptionPaymentSettings.cs index 2e3d588988..64d1d808b2 100644 --- a/src/Stripe.net/Entities/Subscriptions/SubscriptionPaymentSettings.cs +++ b/src/Stripe.net/Entities/Subscriptions/SubscriptionPaymentSettings.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionPaymentSettings : StripeEntity { @@ -11,6 +14,9 @@ public class SubscriptionPaymentSettings : StripeEntity [JsonProperty("payment_method_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_options")] +#endif public SubscriptionPaymentSettingsPaymentMethodOptions PaymentMethodOptions { get; set; } /// @@ -30,6 +36,9 @@ public class SubscriptionPaymentSettings : StripeEntitysofort, swish, us_bank_account, or wechat_pay. /// [JsonProperty("payment_method_types")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_types")] +#endif public List PaymentMethodTypes { get; set; } /// @@ -38,6 +47,9 @@ public class SubscriptionPaymentSettings : StripeEntityoff, or on_subscription. /// [JsonProperty("save_default_payment_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("save_default_payment_method")] +#endif public string SaveDefaultPaymentMethod { get; set; } } } diff --git a/src/Stripe.net/Entities/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptions.cs b/src/Stripe.net/Entities/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptions.cs index ad9778e2f9..37734497fa 100644 --- a/src/Stripe.net/Entities/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptions.cs +++ b/src/Stripe.net/Entities/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionPaymentSettingsPaymentMethodOptions : StripeEntity { @@ -10,6 +13,9 @@ public class SubscriptionPaymentSettingsPaymentMethodOptions : StripeEntity [JsonProperty("acss_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("acss_debit")] +#endif public SubscriptionPaymentSettingsPaymentMethodOptionsAcssDebit AcssDebit { get; set; } /// @@ -17,6 +23,9 @@ public class SubscriptionPaymentSettingsPaymentMethodOptions : StripeEntity [JsonProperty("bancontact")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bancontact")] +#endif public SubscriptionPaymentSettingsPaymentMethodOptionsBancontact Bancontact { get; set; } /// @@ -24,6 +33,9 @@ public class SubscriptionPaymentSettingsPaymentMethodOptions : StripeEntity [JsonProperty("card")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card")] +#endif public SubscriptionPaymentSettingsPaymentMethodOptionsCard Card { get; set; } /// @@ -31,6 +43,9 @@ public class SubscriptionPaymentSettingsPaymentMethodOptions : StripeEntity [JsonProperty("customer_balance")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_balance")] +#endif public SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalance CustomerBalance { get; set; } /// @@ -38,6 +53,9 @@ public class SubscriptionPaymentSettingsPaymentMethodOptions : StripeEntity [JsonProperty("konbini")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("konbini")] +#endif public SubscriptionPaymentSettingsPaymentMethodOptionsKonbini Konbini { get; set; } /// @@ -45,6 +63,9 @@ public class SubscriptionPaymentSettingsPaymentMethodOptions : StripeEntity [JsonProperty("sepa_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sepa_debit")] +#endif public SubscriptionPaymentSettingsPaymentMethodOptionsSepaDebit SepaDebit { get; set; } /// @@ -52,6 +73,9 @@ public class SubscriptionPaymentSettingsPaymentMethodOptions : StripeEntity [JsonProperty("us_bank_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("us_bank_account")] +#endif public SubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccount UsBankAccount { get; set; } } } diff --git a/src/Stripe.net/Entities/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsAcssDebit.cs b/src/Stripe.net/Entities/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsAcssDebit.cs index 63b66e1263..a0659e1166 100644 --- a/src/Stripe.net/Entities/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsAcssDebit.cs +++ b/src/Stripe.net/Entities/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsAcssDebit.cs @@ -2,10 +2,16 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionPaymentSettingsPaymentMethodOptionsAcssDebit : StripeEntity { [JsonProperty("mandate_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mandate_options")] +#endif public SubscriptionPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions MandateOptions { get; set; } /// @@ -13,6 +19,9 @@ public class SubscriptionPaymentSettingsPaymentMethodOptionsAcssDebit : StripeEn /// One of: automatic, instant, or microdeposits. /// [JsonProperty("verification_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("verification_method")] +#endif public string VerificationMethod { get; set; } } } diff --git a/src/Stripe.net/Entities/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions.cs b/src/Stripe.net/Entities/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions.cs index 63dc6a580e..f2d52de433 100644 --- a/src/Stripe.net/Entities/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions.cs +++ b/src/Stripe.net/Entities/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions : StripeEntity { @@ -10,6 +13,9 @@ public class SubscriptionPaymentSettingsPaymentMethodOptionsAcssDebitMandateOpti /// One of: business, or personal. /// [JsonProperty("transaction_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transaction_type")] +#endif public string TransactionType { get; set; } } } diff --git a/src/Stripe.net/Entities/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsBancontact.cs b/src/Stripe.net/Entities/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsBancontact.cs index 358a31dd1b..bfa8367e91 100644 --- a/src/Stripe.net/Entities/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsBancontact.cs +++ b/src/Stripe.net/Entities/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsBancontact.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionPaymentSettingsPaymentMethodOptionsBancontact : StripeEntity { @@ -11,6 +14,9 @@ public class SubscriptionPaymentSettingsPaymentMethodOptionsBancontact : StripeE /// One of: de, en, fr, or nl. /// [JsonProperty("preferred_language")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preferred_language")] +#endif public string PreferredLanguage { get; set; } } } diff --git a/src/Stripe.net/Entities/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsCard.cs b/src/Stripe.net/Entities/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsCard.cs index 7c22f03c19..126be9dc90 100644 --- a/src/Stripe.net/Entities/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsCard.cs +++ b/src/Stripe.net/Entities/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsCard.cs @@ -2,10 +2,16 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionPaymentSettingsPaymentMethodOptionsCard : StripeEntity { [JsonProperty("mandate_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mandate_options")] +#endif public SubscriptionPaymentSettingsPaymentMethodOptionsCardMandateOptions MandateOptions { get; set; } /// @@ -16,6 +22,9 @@ public class SubscriptionPaymentSettingsPaymentMethodOptionsCard : StripeEntity< /// mastercard, unionpay, unknown, or visa. /// [JsonProperty("network")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("network")] +#endif public string Network { get; set; } /// @@ -30,6 +39,9 @@ public class SubscriptionPaymentSettingsPaymentMethodOptionsCard : StripeEntity< /// One of: any, automatic, or challenge. /// [JsonProperty("request_three_d_secure")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("request_three_d_secure")] +#endif public string RequestThreeDSecure { get; set; } } } diff --git a/src/Stripe.net/Entities/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsCardMandateOptions.cs b/src/Stripe.net/Entities/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsCardMandateOptions.cs index d677818d14..5779802d46 100644 --- a/src/Stripe.net/Entities/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsCardMandateOptions.cs +++ b/src/Stripe.net/Entities/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsCardMandateOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionPaymentSettingsPaymentMethodOptionsCardMandateOptions : StripeEntity { @@ -9,6 +12,9 @@ public class SubscriptionPaymentSettingsPaymentMethodOptionsCardMandateOptions : /// Amount to be charged for future payments. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long? Amount { get; set; } /// @@ -18,6 +24,9 @@ public class SubscriptionPaymentSettingsPaymentMethodOptionsCardMandateOptions : /// One of: fixed, or maximum. /// [JsonProperty("amount_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_type")] +#endif public string AmountType { get; set; } /// @@ -25,6 +34,9 @@ public class SubscriptionPaymentSettingsPaymentMethodOptionsCardMandateOptions : /// customer. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } } } diff --git a/src/Stripe.net/Entities/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalance.cs b/src/Stripe.net/Entities/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalance.cs index 7240fca7b3..d21da60f48 100644 --- a/src/Stripe.net/Entities/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalance.cs +++ b/src/Stripe.net/Entities/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalance.cs @@ -2,10 +2,16 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalance : StripeEntity { [JsonProperty("bank_transfer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_transfer")] +#endif public SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer BankTransfer { get; set; } /// @@ -13,6 +19,9 @@ public class SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalance : St /// balance. Permitted values include: bank_transfer. /// [JsonProperty("funding_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("funding_type")] +#endif public string FundingType { get; set; } } } diff --git a/src/Stripe.net/Entities/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer.cs b/src/Stripe.net/Entities/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer.cs index 3ce30b1842..9d81faf254 100644 --- a/src/Stripe.net/Entities/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer.cs +++ b/src/Stripe.net/Entities/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer.cs @@ -2,10 +2,16 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer : StripeEntity { [JsonProperty("eu_bank_transfer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("eu_bank_transfer")] +#endif public SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer EuBankTransfer { get; set; } /// @@ -14,6 +20,9 @@ public class SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceBankT /// mx_bank_transfer, or us_bank_transfer. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer.cs b/src/Stripe.net/Entities/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer.cs index 875ad840d2..dc90703422 100644 --- a/src/Stripe.net/Entities/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer.cs +++ b/src/Stripe.net/Entities/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer : StripeEntity { @@ -11,6 +14,9 @@ public class SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceBankT /// One of: BE, DE, ES, FR, IE, or NL. /// [JsonProperty("country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country")] +#endif public string Country { get; set; } } } diff --git a/src/Stripe.net/Entities/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccount.cs b/src/Stripe.net/Entities/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccount.cs index be8cc5fca3..4bad637318 100644 --- a/src/Stripe.net/Entities/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccount.cs +++ b/src/Stripe.net/Entities/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccount.cs @@ -2,10 +2,16 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccount : StripeEntity { [JsonProperty("financial_connections")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("financial_connections")] +#endif public SubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections FinancialConnections { get; set; } /// @@ -13,6 +19,9 @@ public class SubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccount : Stri /// One of: automatic, instant, or microdeposits. /// [JsonProperty("verification_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("verification_method")] +#endif public string VerificationMethod { get; set; } } } diff --git a/src/Stripe.net/Entities/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections.cs b/src/Stripe.net/Entities/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections.cs index 2642db7862..e8cc96ff16 100644 --- a/src/Stripe.net/Entities/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections.cs +++ b/src/Stripe.net/Entities/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections.cs @@ -3,10 +3,16 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections : StripeEntity { [JsonProperty("filters")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("filters")] +#endif public SubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters Filters { get; set; } /// @@ -16,6 +22,9 @@ public class SubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinanci /// transactions. /// [JsonProperty("permissions")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("permissions")] +#endif public List Permissions { get; set; } /// @@ -23,6 +32,9 @@ public class SubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinanci /// One of: balances, ownership, or transactions. /// [JsonProperty("prefetch")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("prefetch")] +#endif public List Prefetch { get; set; } } } diff --git a/src/Stripe.net/Entities/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters.cs b/src/Stripe.net/Entities/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters.cs index d37e92e20b..c606135ab2 100644 --- a/src/Stripe.net/Entities/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters.cs +++ b/src/Stripe.net/Entities/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters : StripeEntity { @@ -12,6 +15,9 @@ public class SubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinanci /// One of: checking, or savings. /// [JsonProperty("account_subcategories")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_subcategories")] +#endif public List AccountSubcategories { get; set; } } } diff --git a/src/Stripe.net/Entities/Subscriptions/SubscriptionPendingInvoiceItemInterval.cs b/src/Stripe.net/Entities/Subscriptions/SubscriptionPendingInvoiceItemInterval.cs index 7a30f9b78b..5811f35224 100644 --- a/src/Stripe.net/Entities/Subscriptions/SubscriptionPendingInvoiceItemInterval.cs +++ b/src/Stripe.net/Entities/Subscriptions/SubscriptionPendingInvoiceItemInterval.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionPendingInvoiceItemInterval : StripeEntity { @@ -11,6 +14,9 @@ public class SubscriptionPendingInvoiceItemInterval : StripeEntityday, month, week, or year. /// [JsonProperty("interval")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interval")] +#endif public string Interval { get; set; } /// @@ -19,6 +25,9 @@ public class SubscriptionPendingInvoiceItemInterval : StripeEntity [JsonProperty("interval_count")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interval_count")] +#endif public long IntervalCount { get; set; } } } diff --git a/src/Stripe.net/Entities/Subscriptions/SubscriptionPendingUpdate.cs b/src/Stripe.net/Entities/Subscriptions/SubscriptionPendingUpdate.cs index 7f36089552..a54a85c7f6 100644 --- a/src/Stripe.net/Entities/Subscriptions/SubscriptionPendingUpdate.cs +++ b/src/Stripe.net/Entities/Subscriptions/SubscriptionPendingUpdate.cs @@ -5,6 +5,9 @@ namespace Stripe using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionPendingUpdate : StripeEntity { @@ -15,6 +18,10 @@ public class SubscriptionPendingUpdate : StripeEntity /// [JsonProperty("billing_cycle_anchor")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_cycle_anchor")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? BillingCycleAnchor { get; set; } /// @@ -23,6 +30,10 @@ public class SubscriptionPendingUpdate : StripeEntity /// [JsonProperty("expires_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("expires_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime ExpiresAt { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -30,6 +41,9 @@ public class SubscriptionPendingUpdate : StripeEntity /// is applied. /// [JsonProperty("subscription_items")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("subscription_items")] +#endif public List SubscriptionItems { get; set; } /// @@ -38,6 +52,10 @@ public class SubscriptionPendingUpdate : StripeEntity /// [JsonProperty("trial_end")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("trial_end")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? TrialEnd { get; set; } /// @@ -48,6 +66,9 @@ public class SubscriptionPendingUpdate : StripeEntity /// periods on subscriptions to learn more. /// [JsonProperty("trial_from_plan")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("trial_from_plan")] +#endif public bool? TrialFromPlan { get; set; } } } diff --git a/src/Stripe.net/Entities/Subscriptions/SubscriptionTransferData.cs b/src/Stripe.net/Entities/Subscriptions/SubscriptionTransferData.cs index c4367e8fa9..6712f4986a 100644 --- a/src/Stripe.net/Entities/Subscriptions/SubscriptionTransferData.cs +++ b/src/Stripe.net/Entities/Subscriptions/SubscriptionTransferData.cs @@ -3,7 +3,13 @@ namespace Stripe { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class SubscriptionTransferData : StripeEntity { /// @@ -13,6 +19,9 @@ public class SubscriptionTransferData : StripeEntity /// destination. /// [JsonProperty("amount_percent")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_percent")] +#endif public decimal? AmountPercent { get; set; } #region Expandable Destination @@ -22,6 +31,9 @@ public class SubscriptionTransferData : StripeEntity /// The account where funds from the payment will be transferred to upon payment success. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string DestinationId { get => this.InternalDestination?.Id; @@ -35,6 +47,9 @@ public string DestinationId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Account Destination { get => this.InternalDestination?.ExpandedObject; @@ -43,6 +58,10 @@ public Account Destination [JsonProperty("destination")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("destination")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalDestination { get; set; } #endregion } diff --git a/src/Stripe.net/Entities/Subscriptions/SubscriptionTrialSettings.cs b/src/Stripe.net/Entities/Subscriptions/SubscriptionTrialSettings.cs index 9fbf086f72..b27af1c020 100644 --- a/src/Stripe.net/Entities/Subscriptions/SubscriptionTrialSettings.cs +++ b/src/Stripe.net/Entities/Subscriptions/SubscriptionTrialSettings.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionTrialSettings : StripeEntity { @@ -9,6 +12,9 @@ public class SubscriptionTrialSettings : StripeEntity /// Defines how a subscription behaves when a free trial ends. /// [JsonProperty("end_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("end_behavior")] +#endif public SubscriptionTrialSettingsEndBehavior EndBehavior { get; set; } } } diff --git a/src/Stripe.net/Entities/Subscriptions/SubscriptionTrialSettingsEndBehavior.cs b/src/Stripe.net/Entities/Subscriptions/SubscriptionTrialSettingsEndBehavior.cs index 967459db12..3f2c71d627 100644 --- a/src/Stripe.net/Entities/Subscriptions/SubscriptionTrialSettingsEndBehavior.cs +++ b/src/Stripe.net/Entities/Subscriptions/SubscriptionTrialSettingsEndBehavior.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionTrialSettingsEndBehavior : StripeEntity { @@ -11,6 +14,9 @@ public class SubscriptionTrialSettingsEndBehavior : StripeEntitycancel, create_invoice, or pause. /// [JsonProperty("missing_payment_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("missing_payment_method")] +#endif public string MissingPaymentMethod { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/CalculationLineItems/CalculationLineItem.cs b/src/Stripe.net/Entities/Tax/CalculationLineItems/CalculationLineItem.cs index e9cce23a85..6da5717664 100644 --- a/src/Stripe.net/Entities/Tax/CalculationLineItems/CalculationLineItem.cs +++ b/src/Stripe.net/Entities/Tax/CalculationLineItems/CalculationLineItem.cs @@ -3,6 +3,9 @@ namespace Stripe.Tax { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CalculationLineItem : StripeEntity, IHasId, IHasObject { @@ -10,12 +13,18 @@ public class CalculationLineItem : StripeEntity, IHasId, IH /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// @@ -25,6 +34,9 @@ public class CalculationLineItem : StripeEntity, IHasId, IH /// calculated on top of this amount. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long Amount { get; set; } /// @@ -32,6 +44,9 @@ public class CalculationLineItem : StripeEntity, IHasId, IH /// href="https://stripe.com/docs/currencies#zero-decimal">smallest currency unit. /// [JsonProperty("amount_tax")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_tax")] +#endif public long AmountTax { get; set; } /// @@ -39,12 +54,18 @@ public class CalculationLineItem : StripeEntity, IHasId, IH /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// /// The ID of an existing Product. /// [JsonProperty("product")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("product")] +#endif public string Product { get; set; } /// @@ -52,12 +73,18 @@ public class CalculationLineItem : StripeEntity, IHasId, IH /// reversed. /// [JsonProperty("quantity")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("quantity")] +#endif public long Quantity { get; set; } /// /// A custom identifier for this line item. /// [JsonProperty("reference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reference")] +#endif public string Reference { get; set; } /// @@ -66,12 +93,18 @@ public class CalculationLineItem : StripeEntity, IHasId, IH /// One of: exclusive, or inclusive. /// [JsonProperty("tax_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_behavior")] +#endif public string TaxBehavior { get; set; } /// /// Detailed account of taxes relevant to this line item. /// [JsonProperty("tax_breakdown")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_breakdown")] +#endif public List TaxBreakdown { get; set; } /// @@ -79,6 +112,9 @@ public class CalculationLineItem : StripeEntity, IHasId, IH /// resource. /// [JsonProperty("tax_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_code")] +#endif public string TaxCode { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/CalculationLineItems/CalculationLineItemTaxBreakdown.cs b/src/Stripe.net/Entities/Tax/CalculationLineItems/CalculationLineItemTaxBreakdown.cs index 8bb41d462c..619f1b65c0 100644 --- a/src/Stripe.net/Entities/Tax/CalculationLineItems/CalculationLineItemTaxBreakdown.cs +++ b/src/Stripe.net/Entities/Tax/CalculationLineItems/CalculationLineItemTaxBreakdown.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CalculationLineItemTaxBreakdown : StripeEntity { @@ -10,9 +13,15 @@ public class CalculationLineItemTaxBreakdown : StripeEntitysmallest currency unit. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long Amount { get; set; } [JsonProperty("jurisdiction")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("jurisdiction")] +#endif public CalculationLineItemTaxBreakdownJurisdiction Jurisdiction { get; set; } /// @@ -21,6 +30,9 @@ public class CalculationLineItemTaxBreakdown : StripeEntitydestination, or origin. /// [JsonProperty("sourcing")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sourcing")] +#endif public string Sourcing { get; set; } /// @@ -28,6 +40,9 @@ public class CalculationLineItemTaxBreakdown : StripeEntity [JsonProperty("tax_rate_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_rate_details")] +#endif public CalculationLineItemTaxBreakdownTaxRateDetails TaxRateDetails { get; set; } /// @@ -40,6 +55,9 @@ public class CalculationLineItemTaxBreakdown : StripeEntitystandard_rated, taxable_basis_reduced, or zero_rated. /// [JsonProperty("taxability_reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("taxability_reason")] +#endif public string TaxabilityReason { get; set; } /// @@ -47,6 +65,9 @@ public class CalculationLineItemTaxBreakdown : StripeEntitysmallest currency unit. /// [JsonProperty("taxable_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("taxable_amount")] +#endif public long TaxableAmount { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/CalculationLineItems/CalculationLineItemTaxBreakdownJurisdiction.cs b/src/Stripe.net/Entities/Tax/CalculationLineItems/CalculationLineItemTaxBreakdownJurisdiction.cs index 6f1acc4312..5a37d666c2 100644 --- a/src/Stripe.net/Entities/Tax/CalculationLineItems/CalculationLineItemTaxBreakdownJurisdiction.cs +++ b/src/Stripe.net/Entities/Tax/CalculationLineItems/CalculationLineItemTaxBreakdownJurisdiction.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CalculationLineItemTaxBreakdownJurisdiction : StripeEntity { @@ -10,12 +13,18 @@ public class CalculationLineItemTaxBreakdownJurisdiction : StripeEntity). /// [JsonProperty("country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country")] +#endif public string Country { get; set; } /// /// A human-readable name for the jurisdiction imposing the tax. /// [JsonProperty("display_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_name")] +#endif public string DisplayName { get; set; } /// @@ -23,6 +32,9 @@ public class CalculationLineItemTaxBreakdownJurisdiction : StripeEntitycity, country, county, district, or state. /// [JsonProperty("level")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("level")] +#endif public string Level { get; set; } /// @@ -30,6 +42,9 @@ public class CalculationLineItemTaxBreakdownJurisdiction : StripeEntity [JsonProperty("state")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("state")] +#endif public string State { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/CalculationLineItems/CalculationLineItemTaxBreakdownTaxRateDetails.cs b/src/Stripe.net/Entities/Tax/CalculationLineItems/CalculationLineItemTaxBreakdownTaxRateDetails.cs index ee45362f22..fbb1a256cf 100644 --- a/src/Stripe.net/Entities/Tax/CalculationLineItems/CalculationLineItemTaxBreakdownTaxRateDetails.cs +++ b/src/Stripe.net/Entities/Tax/CalculationLineItems/CalculationLineItemTaxBreakdownTaxRateDetails.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CalculationLineItemTaxBreakdownTaxRateDetails : StripeEntity { @@ -10,12 +13,18 @@ public class CalculationLineItemTaxBreakdownTaxRateDetails : StripeEntity [JsonProperty("display_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_name")] +#endif public string DisplayName { get; set; } /// /// The tax rate percentage as a string. For example, 8.5% is represented as "8.5". /// [JsonProperty("percentage_decimal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("percentage_decimal")] +#endif public string PercentageDecimal { get; set; } /// @@ -26,6 +35,9 @@ public class CalculationLineItemTaxBreakdownTaxRateDetails : StripeEntityvat. /// [JsonProperty("tax_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_type")] +#endif public string TaxType { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Calculations/Calculation.cs b/src/Stripe.net/Entities/Tax/Calculations/Calculation.cs index 0822b3f3f4..a1cdb4e51a 100644 --- a/src/Stripe.net/Entities/Tax/Calculations/Calculation.cs +++ b/src/Stripe.net/Entities/Tax/Calculations/Calculation.cs @@ -5,6 +5,9 @@ namespace Stripe.Tax using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// A Tax Calculation allows you to calculate the tax to collect from your customer. @@ -18,12 +21,18 @@ public class Calculation : StripeEntity, IHasId, IHasObject /// Unique identifier for the calculation. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// @@ -31,6 +40,9 @@ public class Calculation : StripeEntity, IHasId, IHasObject /// href="https://stripe.com/docs/currencies#zero-decimal">smallest currency unit. /// [JsonProperty("amount_total")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_total")] +#endif public long AmountTotal { get; set; } /// @@ -39,6 +51,9 @@ public class Calculation : StripeEntity, IHasId, IHasObject /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// @@ -46,9 +61,15 @@ public class Calculation : StripeEntity, IHasId, IHasObject /// href="https://stripe.com/docs/api/customers/object">Customer used for the resource. /// [JsonProperty("customer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] +#endif public string Customer { get; set; } [JsonProperty("customer_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_details")] +#endif public CalculationCustomerDetails CustomerDetails { get; set; } /// @@ -56,12 +77,19 @@ public class Calculation : StripeEntity, IHasId, IHasObject /// [JsonProperty("expires_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("expires_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? ExpiresAt { get; set; } /// /// The list of items the customer is purchasing. /// [JsonProperty("line_items")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("line_items")] +#endif public StripeList LineItems { get; set; } /// @@ -69,36 +97,54 @@ public class Calculation : StripeEntity, IHasId, IHasObject /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// /// The details of the ship from location, such as the address. /// [JsonProperty("ship_from_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ship_from_details")] +#endif public CalculationShipFromDetails ShipFromDetails { get; set; } /// /// The shipping cost details for the calculation. /// [JsonProperty("shipping_cost")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping_cost")] +#endif public CalculationShippingCost ShippingCost { get; set; } /// /// The amount of tax to be collected on top of the line item prices. /// [JsonProperty("tax_amount_exclusive")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_amount_exclusive")] +#endif public long TaxAmountExclusive { get; set; } /// /// The amount of tax already included in the line item prices. /// [JsonProperty("tax_amount_inclusive")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_amount_inclusive")] +#endif public long TaxAmountInclusive { get; set; } /// /// Breakdown of individual tax amounts that add up to the total. /// [JsonProperty("tax_breakdown")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_breakdown")] +#endif public List TaxBreakdown { get; set; } /// @@ -107,6 +153,10 @@ public class Calculation : StripeEntity, IHasId, IHasObject /// [JsonProperty("tax_date")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_date")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime TaxDate { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; } } diff --git a/src/Stripe.net/Entities/Tax/Calculations/CalculationCustomerDetails.cs b/src/Stripe.net/Entities/Tax/Calculations/CalculationCustomerDetails.cs index 180f52cff0..cb653f7709 100644 --- a/src/Stripe.net/Entities/Tax/Calculations/CalculationCustomerDetails.cs +++ b/src/Stripe.net/Entities/Tax/Calculations/CalculationCustomerDetails.cs @@ -3,6 +3,9 @@ namespace Stripe.Tax { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CalculationCustomerDetails : StripeEntity { @@ -10,6 +13,9 @@ public class CalculationCustomerDetails : StripeEntity [JsonProperty("address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address")] +#endif public CalculationCustomerDetailsAddress Address { get; set; } /// @@ -17,18 +23,27 @@ public class CalculationCustomerDetails : StripeEntitybilling, or shipping. /// [JsonProperty("address_source")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_source")] +#endif public string AddressSource { get; set; } /// /// The customer's IP address (IPv4 or IPv6). /// [JsonProperty("ip_address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ip_address")] +#endif public string IpAddress { get; set; } /// /// The customer's tax IDs (for example, EU VAT numbers). /// [JsonProperty("tax_ids")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_ids")] +#endif public List TaxIds { get; set; } /// @@ -36,6 +51,9 @@ public class CalculationCustomerDetails : StripeEntitycustomer_exempt, none, or reverse_charge. /// [JsonProperty("taxability_override")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("taxability_override")] +#endif public string TaxabilityOverride { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Calculations/CalculationCustomerDetailsAddress.cs b/src/Stripe.net/Entities/Tax/Calculations/CalculationCustomerDetailsAddress.cs index bbc45886c0..16f7a262de 100644 --- a/src/Stripe.net/Entities/Tax/Calculations/CalculationCustomerDetailsAddress.cs +++ b/src/Stripe.net/Entities/Tax/Calculations/CalculationCustomerDetailsAddress.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CalculationCustomerDetailsAddress : StripeEntity { @@ -9,6 +12,9 @@ public class CalculationCustomerDetailsAddress : StripeEntity [JsonProperty("city")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("city")] +#endif public string City { get; set; } /// @@ -16,24 +22,36 @@ public class CalculationCustomerDetailsAddress : StripeEntity). /// [JsonProperty("country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country")] +#endif public string Country { get; set; } /// /// Address line 1 (e.g., street, PO Box, or company name). /// [JsonProperty("line1")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("line1")] +#endif public string Line1 { get; set; } /// /// Address line 2 (e.g., apartment, suite, unit, or building). /// [JsonProperty("line2")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("line2")] +#endif public string Line2 { get; set; } /// /// ZIP or postal code. /// [JsonProperty("postal_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("postal_code")] +#endif public string PostalCode { get; set; } /// @@ -41,6 +59,9 @@ public class CalculationCustomerDetailsAddress : StripeEntity [JsonProperty("state")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("state")] +#endif public string State { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Calculations/CalculationCustomerDetailsTaxId.cs b/src/Stripe.net/Entities/Tax/Calculations/CalculationCustomerDetailsTaxId.cs index 1141ff6a97..8ea7ab22ad 100644 --- a/src/Stripe.net/Entities/Tax/Calculations/CalculationCustomerDetailsTaxId.cs +++ b/src/Stripe.net/Entities/Tax/Calculations/CalculationCustomerDetailsTaxId.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CalculationCustomerDetailsTaxId : StripeEntity { @@ -42,12 +45,18 @@ public class CalculationCustomerDetailsTaxId : StripeEntityza_vat. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } /// /// The value of the tax ID. /// [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public string Value { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Calculations/CalculationShipFromDetails.cs b/src/Stripe.net/Entities/Tax/Calculations/CalculationShipFromDetails.cs index b83f5e75f4..a1a758fd21 100644 --- a/src/Stripe.net/Entities/Tax/Calculations/CalculationShipFromDetails.cs +++ b/src/Stripe.net/Entities/Tax/Calculations/CalculationShipFromDetails.cs @@ -2,10 +2,16 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CalculationShipFromDetails : StripeEntity { [JsonProperty("address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address")] +#endif public CalculationShipFromDetailsAddress Address { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Calculations/CalculationShipFromDetailsAddress.cs b/src/Stripe.net/Entities/Tax/Calculations/CalculationShipFromDetailsAddress.cs index a8c6271cd6..2641e2bccc 100644 --- a/src/Stripe.net/Entities/Tax/Calculations/CalculationShipFromDetailsAddress.cs +++ b/src/Stripe.net/Entities/Tax/Calculations/CalculationShipFromDetailsAddress.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CalculationShipFromDetailsAddress : StripeEntity { @@ -9,6 +12,9 @@ public class CalculationShipFromDetailsAddress : StripeEntity [JsonProperty("city")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("city")] +#endif public string City { get; set; } /// @@ -16,24 +22,36 @@ public class CalculationShipFromDetailsAddress : StripeEntity). /// [JsonProperty("country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country")] +#endif public string Country { get; set; } /// /// Address line 1 (e.g., street, PO Box, or company name). /// [JsonProperty("line1")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("line1")] +#endif public string Line1 { get; set; } /// /// Address line 2 (e.g., apartment, suite, unit, or building). /// [JsonProperty("line2")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("line2")] +#endif public string Line2 { get; set; } /// /// ZIP or postal code. /// [JsonProperty("postal_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("postal_code")] +#endif public string PostalCode { get; set; } /// @@ -41,6 +59,9 @@ public class CalculationShipFromDetailsAddress : StripeEntity [JsonProperty("state")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("state")] +#endif public string State { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Calculations/CalculationShippingCost.cs b/src/Stripe.net/Entities/Tax/Calculations/CalculationShippingCost.cs index 64cdfb96f0..8f8fd81b53 100644 --- a/src/Stripe.net/Entities/Tax/Calculations/CalculationShippingCost.cs +++ b/src/Stripe.net/Entities/Tax/Calculations/CalculationShippingCost.cs @@ -3,6 +3,9 @@ namespace Stripe.Tax { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CalculationShippingCost : StripeEntity { @@ -13,6 +16,9 @@ public class CalculationShippingCost : StripeEntity /// calculated on top of this amount. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long Amount { get; set; } /// @@ -20,6 +26,9 @@ public class CalculationShippingCost : StripeEntity /// href="https://stripe.com/docs/currencies#zero-decimal">smallest currency unit. /// [JsonProperty("amount_tax")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_tax")] +#endif public long AmountTax { get; set; } /// @@ -27,6 +36,9 @@ public class CalculationShippingCost : StripeEntity /// href="https://stripe.com/docs/api/shipping_rates/object">ShippingRate. /// [JsonProperty("shipping_rate")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping_rate")] +#endif public string ShippingRate { get; set; } /// @@ -35,12 +47,18 @@ public class CalculationShippingCost : StripeEntity /// One of: exclusive, or inclusive. /// [JsonProperty("tax_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_behavior")] +#endif public string TaxBehavior { get; set; } /// /// Detailed account of taxes relevant to shipping cost. /// [JsonProperty("tax_breakdown")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_breakdown")] +#endif public List TaxBreakdown { get; set; } /// @@ -48,6 +66,9 @@ public class CalculationShippingCost : StripeEntity /// shipping. /// [JsonProperty("tax_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_code")] +#endif public string TaxCode { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Calculations/CalculationShippingCostTaxBreakdown.cs b/src/Stripe.net/Entities/Tax/Calculations/CalculationShippingCostTaxBreakdown.cs index ed6541a164..8e970a5641 100644 --- a/src/Stripe.net/Entities/Tax/Calculations/CalculationShippingCostTaxBreakdown.cs +++ b/src/Stripe.net/Entities/Tax/Calculations/CalculationShippingCostTaxBreakdown.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CalculationShippingCostTaxBreakdown : StripeEntity { @@ -10,9 +13,15 @@ public class CalculationShippingCostTaxBreakdown : StripeEntitysmallest currency unit. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long Amount { get; set; } [JsonProperty("jurisdiction")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("jurisdiction")] +#endif public CalculationShippingCostTaxBreakdownJurisdiction Jurisdiction { get; set; } /// @@ -21,6 +30,9 @@ public class CalculationShippingCostTaxBreakdown : StripeEntitydestination, or origin. /// [JsonProperty("sourcing")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sourcing")] +#endif public string Sourcing { get; set; } /// @@ -28,6 +40,9 @@ public class CalculationShippingCostTaxBreakdown : StripeEntity [JsonProperty("tax_rate_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_rate_details")] +#endif public CalculationShippingCostTaxBreakdownTaxRateDetails TaxRateDetails { get; set; } /// @@ -40,6 +55,9 @@ public class CalculationShippingCostTaxBreakdown : StripeEntitystandard_rated, taxable_basis_reduced, or zero_rated. /// [JsonProperty("taxability_reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("taxability_reason")] +#endif public string TaxabilityReason { get; set; } /// @@ -47,6 +65,9 @@ public class CalculationShippingCostTaxBreakdown : StripeEntitysmallest currency unit. /// [JsonProperty("taxable_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("taxable_amount")] +#endif public long TaxableAmount { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Calculations/CalculationShippingCostTaxBreakdownJurisdiction.cs b/src/Stripe.net/Entities/Tax/Calculations/CalculationShippingCostTaxBreakdownJurisdiction.cs index 99a4bbab9c..0a7363bcc6 100644 --- a/src/Stripe.net/Entities/Tax/Calculations/CalculationShippingCostTaxBreakdownJurisdiction.cs +++ b/src/Stripe.net/Entities/Tax/Calculations/CalculationShippingCostTaxBreakdownJurisdiction.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CalculationShippingCostTaxBreakdownJurisdiction : StripeEntity { @@ -10,12 +13,18 @@ public class CalculationShippingCostTaxBreakdownJurisdiction : StripeEntity). /// [JsonProperty("country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country")] +#endif public string Country { get; set; } /// /// A human-readable name for the jurisdiction imposing the tax. /// [JsonProperty("display_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_name")] +#endif public string DisplayName { get; set; } /// @@ -23,6 +32,9 @@ public class CalculationShippingCostTaxBreakdownJurisdiction : StripeEntitycity, country, county, district, or state. /// [JsonProperty("level")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("level")] +#endif public string Level { get; set; } /// @@ -30,6 +42,9 @@ public class CalculationShippingCostTaxBreakdownJurisdiction : StripeEntity [JsonProperty("state")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("state")] +#endif public string State { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Calculations/CalculationShippingCostTaxBreakdownTaxRateDetails.cs b/src/Stripe.net/Entities/Tax/Calculations/CalculationShippingCostTaxBreakdownTaxRateDetails.cs index 81343738cf..d769b181f8 100644 --- a/src/Stripe.net/Entities/Tax/Calculations/CalculationShippingCostTaxBreakdownTaxRateDetails.cs +++ b/src/Stripe.net/Entities/Tax/Calculations/CalculationShippingCostTaxBreakdownTaxRateDetails.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CalculationShippingCostTaxBreakdownTaxRateDetails : StripeEntity { @@ -10,12 +13,18 @@ public class CalculationShippingCostTaxBreakdownTaxRateDetails : StripeEntity [JsonProperty("display_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_name")] +#endif public string DisplayName { get; set; } /// /// The tax rate percentage as a string. For example, 8.5% is represented as "8.5". /// [JsonProperty("percentage_decimal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("percentage_decimal")] +#endif public string PercentageDecimal { get; set; } /// @@ -26,6 +35,9 @@ public class CalculationShippingCostTaxBreakdownTaxRateDetails : StripeEntityvat. /// [JsonProperty("tax_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_type")] +#endif public string TaxType { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Calculations/CalculationTaxBreakdown.cs b/src/Stripe.net/Entities/Tax/Calculations/CalculationTaxBreakdown.cs index cf829c0e17..08f234798b 100644 --- a/src/Stripe.net/Entities/Tax/Calculations/CalculationTaxBreakdown.cs +++ b/src/Stripe.net/Entities/Tax/Calculations/CalculationTaxBreakdown.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CalculationTaxBreakdown : StripeEntity { @@ -10,15 +13,24 @@ public class CalculationTaxBreakdown : StripeEntity /// href="https://stripe.com/docs/currencies#zero-decimal">smallest currency unit. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long Amount { get; set; } /// /// Specifies whether the tax amount is included in the line item amount. /// [JsonProperty("inclusive")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("inclusive")] +#endif public bool Inclusive { get; set; } [JsonProperty("tax_rate_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_rate_details")] +#endif public CalculationTaxBreakdownTaxRateDetails TaxRateDetails { get; set; } /// @@ -31,6 +43,9 @@ public class CalculationTaxBreakdown : StripeEntity /// standard_rated, taxable_basis_reduced, or zero_rated. /// [JsonProperty("taxability_reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("taxability_reason")] +#endif public string TaxabilityReason { get; set; } /// @@ -38,6 +53,9 @@ public class CalculationTaxBreakdown : StripeEntity /// href="https://stripe.com/docs/currencies#zero-decimal">smallest currency unit. /// [JsonProperty("taxable_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("taxable_amount")] +#endif public long TaxableAmount { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Calculations/CalculationTaxBreakdownTaxRateDetails.cs b/src/Stripe.net/Entities/Tax/Calculations/CalculationTaxBreakdownTaxRateDetails.cs index 292c4215ac..7435f93864 100644 --- a/src/Stripe.net/Entities/Tax/Calculations/CalculationTaxBreakdownTaxRateDetails.cs +++ b/src/Stripe.net/Entities/Tax/Calculations/CalculationTaxBreakdownTaxRateDetails.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CalculationTaxBreakdownTaxRateDetails : StripeEntity { @@ -10,6 +13,9 @@ public class CalculationTaxBreakdownTaxRateDetails : StripeEntity). /// [JsonProperty("country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country")] +#endif public string Country { get; set; } /// @@ -19,12 +25,18 @@ public class CalculationTaxBreakdownTaxRateDetails : StripeEntity [JsonProperty("flat_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("flat_amount")] +#endif public CalculationTaxBreakdownTaxRateDetailsFlatAmount FlatAmount { get; set; } /// /// The tax rate percentage as a string. For example, 8.5% is represented as "8.5". /// [JsonProperty("percentage_decimal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("percentage_decimal")] +#endif public string PercentageDecimal { get; set; } /// @@ -33,12 +45,18 @@ public class CalculationTaxBreakdownTaxRateDetails : StripeEntityflat_amount, or percentage. /// [JsonProperty("rate_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("rate_type")] +#endif public string RateType { get; set; } /// /// State, county, province, or region. /// [JsonProperty("state")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("state")] +#endif public string State { get; set; } /// @@ -49,6 +67,9 @@ public class CalculationTaxBreakdownTaxRateDetails : StripeEntityvat. /// [JsonProperty("tax_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_type")] +#endif public string TaxType { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Calculations/CalculationTaxBreakdownTaxRateDetailsFlatAmount.cs b/src/Stripe.net/Entities/Tax/Calculations/CalculationTaxBreakdownTaxRateDetailsFlatAmount.cs index e4371cf655..3647732735 100644 --- a/src/Stripe.net/Entities/Tax/Calculations/CalculationTaxBreakdownTaxRateDetailsFlatAmount.cs +++ b/src/Stripe.net/Entities/Tax/Calculations/CalculationTaxBreakdownTaxRateDetailsFlatAmount.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CalculationTaxBreakdownTaxRateDetailsFlatAmount : StripeEntity { @@ -12,12 +15,18 @@ public class CalculationTaxBreakdownTaxRateDetailsFlatAmount : StripeEntity [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long Amount { get; set; } /// /// Three-letter ISO currency code, in lowercase. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/Registration.cs b/src/Stripe.net/Entities/Tax/Registrations/Registration.cs index d40e96199e..5d1ff601d5 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/Registration.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/Registration.cs @@ -4,6 +4,9 @@ namespace Stripe.Tax using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// A Tax Registration lets us know that your business is registered to collect tax @@ -23,12 +26,18 @@ public class Registration : StripeEntity, IHasId, IHasObject /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// @@ -36,6 +45,10 @@ public class Registration : StripeEntity, IHasId, IHasObject /// [JsonProperty("active_from")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("active_from")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime ActiveFrom { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -43,9 +56,15 @@ public class Registration : StripeEntity, IHasId, IHasObject /// 3166-1 alpha-2). /// [JsonProperty("country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country")] +#endif public string Country { get; set; } [JsonProperty("country_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country_options")] +#endif public RegistrationCountryOptions CountryOptions { get; set; } /// @@ -53,6 +72,10 @@ public class Registration : StripeEntity, IHasId, IHasObject /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -61,6 +84,10 @@ public class Registration : StripeEntity, IHasId, IHasObject /// [JsonProperty("expires_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("expires_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? ExpiresAt { get; set; } /// @@ -68,6 +95,9 @@ public class Registration : StripeEntity, IHasId, IHasObject /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// @@ -76,6 +106,9 @@ public class Registration : StripeEntity, IHasId, IHasObject /// One of: active, expired, or scheduled. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptions.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptions.cs index 0f18f88995..67f6ce1199 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptions.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptions.cs @@ -2,202 +2,400 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptions : StripeEntity { [JsonProperty("ae")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ae")] +#endif public RegistrationCountryOptionsAe Ae { get; set; } [JsonProperty("at")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("at")] +#endif public RegistrationCountryOptionsAt At { get; set; } [JsonProperty("au")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("au")] +#endif public RegistrationCountryOptionsAu Au { get; set; } [JsonProperty("be")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("be")] +#endif public RegistrationCountryOptionsBe Be { get; set; } [JsonProperty("bg")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bg")] +#endif public RegistrationCountryOptionsBg Bg { get; set; } [JsonProperty("bh")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bh")] +#endif public RegistrationCountryOptionsBh Bh { get; set; } [JsonProperty("by")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("by")] +#endif public RegistrationCountryOptionsBy By { get; set; } [JsonProperty("ca")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ca")] +#endif public RegistrationCountryOptionsCa Ca { get; set; } [JsonProperty("ch")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ch")] +#endif public RegistrationCountryOptionsCh Ch { get; set; } [JsonProperty("cl")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cl")] +#endif public RegistrationCountryOptionsCl Cl { get; set; } [JsonProperty("co")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("co")] +#endif public RegistrationCountryOptionsCo Co { get; set; } [JsonProperty("cr")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cr")] +#endif public RegistrationCountryOptionsCr Cr { get; set; } [JsonProperty("cy")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cy")] +#endif public RegistrationCountryOptionsCy Cy { get; set; } [JsonProperty("cz")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cz")] +#endif public RegistrationCountryOptionsCz Cz { get; set; } [JsonProperty("de")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("de")] +#endif public RegistrationCountryOptionsDe De { get; set; } [JsonProperty("dk")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("dk")] +#endif public RegistrationCountryOptionsDk Dk { get; set; } [JsonProperty("ec")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ec")] +#endif public RegistrationCountryOptionsEc Ec { get; set; } [JsonProperty("ee")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ee")] +#endif public RegistrationCountryOptionsEe Ee { get; set; } [JsonProperty("eg")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("eg")] +#endif public RegistrationCountryOptionsEg Eg { get; set; } [JsonProperty("es")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("es")] +#endif public RegistrationCountryOptionsEs Es { get; set; } [JsonProperty("fi")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fi")] +#endif public RegistrationCountryOptionsFi Fi { get; set; } [JsonProperty("fr")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fr")] +#endif public RegistrationCountryOptionsFr Fr { get; set; } [JsonProperty("gb")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("gb")] +#endif public RegistrationCountryOptionsGb Gb { get; set; } [JsonProperty("ge")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ge")] +#endif public RegistrationCountryOptionsGe Ge { get; set; } [JsonProperty("gr")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("gr")] +#endif public RegistrationCountryOptionsGr Gr { get; set; } [JsonProperty("hr")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("hr")] +#endif public RegistrationCountryOptionsHr Hr { get; set; } [JsonProperty("hu")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("hu")] +#endif public RegistrationCountryOptionsHu Hu { get; set; } [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public RegistrationCountryOptionsId Id { get; set; } [JsonProperty("ie")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ie")] +#endif public RegistrationCountryOptionsIe Ie { get; set; } [JsonProperty("is")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("is")] +#endif public RegistrationCountryOptionsIs Is { get; set; } [JsonProperty("it")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("it")] +#endif public RegistrationCountryOptionsIt It { get; set; } [JsonProperty("jp")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("jp")] +#endif public RegistrationCountryOptionsJp Jp { get; set; } [JsonProperty("ke")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ke")] +#endif public RegistrationCountryOptionsKe Ke { get; set; } [JsonProperty("kr")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("kr")] +#endif public RegistrationCountryOptionsKr Kr { get; set; } [JsonProperty("kz")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("kz")] +#endif public RegistrationCountryOptionsKz Kz { get; set; } [JsonProperty("lt")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("lt")] +#endif public RegistrationCountryOptionsLt Lt { get; set; } [JsonProperty("lu")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("lu")] +#endif public RegistrationCountryOptionsLu Lu { get; set; } [JsonProperty("lv")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("lv")] +#endif public RegistrationCountryOptionsLv Lv { get; set; } [JsonProperty("ma")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ma")] +#endif public RegistrationCountryOptionsMa Ma { get; set; } [JsonProperty("md")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("md")] +#endif public RegistrationCountryOptionsMd Md { get; set; } [JsonProperty("mt")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mt")] +#endif public RegistrationCountryOptionsMt Mt { get; set; } [JsonProperty("mx")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mx")] +#endif public RegistrationCountryOptionsMx Mx { get; set; } [JsonProperty("my")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("my")] +#endif public RegistrationCountryOptionsMy My { get; set; } [JsonProperty("ng")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ng")] +#endif public RegistrationCountryOptionsNg Ng { get; set; } [JsonProperty("nl")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("nl")] +#endif public RegistrationCountryOptionsNl Nl { get; set; } [JsonProperty("no")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("no")] +#endif public RegistrationCountryOptionsNo No { get; set; } [JsonProperty("nz")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("nz")] +#endif public RegistrationCountryOptionsNz Nz { get; set; } [JsonProperty("om")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("om")] +#endif public RegistrationCountryOptionsOm Om { get; set; } [JsonProperty("pl")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("pl")] +#endif public RegistrationCountryOptionsPl Pl { get; set; } [JsonProperty("pt")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("pt")] +#endif public RegistrationCountryOptionsPt Pt { get; set; } [JsonProperty("ro")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ro")] +#endif public RegistrationCountryOptionsRo Ro { get; set; } [JsonProperty("rs")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("rs")] +#endif public RegistrationCountryOptionsRs Rs { get; set; } [JsonProperty("ru")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ru")] +#endif public RegistrationCountryOptionsRu Ru { get; set; } [JsonProperty("sa")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sa")] +#endif public RegistrationCountryOptionsSa Sa { get; set; } [JsonProperty("se")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("se")] +#endif public RegistrationCountryOptionsSe Se { get; set; } [JsonProperty("sg")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sg")] +#endif public RegistrationCountryOptionsSg Sg { get; set; } [JsonProperty("si")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("si")] +#endif public RegistrationCountryOptionsSi Si { get; set; } [JsonProperty("sk")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sk")] +#endif public RegistrationCountryOptionsSk Sk { get; set; } [JsonProperty("th")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("th")] +#endif public RegistrationCountryOptionsTh Th { get; set; } [JsonProperty("tr")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tr")] +#endif public RegistrationCountryOptionsTr Tr { get; set; } [JsonProperty("tz")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tz")] +#endif public RegistrationCountryOptionsTz Tz { get; set; } [JsonProperty("us")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("us")] +#endif public RegistrationCountryOptionsUs Us { get; set; } [JsonProperty("uz")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("uz")] +#endif public RegistrationCountryOptionsUz Uz { get; set; } [JsonProperty("vn")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("vn")] +#endif public RegistrationCountryOptionsVn Vn { get; set; } [JsonProperty("za")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("za")] +#endif public RegistrationCountryOptionsZa Za { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsAe.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsAe.cs index c4dc706a91..5d053a73d9 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsAe.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsAe.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsAe : StripeEntity { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsAe : StripeEntitycountry. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsAt.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsAt.cs index 1ef24eb274..2b70f745b5 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsAt.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsAt.cs @@ -2,10 +2,16 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsAt : StripeEntity { [JsonProperty("standard")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("standard")] +#endif public RegistrationCountryOptionsAtStandard Standard { get; set; } /// @@ -13,6 +19,9 @@ public class RegistrationCountryOptionsAt : StripeEntityioss, oss_non_union, oss_union, or standard. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsAtStandard.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsAtStandard.cs index 7860c39af5..924351661d 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsAtStandard.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsAtStandard.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsAtStandard : StripeEntity { @@ -10,6 +13,9 @@ public class RegistrationCountryOptionsAtStandard : StripeEntitysmall_seller, or standard. /// [JsonProperty("place_of_supply_scheme")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("place_of_supply_scheme")] +#endif public string PlaceOfSupplyScheme { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsAu.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsAu.cs index 75cb0df4af..f8b3692dc9 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsAu.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsAu.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsAu : StripeEntity { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsAu : StripeEntitycountry. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsBe.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsBe.cs index 8d0e2a0f74..529b74185f 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsBe.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsBe.cs @@ -2,10 +2,16 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsBe : StripeEntity { [JsonProperty("standard")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("standard")] +#endif public RegistrationCountryOptionsBeStandard Standard { get; set; } /// @@ -13,6 +19,9 @@ public class RegistrationCountryOptionsBe : StripeEntityioss, oss_non_union, oss_union, or standard. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsBeStandard.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsBeStandard.cs index 88c8df80ac..fb8225cd1a 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsBeStandard.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsBeStandard.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsBeStandard : StripeEntity { @@ -10,6 +13,9 @@ public class RegistrationCountryOptionsBeStandard : StripeEntitysmall_seller, or standard. /// [JsonProperty("place_of_supply_scheme")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("place_of_supply_scheme")] +#endif public string PlaceOfSupplyScheme { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsBg.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsBg.cs index 01ba4f2517..87f2ba127a 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsBg.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsBg.cs @@ -2,10 +2,16 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsBg : StripeEntity { [JsonProperty("standard")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("standard")] +#endif public RegistrationCountryOptionsBgStandard Standard { get; set; } /// @@ -13,6 +19,9 @@ public class RegistrationCountryOptionsBg : StripeEntityioss, oss_non_union, oss_union, or standard. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsBgStandard.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsBgStandard.cs index 5d215e98c4..33bf643bae 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsBgStandard.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsBgStandard.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsBgStandard : StripeEntity { @@ -10,6 +13,9 @@ public class RegistrationCountryOptionsBgStandard : StripeEntitysmall_seller, or standard. /// [JsonProperty("place_of_supply_scheme")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("place_of_supply_scheme")] +#endif public string PlaceOfSupplyScheme { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsBh.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsBh.cs index 4c60e2caa4..826588ab54 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsBh.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsBh.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsBh : StripeEntity { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsBh : StripeEntitycountry. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsBy.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsBy.cs index 124eb6dc66..770f2bb88d 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsBy.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsBy.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsBy : StripeEntity { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsBy : StripeEntitycountry. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsCa.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsCa.cs index 51e8caaa89..871e97f45c 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsCa.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsCa.cs @@ -2,10 +2,16 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsCa : StripeEntity { [JsonProperty("province_standard")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("province_standard")] +#endif public RegistrationCountryOptionsCaProvinceStandard ProvinceStandard { get; set; } /// @@ -13,6 +19,9 @@ public class RegistrationCountryOptionsCa : StripeEntityprovince_standard, simplified, or standard. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsCaProvinceStandard.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsCaProvinceStandard.cs index 901ae7c211..a576f90f45 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsCaProvinceStandard.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsCaProvinceStandard.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsCaProvinceStandard : StripeEntity { @@ -10,6 +13,9 @@ public class RegistrationCountryOptionsCaProvinceStandard : StripeEntity). /// [JsonProperty("province")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("province")] +#endif public string Province { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsCh.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsCh.cs index e9212dc8b1..4d21b47678 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsCh.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsCh.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsCh : StripeEntity { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsCh : StripeEntitycountry. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsCl.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsCl.cs index e0c50f3b66..f356e098fa 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsCl.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsCl.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsCl : StripeEntity { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsCl : StripeEntitycountry. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsCo.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsCo.cs index 140dd1163b..28d6053cef 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsCo.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsCo.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsCo : StripeEntity { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsCo : StripeEntitycountry. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsCr.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsCr.cs index eb3f4cbfad..40da230c6d 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsCr.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsCr.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsCr : StripeEntity { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsCr : StripeEntitycountry. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsCy.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsCy.cs index 4044369c4c..f6442f4288 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsCy.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsCy.cs @@ -2,10 +2,16 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsCy : StripeEntity { [JsonProperty("standard")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("standard")] +#endif public RegistrationCountryOptionsCyStandard Standard { get; set; } /// @@ -13,6 +19,9 @@ public class RegistrationCountryOptionsCy : StripeEntityioss, oss_non_union, oss_union, or standard. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsCyStandard.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsCyStandard.cs index cc770fffb7..b93c0b21d6 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsCyStandard.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsCyStandard.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsCyStandard : StripeEntity { @@ -10,6 +13,9 @@ public class RegistrationCountryOptionsCyStandard : StripeEntitysmall_seller, or standard. /// [JsonProperty("place_of_supply_scheme")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("place_of_supply_scheme")] +#endif public string PlaceOfSupplyScheme { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsCz.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsCz.cs index 56ec9cc154..87a2066394 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsCz.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsCz.cs @@ -2,10 +2,16 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsCz : StripeEntity { [JsonProperty("standard")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("standard")] +#endif public RegistrationCountryOptionsCzStandard Standard { get; set; } /// @@ -13,6 +19,9 @@ public class RegistrationCountryOptionsCz : StripeEntityioss, oss_non_union, oss_union, or standard. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsCzStandard.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsCzStandard.cs index 205ff25bbf..8007a5329c 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsCzStandard.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsCzStandard.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsCzStandard : StripeEntity { @@ -10,6 +13,9 @@ public class RegistrationCountryOptionsCzStandard : StripeEntitysmall_seller, or standard. /// [JsonProperty("place_of_supply_scheme")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("place_of_supply_scheme")] +#endif public string PlaceOfSupplyScheme { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsDe.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsDe.cs index ecb08d0903..ee18b6fa82 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsDe.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsDe.cs @@ -2,10 +2,16 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsDe : StripeEntity { [JsonProperty("standard")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("standard")] +#endif public RegistrationCountryOptionsDeStandard Standard { get; set; } /// @@ -13,6 +19,9 @@ public class RegistrationCountryOptionsDe : StripeEntityioss, oss_non_union, oss_union, or standard. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsDeStandard.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsDeStandard.cs index 166f269c97..eda1c62405 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsDeStandard.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsDeStandard.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsDeStandard : StripeEntity { @@ -10,6 +13,9 @@ public class RegistrationCountryOptionsDeStandard : StripeEntitysmall_seller, or standard. /// [JsonProperty("place_of_supply_scheme")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("place_of_supply_scheme")] +#endif public string PlaceOfSupplyScheme { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsDk.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsDk.cs index 15868a1c42..5860e20dd8 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsDk.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsDk.cs @@ -2,10 +2,16 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsDk : StripeEntity { [JsonProperty("standard")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("standard")] +#endif public RegistrationCountryOptionsDkStandard Standard { get; set; } /// @@ -13,6 +19,9 @@ public class RegistrationCountryOptionsDk : StripeEntityioss, oss_non_union, oss_union, or standard. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsDkStandard.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsDkStandard.cs index 3601728221..fa1472d9a5 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsDkStandard.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsDkStandard.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsDkStandard : StripeEntity { @@ -10,6 +13,9 @@ public class RegistrationCountryOptionsDkStandard : StripeEntitysmall_seller, or standard. /// [JsonProperty("place_of_supply_scheme")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("place_of_supply_scheme")] +#endif public string PlaceOfSupplyScheme { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsEc.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsEc.cs index e9c5fd0ee2..a368de99e5 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsEc.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsEc.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsEc : StripeEntity { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsEc : StripeEntitycountry. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsEe.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsEe.cs index 610d781e48..ce6c920859 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsEe.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsEe.cs @@ -2,10 +2,16 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsEe : StripeEntity { [JsonProperty("standard")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("standard")] +#endif public RegistrationCountryOptionsEeStandard Standard { get; set; } /// @@ -13,6 +19,9 @@ public class RegistrationCountryOptionsEe : StripeEntityioss, oss_non_union, oss_union, or standard. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsEeStandard.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsEeStandard.cs index 60313a61ca..8a5daee3d9 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsEeStandard.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsEeStandard.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsEeStandard : StripeEntity { @@ -10,6 +13,9 @@ public class RegistrationCountryOptionsEeStandard : StripeEntitysmall_seller, or standard. /// [JsonProperty("place_of_supply_scheme")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("place_of_supply_scheme")] +#endif public string PlaceOfSupplyScheme { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsEg.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsEg.cs index 7bd23cf302..9c830d5679 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsEg.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsEg.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsEg : StripeEntity { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsEg : StripeEntitycountry. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsEs.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsEs.cs index 056539776d..412a0aa42a 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsEs.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsEs.cs @@ -2,10 +2,16 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsEs : StripeEntity { [JsonProperty("standard")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("standard")] +#endif public RegistrationCountryOptionsEsStandard Standard { get; set; } /// @@ -13,6 +19,9 @@ public class RegistrationCountryOptionsEs : StripeEntityioss, oss_non_union, oss_union, or standard. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsEsStandard.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsEsStandard.cs index b1d3095365..b216ee7ac6 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsEsStandard.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsEsStandard.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsEsStandard : StripeEntity { @@ -10,6 +13,9 @@ public class RegistrationCountryOptionsEsStandard : StripeEntitysmall_seller, or standard. /// [JsonProperty("place_of_supply_scheme")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("place_of_supply_scheme")] +#endif public string PlaceOfSupplyScheme { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsFi.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsFi.cs index 6308b281d3..44d4e072ed 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsFi.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsFi.cs @@ -2,10 +2,16 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsFi : StripeEntity { [JsonProperty("standard")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("standard")] +#endif public RegistrationCountryOptionsFiStandard Standard { get; set; } /// @@ -13,6 +19,9 @@ public class RegistrationCountryOptionsFi : StripeEntityioss, oss_non_union, oss_union, or standard. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsFiStandard.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsFiStandard.cs index f9325ccee9..5f34b88f92 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsFiStandard.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsFiStandard.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsFiStandard : StripeEntity { @@ -10,6 +13,9 @@ public class RegistrationCountryOptionsFiStandard : StripeEntitysmall_seller, or standard. /// [JsonProperty("place_of_supply_scheme")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("place_of_supply_scheme")] +#endif public string PlaceOfSupplyScheme { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsFr.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsFr.cs index 288f6b0511..4ccf4bbff4 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsFr.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsFr.cs @@ -2,10 +2,16 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsFr : StripeEntity { [JsonProperty("standard")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("standard")] +#endif public RegistrationCountryOptionsFrStandard Standard { get; set; } /// @@ -13,6 +19,9 @@ public class RegistrationCountryOptionsFr : StripeEntityioss, oss_non_union, oss_union, or standard. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsFrStandard.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsFrStandard.cs index 84a95f484c..dbca781bca 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsFrStandard.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsFrStandard.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsFrStandard : StripeEntity { @@ -10,6 +13,9 @@ public class RegistrationCountryOptionsFrStandard : StripeEntitysmall_seller, or standard. /// [JsonProperty("place_of_supply_scheme")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("place_of_supply_scheme")] +#endif public string PlaceOfSupplyScheme { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsGb.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsGb.cs index 5ad7d7a0ec..bb40dfe512 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsGb.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsGb.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsGb : StripeEntity { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsGb : StripeEntitycountry. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsGe.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsGe.cs index 13d70b88ef..b2cf01d054 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsGe.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsGe.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsGe : StripeEntity { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsGe : StripeEntitycountry. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsGr.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsGr.cs index 1a048ec4a6..fd80cd58b4 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsGr.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsGr.cs @@ -2,10 +2,16 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsGr : StripeEntity { [JsonProperty("standard")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("standard")] +#endif public RegistrationCountryOptionsGrStandard Standard { get; set; } /// @@ -13,6 +19,9 @@ public class RegistrationCountryOptionsGr : StripeEntityioss, oss_non_union, oss_union, or standard. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsGrStandard.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsGrStandard.cs index 5e73ea475d..66cc72d529 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsGrStandard.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsGrStandard.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsGrStandard : StripeEntity { @@ -10,6 +13,9 @@ public class RegistrationCountryOptionsGrStandard : StripeEntitysmall_seller, or standard. /// [JsonProperty("place_of_supply_scheme")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("place_of_supply_scheme")] +#endif public string PlaceOfSupplyScheme { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsHr.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsHr.cs index e0538cf0c7..835d417a83 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsHr.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsHr.cs @@ -2,10 +2,16 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsHr : StripeEntity { [JsonProperty("standard")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("standard")] +#endif public RegistrationCountryOptionsHrStandard Standard { get; set; } /// @@ -13,6 +19,9 @@ public class RegistrationCountryOptionsHr : StripeEntityioss, oss_non_union, oss_union, or standard. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsHrStandard.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsHrStandard.cs index 5beac81655..50ac14626e 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsHrStandard.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsHrStandard.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsHrStandard : StripeEntity { @@ -10,6 +13,9 @@ public class RegistrationCountryOptionsHrStandard : StripeEntitysmall_seller, or standard. /// [JsonProperty("place_of_supply_scheme")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("place_of_supply_scheme")] +#endif public string PlaceOfSupplyScheme { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsHu.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsHu.cs index fa5872e54a..da7f973aff 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsHu.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsHu.cs @@ -2,10 +2,16 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsHu : StripeEntity { [JsonProperty("standard")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("standard")] +#endif public RegistrationCountryOptionsHuStandard Standard { get; set; } /// @@ -13,6 +19,9 @@ public class RegistrationCountryOptionsHu : StripeEntityioss, oss_non_union, oss_union, or standard. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsHuStandard.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsHuStandard.cs index 2c8e0a16dd..e381787bd3 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsHuStandard.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsHuStandard.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsHuStandard : StripeEntity { @@ -10,6 +13,9 @@ public class RegistrationCountryOptionsHuStandard : StripeEntitysmall_seller, or standard. /// [JsonProperty("place_of_supply_scheme")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("place_of_supply_scheme")] +#endif public string PlaceOfSupplyScheme { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsId.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsId.cs index 3be13978ae..e9bc9ea7be 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsId.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsId.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsId : StripeEntity { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsId : StripeEntitycountry. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsIe.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsIe.cs index 22b02dd7dc..ec6b6e242c 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsIe.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsIe.cs @@ -2,10 +2,16 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsIe : StripeEntity { [JsonProperty("standard")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("standard")] +#endif public RegistrationCountryOptionsIeStandard Standard { get; set; } /// @@ -13,6 +19,9 @@ public class RegistrationCountryOptionsIe : StripeEntityioss, oss_non_union, oss_union, or standard. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsIeStandard.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsIeStandard.cs index a08d7ef5b2..3476e8d3f6 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsIeStandard.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsIeStandard.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsIeStandard : StripeEntity { @@ -10,6 +13,9 @@ public class RegistrationCountryOptionsIeStandard : StripeEntitysmall_seller, or standard. /// [JsonProperty("place_of_supply_scheme")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("place_of_supply_scheme")] +#endif public string PlaceOfSupplyScheme { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsIs.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsIs.cs index 0455838bf4..9d61973296 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsIs.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsIs.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsIs : StripeEntity { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsIs : StripeEntitycountry. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsIt.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsIt.cs index dc554219a3..6dd2621ece 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsIt.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsIt.cs @@ -2,10 +2,16 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsIt : StripeEntity { [JsonProperty("standard")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("standard")] +#endif public RegistrationCountryOptionsItStandard Standard { get; set; } /// @@ -13,6 +19,9 @@ public class RegistrationCountryOptionsIt : StripeEntityioss, oss_non_union, oss_union, or standard. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsItStandard.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsItStandard.cs index b8e0b94c27..54ddb4753e 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsItStandard.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsItStandard.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsItStandard : StripeEntity { @@ -10,6 +13,9 @@ public class RegistrationCountryOptionsItStandard : StripeEntitysmall_seller, or standard. /// [JsonProperty("place_of_supply_scheme")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("place_of_supply_scheme")] +#endif public string PlaceOfSupplyScheme { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsJp.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsJp.cs index ddb7dd6608..8a200aa53c 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsJp.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsJp.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsJp : StripeEntity { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsJp : StripeEntitycountry. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsKe.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsKe.cs index d7bc16b949..dc1409e7b3 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsKe.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsKe.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsKe : StripeEntity { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsKe : StripeEntitycountry. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsKr.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsKr.cs index 214c3011c2..f3fb66af39 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsKr.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsKr.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsKr : StripeEntity { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsKr : StripeEntitycountry. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsKz.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsKz.cs index 97ae390df8..09cf6f2d34 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsKz.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsKz.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsKz : StripeEntity { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsKz : StripeEntitycountry. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsLt.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsLt.cs index 271c218f5e..bad1b0afb3 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsLt.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsLt.cs @@ -2,10 +2,16 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsLt : StripeEntity { [JsonProperty("standard")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("standard")] +#endif public RegistrationCountryOptionsLtStandard Standard { get; set; } /// @@ -13,6 +19,9 @@ public class RegistrationCountryOptionsLt : StripeEntityioss, oss_non_union, oss_union, or standard. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsLtStandard.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsLtStandard.cs index 1ad365524a..ccfbee2f12 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsLtStandard.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsLtStandard.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsLtStandard : StripeEntity { @@ -10,6 +13,9 @@ public class RegistrationCountryOptionsLtStandard : StripeEntitysmall_seller, or standard. /// [JsonProperty("place_of_supply_scheme")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("place_of_supply_scheme")] +#endif public string PlaceOfSupplyScheme { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsLu.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsLu.cs index 0660e5a5f8..313e1db644 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsLu.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsLu.cs @@ -2,10 +2,16 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsLu : StripeEntity { [JsonProperty("standard")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("standard")] +#endif public RegistrationCountryOptionsLuStandard Standard { get; set; } /// @@ -13,6 +19,9 @@ public class RegistrationCountryOptionsLu : StripeEntityioss, oss_non_union, oss_union, or standard. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsLuStandard.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsLuStandard.cs index b290342b51..6481729f62 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsLuStandard.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsLuStandard.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsLuStandard : StripeEntity { @@ -10,6 +13,9 @@ public class RegistrationCountryOptionsLuStandard : StripeEntitysmall_seller, or standard. /// [JsonProperty("place_of_supply_scheme")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("place_of_supply_scheme")] +#endif public string PlaceOfSupplyScheme { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsLv.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsLv.cs index 5220f355bd..73e54eb796 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsLv.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsLv.cs @@ -2,10 +2,16 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsLv : StripeEntity { [JsonProperty("standard")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("standard")] +#endif public RegistrationCountryOptionsLvStandard Standard { get; set; } /// @@ -13,6 +19,9 @@ public class RegistrationCountryOptionsLv : StripeEntityioss, oss_non_union, oss_union, or standard. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsLvStandard.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsLvStandard.cs index 68d1c56db4..2d8a9c7743 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsLvStandard.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsLvStandard.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsLvStandard : StripeEntity { @@ -10,6 +13,9 @@ public class RegistrationCountryOptionsLvStandard : StripeEntitysmall_seller, or standard. /// [JsonProperty("place_of_supply_scheme")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("place_of_supply_scheme")] +#endif public string PlaceOfSupplyScheme { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsMa.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsMa.cs index 5569450858..86d5207c8f 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsMa.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsMa.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsMa : StripeEntity { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsMa : StripeEntitycountry. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsMd.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsMd.cs index 92eba4e646..0e9558ea07 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsMd.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsMd.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsMd : StripeEntity { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsMd : StripeEntitycountry. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsMt.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsMt.cs index f40eed2de6..b874ba39ef 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsMt.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsMt.cs @@ -2,10 +2,16 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsMt : StripeEntity { [JsonProperty("standard")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("standard")] +#endif public RegistrationCountryOptionsMtStandard Standard { get; set; } /// @@ -13,6 +19,9 @@ public class RegistrationCountryOptionsMt : StripeEntityioss, oss_non_union, oss_union, or standard. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsMtStandard.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsMtStandard.cs index 236b8b9636..1e9eab61cd 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsMtStandard.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsMtStandard.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsMtStandard : StripeEntity { @@ -10,6 +13,9 @@ public class RegistrationCountryOptionsMtStandard : StripeEntitysmall_seller, or standard. /// [JsonProperty("place_of_supply_scheme")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("place_of_supply_scheme")] +#endif public string PlaceOfSupplyScheme { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsMx.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsMx.cs index 5782720e76..2ced991fbe 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsMx.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsMx.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsMx : StripeEntity { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsMx : StripeEntitycountry. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsMy.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsMy.cs index b952e9c3aa..5a66454ec8 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsMy.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsMy.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsMy : StripeEntity { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsMy : StripeEntitycountry. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsNg.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsNg.cs index 01a788ab64..d63eae14d1 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsNg.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsNg.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsNg : StripeEntity { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsNg : StripeEntitycountry. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsNl.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsNl.cs index 92889414ee..f7fa4e3297 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsNl.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsNl.cs @@ -2,10 +2,16 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsNl : StripeEntity { [JsonProperty("standard")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("standard")] +#endif public RegistrationCountryOptionsNlStandard Standard { get; set; } /// @@ -13,6 +19,9 @@ public class RegistrationCountryOptionsNl : StripeEntityioss, oss_non_union, oss_union, or standard. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsNlStandard.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsNlStandard.cs index ea7be8c97a..78077815ad 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsNlStandard.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsNlStandard.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsNlStandard : StripeEntity { @@ -10,6 +13,9 @@ public class RegistrationCountryOptionsNlStandard : StripeEntitysmall_seller, or standard. /// [JsonProperty("place_of_supply_scheme")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("place_of_supply_scheme")] +#endif public string PlaceOfSupplyScheme { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsNo.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsNo.cs index 4e8797e9c6..7de9cba054 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsNo.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsNo.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsNo : StripeEntity { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsNo : StripeEntitycountry. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsNz.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsNz.cs index 139aa2bc33..ef1b355001 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsNz.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsNz.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsNz : StripeEntity { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsNz : StripeEntitycountry. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsOm.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsOm.cs index 3694abf179..35ceabc527 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsOm.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsOm.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsOm : StripeEntity { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsOm : StripeEntitycountry. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsPl.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsPl.cs index 2d7328d37e..96676e9969 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsPl.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsPl.cs @@ -2,10 +2,16 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsPl : StripeEntity { [JsonProperty("standard")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("standard")] +#endif public RegistrationCountryOptionsPlStandard Standard { get; set; } /// @@ -13,6 +19,9 @@ public class RegistrationCountryOptionsPl : StripeEntityioss, oss_non_union, oss_union, or standard. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsPlStandard.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsPlStandard.cs index 7966dc030c..f5663f42db 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsPlStandard.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsPlStandard.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsPlStandard : StripeEntity { @@ -10,6 +13,9 @@ public class RegistrationCountryOptionsPlStandard : StripeEntitysmall_seller, or standard. /// [JsonProperty("place_of_supply_scheme")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("place_of_supply_scheme")] +#endif public string PlaceOfSupplyScheme { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsPt.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsPt.cs index 3d88535cc1..d42232e724 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsPt.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsPt.cs @@ -2,10 +2,16 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsPt : StripeEntity { [JsonProperty("standard")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("standard")] +#endif public RegistrationCountryOptionsPtStandard Standard { get; set; } /// @@ -13,6 +19,9 @@ public class RegistrationCountryOptionsPt : StripeEntityioss, oss_non_union, oss_union, or standard. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsPtStandard.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsPtStandard.cs index 3c500a6a28..352e0bdc25 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsPtStandard.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsPtStandard.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsPtStandard : StripeEntity { @@ -10,6 +13,9 @@ public class RegistrationCountryOptionsPtStandard : StripeEntitysmall_seller, or standard. /// [JsonProperty("place_of_supply_scheme")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("place_of_supply_scheme")] +#endif public string PlaceOfSupplyScheme { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsRo.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsRo.cs index d9a4e17ef4..6a8cf33398 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsRo.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsRo.cs @@ -2,10 +2,16 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsRo : StripeEntity { [JsonProperty("standard")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("standard")] +#endif public RegistrationCountryOptionsRoStandard Standard { get; set; } /// @@ -13,6 +19,9 @@ public class RegistrationCountryOptionsRo : StripeEntityioss, oss_non_union, oss_union, or standard. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsRoStandard.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsRoStandard.cs index 7abd3b2cca..4b686892ab 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsRoStandard.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsRoStandard.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsRoStandard : StripeEntity { @@ -10,6 +13,9 @@ public class RegistrationCountryOptionsRoStandard : StripeEntitysmall_seller, or standard. /// [JsonProperty("place_of_supply_scheme")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("place_of_supply_scheme")] +#endif public string PlaceOfSupplyScheme { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsRs.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsRs.cs index 6d614566d0..3b5feb95c7 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsRs.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsRs.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsRs : StripeEntity { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsRs : StripeEntitycountry. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsRu.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsRu.cs index d80da8c0c5..6038563115 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsRu.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsRu.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsRu : StripeEntity { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsRu : StripeEntitycountry. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsSa.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsSa.cs index 50bd304d1d..a531ef36e2 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsSa.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsSa.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsSa : StripeEntity { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsSa : StripeEntitycountry. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsSe.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsSe.cs index 07a064b2be..2c8ac05a21 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsSe.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsSe.cs @@ -2,10 +2,16 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsSe : StripeEntity { [JsonProperty("standard")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("standard")] +#endif public RegistrationCountryOptionsSeStandard Standard { get; set; } /// @@ -13,6 +19,9 @@ public class RegistrationCountryOptionsSe : StripeEntityioss, oss_non_union, oss_union, or standard. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsSeStandard.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsSeStandard.cs index 2ee863f94d..545f990578 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsSeStandard.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsSeStandard.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsSeStandard : StripeEntity { @@ -10,6 +13,9 @@ public class RegistrationCountryOptionsSeStandard : StripeEntitysmall_seller, or standard. /// [JsonProperty("place_of_supply_scheme")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("place_of_supply_scheme")] +#endif public string PlaceOfSupplyScheme { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsSg.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsSg.cs index 5c8ae2b89c..05238bb9cc 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsSg.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsSg.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsSg : StripeEntity { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsSg : StripeEntitycountry. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsSi.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsSi.cs index 2b98a4b50f..b88f2241e5 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsSi.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsSi.cs @@ -2,10 +2,16 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsSi : StripeEntity { [JsonProperty("standard")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("standard")] +#endif public RegistrationCountryOptionsSiStandard Standard { get; set; } /// @@ -13,6 +19,9 @@ public class RegistrationCountryOptionsSi : StripeEntityioss, oss_non_union, oss_union, or standard. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsSiStandard.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsSiStandard.cs index ee53dd699b..c2d95a007b 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsSiStandard.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsSiStandard.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsSiStandard : StripeEntity { @@ -10,6 +13,9 @@ public class RegistrationCountryOptionsSiStandard : StripeEntitysmall_seller, or standard. /// [JsonProperty("place_of_supply_scheme")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("place_of_supply_scheme")] +#endif public string PlaceOfSupplyScheme { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsSk.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsSk.cs index 55aeb38547..2b7f08f7ac 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsSk.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsSk.cs @@ -2,10 +2,16 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsSk : StripeEntity { [JsonProperty("standard")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("standard")] +#endif public RegistrationCountryOptionsSkStandard Standard { get; set; } /// @@ -13,6 +19,9 @@ public class RegistrationCountryOptionsSk : StripeEntityioss, oss_non_union, oss_union, or standard. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsSkStandard.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsSkStandard.cs index 90cd31b217..dada1311f9 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsSkStandard.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsSkStandard.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsSkStandard : StripeEntity { @@ -10,6 +13,9 @@ public class RegistrationCountryOptionsSkStandard : StripeEntitysmall_seller, or standard. /// [JsonProperty("place_of_supply_scheme")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("place_of_supply_scheme")] +#endif public string PlaceOfSupplyScheme { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsTh.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsTh.cs index 319f454054..5b650c74a1 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsTh.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsTh.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsTh : StripeEntity { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsTh : StripeEntitycountry. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsTr.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsTr.cs index 00aacd01ad..f8894285f1 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsTr.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsTr.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsTr : StripeEntity { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsTr : StripeEntitycountry. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsTz.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsTz.cs index 25aedb2a12..fea7878cbc 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsTz.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsTz.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsTz : StripeEntity { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsTz : StripeEntitycountry. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsUs.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsUs.cs index 25d1fb5172..e85b1aa71e 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsUs.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsUs.cs @@ -2,13 +2,22 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsUs : StripeEntity { [JsonProperty("local_amusement_tax")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("local_amusement_tax")] +#endif public RegistrationCountryOptionsUsLocalAmusementTax LocalAmusementTax { get; set; } [JsonProperty("local_lease_tax")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("local_lease_tax")] +#endif public RegistrationCountryOptionsUsLocalLeaseTax LocalLeaseTax { get; set; } /// @@ -16,9 +25,15 @@ public class RegistrationCountryOptionsUs : StripeEntity). /// [JsonProperty("state")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("state")] +#endif public string State { get; set; } [JsonProperty("state_sales_tax")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("state_sales_tax")] +#endif public RegistrationCountryOptionsUsStateSalesTax StateSalesTax { get; set; } /// @@ -28,6 +43,9 @@ public class RegistrationCountryOptionsUs : StripeEntitystate_sales_tax. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsUsLocalAmusementTax.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsUsLocalAmusementTax.cs index e7ba560e9f..9bf086027c 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsUsLocalAmusementTax.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsUsLocalAmusementTax.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsUsLocalAmusementTax : StripeEntity { @@ -10,6 +13,9 @@ public class RegistrationCountryOptionsUsLocalAmusementTax : StripeEntity [JsonProperty("jurisdiction")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("jurisdiction")] +#endif public string Jurisdiction { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsUsLocalLeaseTax.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsUsLocalLeaseTax.cs index bfad26dbb7..69fb6c85fc 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsUsLocalLeaseTax.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsUsLocalLeaseTax.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsUsLocalLeaseTax : StripeEntity { @@ -10,6 +13,9 @@ public class RegistrationCountryOptionsUsLocalLeaseTax : StripeEntity [JsonProperty("jurisdiction")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("jurisdiction")] +#endif public string Jurisdiction { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsUsStateSalesTax.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsUsStateSalesTax.cs index df2298b297..01fb95cfe0 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsUsStateSalesTax.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsUsStateSalesTax.cs @@ -3,6 +3,9 @@ namespace Stripe.Tax { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsUsStateSalesTax : StripeEntity { @@ -10,6 +13,9 @@ public class RegistrationCountryOptionsUsStateSalesTax : StripeEntity [JsonProperty("elections")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("elections")] +#endif public List Elections { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsUsStateSalesTaxElection.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsUsStateSalesTaxElection.cs index dfa26183c0..9371514190 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsUsStateSalesTaxElection.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsUsStateSalesTaxElection.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsUsStateSalesTaxElection : StripeEntity { @@ -10,6 +13,9 @@ public class RegistrationCountryOptionsUsStateSalesTaxElection : StripeEntity [JsonProperty("jurisdiction")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("jurisdiction")] +#endif public string Jurisdiction { get; set; } /// @@ -18,6 +24,9 @@ public class RegistrationCountryOptionsUsStateSalesTaxElection : StripeEntitysingle_local_use_tax. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsUz.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsUz.cs index 4905f9360f..727d7272df 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsUz.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsUz.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsUz : StripeEntity { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsUz : StripeEntitycountry. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsVn.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsVn.cs index c7e10236df..303affbb02 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsVn.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsVn.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsVn : StripeEntity { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsVn : StripeEntitycountry. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsZa.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsZa.cs index 2a15d3fe32..d9a4a9259d 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsZa.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsZa.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsZa : StripeEntity { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsZa : StripeEntitycountry. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Settings/Settings.cs b/src/Stripe.net/Entities/Tax/Settings/Settings.cs index 659fee67df..3073e4ebcd 100644 --- a/src/Stripe.net/Entities/Tax/Settings/Settings.cs +++ b/src/Stripe.net/Entities/Tax/Settings/Settings.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// You can use Tax Settings to manage configurations used by Stripe Tax @@ -16,15 +19,24 @@ public class Settings : StripeEntity, IHasObject /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } [JsonProperty("defaults")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("defaults")] +#endif public SettingsDefaults Defaults { get; set; } /// /// The place where your business is located. /// [JsonProperty("head_office")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("head_office")] +#endif public SettingsHeadOffice HeadOffice { get; set; } /// @@ -32,6 +44,9 @@ public class Settings : StripeEntity, IHasObject /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// @@ -39,9 +54,15 @@ public class Settings : StripeEntity, IHasObject /// One of: active, or pending. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } [JsonProperty("status_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status_details")] +#endif public SettingsStatusDetails StatusDetails { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Settings/SettingsDefaults.cs b/src/Stripe.net/Entities/Tax/Settings/SettingsDefaults.cs index b6ffb1eb22..68ab2acd5e 100644 --- a/src/Stripe.net/Entities/Tax/Settings/SettingsDefaults.cs +++ b/src/Stripe.net/Entities/Tax/Settings/SettingsDefaults.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SettingsDefaults : StripeEntity { @@ -14,6 +17,9 @@ public class SettingsDefaults : StripeEntity /// One of: exclusive, inclusive, or inferred_by_currency. /// [JsonProperty("tax_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_behavior")] +#endif public string TaxBehavior { get; set; } /// @@ -21,6 +27,9 @@ public class SettingsDefaults : StripeEntity /// classify your products and prices. /// [JsonProperty("tax_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_code")] +#endif public string TaxCode { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Settings/SettingsHeadOffice.cs b/src/Stripe.net/Entities/Tax/Settings/SettingsHeadOffice.cs index c0e607a630..d86453db26 100644 --- a/src/Stripe.net/Entities/Tax/Settings/SettingsHeadOffice.cs +++ b/src/Stripe.net/Entities/Tax/Settings/SettingsHeadOffice.cs @@ -2,10 +2,16 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SettingsHeadOffice : StripeEntity { [JsonProperty("address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address")] +#endif public Address Address { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Settings/SettingsStatusDetails.cs b/src/Stripe.net/Entities/Tax/Settings/SettingsStatusDetails.cs index 25b18f2878..b263e6c8c7 100644 --- a/src/Stripe.net/Entities/Tax/Settings/SettingsStatusDetails.cs +++ b/src/Stripe.net/Entities/Tax/Settings/SettingsStatusDetails.cs @@ -2,13 +2,22 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SettingsStatusDetails : StripeEntity { [JsonProperty("active")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("active")] +#endif public SettingsStatusDetailsActive Active { get; set; } [JsonProperty("pending")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("pending")] +#endif public SettingsStatusDetailsPending Pending { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Settings/SettingsStatusDetailsPending.cs b/src/Stripe.net/Entities/Tax/Settings/SettingsStatusDetailsPending.cs index 12aff8b6e5..b3006b5be9 100644 --- a/src/Stripe.net/Entities/Tax/Settings/SettingsStatusDetailsPending.cs +++ b/src/Stripe.net/Entities/Tax/Settings/SettingsStatusDetailsPending.cs @@ -3,6 +3,9 @@ namespace Stripe.Tax { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SettingsStatusDetailsPending : StripeEntity { @@ -13,6 +16,9 @@ public class SettingsStatusDetailsPending : StripeEntity [JsonProperty("missing_fields")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("missing_fields")] +#endif public List MissingFields { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/TransactionLineItems/TransactionLineItem.cs b/src/Stripe.net/Entities/Tax/TransactionLineItems/TransactionLineItem.cs index 727491cd41..05d3a9a932 100644 --- a/src/Stripe.net/Entities/Tax/TransactionLineItems/TransactionLineItem.cs +++ b/src/Stripe.net/Entities/Tax/TransactionLineItems/TransactionLineItem.cs @@ -3,6 +3,9 @@ namespace Stripe.Tax { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TransactionLineItem : StripeEntity, IHasId, IHasMetadata, IHasObject { @@ -10,12 +13,18 @@ public class TransactionLineItem : StripeEntity, IHasId, IH /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// @@ -25,6 +34,9 @@ public class TransactionLineItem : StripeEntity, IHasId, IH /// calculated on top of this amount. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long Amount { get; set; } /// @@ -32,6 +44,9 @@ public class TransactionLineItem : StripeEntity, IHasId, IH /// href="https://stripe.com/docs/currencies#zero-decimal">smallest currency unit. /// [JsonProperty("amount_tax")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_tax")] +#endif public long AmountTax { get; set; } /// @@ -39,6 +54,9 @@ public class TransactionLineItem : StripeEntity, IHasId, IH /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// @@ -47,12 +65,18 @@ public class TransactionLineItem : StripeEntity, IHasId, IH /// object in a structured format. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// The ID of an existing Product. /// [JsonProperty("product")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("product")] +#endif public string Product { get; set; } /// @@ -60,18 +84,27 @@ public class TransactionLineItem : StripeEntity, IHasId, IH /// reversed. /// [JsonProperty("quantity")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("quantity")] +#endif public long Quantity { get; set; } /// /// A custom identifier for this line item in the transaction. /// [JsonProperty("reference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reference")] +#endif public string Reference { get; set; } /// /// If type=reversal, contains information about what was reversed. /// [JsonProperty("reversal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reversal")] +#endif public TransactionLineItemReversal Reversal { get; set; } /// @@ -80,6 +113,9 @@ public class TransactionLineItem : StripeEntity, IHasId, IH /// One of: exclusive, or inclusive. /// [JsonProperty("tax_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_behavior")] +#endif public string TaxBehavior { get; set; } /// @@ -87,6 +123,9 @@ public class TransactionLineItem : StripeEntity, IHasId, IH /// resource. /// [JsonProperty("tax_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_code")] +#endif public string TaxCode { get; set; } /// @@ -94,6 +133,9 @@ public class TransactionLineItem : StripeEntity, IHasId, IH /// One of: reversal, or transaction. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/TransactionLineItems/TransactionLineItemReversal.cs b/src/Stripe.net/Entities/Tax/TransactionLineItems/TransactionLineItemReversal.cs index 4437326776..21bf092b2b 100644 --- a/src/Stripe.net/Entities/Tax/TransactionLineItems/TransactionLineItemReversal.cs +++ b/src/Stripe.net/Entities/Tax/TransactionLineItems/TransactionLineItemReversal.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TransactionLineItemReversal : StripeEntity { @@ -9,6 +12,9 @@ public class TransactionLineItemReversal : StripeEntityid of the line item to reverse in the original transaction. /// [JsonProperty("original_line_item")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("original_line_item")] +#endif public string OriginalLineItem { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Transactions/Transaction.cs b/src/Stripe.net/Entities/Tax/Transactions/Transaction.cs index 1c4e9ee4ba..da0e1c0c0d 100644 --- a/src/Stripe.net/Entities/Tax/Transactions/Transaction.cs +++ b/src/Stripe.net/Entities/Tax/Transactions/Transaction.cs @@ -5,6 +5,9 @@ namespace Stripe.Tax using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// A Tax Transaction records the tax collected from or refunded to your customer. @@ -18,12 +21,18 @@ public class Transaction : StripeEntity, IHasId, IHasMetadata, IHas /// Unique identifier for the transaction. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// @@ -31,6 +40,10 @@ public class Transaction : StripeEntity, IHasId, IHasMetadata, IHas /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -39,6 +52,9 @@ public class Transaction : StripeEntity, IHasId, IHasMetadata, IHas /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// @@ -46,15 +62,24 @@ public class Transaction : StripeEntity, IHasId, IHasMetadata, IHas /// href="https://stripe.com/docs/api/customers/object">Customer used for the resource. /// [JsonProperty("customer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] +#endif public string Customer { get; set; } [JsonProperty("customer_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_details")] +#endif public TransactionCustomerDetails CustomerDetails { get; set; } /// /// The tax collected or refunded, by line item. /// [JsonProperty("line_items")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("line_items")] +#endif public StripeList LineItems { get; set; } /// @@ -62,6 +87,9 @@ public class Transaction : StripeEntity, IHasId, IHasMetadata, IHas /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// @@ -70,6 +98,9 @@ public class Transaction : StripeEntity, IHasId, IHasMetadata, IHas /// object in a structured format. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -77,30 +108,46 @@ public class Transaction : StripeEntity, IHasId, IHasMetadata, IHas /// [JsonProperty("posted_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("posted_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime PostedAt { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// /// A custom unique identifier, such as 'myOrder_123'. /// [JsonProperty("reference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reference")] +#endif public string Reference { get; set; } /// /// If type=reversal, contains information about what was reversed. /// [JsonProperty("reversal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reversal")] +#endif public TransactionReversal Reversal { get; set; } /// /// The details of the ship from location, such as the address. /// [JsonProperty("ship_from_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ship_from_details")] +#endif public TransactionShipFromDetails ShipFromDetails { get; set; } /// /// The shipping cost details for the transaction. /// [JsonProperty("shipping_cost")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping_cost")] +#endif public TransactionShippingCost ShippingCost { get; set; } /// @@ -109,6 +156,10 @@ public class Transaction : StripeEntity, IHasId, IHasMetadata, IHas /// [JsonProperty("tax_date")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_date")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime TaxDate { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -116,6 +167,9 @@ public class Transaction : StripeEntity, IHasId, IHasMetadata, IHas /// One of: reversal, or transaction. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Transactions/TransactionCustomerDetails.cs b/src/Stripe.net/Entities/Tax/Transactions/TransactionCustomerDetails.cs index e54a95c031..98d0e4c693 100644 --- a/src/Stripe.net/Entities/Tax/Transactions/TransactionCustomerDetails.cs +++ b/src/Stripe.net/Entities/Tax/Transactions/TransactionCustomerDetails.cs @@ -3,6 +3,9 @@ namespace Stripe.Tax { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TransactionCustomerDetails : StripeEntity { @@ -10,6 +13,9 @@ public class TransactionCustomerDetails : StripeEntity [JsonProperty("address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address")] +#endif public TransactionCustomerDetailsAddress Address { get; set; } /// @@ -17,18 +23,27 @@ public class TransactionCustomerDetails : StripeEntitybilling, or shipping. /// [JsonProperty("address_source")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_source")] +#endif public string AddressSource { get; set; } /// /// The customer's IP address (IPv4 or IPv6). /// [JsonProperty("ip_address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ip_address")] +#endif public string IpAddress { get; set; } /// /// The customer's tax IDs (for example, EU VAT numbers). /// [JsonProperty("tax_ids")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_ids")] +#endif public List TaxIds { get; set; } /// @@ -36,6 +51,9 @@ public class TransactionCustomerDetails : StripeEntitycustomer_exempt, none, or reverse_charge. /// [JsonProperty("taxability_override")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("taxability_override")] +#endif public string TaxabilityOverride { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Transactions/TransactionCustomerDetailsAddress.cs b/src/Stripe.net/Entities/Tax/Transactions/TransactionCustomerDetailsAddress.cs index 2b4e8fb6d8..d7b493dcb2 100644 --- a/src/Stripe.net/Entities/Tax/Transactions/TransactionCustomerDetailsAddress.cs +++ b/src/Stripe.net/Entities/Tax/Transactions/TransactionCustomerDetailsAddress.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TransactionCustomerDetailsAddress : StripeEntity { @@ -9,6 +12,9 @@ public class TransactionCustomerDetailsAddress : StripeEntity [JsonProperty("city")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("city")] +#endif public string City { get; set; } /// @@ -16,24 +22,36 @@ public class TransactionCustomerDetailsAddress : StripeEntity). /// [JsonProperty("country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country")] +#endif public string Country { get; set; } /// /// Address line 1 (e.g., street, PO Box, or company name). /// [JsonProperty("line1")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("line1")] +#endif public string Line1 { get; set; } /// /// Address line 2 (e.g., apartment, suite, unit, or building). /// [JsonProperty("line2")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("line2")] +#endif public string Line2 { get; set; } /// /// ZIP or postal code. /// [JsonProperty("postal_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("postal_code")] +#endif public string PostalCode { get; set; } /// @@ -41,6 +59,9 @@ public class TransactionCustomerDetailsAddress : StripeEntity [JsonProperty("state")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("state")] +#endif public string State { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Transactions/TransactionCustomerDetailsTaxId.cs b/src/Stripe.net/Entities/Tax/Transactions/TransactionCustomerDetailsTaxId.cs index 6639315c28..104514abf1 100644 --- a/src/Stripe.net/Entities/Tax/Transactions/TransactionCustomerDetailsTaxId.cs +++ b/src/Stripe.net/Entities/Tax/Transactions/TransactionCustomerDetailsTaxId.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TransactionCustomerDetailsTaxId : StripeEntity { @@ -42,12 +45,18 @@ public class TransactionCustomerDetailsTaxId : StripeEntityza_vat. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } /// /// The value of the tax ID. /// [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public string Value { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Transactions/TransactionReversal.cs b/src/Stripe.net/Entities/Tax/Transactions/TransactionReversal.cs index 61001b2e1d..c2541c14a9 100644 --- a/src/Stripe.net/Entities/Tax/Transactions/TransactionReversal.cs +++ b/src/Stripe.net/Entities/Tax/Transactions/TransactionReversal.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TransactionReversal : StripeEntity { @@ -9,6 +12,9 @@ public class TransactionReversal : StripeEntity /// The id of the reversed Transaction object. /// [JsonProperty("original_transaction")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("original_transaction")] +#endif public string OriginalTransaction { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Transactions/TransactionShipFromDetails.cs b/src/Stripe.net/Entities/Tax/Transactions/TransactionShipFromDetails.cs index 3133b59035..e708f6509c 100644 --- a/src/Stripe.net/Entities/Tax/Transactions/TransactionShipFromDetails.cs +++ b/src/Stripe.net/Entities/Tax/Transactions/TransactionShipFromDetails.cs @@ -2,10 +2,16 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TransactionShipFromDetails : StripeEntity { [JsonProperty("address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address")] +#endif public TransactionShipFromDetailsAddress Address { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Transactions/TransactionShipFromDetailsAddress.cs b/src/Stripe.net/Entities/Tax/Transactions/TransactionShipFromDetailsAddress.cs index 4c69eec879..0789af30d1 100644 --- a/src/Stripe.net/Entities/Tax/Transactions/TransactionShipFromDetailsAddress.cs +++ b/src/Stripe.net/Entities/Tax/Transactions/TransactionShipFromDetailsAddress.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TransactionShipFromDetailsAddress : StripeEntity { @@ -9,6 +12,9 @@ public class TransactionShipFromDetailsAddress : StripeEntity [JsonProperty("city")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("city")] +#endif public string City { get; set; } /// @@ -16,24 +22,36 @@ public class TransactionShipFromDetailsAddress : StripeEntity). /// [JsonProperty("country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country")] +#endif public string Country { get; set; } /// /// Address line 1 (e.g., street, PO Box, or company name). /// [JsonProperty("line1")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("line1")] +#endif public string Line1 { get; set; } /// /// Address line 2 (e.g., apartment, suite, unit, or building). /// [JsonProperty("line2")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("line2")] +#endif public string Line2 { get; set; } /// /// ZIP or postal code. /// [JsonProperty("postal_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("postal_code")] +#endif public string PostalCode { get; set; } /// @@ -41,6 +59,9 @@ public class TransactionShipFromDetailsAddress : StripeEntity [JsonProperty("state")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("state")] +#endif public string State { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Transactions/TransactionShippingCost.cs b/src/Stripe.net/Entities/Tax/Transactions/TransactionShippingCost.cs index a826975e98..301c06c7a2 100644 --- a/src/Stripe.net/Entities/Tax/Transactions/TransactionShippingCost.cs +++ b/src/Stripe.net/Entities/Tax/Transactions/TransactionShippingCost.cs @@ -3,6 +3,9 @@ namespace Stripe.Tax { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TransactionShippingCost : StripeEntity { @@ -13,6 +16,9 @@ public class TransactionShippingCost : StripeEntity /// calculated on top of this amount. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long Amount { get; set; } /// @@ -20,6 +26,9 @@ public class TransactionShippingCost : StripeEntity /// href="https://stripe.com/docs/currencies#zero-decimal">smallest currency unit. /// [JsonProperty("amount_tax")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_tax")] +#endif public long AmountTax { get; set; } /// @@ -27,6 +36,9 @@ public class TransactionShippingCost : StripeEntity /// href="https://stripe.com/docs/api/shipping_rates/object">ShippingRate. /// [JsonProperty("shipping_rate")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping_rate")] +#endif public string ShippingRate { get; set; } /// @@ -35,6 +47,9 @@ public class TransactionShippingCost : StripeEntity /// One of: exclusive, or inclusive. /// [JsonProperty("tax_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_behavior")] +#endif public string TaxBehavior { get; set; } /// @@ -42,6 +57,9 @@ public class TransactionShippingCost : StripeEntity /// transaction resource object and will be removed in the next API version.). /// [JsonProperty("tax_breakdown")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_breakdown")] +#endif public List TaxBreakdown { get; set; } /// @@ -49,6 +67,9 @@ public class TransactionShippingCost : StripeEntity /// shipping. /// [JsonProperty("tax_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_code")] +#endif public string TaxCode { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Transactions/TransactionShippingCostTaxBreakdown.cs b/src/Stripe.net/Entities/Tax/Transactions/TransactionShippingCostTaxBreakdown.cs index 3777afb08a..067acad462 100644 --- a/src/Stripe.net/Entities/Tax/Transactions/TransactionShippingCostTaxBreakdown.cs +++ b/src/Stripe.net/Entities/Tax/Transactions/TransactionShippingCostTaxBreakdown.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TransactionShippingCostTaxBreakdown : StripeEntity { @@ -10,9 +13,15 @@ public class TransactionShippingCostTaxBreakdown : StripeEntitysmallest currency unit. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long Amount { get; set; } [JsonProperty("jurisdiction")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("jurisdiction")] +#endif public TransactionShippingCostTaxBreakdownJurisdiction Jurisdiction { get; set; } /// @@ -21,6 +30,9 @@ public class TransactionShippingCostTaxBreakdown : StripeEntitydestination, or origin. /// [JsonProperty("sourcing")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sourcing")] +#endif public string Sourcing { get; set; } /// @@ -28,6 +40,9 @@ public class TransactionShippingCostTaxBreakdown : StripeEntity [JsonProperty("tax_rate_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_rate_details")] +#endif public TransactionShippingCostTaxBreakdownTaxRateDetails TaxRateDetails { get; set; } /// @@ -40,6 +55,9 @@ public class TransactionShippingCostTaxBreakdown : StripeEntitystandard_rated, taxable_basis_reduced, or zero_rated. /// [JsonProperty("taxability_reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("taxability_reason")] +#endif public string TaxabilityReason { get; set; } /// @@ -47,6 +65,9 @@ public class TransactionShippingCostTaxBreakdown : StripeEntitysmallest currency unit. /// [JsonProperty("taxable_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("taxable_amount")] +#endif public long TaxableAmount { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Transactions/TransactionShippingCostTaxBreakdownJurisdiction.cs b/src/Stripe.net/Entities/Tax/Transactions/TransactionShippingCostTaxBreakdownJurisdiction.cs index 4875baa7af..7aa8e006b4 100644 --- a/src/Stripe.net/Entities/Tax/Transactions/TransactionShippingCostTaxBreakdownJurisdiction.cs +++ b/src/Stripe.net/Entities/Tax/Transactions/TransactionShippingCostTaxBreakdownJurisdiction.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TransactionShippingCostTaxBreakdownJurisdiction : StripeEntity { @@ -10,12 +13,18 @@ public class TransactionShippingCostTaxBreakdownJurisdiction : StripeEntity). /// [JsonProperty("country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country")] +#endif public string Country { get; set; } /// /// A human-readable name for the jurisdiction imposing the tax. /// [JsonProperty("display_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_name")] +#endif public string DisplayName { get; set; } /// @@ -23,6 +32,9 @@ public class TransactionShippingCostTaxBreakdownJurisdiction : StripeEntitycity, country, county, district, or state. /// [JsonProperty("level")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("level")] +#endif public string Level { get; set; } /// @@ -30,6 +42,9 @@ public class TransactionShippingCostTaxBreakdownJurisdiction : StripeEntity [JsonProperty("state")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("state")] +#endif public string State { get; set; } } } diff --git a/src/Stripe.net/Entities/Tax/Transactions/TransactionShippingCostTaxBreakdownTaxRateDetails.cs b/src/Stripe.net/Entities/Tax/Transactions/TransactionShippingCostTaxBreakdownTaxRateDetails.cs index a63b82a1e4..afc4a3e94d 100644 --- a/src/Stripe.net/Entities/Tax/Transactions/TransactionShippingCostTaxBreakdownTaxRateDetails.cs +++ b/src/Stripe.net/Entities/Tax/Transactions/TransactionShippingCostTaxBreakdownTaxRateDetails.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TransactionShippingCostTaxBreakdownTaxRateDetails : StripeEntity { @@ -10,12 +13,18 @@ public class TransactionShippingCostTaxBreakdownTaxRateDetails : StripeEntity [JsonProperty("display_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_name")] +#endif public string DisplayName { get; set; } /// /// The tax rate percentage as a string. For example, 8.5% is represented as "8.5". /// [JsonProperty("percentage_decimal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("percentage_decimal")] +#endif public string PercentageDecimal { get; set; } /// @@ -26,6 +35,9 @@ public class TransactionShippingCostTaxBreakdownTaxRateDetails : StripeEntityvat. /// [JsonProperty("tax_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_type")] +#endif public string TaxType { get; set; } } } diff --git a/src/Stripe.net/Entities/TaxCodes/TaxCode.cs b/src/Stripe.net/Entities/TaxCodes/TaxCode.cs index e912eb1039..d8162a015e 100644 --- a/src/Stripe.net/Entities/TaxCodes/TaxCode.cs +++ b/src/Stripe.net/Entities/TaxCodes/TaxCode.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// Tax codes classify goods and @@ -13,24 +16,36 @@ public class TaxCode : StripeEntity, IHasId, IHasObject /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// /// A detailed description of which types of products the tax code represents. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// /// A short name for the tax code. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } } } diff --git a/src/Stripe.net/Entities/TaxDeductedAtSources/TaxDeductedAtSource.cs b/src/Stripe.net/Entities/TaxDeductedAtSources/TaxDeductedAtSource.cs index 99bd83ea7b..41c008dcaf 100644 --- a/src/Stripe.net/Entities/TaxDeductedAtSources/TaxDeductedAtSource.cs +++ b/src/Stripe.net/Entities/TaxDeductedAtSources/TaxDeductedAtSource.cs @@ -4,6 +4,9 @@ namespace Stripe using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TaxDeductedAtSource : StripeEntity, IHasId, IHasObject, IBalanceTransactionSource { @@ -11,12 +14,18 @@ public class TaxDeductedAtSource : StripeEntity, IHasId, IH /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// @@ -25,6 +34,10 @@ public class TaxDeductedAtSource : StripeEntity, IHasId, IH /// [JsonProperty("period_end")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("period_end")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime PeriodEnd { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -33,12 +46,19 @@ public class TaxDeductedAtSource : StripeEntity, IHasId, IH /// [JsonProperty("period_start")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("period_start")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime PeriodStart { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// /// The TAN that was supplied to Stripe when TDS was assessed. /// [JsonProperty("tax_deduction_account_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_deduction_account_number")] +#endif public string TaxDeductionAccountNumber { get; set; } } } diff --git a/src/Stripe.net/Entities/TaxIds/TaxId.cs b/src/Stripe.net/Entities/TaxIds/TaxId.cs index 3239b94fe4..63765530ed 100644 --- a/src/Stripe.net/Entities/TaxIds/TaxId.cs +++ b/src/Stripe.net/Entities/TaxIds/TaxId.cs @@ -4,6 +4,9 @@ namespace Stripe using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// You can add one or multiple tax IDs to a , Account tax IDs. /// +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class TaxId : StripeEntity, IHasId, IHasObject { /// /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// /// Two-letter ISO code representing the country of the tax ID. /// [JsonProperty("country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country")] +#endif public string Country { get; set; } /// @@ -39,6 +54,10 @@ public class TaxId : StripeEntity, IHasId, IHasObject /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; #region Expandable Customer @@ -48,6 +67,9 @@ public class TaxId : StripeEntity, IHasId, IHasObject /// ID of the customer. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string CustomerId { get => this.InternalCustomer?.Id; @@ -61,6 +83,9 @@ public string CustomerId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Customer Customer { get => this.InternalCustomer?.ExpandedObject; @@ -69,6 +94,10 @@ public Customer Customer [JsonProperty("customer")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalCustomer { get; set; } #endregion @@ -76,6 +105,10 @@ public Customer Customer /// Whether this object is deleted or not. /// [JsonProperty("deleted", NullValueHandling = NullValueHandling.Ignore)] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("deleted")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] +#endif public bool? Deleted { get; set; } /// @@ -83,12 +116,18 @@ public Customer Customer /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// /// The account or customer the tax ID belongs to. /// [JsonProperty("owner")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("owner")] +#endif public TaxIdOwner Owner { get; set; } /// @@ -128,18 +167,27 @@ public Customer Customer /// za_vat. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } /// /// Value of the tax ID. /// [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public string Value { get; set; } /// /// Tax ID verification information. /// [JsonProperty("verification")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("verification")] +#endif public TaxIdVerification Verification { get; set; } } } diff --git a/src/Stripe.net/Entities/TaxIds/TaxIdOwner.cs b/src/Stripe.net/Entities/TaxIds/TaxIdOwner.cs index b06032ab94..fd495014c2 100644 --- a/src/Stripe.net/Entities/TaxIds/TaxIdOwner.cs +++ b/src/Stripe.net/Entities/TaxIds/TaxIdOwner.cs @@ -3,7 +3,13 @@ namespace Stripe { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class TaxIdOwner : StripeEntity { #region Expandable Account @@ -13,6 +19,9 @@ public class TaxIdOwner : StripeEntity /// The account being referenced when type is account. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string AccountId { get => this.InternalAccount?.Id; @@ -26,6 +35,9 @@ public string AccountId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Account Account { get => this.InternalAccount?.ExpandedObject; @@ -34,6 +46,10 @@ public Account Account [JsonProperty("account")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalAccount { get; set; } #endregion @@ -44,6 +60,9 @@ public Account Account /// The Connect Application being referenced when type is application. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string ApplicationId { get => this.InternalApplication?.Id; @@ -57,6 +76,9 @@ public string ApplicationId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Application Application { get => this.InternalApplication?.ExpandedObject; @@ -65,6 +87,10 @@ public Application Application [JsonProperty("application")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("application")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalApplication { get; set; } #endregion @@ -75,6 +101,9 @@ public Application Application /// The customer being referenced when type is customer. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string CustomerId { get => this.InternalCustomer?.Id; @@ -88,6 +117,9 @@ public string CustomerId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Customer Customer { get => this.InternalCustomer?.ExpandedObject; @@ -96,6 +128,10 @@ public Customer Customer [JsonProperty("customer")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalCustomer { get; set; } #endregion @@ -104,6 +140,9 @@ public Customer Customer /// One of: account, application, customer, or self. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/TaxIds/TaxIdVerification.cs b/src/Stripe.net/Entities/TaxIds/TaxIdVerification.cs index f847ca4f95..06c6373d7c 100644 --- a/src/Stripe.net/Entities/TaxIds/TaxIdVerification.cs +++ b/src/Stripe.net/Entities/TaxIds/TaxIdVerification.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TaxIdVerification : StripeEntity { @@ -11,18 +14,27 @@ public class TaxIdVerification : StripeEntity /// One of: pending, unavailable, unverified, or verified. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } /// /// Verified address. /// [JsonProperty("verified_address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("verified_address")] +#endif public string VerifiedAddress { get; set; } /// /// Verified name. /// [JsonProperty("verified_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("verified_name")] +#endif public string VerifiedName { get; set; } } } diff --git a/src/Stripe.net/Entities/TaxRates/TaxRate.cs b/src/Stripe.net/Entities/TaxRates/TaxRate.cs index 38262c995c..e9849330f2 100644 --- a/src/Stripe.net/Entities/TaxRates/TaxRate.cs +++ b/src/Stripe.net/Entities/TaxRates/TaxRate.cs @@ -5,6 +5,9 @@ namespace Stripe using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// Tax rates can be applied to , IHasId, IHasMetadata, IHasObject /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// @@ -35,6 +44,9 @@ public class TaxRate : StripeEntity, IHasId, IHasMetadata, IHasObject /// that already have it set. /// [JsonProperty("active")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("active")] +#endif public bool Active { get; set; } /// @@ -42,6 +54,9 @@ public class TaxRate : StripeEntity, IHasId, IHasMetadata, IHasObject /// 3166-1 alpha-2). /// [JsonProperty("country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country")] +#endif public string Country { get; set; } /// @@ -49,6 +64,10 @@ public class TaxRate : StripeEntity, IHasId, IHasMetadata, IHasObject /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -56,6 +75,9 @@ public class TaxRate : StripeEntity, IHasId, IHasMetadata, IHasObject /// visible to your customers. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// @@ -63,6 +85,9 @@ public class TaxRate : StripeEntity, IHasId, IHasMetadata, IHasObject /// email, PDF, and the hosted invoice page. /// [JsonProperty("display_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_name")] +#endif public string DisplayName { get; set; } /// @@ -72,6 +97,9 @@ public class TaxRate : StripeEntity, IHasId, IHasMetadata, IHasObject /// collect taxes in the corresponding jurisdiction. /// [JsonProperty("effective_percentage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("effective_percentage")] +#endif public decimal? EffectivePercentage { get; set; } /// @@ -81,12 +109,18 @@ public class TaxRate : StripeEntity, IHasId, IHasMetadata, IHasObject /// rate. /// [JsonProperty("flat_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("flat_amount")] +#endif public TaxRateFlatAmount FlatAmount { get; set; } /// /// This specifies if the tax rate is inclusive or exclusive. /// [JsonProperty("inclusive")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("inclusive")] +#endif public bool Inclusive { get; set; } /// @@ -94,6 +128,9 @@ public class TaxRate : StripeEntity, IHasId, IHasMetadata, IHasObject /// purposes. It also appears on your customer’s invoice. /// [JsonProperty("jurisdiction")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("jurisdiction")] +#endif public string Jurisdiction { get; set; } /// @@ -103,6 +140,9 @@ public class TaxRate : StripeEntity, IHasId, IHasMetadata, IHasObject /// state. /// [JsonProperty("jurisdiction_level")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("jurisdiction_level")] +#endif public string JurisdictionLevel { get; set; } /// @@ -110,6 +150,9 @@ public class TaxRate : StripeEntity, IHasId, IHasMetadata, IHasObject /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// @@ -118,6 +161,9 @@ public class TaxRate : StripeEntity, IHasId, IHasMetadata, IHasObject /// object in a structured format. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -125,6 +171,9 @@ public class TaxRate : StripeEntity, IHasId, IHasMetadata, IHasObject /// this percentage includes the statutory tax rate of non-taxable jurisdictions. /// [JsonProperty("percentage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("percentage")] +#endif public decimal Percentage { get; set; } /// @@ -133,6 +182,9 @@ public class TaxRate : StripeEntity, IHasId, IHasMetadata, IHasObject /// One of: flat_amount, or percentage. /// [JsonProperty("rate_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("rate_type")] +#endif public string RateType { get; set; } /// @@ -140,6 +192,9 @@ public class TaxRate : StripeEntity, IHasId, IHasMetadata, IHasObject /// without country prefix. For example, "NY" for New York, United States. /// [JsonProperty("state")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("state")] +#endif public string State { get; set; } /// @@ -150,6 +205,9 @@ public class TaxRate : StripeEntity, IHasId, IHasMetadata, IHasObject /// vat. /// [JsonProperty("tax_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_type")] +#endif public string TaxType { get; set; } } } diff --git a/src/Stripe.net/Entities/TaxRates/TaxRateFlatAmount.cs b/src/Stripe.net/Entities/TaxRates/TaxRateFlatAmount.cs index 9818143b1b..31946b2490 100644 --- a/src/Stripe.net/Entities/TaxRates/TaxRateFlatAmount.cs +++ b/src/Stripe.net/Entities/TaxRates/TaxRateFlatAmount.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TaxRateFlatAmount : StripeEntity { @@ -12,12 +15,18 @@ public class TaxRateFlatAmount : StripeEntity /// eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long Amount { get; set; } /// /// Three-letter ISO currency code, in lowercase. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } } } diff --git a/src/Stripe.net/Entities/Terminal/Configurations/Configuration.cs b/src/Stripe.net/Entities/Terminal/Configurations/Configuration.cs index 95e0ccd3e6..8a90ece59f 100644 --- a/src/Stripe.net/Entities/Terminal/Configurations/Configuration.cs +++ b/src/Stripe.net/Entities/Terminal/Configurations/Configuration.cs @@ -2,6 +2,9 @@ namespace Stripe.Terminal { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// A Configurations object represents how features should be configured for terminal @@ -13,27 +16,43 @@ public class Configuration : StripeEntity, IHasId, IHasObject /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } [JsonProperty("bbpos_wisepos_e")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bbpos_wisepos_e")] +#endif public ConfigurationBbposWiseposE BbposWiseposE { get; set; } /// /// Whether this object is deleted or not. /// [JsonProperty("deleted", NullValueHandling = NullValueHandling.Ignore)] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("deleted")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] +#endif public bool? Deleted { get; set; } /// /// Whether this Configuration is the default for your account. /// [JsonProperty("is_account_default")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("is_account_default")] +#endif public bool? IsAccountDefault { get; set; } /// @@ -41,27 +60,48 @@ public class Configuration : StripeEntity, IHasId, IHasObject /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// /// String indicating the name of the Configuration object, set by the user. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } [JsonProperty("offline")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("offline")] +#endif public ConfigurationOffline Offline { get; set; } [JsonProperty("reboot_window")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reboot_window")] +#endif public ConfigurationRebootWindow RebootWindow { get; set; } [JsonProperty("stripe_s700")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("stripe_s700")] +#endif public ConfigurationStripeS700 StripeS700 { get; set; } [JsonProperty("tipping")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tipping")] +#endif public ConfigurationTipping Tipping { get; set; } [JsonProperty("verifone_p400")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("verifone_p400")] +#endif public ConfigurationVerifoneP400 VerifoneP400 { get; set; } } } diff --git a/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationBbposWiseposE.cs b/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationBbposWiseposE.cs index 152fed5493..f07cc8a12e 100644 --- a/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationBbposWiseposE.cs +++ b/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationBbposWiseposE.cs @@ -3,7 +3,13 @@ namespace Stripe.Terminal { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class ConfigurationBbposWiseposE : StripeEntity { #region Expandable Splashscreen @@ -13,6 +19,9 @@ public class ConfigurationBbposWiseposE : StripeEntity [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string SplashscreenId { get => this.InternalSplashscreen?.Id; @@ -26,6 +35,9 @@ public string SplashscreenId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public File Splashscreen { get => this.InternalSplashscreen?.ExpandedObject; @@ -34,6 +46,10 @@ public File Splashscreen [JsonProperty("splashscreen")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("splashscreen")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalSplashscreen { get; set; } #endregion } diff --git a/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationOffline.cs b/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationOffline.cs index d8643eada5..e01c98c66b 100644 --- a/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationOffline.cs +++ b/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationOffline.cs @@ -2,6 +2,9 @@ namespace Stripe.Terminal { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfigurationOffline : StripeEntity { @@ -10,6 +13,9 @@ public class ConfigurationOffline : StripeEntity /// Defaults to false. /// [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool? Enabled { get; set; } } } diff --git a/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationRebootWindow.cs b/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationRebootWindow.cs index 8678d94c8c..acbd0f4736 100644 --- a/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationRebootWindow.cs +++ b/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationRebootWindow.cs @@ -2,6 +2,9 @@ namespace Stripe.Terminal { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfigurationRebootWindow : StripeEntity { @@ -10,12 +13,18 @@ public class ConfigurationRebootWindow : StripeEntity /// value must be different than the start_hour. /// [JsonProperty("end_hour")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("end_hour")] +#endif public long EndHour { get; set; } /// /// Integer between 0 to 23 that represents the start hour of the reboot time window. /// [JsonProperty("start_hour")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("start_hour")] +#endif public long StartHour { get; set; } } } diff --git a/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationStripeS700.cs b/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationStripeS700.cs index e6a2431261..aefbb6d175 100644 --- a/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationStripeS700.cs +++ b/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationStripeS700.cs @@ -3,7 +3,13 @@ namespace Stripe.Terminal { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class ConfigurationStripeS700 : StripeEntity { #region Expandable Splashscreen @@ -13,6 +19,9 @@ public class ConfigurationStripeS700 : StripeEntity /// A File ID representing an image you would like displayed on the reader. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string SplashscreenId { get => this.InternalSplashscreen?.Id; @@ -26,6 +35,9 @@ public string SplashscreenId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public File Splashscreen { get => this.InternalSplashscreen?.ExpandedObject; @@ -34,6 +46,10 @@ public File Splashscreen [JsonProperty("splashscreen")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("splashscreen")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalSplashscreen { get; set; } #endregion } diff --git a/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationTipping.cs b/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationTipping.cs index 0e50729f0a..39743289f6 100644 --- a/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationTipping.cs +++ b/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationTipping.cs @@ -2,52 +2,100 @@ namespace Stripe.Terminal { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfigurationTipping : StripeEntity { [JsonProperty("aud")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("aud")] +#endif public ConfigurationTippingAud Aud { get; set; } [JsonProperty("cad")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cad")] +#endif public ConfigurationTippingCad Cad { get; set; } [JsonProperty("chf")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("chf")] +#endif public ConfigurationTippingChf Chf { get; set; } [JsonProperty("czk")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("czk")] +#endif public ConfigurationTippingCzk Czk { get; set; } [JsonProperty("dkk")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("dkk")] +#endif public ConfigurationTippingDkk Dkk { get; set; } [JsonProperty("eur")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("eur")] +#endif public ConfigurationTippingEur Eur { get; set; } [JsonProperty("gbp")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("gbp")] +#endif public ConfigurationTippingGbp Gbp { get; set; } [JsonProperty("hkd")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("hkd")] +#endif public ConfigurationTippingHkd Hkd { get; set; } [JsonProperty("myr")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("myr")] +#endif public ConfigurationTippingMyr Myr { get; set; } [JsonProperty("nok")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("nok")] +#endif public ConfigurationTippingNok Nok { get; set; } [JsonProperty("nzd")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("nzd")] +#endif public ConfigurationTippingNzd Nzd { get; set; } [JsonProperty("pln")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("pln")] +#endif public ConfigurationTippingPln Pln { get; set; } [JsonProperty("sek")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sek")] +#endif public ConfigurationTippingSek Sek { get; set; } [JsonProperty("sgd")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sgd")] +#endif public ConfigurationTippingSgd Sgd { get; set; } [JsonProperty("usd")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("usd")] +#endif public ConfigurationTippingUsd Usd { get; set; } } } diff --git a/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationTippingAud.cs b/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationTippingAud.cs index bf4c37e660..fb2289a819 100644 --- a/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationTippingAud.cs +++ b/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationTippingAud.cs @@ -3,6 +3,9 @@ namespace Stripe.Terminal { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfigurationTippingAud : StripeEntity { @@ -10,12 +13,18 @@ public class ConfigurationTippingAud : StripeEntity /// Fixed amounts displayed when collecting a tip. /// [JsonProperty("fixed_amounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fixed_amounts")] +#endif public List FixedAmounts { get; set; } /// /// Percentages displayed when collecting a tip. /// [JsonProperty("percentages")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("percentages")] +#endif public List Percentages { get; set; } /// @@ -23,6 +32,9 @@ public class ConfigurationTippingAud : StripeEntity /// displayed. /// [JsonProperty("smart_tip_threshold")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("smart_tip_threshold")] +#endif public long SmartTipThreshold { get; set; } } } diff --git a/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationTippingCad.cs b/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationTippingCad.cs index 55ac511db2..84d0f0c50d 100644 --- a/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationTippingCad.cs +++ b/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationTippingCad.cs @@ -3,6 +3,9 @@ namespace Stripe.Terminal { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfigurationTippingCad : StripeEntity { @@ -10,12 +13,18 @@ public class ConfigurationTippingCad : StripeEntity /// Fixed amounts displayed when collecting a tip. /// [JsonProperty("fixed_amounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fixed_amounts")] +#endif public List FixedAmounts { get; set; } /// /// Percentages displayed when collecting a tip. /// [JsonProperty("percentages")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("percentages")] +#endif public List Percentages { get; set; } /// @@ -23,6 +32,9 @@ public class ConfigurationTippingCad : StripeEntity /// displayed. /// [JsonProperty("smart_tip_threshold")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("smart_tip_threshold")] +#endif public long SmartTipThreshold { get; set; } } } diff --git a/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationTippingChf.cs b/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationTippingChf.cs index c7ca04ce80..796cbefb5c 100644 --- a/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationTippingChf.cs +++ b/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationTippingChf.cs @@ -3,6 +3,9 @@ namespace Stripe.Terminal { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfigurationTippingChf : StripeEntity { @@ -10,12 +13,18 @@ public class ConfigurationTippingChf : StripeEntity /// Fixed amounts displayed when collecting a tip. /// [JsonProperty("fixed_amounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fixed_amounts")] +#endif public List FixedAmounts { get; set; } /// /// Percentages displayed when collecting a tip. /// [JsonProperty("percentages")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("percentages")] +#endif public List Percentages { get; set; } /// @@ -23,6 +32,9 @@ public class ConfigurationTippingChf : StripeEntity /// displayed. /// [JsonProperty("smart_tip_threshold")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("smart_tip_threshold")] +#endif public long SmartTipThreshold { get; set; } } } diff --git a/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationTippingCzk.cs b/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationTippingCzk.cs index 4914b68bf1..8b22b97a95 100644 --- a/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationTippingCzk.cs +++ b/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationTippingCzk.cs @@ -3,6 +3,9 @@ namespace Stripe.Terminal { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfigurationTippingCzk : StripeEntity { @@ -10,12 +13,18 @@ public class ConfigurationTippingCzk : StripeEntity /// Fixed amounts displayed when collecting a tip. /// [JsonProperty("fixed_amounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fixed_amounts")] +#endif public List FixedAmounts { get; set; } /// /// Percentages displayed when collecting a tip. /// [JsonProperty("percentages")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("percentages")] +#endif public List Percentages { get; set; } /// @@ -23,6 +32,9 @@ public class ConfigurationTippingCzk : StripeEntity /// displayed. /// [JsonProperty("smart_tip_threshold")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("smart_tip_threshold")] +#endif public long SmartTipThreshold { get; set; } } } diff --git a/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationTippingDkk.cs b/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationTippingDkk.cs index 8335f55b45..ed6ec81889 100644 --- a/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationTippingDkk.cs +++ b/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationTippingDkk.cs @@ -3,6 +3,9 @@ namespace Stripe.Terminal { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfigurationTippingDkk : StripeEntity { @@ -10,12 +13,18 @@ public class ConfigurationTippingDkk : StripeEntity /// Fixed amounts displayed when collecting a tip. /// [JsonProperty("fixed_amounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fixed_amounts")] +#endif public List FixedAmounts { get; set; } /// /// Percentages displayed when collecting a tip. /// [JsonProperty("percentages")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("percentages")] +#endif public List Percentages { get; set; } /// @@ -23,6 +32,9 @@ public class ConfigurationTippingDkk : StripeEntity /// displayed. /// [JsonProperty("smart_tip_threshold")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("smart_tip_threshold")] +#endif public long SmartTipThreshold { get; set; } } } diff --git a/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationTippingEur.cs b/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationTippingEur.cs index a5a8152866..e11b305f50 100644 --- a/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationTippingEur.cs +++ b/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationTippingEur.cs @@ -3,6 +3,9 @@ namespace Stripe.Terminal { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfigurationTippingEur : StripeEntity { @@ -10,12 +13,18 @@ public class ConfigurationTippingEur : StripeEntity /// Fixed amounts displayed when collecting a tip. /// [JsonProperty("fixed_amounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fixed_amounts")] +#endif public List FixedAmounts { get; set; } /// /// Percentages displayed when collecting a tip. /// [JsonProperty("percentages")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("percentages")] +#endif public List Percentages { get; set; } /// @@ -23,6 +32,9 @@ public class ConfigurationTippingEur : StripeEntity /// displayed. /// [JsonProperty("smart_tip_threshold")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("smart_tip_threshold")] +#endif public long SmartTipThreshold { get; set; } } } diff --git a/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationTippingGbp.cs b/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationTippingGbp.cs index 528cd239e0..45f84a92da 100644 --- a/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationTippingGbp.cs +++ b/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationTippingGbp.cs @@ -3,6 +3,9 @@ namespace Stripe.Terminal { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfigurationTippingGbp : StripeEntity { @@ -10,12 +13,18 @@ public class ConfigurationTippingGbp : StripeEntity /// Fixed amounts displayed when collecting a tip. /// [JsonProperty("fixed_amounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fixed_amounts")] +#endif public List FixedAmounts { get; set; } /// /// Percentages displayed when collecting a tip. /// [JsonProperty("percentages")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("percentages")] +#endif public List Percentages { get; set; } /// @@ -23,6 +32,9 @@ public class ConfigurationTippingGbp : StripeEntity /// displayed. /// [JsonProperty("smart_tip_threshold")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("smart_tip_threshold")] +#endif public long SmartTipThreshold { get; set; } } } diff --git a/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationTippingHkd.cs b/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationTippingHkd.cs index 64a71e2746..dd74edafed 100644 --- a/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationTippingHkd.cs +++ b/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationTippingHkd.cs @@ -3,6 +3,9 @@ namespace Stripe.Terminal { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfigurationTippingHkd : StripeEntity { @@ -10,12 +13,18 @@ public class ConfigurationTippingHkd : StripeEntity /// Fixed amounts displayed when collecting a tip. /// [JsonProperty("fixed_amounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fixed_amounts")] +#endif public List FixedAmounts { get; set; } /// /// Percentages displayed when collecting a tip. /// [JsonProperty("percentages")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("percentages")] +#endif public List Percentages { get; set; } /// @@ -23,6 +32,9 @@ public class ConfigurationTippingHkd : StripeEntity /// displayed. /// [JsonProperty("smart_tip_threshold")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("smart_tip_threshold")] +#endif public long SmartTipThreshold { get; set; } } } diff --git a/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationTippingMyr.cs b/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationTippingMyr.cs index e5d3155fac..2334dad27c 100644 --- a/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationTippingMyr.cs +++ b/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationTippingMyr.cs @@ -3,6 +3,9 @@ namespace Stripe.Terminal { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfigurationTippingMyr : StripeEntity { @@ -10,12 +13,18 @@ public class ConfigurationTippingMyr : StripeEntity /// Fixed amounts displayed when collecting a tip. /// [JsonProperty("fixed_amounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fixed_amounts")] +#endif public List FixedAmounts { get; set; } /// /// Percentages displayed when collecting a tip. /// [JsonProperty("percentages")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("percentages")] +#endif public List Percentages { get; set; } /// @@ -23,6 +32,9 @@ public class ConfigurationTippingMyr : StripeEntity /// displayed. /// [JsonProperty("smart_tip_threshold")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("smart_tip_threshold")] +#endif public long SmartTipThreshold { get; set; } } } diff --git a/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationTippingNok.cs b/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationTippingNok.cs index bf14b4e768..9fba265d95 100644 --- a/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationTippingNok.cs +++ b/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationTippingNok.cs @@ -3,6 +3,9 @@ namespace Stripe.Terminal { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfigurationTippingNok : StripeEntity { @@ -10,12 +13,18 @@ public class ConfigurationTippingNok : StripeEntity /// Fixed amounts displayed when collecting a tip. /// [JsonProperty("fixed_amounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fixed_amounts")] +#endif public List FixedAmounts { get; set; } /// /// Percentages displayed when collecting a tip. /// [JsonProperty("percentages")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("percentages")] +#endif public List Percentages { get; set; } /// @@ -23,6 +32,9 @@ public class ConfigurationTippingNok : StripeEntity /// displayed. /// [JsonProperty("smart_tip_threshold")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("smart_tip_threshold")] +#endif public long SmartTipThreshold { get; set; } } } diff --git a/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationTippingNzd.cs b/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationTippingNzd.cs index 3ef2cb674f..a56dc1d696 100644 --- a/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationTippingNzd.cs +++ b/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationTippingNzd.cs @@ -3,6 +3,9 @@ namespace Stripe.Terminal { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfigurationTippingNzd : StripeEntity { @@ -10,12 +13,18 @@ public class ConfigurationTippingNzd : StripeEntity /// Fixed amounts displayed when collecting a tip. /// [JsonProperty("fixed_amounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fixed_amounts")] +#endif public List FixedAmounts { get; set; } /// /// Percentages displayed when collecting a tip. /// [JsonProperty("percentages")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("percentages")] +#endif public List Percentages { get; set; } /// @@ -23,6 +32,9 @@ public class ConfigurationTippingNzd : StripeEntity /// displayed. /// [JsonProperty("smart_tip_threshold")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("smart_tip_threshold")] +#endif public long SmartTipThreshold { get; set; } } } diff --git a/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationTippingPln.cs b/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationTippingPln.cs index 56a7c99117..1a6edca4b5 100644 --- a/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationTippingPln.cs +++ b/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationTippingPln.cs @@ -3,6 +3,9 @@ namespace Stripe.Terminal { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfigurationTippingPln : StripeEntity { @@ -10,12 +13,18 @@ public class ConfigurationTippingPln : StripeEntity /// Fixed amounts displayed when collecting a tip. /// [JsonProperty("fixed_amounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fixed_amounts")] +#endif public List FixedAmounts { get; set; } /// /// Percentages displayed when collecting a tip. /// [JsonProperty("percentages")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("percentages")] +#endif public List Percentages { get; set; } /// @@ -23,6 +32,9 @@ public class ConfigurationTippingPln : StripeEntity /// displayed. /// [JsonProperty("smart_tip_threshold")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("smart_tip_threshold")] +#endif public long SmartTipThreshold { get; set; } } } diff --git a/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationTippingSek.cs b/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationTippingSek.cs index 0b5234401a..3a5bfb6821 100644 --- a/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationTippingSek.cs +++ b/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationTippingSek.cs @@ -3,6 +3,9 @@ namespace Stripe.Terminal { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfigurationTippingSek : StripeEntity { @@ -10,12 +13,18 @@ public class ConfigurationTippingSek : StripeEntity /// Fixed amounts displayed when collecting a tip. /// [JsonProperty("fixed_amounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fixed_amounts")] +#endif public List FixedAmounts { get; set; } /// /// Percentages displayed when collecting a tip. /// [JsonProperty("percentages")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("percentages")] +#endif public List Percentages { get; set; } /// @@ -23,6 +32,9 @@ public class ConfigurationTippingSek : StripeEntity /// displayed. /// [JsonProperty("smart_tip_threshold")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("smart_tip_threshold")] +#endif public long SmartTipThreshold { get; set; } } } diff --git a/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationTippingSgd.cs b/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationTippingSgd.cs index 047b2d50ca..2dceca8d2c 100644 --- a/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationTippingSgd.cs +++ b/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationTippingSgd.cs @@ -3,6 +3,9 @@ namespace Stripe.Terminal { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfigurationTippingSgd : StripeEntity { @@ -10,12 +13,18 @@ public class ConfigurationTippingSgd : StripeEntity /// Fixed amounts displayed when collecting a tip. /// [JsonProperty("fixed_amounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fixed_amounts")] +#endif public List FixedAmounts { get; set; } /// /// Percentages displayed when collecting a tip. /// [JsonProperty("percentages")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("percentages")] +#endif public List Percentages { get; set; } /// @@ -23,6 +32,9 @@ public class ConfigurationTippingSgd : StripeEntity /// displayed. /// [JsonProperty("smart_tip_threshold")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("smart_tip_threshold")] +#endif public long SmartTipThreshold { get; set; } } } diff --git a/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationTippingUsd.cs b/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationTippingUsd.cs index 39d5cf5edd..a6c5d6bfba 100644 --- a/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationTippingUsd.cs +++ b/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationTippingUsd.cs @@ -3,6 +3,9 @@ namespace Stripe.Terminal { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfigurationTippingUsd : StripeEntity { @@ -10,12 +13,18 @@ public class ConfigurationTippingUsd : StripeEntity /// Fixed amounts displayed when collecting a tip. /// [JsonProperty("fixed_amounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fixed_amounts")] +#endif public List FixedAmounts { get; set; } /// /// Percentages displayed when collecting a tip. /// [JsonProperty("percentages")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("percentages")] +#endif public List Percentages { get; set; } /// @@ -23,6 +32,9 @@ public class ConfigurationTippingUsd : StripeEntity /// displayed. /// [JsonProperty("smart_tip_threshold")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("smart_tip_threshold")] +#endif public long SmartTipThreshold { get; set; } } } diff --git a/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationVerifoneP400.cs b/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationVerifoneP400.cs index fc17cde7ed..48c466f980 100644 --- a/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationVerifoneP400.cs +++ b/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationVerifoneP400.cs @@ -3,7 +3,13 @@ namespace Stripe.Terminal { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class ConfigurationVerifoneP400 : StripeEntity { #region Expandable Splashscreen @@ -13,6 +19,9 @@ public class ConfigurationVerifoneP400 : StripeEntity /// A File ID representing an image you would like displayed on the reader. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string SplashscreenId { get => this.InternalSplashscreen?.Id; @@ -26,6 +35,9 @@ public string SplashscreenId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public File Splashscreen { get => this.InternalSplashscreen?.ExpandedObject; @@ -34,6 +46,10 @@ public File Splashscreen [JsonProperty("splashscreen")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("splashscreen")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalSplashscreen { get; set; } #endregion } diff --git a/src/Stripe.net/Entities/Terminal/ConnectionTokens/ConnectionToken.cs b/src/Stripe.net/Entities/Terminal/ConnectionTokens/ConnectionToken.cs index 4dde566fd2..8294b947d5 100644 --- a/src/Stripe.net/Entities/Terminal/ConnectionTokens/ConnectionToken.cs +++ b/src/Stripe.net/Entities/Terminal/ConnectionTokens/ConnectionToken.cs @@ -2,6 +2,9 @@ namespace Stripe.Terminal { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// A Connection Token is used by the Stripe Terminal SDK to connect to a reader. @@ -15,6 +18,9 @@ public class ConnectionToken : StripeEntity, IHasObject /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// @@ -24,12 +30,18 @@ public class ConnectionToken : StripeEntity, IHasObject /// docs on scoping connection tokens. /// [JsonProperty("location")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("location")] +#endif public string Location { get; set; } /// /// Your application should pass this token to the Stripe Terminal SDK. /// [JsonProperty("secret")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("secret")] +#endif public string Secret { get; set; } } } diff --git a/src/Stripe.net/Entities/Terminal/Locations/Location.cs b/src/Stripe.net/Entities/Terminal/Locations/Location.cs index 1b88b87f48..8924d9de96 100644 --- a/src/Stripe.net/Entities/Terminal/Locations/Location.cs +++ b/src/Stripe.net/Entities/Terminal/Locations/Location.cs @@ -3,6 +3,9 @@ namespace Stripe.Terminal { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// A Location represents a grouping of readers. @@ -16,33 +19,52 @@ public class Location : StripeEntity, IHasId, IHasMetadata, IHasObject /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } [JsonProperty("address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address")] +#endif public Address Address { get; set; } /// /// The ID of a configuration that will be used to customize all readers in this location. /// [JsonProperty("configuration_overrides")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("configuration_overrides")] +#endif public string ConfigurationOverrides { get; set; } /// /// Whether this object is deleted or not. /// [JsonProperty("deleted", NullValueHandling = NullValueHandling.Ignore)] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("deleted")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] +#endif public bool? Deleted { get; set; } /// /// The display name of the location. /// [JsonProperty("display_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_name")] +#endif public string DisplayName { get; set; } /// @@ -50,6 +72,9 @@ public class Location : StripeEntity, IHasId, IHasMetadata, IHasObject /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// @@ -58,6 +83,9 @@ public class Location : StripeEntity, IHasId, IHasMetadata, IHasObject /// object in a structured format. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } } } diff --git a/src/Stripe.net/Entities/Terminal/Readers/Reader.cs b/src/Stripe.net/Entities/Terminal/Readers/Reader.cs index 37a4251767..098ca59fe5 100644 --- a/src/Stripe.net/Entities/Terminal/Readers/Reader.cs +++ b/src/Stripe.net/Entities/Terminal/Readers/Reader.cs @@ -4,6 +4,9 @@ namespace Stripe.Terminal using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// A Reader represents a physical device for accepting payment details. @@ -12,36 +15,55 @@ namespace Stripe.Terminal /// href="https://stripe.com/docs/terminal/payments/connect-reader">Connecting to a /// reader. /// +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class Reader : StripeEntity, IHasId, IHasMetadata, IHasObject { /// /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// /// The most recent action performed by the reader. /// [JsonProperty("action")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("action")] +#endif public ReaderAction Action { get; set; } /// /// Whether this object is deleted or not. /// [JsonProperty("deleted", NullValueHandling = NullValueHandling.Ignore)] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("deleted")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] +#endif public bool? Deleted { get; set; } /// /// The current software version of the reader. /// [JsonProperty("device_sw_version")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("device_sw_version")] +#endif public string DeviceSwVersion { get; set; } /// @@ -53,18 +75,27 @@ public class Reader : StripeEntity, IHasId, IHasMetadata, IHasObject /// stripe_s700, or verifone_P400. /// [JsonProperty("device_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("device_type")] +#endif public string DeviceType { get; set; } /// /// The local IP address of the reader. /// [JsonProperty("ip_address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ip_address")] +#endif public string IpAddress { get; set; } /// /// Custom label given to the reader for easier identification. /// [JsonProperty("label")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("label")] +#endif public string Label { get; set; } /// @@ -72,6 +103,9 @@ public class Reader : StripeEntity, IHasId, IHasMetadata, IHasObject /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } #region Expandable Location @@ -81,6 +115,9 @@ public class Reader : StripeEntity, IHasId, IHasMetadata, IHasObject /// The location identifier of the reader. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string LocationId { get => this.InternalLocation?.Id; @@ -94,6 +131,9 @@ public string LocationId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Location Location { get => this.InternalLocation?.ExpandedObject; @@ -102,6 +142,10 @@ public Location Location [JsonProperty("location")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("location")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalLocation { get; set; } #endregion @@ -111,12 +155,18 @@ public Location Location /// object in a structured format. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// Serial number of the reader. /// [JsonProperty("serial_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("serial_number")] +#endif public string SerialNumber { get; set; } /// @@ -125,6 +175,9 @@ public Location Location /// One of: offline, or online. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } } } diff --git a/src/Stripe.net/Entities/Terminal/Readers/ReaderAction.cs b/src/Stripe.net/Entities/Terminal/Readers/ReaderAction.cs index fbd16f5b2f..5850508ad0 100644 --- a/src/Stripe.net/Entities/Terminal/Readers/ReaderAction.cs +++ b/src/Stripe.net/Entities/Terminal/Readers/ReaderAction.cs @@ -2,6 +2,9 @@ namespace Stripe.Terminal { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ReaderAction : StripeEntity { @@ -9,36 +12,54 @@ public class ReaderAction : StripeEntity /// Failure code, only set if status is failed. /// [JsonProperty("failure_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("failure_code")] +#endif public string FailureCode { get; set; } /// /// Detailed failure message, only set if status is failed. /// [JsonProperty("failure_message")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("failure_message")] +#endif public string FailureMessage { get; set; } /// /// Represents a reader action to process a payment intent. /// [JsonProperty("process_payment_intent")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("process_payment_intent")] +#endif public ReaderActionProcessPaymentIntent ProcessPaymentIntent { get; set; } /// /// Represents a reader action to process a setup intent. /// [JsonProperty("process_setup_intent")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("process_setup_intent")] +#endif public ReaderActionProcessSetupIntent ProcessSetupIntent { get; set; } /// /// Represents a reader action to refund a payment. /// [JsonProperty("refund_payment")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("refund_payment")] +#endif public ReaderActionRefundPayment RefundPayment { get; set; } /// /// Represents a reader action to set the reader display. /// [JsonProperty("set_reader_display")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("set_reader_display")] +#endif public ReaderActionSetReaderDisplay SetReaderDisplay { get; set; } /// @@ -46,6 +67,9 @@ public class ReaderAction : StripeEntity /// One of: failed, in_progress, or succeeded. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } /// @@ -54,6 +78,9 @@ public class ReaderAction : StripeEntity /// refund_payment, or set_reader_display. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Terminal/Readers/ReaderActionProcessPaymentIntent.cs b/src/Stripe.net/Entities/Terminal/Readers/ReaderActionProcessPaymentIntent.cs index 6405fb8bd3..8fbe51b34c 100644 --- a/src/Stripe.net/Entities/Terminal/Readers/ReaderActionProcessPaymentIntent.cs +++ b/src/Stripe.net/Entities/Terminal/Readers/ReaderActionProcessPaymentIntent.cs @@ -3,7 +3,13 @@ namespace Stripe.Terminal { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class ReaderActionProcessPaymentIntent : StripeEntity { #region Expandable PaymentIntent @@ -13,6 +19,9 @@ public class ReaderActionProcessPaymentIntent : StripeEntity [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string PaymentIntentId { get => this.InternalPaymentIntent?.Id; @@ -26,6 +35,9 @@ public string PaymentIntentId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public PaymentIntent PaymentIntent { get => this.InternalPaymentIntent?.ExpandedObject; @@ -34,6 +46,10 @@ public PaymentIntent PaymentIntent [JsonProperty("payment_intent")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_intent")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalPaymentIntent { get; set; } #endregion @@ -41,6 +57,9 @@ public PaymentIntent PaymentIntent /// Represents a per-transaction override of a reader configuration. /// [JsonProperty("process_config")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("process_config")] +#endif public ReaderActionProcessPaymentIntentProcessConfig ProcessConfig { get; set; } } } diff --git a/src/Stripe.net/Entities/Terminal/Readers/ReaderActionProcessPaymentIntentProcessConfig.cs b/src/Stripe.net/Entities/Terminal/Readers/ReaderActionProcessPaymentIntentProcessConfig.cs index 128d1581e5..db1fdd568e 100644 --- a/src/Stripe.net/Entities/Terminal/Readers/ReaderActionProcessPaymentIntentProcessConfig.cs +++ b/src/Stripe.net/Entities/Terminal/Readers/ReaderActionProcessPaymentIntentProcessConfig.cs @@ -2,6 +2,9 @@ namespace Stripe.Terminal { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ReaderActionProcessPaymentIntentProcessConfig : StripeEntity { @@ -9,18 +12,27 @@ public class ReaderActionProcessPaymentIntentProcessConfig : StripeEntity [JsonProperty("enable_customer_cancellation")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enable_customer_cancellation")] +#endif public bool EnableCustomerCancellation { get; set; } /// /// Override showing a tipping selection screen on this transaction. /// [JsonProperty("skip_tipping")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("skip_tipping")] +#endif public bool SkipTipping { get; set; } /// /// Represents a per-transaction tipping configuration. /// [JsonProperty("tipping")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tipping")] +#endif public ReaderActionProcessPaymentIntentProcessConfigTipping Tipping { get; set; } } } diff --git a/src/Stripe.net/Entities/Terminal/Readers/ReaderActionProcessPaymentIntentProcessConfigTipping.cs b/src/Stripe.net/Entities/Terminal/Readers/ReaderActionProcessPaymentIntentProcessConfigTipping.cs index 1cdc27706d..e163eef35a 100644 --- a/src/Stripe.net/Entities/Terminal/Readers/ReaderActionProcessPaymentIntentProcessConfigTipping.cs +++ b/src/Stripe.net/Entities/Terminal/Readers/ReaderActionProcessPaymentIntentProcessConfigTipping.cs @@ -2,6 +2,9 @@ namespace Stripe.Terminal { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ReaderActionProcessPaymentIntentProcessConfigTipping : StripeEntity { @@ -11,6 +14,9 @@ public class ReaderActionProcessPaymentIntentProcessConfigTipping : StripeEntity /// to represent $1.00 or 100 to represent ¥100, a zero-decimal currency). /// [JsonProperty("amount_eligible")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_eligible")] +#endif public long AmountEligible { get; set; } } } diff --git a/src/Stripe.net/Entities/Terminal/Readers/ReaderActionProcessSetupIntent.cs b/src/Stripe.net/Entities/Terminal/Readers/ReaderActionProcessSetupIntent.cs index 5ef50f1f38..9b762a4eb8 100644 --- a/src/Stripe.net/Entities/Terminal/Readers/ReaderActionProcessSetupIntent.cs +++ b/src/Stripe.net/Entities/Terminal/Readers/ReaderActionProcessSetupIntent.cs @@ -3,7 +3,13 @@ namespace Stripe.Terminal { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class ReaderActionProcessSetupIntent : StripeEntity { /// @@ -12,12 +18,18 @@ public class ReaderActionProcessSetupIntent : StripeEntity [JsonProperty("generated_card")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("generated_card")] +#endif public string GeneratedCard { get; set; } /// /// Represents a per-setup override of a reader configuration. /// [JsonProperty("process_config")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("process_config")] +#endif public ReaderActionProcessSetupIntentProcessConfig ProcessConfig { get; set; } #region Expandable SetupIntent @@ -27,6 +39,9 @@ public class ReaderActionProcessSetupIntent : StripeEntity [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string SetupIntentId { get => this.InternalSetupIntent?.Id; @@ -40,6 +55,9 @@ public string SetupIntentId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public SetupIntent SetupIntent { get => this.InternalSetupIntent?.ExpandedObject; @@ -48,6 +66,10 @@ public SetupIntent SetupIntent [JsonProperty("setup_intent")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_intent")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalSetupIntent { get; set; } #endregion } diff --git a/src/Stripe.net/Entities/Terminal/Readers/ReaderActionProcessSetupIntentProcessConfig.cs b/src/Stripe.net/Entities/Terminal/Readers/ReaderActionProcessSetupIntentProcessConfig.cs index f072e59ab7..f8251ad7cc 100644 --- a/src/Stripe.net/Entities/Terminal/Readers/ReaderActionProcessSetupIntentProcessConfig.cs +++ b/src/Stripe.net/Entities/Terminal/Readers/ReaderActionProcessSetupIntentProcessConfig.cs @@ -2,6 +2,9 @@ namespace Stripe.Terminal { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ReaderActionProcessSetupIntentProcessConfig : StripeEntity { @@ -9,6 +12,9 @@ public class ReaderActionProcessSetupIntentProcessConfig : StripeEntity [JsonProperty("enable_customer_cancellation")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enable_customer_cancellation")] +#endif public bool EnableCustomerCancellation { get; set; } } } diff --git a/src/Stripe.net/Entities/Terminal/Readers/ReaderActionRefundPayment.cs b/src/Stripe.net/Entities/Terminal/Readers/ReaderActionRefundPayment.cs index 80d472dd27..dc58f17830 100644 --- a/src/Stripe.net/Entities/Terminal/Readers/ReaderActionRefundPayment.cs +++ b/src/Stripe.net/Entities/Terminal/Readers/ReaderActionRefundPayment.cs @@ -4,13 +4,22 @@ namespace Stripe.Terminal using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class ReaderActionRefundPayment : StripeEntity, IHasMetadata { /// /// The amount being refunded. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long Amount { get; set; } #region Expandable Charge @@ -20,6 +29,9 @@ public class ReaderActionRefundPayment : StripeEntity /// Charge that is being refunded. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string ChargeId { get => this.InternalCharge?.Id; @@ -33,6 +45,9 @@ public string ChargeId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Charge Charge { get => this.InternalCharge?.ExpandedObject; @@ -41,6 +56,10 @@ public Charge Charge [JsonProperty("charge")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("charge")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalCharge { get; set; } #endregion @@ -50,6 +69,9 @@ public Charge Charge /// object in a structured format. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } #region Expandable PaymentIntent @@ -59,6 +81,9 @@ public Charge Charge /// Payment intent that is being refunded. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string PaymentIntentId { get => this.InternalPaymentIntent?.Id; @@ -72,6 +97,9 @@ public string PaymentIntentId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public PaymentIntent PaymentIntent { get => this.InternalPaymentIntent?.ExpandedObject; @@ -80,6 +108,10 @@ public PaymentIntent PaymentIntent [JsonProperty("payment_intent")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_intent")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalPaymentIntent { get; set; } #endregion @@ -88,6 +120,9 @@ public PaymentIntent PaymentIntent /// One of: duplicate, fraudulent, or requested_by_customer. /// [JsonProperty("reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reason")] +#endif public string Reason { get; set; } #region Expandable Refund @@ -97,6 +132,9 @@ public PaymentIntent PaymentIntent /// Unique identifier for the refund object. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string RefundId { get => this.InternalRefund?.Id; @@ -110,6 +148,9 @@ public string RefundId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Refund Refund { get => this.InternalRefund?.ExpandedObject; @@ -118,6 +159,10 @@ public Refund Refund [JsonProperty("refund")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("refund")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalRefund { get; set; } #endregion @@ -129,12 +174,18 @@ public Refund Refund /// created the charge. /// [JsonProperty("refund_application_fee")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("refund_application_fee")] +#endif public bool RefundApplicationFee { get; set; } /// /// Represents a per-transaction override of a reader configuration. /// [JsonProperty("refund_payment_config")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("refund_payment_config")] +#endif public ReaderActionRefundPaymentRefundPaymentConfig RefundPaymentConfig { get; set; } /// @@ -144,6 +195,9 @@ public Refund Refund /// created the charge. /// [JsonProperty("reverse_transfer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reverse_transfer")] +#endif public bool ReverseTransfer { get; set; } } } diff --git a/src/Stripe.net/Entities/Terminal/Readers/ReaderActionRefundPaymentRefundPaymentConfig.cs b/src/Stripe.net/Entities/Terminal/Readers/ReaderActionRefundPaymentRefundPaymentConfig.cs index 6dff96f149..a461ecdaf6 100644 --- a/src/Stripe.net/Entities/Terminal/Readers/ReaderActionRefundPaymentRefundPaymentConfig.cs +++ b/src/Stripe.net/Entities/Terminal/Readers/ReaderActionRefundPaymentRefundPaymentConfig.cs @@ -2,6 +2,9 @@ namespace Stripe.Terminal { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ReaderActionRefundPaymentRefundPaymentConfig : StripeEntity { @@ -9,6 +12,9 @@ public class ReaderActionRefundPaymentRefundPaymentConfig : StripeEntity [JsonProperty("enable_customer_cancellation")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enable_customer_cancellation")] +#endif public bool EnableCustomerCancellation { get; set; } } } diff --git a/src/Stripe.net/Entities/Terminal/Readers/ReaderActionSetReaderDisplay.cs b/src/Stripe.net/Entities/Terminal/Readers/ReaderActionSetReaderDisplay.cs index 1a491f5443..531eccf2d6 100644 --- a/src/Stripe.net/Entities/Terminal/Readers/ReaderActionSetReaderDisplay.cs +++ b/src/Stripe.net/Entities/Terminal/Readers/ReaderActionSetReaderDisplay.cs @@ -2,6 +2,9 @@ namespace Stripe.Terminal { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ReaderActionSetReaderDisplay : StripeEntity { @@ -9,12 +12,18 @@ public class ReaderActionSetReaderDisplay : StripeEntity [JsonProperty("cart")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cart")] +#endif public ReaderActionSetReaderDisplayCart Cart { get; set; } /// /// Type of information to be displayed by the reader. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Terminal/Readers/ReaderActionSetReaderDisplayCart.cs b/src/Stripe.net/Entities/Terminal/Readers/ReaderActionSetReaderDisplayCart.cs index e53b36c692..da26070caf 100644 --- a/src/Stripe.net/Entities/Terminal/Readers/ReaderActionSetReaderDisplayCart.cs +++ b/src/Stripe.net/Entities/Terminal/Readers/ReaderActionSetReaderDisplayCart.cs @@ -3,6 +3,9 @@ namespace Stripe.Terminal { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ReaderActionSetReaderDisplayCart : StripeEntity { @@ -12,12 +15,18 @@ public class ReaderActionSetReaderDisplayCart : StripeEntity. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// /// List of line items in the cart. /// [JsonProperty("line_items")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("line_items")] +#endif public List LineItems { get; set; } /// @@ -25,6 +34,9 @@ public class ReaderActionSetReaderDisplayCart : StripeEntitysmallest currency unit. /// [JsonProperty("tax")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax")] +#endif public long? Tax { get; set; } /// @@ -32,6 +44,9 @@ public class ReaderActionSetReaderDisplayCart : StripeEntitysmallest currency unit. /// [JsonProperty("total")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("total")] +#endif public long Total { get; set; } } } diff --git a/src/Stripe.net/Entities/Terminal/Readers/ReaderActionSetReaderDisplayCartLineItem.cs b/src/Stripe.net/Entities/Terminal/Readers/ReaderActionSetReaderDisplayCartLineItem.cs index 76af470567..aee697d64f 100644 --- a/src/Stripe.net/Entities/Terminal/Readers/ReaderActionSetReaderDisplayCartLineItem.cs +++ b/src/Stripe.net/Entities/Terminal/Readers/ReaderActionSetReaderDisplayCartLineItem.cs @@ -2,6 +2,9 @@ namespace Stripe.Terminal { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ReaderActionSetReaderDisplayCartLineItem : StripeEntity { @@ -10,18 +13,27 @@ public class ReaderActionSetReaderDisplayCartLineItem : StripeEntitysmallest currency unit. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long Amount { get; set; } /// /// Description of the line item. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// /// The quantity of the line item. /// [JsonProperty("quantity")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("quantity")] +#endif public long Quantity { get; set; } } } diff --git a/src/Stripe.net/Entities/TestHelpers/TestClocks/TestClock.cs b/src/Stripe.net/Entities/TestHelpers/TestClocks/TestClock.cs index 5d968b8270..22dbf69e6d 100644 --- a/src/Stripe.net/Entities/TestHelpers/TestClocks/TestClock.cs +++ b/src/Stripe.net/Entities/TestHelpers/TestClocks/TestClock.cs @@ -4,6 +4,9 @@ namespace Stripe.TestHelpers using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// A test clock enables deterministic control over objects in testmode. With a test clock, @@ -19,12 +22,18 @@ public class TestClock : StripeEntity, IHasId, IHasObject /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// @@ -32,12 +41,20 @@ public class TestClock : StripeEntity, IHasId, IHasObject /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// /// Whether this object is deleted or not. /// [JsonProperty("deleted", NullValueHandling = NullValueHandling.Ignore)] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("deleted")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] +#endif public bool? Deleted { get; set; } /// @@ -45,6 +62,10 @@ public class TestClock : StripeEntity, IHasId, IHasObject /// [JsonProperty("deletes_after")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("deletes_after")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime DeletesAfter { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -52,6 +73,10 @@ public class TestClock : StripeEntity, IHasId, IHasObject /// [JsonProperty("frozen_time")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("frozen_time")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime FrozenTime { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -59,12 +84,18 @@ public class TestClock : StripeEntity, IHasId, IHasObject /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// /// The custom name supplied at creation. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } /// @@ -72,9 +103,15 @@ public class TestClock : StripeEntity, IHasId, IHasObject /// One of: advancing, internal_failure, or ready. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } [JsonProperty("status_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status_details")] +#endif public TestClockStatusDetails StatusDetails { get; set; } } } diff --git a/src/Stripe.net/Entities/TestHelpers/TestClocks/TestClockStatusDetails.cs b/src/Stripe.net/Entities/TestHelpers/TestClocks/TestClockStatusDetails.cs index 80f5c7edf7..8f4804011f 100644 --- a/src/Stripe.net/Entities/TestHelpers/TestClocks/TestClockStatusDetails.cs +++ b/src/Stripe.net/Entities/TestHelpers/TestClocks/TestClockStatusDetails.cs @@ -2,10 +2,16 @@ namespace Stripe.TestHelpers { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TestClockStatusDetails : StripeEntity { [JsonProperty("advancing")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("advancing")] +#endif public TestClockStatusDetailsAdvancing Advancing { get; set; } } } diff --git a/src/Stripe.net/Entities/TestHelpers/TestClocks/TestClockStatusDetailsAdvancing.cs b/src/Stripe.net/Entities/TestHelpers/TestClocks/TestClockStatusDetailsAdvancing.cs index f72d84da0e..66a9a8638e 100644 --- a/src/Stripe.net/Entities/TestHelpers/TestClocks/TestClockStatusDetailsAdvancing.cs +++ b/src/Stripe.net/Entities/TestHelpers/TestClocks/TestClockStatusDetailsAdvancing.cs @@ -4,6 +4,9 @@ namespace Stripe.TestHelpers using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TestClockStatusDetailsAdvancing : StripeEntity { @@ -12,6 +15,10 @@ public class TestClockStatusDetailsAdvancing : StripeEntity [JsonProperty("target_frozen_time")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("target_frozen_time")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime TargetFrozenTime { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; } } diff --git a/src/Stripe.net/Entities/Tokens/Token.cs b/src/Stripe.net/Entities/Tokens/Token.cs index 69050a26ec..eb5352e95c 100644 --- a/src/Stripe.net/Entities/Tokens/Token.cs +++ b/src/Stripe.net/Entities/Tokens/Token.cs @@ -4,6 +4,9 @@ namespace Stripe using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// Tokenization is the process Stripe uses to collect sensitive card or bank account @@ -31,12 +34,18 @@ public class Token : StripeEntity, IHasId, IHasObject /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// @@ -50,6 +59,9 @@ public class Token : StripeEntity, IHasId, IHasObject /// and transfers. /// [JsonProperty("bank_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_account")] +#endif public BankAccount BankAccount { get; set; } /// @@ -61,12 +73,18 @@ public class Token : StripeEntity, IHasId, IHasObject /// Sources. /// [JsonProperty("card")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card")] +#endif public Card Card { get; set; } /// /// IP address of the client that generates the token. /// [JsonProperty("client_ip")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("client_ip")] +#endif public string ClientIp { get; set; } /// @@ -74,6 +92,10 @@ public class Token : StripeEntity, IHasId, IHasObject /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -81,18 +103,27 @@ public class Token : StripeEntity, IHasId, IHasObject /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// /// Type of the token: account, bank_account, card, or pii. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } /// /// Determines if you have already used this token (you can only use tokens once). /// [JsonProperty("used")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("used")] +#endif public bool Used { get; set; } } } diff --git a/src/Stripe.net/Entities/Topups/Topup.cs b/src/Stripe.net/Entities/Topups/Topup.cs index e74c75fda7..e2754310ba 100644 --- a/src/Stripe.net/Entities/Topups/Topup.cs +++ b/src/Stripe.net/Entities/Topups/Topup.cs @@ -5,6 +5,9 @@ namespace Stripe using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// To top up your Stripe balance, you create a top-up object. You can retrieve individual @@ -13,24 +16,36 @@ namespace Stripe /// Related guide: Topping up your /// platform account. /// +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class Topup : StripeEntity, IHasId, IHasMetadata, IHasObject, IBalanceTransactionSource { /// /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// /// Amount transferred. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long Amount { get; set; } #region Expandable BalanceTransaction @@ -41,6 +56,9 @@ public class Topup : StripeEntity, IHasId, IHasMetadata, IHasObject, IBal /// balance. May not be specified depending on status of top-up. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string BalanceTransactionId { get => this.InternalBalanceTransaction?.Id; @@ -55,6 +73,9 @@ public string BalanceTransactionId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public BalanceTransaction BalanceTransaction { get => this.InternalBalanceTransaction?.ExpandedObject; @@ -63,6 +84,10 @@ public BalanceTransaction BalanceTransaction [JsonProperty("balance_transaction")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("balance_transaction")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalBalanceTransaction { get; set; } #endregion @@ -71,6 +96,10 @@ public BalanceTransaction BalanceTransaction /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -79,12 +108,18 @@ public BalanceTransaction BalanceTransaction /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// /// An arbitrary string attached to the object. Often useful for displaying to users. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// @@ -94,6 +129,10 @@ public BalanceTransaction BalanceTransaction /// [JsonProperty("expected_availability_date")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("expected_availability_date")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? ExpectedAvailabilityDate { get; set; } /// @@ -101,12 +140,18 @@ public BalanceTransaction BalanceTransaction /// href="https://stripe.com/docs/api#errors">the errors section for a list of codes). /// [JsonProperty("failure_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("failure_code")] +#endif public string FailureCode { get; set; } /// /// Message to user further explaining reason for top-up failure if available. /// [JsonProperty("failure_message")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("failure_message")] +#endif public string FailureMessage { get; set; } /// @@ -114,6 +159,9 @@ public BalanceTransaction BalanceTransaction /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// @@ -122,12 +170,18 @@ public BalanceTransaction BalanceTransaction /// object in a structured format. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// The source field is deprecated. It might not always be present in the API response. /// [JsonProperty("source")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("source")] +#endif public Source Source { get; set; } /// @@ -135,6 +189,9 @@ public BalanceTransaction BalanceTransaction /// must contain at least one letter. /// [JsonProperty("statement_descriptor")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("statement_descriptor")] +#endif public string StatementDescriptor { get; set; } /// @@ -144,12 +201,18 @@ public BalanceTransaction BalanceTransaction /// succeeded. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } /// /// A string that identifies this top-up as part of a group. /// [JsonProperty("transfer_group")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transfer_group")] +#endif public string TransferGroup { get; set; } } } diff --git a/src/Stripe.net/Entities/TransferReversals/TransferReversal.cs b/src/Stripe.net/Entities/TransferReversals/TransferReversal.cs index 46387dddc7..3a11dc23e2 100644 --- a/src/Stripe.net/Entities/TransferReversals/TransferReversal.cs +++ b/src/Stripe.net/Entities/TransferReversals/TransferReversal.cs @@ -5,6 +5,9 @@ namespace Stripe using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// Stripe Connect platforms can reverse @@ -22,24 +25,36 @@ namespace Stripe /// href="https://stripe.com/docs/connect/separate-charges-and-transfers#reverse-transfers">Reverse /// transfers. /// +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class TransferReversal : StripeEntity, IHasId, IHasMetadata, IHasObject, IBalanceTransactionSource { /// /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// /// Amount, in cents (or local equivalent). /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long Amount { get; set; } #region Expandable BalanceTransaction @@ -49,6 +64,9 @@ public class TransferReversal : StripeEntity, IHasId, IHasMeta /// Balance transaction that describes the impact on your account balance. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string BalanceTransactionId { get => this.InternalBalanceTransaction?.Id; @@ -62,6 +80,9 @@ public string BalanceTransactionId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public BalanceTransaction BalanceTransaction { get => this.InternalBalanceTransaction?.ExpandedObject; @@ -70,6 +91,10 @@ public BalanceTransaction BalanceTransaction [JsonProperty("balance_transaction")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("balance_transaction")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalBalanceTransaction { get; set; } #endregion @@ -78,6 +103,10 @@ public BalanceTransaction BalanceTransaction /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -86,6 +115,9 @@ public BalanceTransaction BalanceTransaction /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } #region Expandable DestinationPaymentRefund @@ -95,6 +127,9 @@ public BalanceTransaction BalanceTransaction /// Linked payment refund for the transfer reversal. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string DestinationPaymentRefundId { get => this.InternalDestinationPaymentRefund?.Id; @@ -108,6 +143,9 @@ public string DestinationPaymentRefundId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Refund DestinationPaymentRefund { get => this.InternalDestinationPaymentRefund?.ExpandedObject; @@ -116,6 +154,10 @@ public Refund DestinationPaymentRefund [JsonProperty("destination_payment_refund")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("destination_payment_refund")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalDestinationPaymentRefund { get; set; } #endregion @@ -125,6 +167,9 @@ public Refund DestinationPaymentRefund /// object in a structured format. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } #region Expandable SourceRefund @@ -134,6 +179,9 @@ public Refund DestinationPaymentRefund /// ID of the refund responsible for the transfer reversal. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string SourceRefundId { get => this.InternalSourceRefund?.Id; @@ -147,6 +195,9 @@ public string SourceRefundId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Refund SourceRefund { get => this.InternalSourceRefund?.ExpandedObject; @@ -155,6 +206,10 @@ public Refund SourceRefund [JsonProperty("source_refund")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("source_refund")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalSourceRefund { get; set; } #endregion @@ -165,6 +220,9 @@ public Refund SourceRefund /// ID of the transfer that was reversed. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string TransferId { get => this.InternalTransfer?.Id; @@ -178,6 +236,9 @@ public string TransferId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Transfer Transfer { get => this.InternalTransfer?.ExpandedObject; @@ -186,6 +247,10 @@ public Transfer Transfer [JsonProperty("transfer")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transfer")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalTransfer { get; set; } #endregion } diff --git a/src/Stripe.net/Entities/Transfers/Transfer.cs b/src/Stripe.net/Entities/Transfers/Transfer.cs index 543ec0303e..b52051b882 100644 --- a/src/Stripe.net/Entities/Transfers/Transfer.cs +++ b/src/Stripe.net/Entities/Transfers/Transfer.cs @@ -5,6 +5,9 @@ namespace Stripe using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// A Transfer object is created when you move funds between Stripe accounts as part @@ -20,24 +23,36 @@ namespace Stripe /// href="https://stripe.com/docs/connect/separate-charges-and-transfers">Creating separate /// charges and transfers. /// +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class Transfer : StripeEntity, IHasId, IHasMetadata, IHasObject, IBalanceTransactionSource { /// /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// /// Amount in cents (or local equivalent) to be transferred. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long Amount { get; set; } /// @@ -45,6 +60,9 @@ public class Transfer : StripeEntity, IHasId, IHasMetadata, IHasObject /// the transfer if a partial reversal was issued). /// [JsonProperty("amount_reversed")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_reversed")] +#endif public long AmountReversed { get; set; } #region Expandable BalanceTransaction @@ -54,6 +72,9 @@ public class Transfer : StripeEntity, IHasId, IHasMetadata, IHasObject /// Balance transaction that describes the impact of this transfer on your account balance. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string BalanceTransactionId { get => this.InternalBalanceTransaction?.Id; @@ -67,6 +88,9 @@ public string BalanceTransactionId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public BalanceTransaction BalanceTransaction { get => this.InternalBalanceTransaction?.ExpandedObject; @@ -75,6 +99,10 @@ public BalanceTransaction BalanceTransaction [JsonProperty("balance_transaction")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("balance_transaction")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalBalanceTransaction { get; set; } #endregion @@ -83,6 +111,10 @@ public BalanceTransaction BalanceTransaction /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -91,12 +123,18 @@ public BalanceTransaction BalanceTransaction /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// /// An arbitrary string attached to the object. Often useful for displaying to users. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } #region Expandable Destination @@ -106,6 +144,9 @@ public BalanceTransaction BalanceTransaction /// ID of the Stripe account the transfer was sent to. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string DestinationId { get => this.InternalDestination?.Id; @@ -119,6 +160,9 @@ public string DestinationId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Account Destination { get => this.InternalDestination?.ExpandedObject; @@ -127,6 +171,10 @@ public Account Destination [JsonProperty("destination")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("destination")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalDestination { get; set; } #endregion @@ -138,6 +186,9 @@ public Account Destination /// destination account received for the transfer. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string DestinationPaymentId { get => this.InternalDestinationPayment?.Id; @@ -152,6 +203,9 @@ public string DestinationPaymentId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Charge DestinationPayment { get => this.InternalDestinationPayment?.ExpandedObject; @@ -160,6 +214,10 @@ public Charge DestinationPayment [JsonProperty("destination_payment")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("destination_payment")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalDestinationPayment { get; set; } #endregion @@ -168,6 +226,9 @@ public Charge DestinationPayment /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// @@ -176,12 +237,18 @@ public Charge DestinationPayment /// object in a structured format. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// A list of reversals that have been applied to the transfer. /// [JsonProperty("reversals")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reversals")] +#endif public StripeList Reversals { get; set; } /// @@ -189,6 +256,9 @@ public Charge DestinationPayment /// reversed, this attribute will still be false. /// [JsonProperty("reversed")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reversed")] +#endif public bool Reversed { get; set; } #region Expandable SourceTransaction @@ -199,6 +269,9 @@ public Charge DestinationPayment /// from the available balance. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string SourceTransactionId { get => this.InternalSourceTransaction?.Id; @@ -213,6 +286,9 @@ public string SourceTransactionId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Charge SourceTransaction { get => this.InternalSourceTransaction?.ExpandedObject; @@ -221,6 +297,10 @@ public Charge SourceTransaction [JsonProperty("source_transaction")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("source_transaction")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalSourceTransaction { get; set; } #endregion @@ -229,6 +309,9 @@ public Charge SourceTransaction /// bank_account. /// [JsonProperty("source_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("source_type")] +#endif public string SourceType { get; set; } /// @@ -237,6 +320,9 @@ public Charge SourceTransaction /// documentation for details. /// [JsonProperty("transfer_group")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transfer_group")] +#endif public string TransferGroup { get; set; } } } diff --git a/src/Stripe.net/Entities/Treasury/CreditReversals/CreditReversal.cs b/src/Stripe.net/Entities/Treasury/CreditReversals/CreditReversal.cs index 41c85be1f5..0de64ad359 100644 --- a/src/Stripe.net/Entities/Treasury/CreditReversals/CreditReversal.cs +++ b/src/Stripe.net/Entities/Treasury/CreditReversals/CreditReversal.cs @@ -5,6 +5,9 @@ namespace Stripe.Treasury using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// You can reverse some +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class CreditReversal : StripeEntity, IHasId, IHasMetadata, IHasObject { /// /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// /// Amount (in cents) transferred. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long Amount { get; set; } /// @@ -37,6 +52,10 @@ public class CreditReversal : StripeEntity, IHasId, IHasMetadata /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -45,12 +64,18 @@ public class CreditReversal : StripeEntity, IHasId, IHasMetadata /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// /// The FinancialAccount to reverse funds from. /// [JsonProperty("financial_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("financial_account")] +#endif public string FinancialAccount { get; set; } /// @@ -59,6 +84,9 @@ public class CreditReversal : StripeEntity, IHasId, IHasMetadata /// under Stripe's money transmission licenses. /// [JsonProperty("hosted_regulatory_receipt_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("hosted_regulatory_receipt_url")] +#endif public string HostedRegulatoryReceiptUrl { get; set; } /// @@ -66,6 +94,9 @@ public class CreditReversal : StripeEntity, IHasId, IHasMetadata /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// @@ -74,6 +105,9 @@ public class CreditReversal : StripeEntity, IHasId, IHasMetadata /// object in a structured format. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -81,12 +115,18 @@ public class CreditReversal : StripeEntity, IHasId, IHasMetadata /// One of: ach, or stripe. /// [JsonProperty("network")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("network")] +#endif public string Network { get; set; } /// /// The ReceivedCredit being reversed. /// [JsonProperty("received_credit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("received_credit")] +#endif public string ReceivedCredit { get; set; } /// @@ -94,9 +134,15 @@ public class CreditReversal : StripeEntity, IHasId, IHasMetadata /// One of: canceled, posted, or processing. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } [JsonProperty("status_transitions")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status_transitions")] +#endif public CreditReversalStatusTransitions StatusTransitions { get; set; } #region Expandable Transaction @@ -106,6 +152,9 @@ public class CreditReversal : StripeEntity, IHasId, IHasMetadata /// The Transaction associated with this object. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string TransactionId { get => this.InternalTransaction?.Id; @@ -119,6 +168,9 @@ public string TransactionId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Transaction Transaction { get => this.InternalTransaction?.ExpandedObject; @@ -127,6 +179,10 @@ public Transaction Transaction [JsonProperty("transaction")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transaction")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalTransaction { get; set; } #endregion } diff --git a/src/Stripe.net/Entities/Treasury/CreditReversals/CreditReversalStatusTransitions.cs b/src/Stripe.net/Entities/Treasury/CreditReversals/CreditReversalStatusTransitions.cs index 33d636c0f2..8f5ce5eaae 100644 --- a/src/Stripe.net/Entities/Treasury/CreditReversals/CreditReversalStatusTransitions.cs +++ b/src/Stripe.net/Entities/Treasury/CreditReversals/CreditReversalStatusTransitions.cs @@ -4,6 +4,9 @@ namespace Stripe.Treasury using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CreditReversalStatusTransitions : StripeEntity { @@ -12,6 +15,10 @@ public class CreditReversalStatusTransitions : StripeEntity [JsonProperty("posted_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("posted_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? PostedAt { get; set; } } } diff --git a/src/Stripe.net/Entities/Treasury/DebitReversals/DebitReversal.cs b/src/Stripe.net/Entities/Treasury/DebitReversals/DebitReversal.cs index 3d109c607c..0d730f9f85 100644 --- a/src/Stripe.net/Entities/Treasury/DebitReversals/DebitReversal.cs +++ b/src/Stripe.net/Entities/Treasury/DebitReversals/DebitReversal.cs @@ -5,6 +5,9 @@ namespace Stripe.Treasury using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// You can reverse some +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class DebitReversal : StripeEntity, IHasId, IHasMetadata, IHasObject { /// /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// /// Amount (in cents) transferred. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long Amount { get; set; } /// @@ -37,6 +52,10 @@ public class DebitReversal : StripeEntity, IHasId, IHasMetadata, /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -45,12 +64,18 @@ public class DebitReversal : StripeEntity, IHasId, IHasMetadata, /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// /// The FinancialAccount to reverse funds from. /// [JsonProperty("financial_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("financial_account")] +#endif public string FinancialAccount { get; set; } /// @@ -59,12 +84,18 @@ public class DebitReversal : StripeEntity, IHasId, IHasMetadata, /// under Stripe's money transmission licenses. /// [JsonProperty("hosted_regulatory_receipt_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("hosted_regulatory_receipt_url")] +#endif public string HostedRegulatoryReceiptUrl { get; set; } /// /// Other flows linked to a DebitReversal. /// [JsonProperty("linked_flows")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("linked_flows")] +#endif public DebitReversalLinkedFlows LinkedFlows { get; set; } /// @@ -72,6 +103,9 @@ public class DebitReversal : StripeEntity, IHasId, IHasMetadata, /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// @@ -80,6 +114,9 @@ public class DebitReversal : StripeEntity, IHasId, IHasMetadata, /// object in a structured format. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -87,12 +124,18 @@ public class DebitReversal : StripeEntity, IHasId, IHasMetadata, /// One of: ach, or card. /// [JsonProperty("network")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("network")] +#endif public string Network { get; set; } /// /// The ReceivedDebit being reversed. /// [JsonProperty("received_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("received_debit")] +#endif public string ReceivedDebit { get; set; } /// @@ -100,9 +143,15 @@ public class DebitReversal : StripeEntity, IHasId, IHasMetadata, /// One of: failed, processing, or succeeded. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } [JsonProperty("status_transitions")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status_transitions")] +#endif public DebitReversalStatusTransitions StatusTransitions { get; set; } #region Expandable Transaction @@ -112,6 +161,9 @@ public class DebitReversal : StripeEntity, IHasId, IHasMetadata, /// The Transaction associated with this object. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string TransactionId { get => this.InternalTransaction?.Id; @@ -125,6 +177,9 @@ public string TransactionId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Transaction Transaction { get => this.InternalTransaction?.ExpandedObject; @@ -133,6 +188,10 @@ public Transaction Transaction [JsonProperty("transaction")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transaction")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalTransaction { get; set; } #endregion } diff --git a/src/Stripe.net/Entities/Treasury/DebitReversals/DebitReversalLinkedFlows.cs b/src/Stripe.net/Entities/Treasury/DebitReversals/DebitReversalLinkedFlows.cs index 3b2fab9afd..47487eaacc 100644 --- a/src/Stripe.net/Entities/Treasury/DebitReversals/DebitReversalLinkedFlows.cs +++ b/src/Stripe.net/Entities/Treasury/DebitReversals/DebitReversalLinkedFlows.cs @@ -2,6 +2,9 @@ namespace Stripe.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class DebitReversalLinkedFlows : StripeEntity { @@ -9,6 +12,9 @@ public class DebitReversalLinkedFlows : StripeEntity /// Set if there is an Issuing dispute associated with the DebitReversal. /// [JsonProperty("issuing_dispute")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("issuing_dispute")] +#endif public string IssuingDispute { get; set; } } } diff --git a/src/Stripe.net/Entities/Treasury/DebitReversals/DebitReversalStatusTransitions.cs b/src/Stripe.net/Entities/Treasury/DebitReversals/DebitReversalStatusTransitions.cs index c2c7bf99da..095a9ccb2e 100644 --- a/src/Stripe.net/Entities/Treasury/DebitReversals/DebitReversalStatusTransitions.cs +++ b/src/Stripe.net/Entities/Treasury/DebitReversals/DebitReversalStatusTransitions.cs @@ -4,6 +4,9 @@ namespace Stripe.Treasury using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class DebitReversalStatusTransitions : StripeEntity { @@ -12,6 +15,10 @@ public class DebitReversalStatusTransitions : StripeEntity [JsonProperty("completed_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("completed_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? CompletedAt { get; set; } } } diff --git a/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeatures.cs b/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeatures.cs index 247cd96e9f..96a560d929 100644 --- a/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeatures.cs +++ b/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeatures.cs @@ -2,6 +2,9 @@ namespace Stripe.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// Encodes whether a FinancialAccount has access to a particular Feature, with a @@ -14,48 +17,72 @@ public class FinancialAccountFeatures : StripeEntity, /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// /// Toggle settings for enabling/disabling a feature. /// [JsonProperty("card_issuing")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card_issuing")] +#endif public FinancialAccountFeaturesCardIssuing CardIssuing { get; set; } /// /// Toggle settings for enabling/disabling a feature. /// [JsonProperty("deposit_insurance")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("deposit_insurance")] +#endif public FinancialAccountFeaturesDepositInsurance DepositInsurance { get; set; } /// /// Settings related to Financial Addresses features on a Financial Account. /// [JsonProperty("financial_addresses")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("financial_addresses")] +#endif public FinancialAccountFeaturesFinancialAddresses FinancialAddresses { get; set; } /// /// InboundTransfers contains inbound transfers features for a FinancialAccount. /// [JsonProperty("inbound_transfers")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("inbound_transfers")] +#endif public FinancialAccountFeaturesInboundTransfers InboundTransfers { get; set; } /// /// Toggle settings for enabling/disabling a feature. /// [JsonProperty("intra_stripe_flows")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("intra_stripe_flows")] +#endif public FinancialAccountFeaturesIntraStripeFlows IntraStripeFlows { get; set; } /// /// Settings related to Outbound Payments features on a Financial Account. /// [JsonProperty("outbound_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("outbound_payments")] +#endif public FinancialAccountFeaturesOutboundPayments OutboundPayments { get; set; } /// /// OutboundTransfers contains outbound transfers features for a FinancialAccount. /// [JsonProperty("outbound_transfers")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("outbound_transfers")] +#endif public FinancialAccountFeaturesOutboundTransfers OutboundTransfers { get; set; } } } diff --git a/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesCardIssuing.cs b/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesCardIssuing.cs index 83bf051201..5ad3b97e42 100644 --- a/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesCardIssuing.cs +++ b/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesCardIssuing.cs @@ -3,6 +3,9 @@ namespace Stripe.Treasury { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class FinancialAccountFeaturesCardIssuing : StripeEntity { @@ -10,6 +13,9 @@ public class FinancialAccountFeaturesCardIssuing : StripeEntity [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif public bool Requested { get; set; } /// @@ -17,12 +23,18 @@ public class FinancialAccountFeaturesCardIssuing : StripeEntityactive, pending, or restricted. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } /// /// Additional details; includes at least one entry when the status is not active. /// [JsonProperty("status_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status_details")] +#endif public List StatusDetails { get; set; } } } diff --git a/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesCardIssuingStatusDetail.cs b/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesCardIssuingStatusDetail.cs index 5f5501093c..31d792cc23 100644 --- a/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesCardIssuingStatusDetail.cs +++ b/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesCardIssuingStatusDetail.cs @@ -2,6 +2,9 @@ namespace Stripe.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class FinancialAccountFeaturesCardIssuingStatusDetail : StripeEntity { @@ -14,6 +17,9 @@ public class FinancialAccountFeaturesCardIssuingStatusDetail : StripeEntityrestricted_other. /// [JsonProperty("code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("code")] +#endif public string Code { get; set; } /// @@ -21,6 +27,9 @@ public class FinancialAccountFeaturesCardIssuingStatusDetail : StripeEntitycontact_stripe, provide_information, or remove_restriction. /// [JsonProperty("resolution")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("resolution")] +#endif public string Resolution { get; set; } /// @@ -28,6 +37,9 @@ public class FinancialAccountFeaturesCardIssuingStatusDetail : StripeEntityinbound_flows, or outbound_flows. /// [JsonProperty("restriction")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("restriction")] +#endif public string Restriction { get; set; } } } diff --git a/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesDepositInsurance.cs b/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesDepositInsurance.cs index c2d47b382a..838f5f29b7 100644 --- a/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesDepositInsurance.cs +++ b/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesDepositInsurance.cs @@ -3,6 +3,9 @@ namespace Stripe.Treasury { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class FinancialAccountFeaturesDepositInsurance : StripeEntity { @@ -10,6 +13,9 @@ public class FinancialAccountFeaturesDepositInsurance : StripeEntity [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif public bool Requested { get; set; } /// @@ -17,12 +23,18 @@ public class FinancialAccountFeaturesDepositInsurance : StripeEntityactive, pending, or restricted. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } /// /// Additional details; includes at least one entry when the status is not active. /// [JsonProperty("status_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status_details")] +#endif public List StatusDetails { get; set; } } } diff --git a/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesDepositInsuranceStatusDetail.cs b/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesDepositInsuranceStatusDetail.cs index 3e8b5f2b09..17a60e6399 100644 --- a/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesDepositInsuranceStatusDetail.cs +++ b/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesDepositInsuranceStatusDetail.cs @@ -2,6 +2,9 @@ namespace Stripe.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class FinancialAccountFeaturesDepositInsuranceStatusDetail : StripeEntity { @@ -14,6 +17,9 @@ public class FinancialAccountFeaturesDepositInsuranceStatusDetail : StripeEntity /// restricted_other. /// [JsonProperty("code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("code")] +#endif public string Code { get; set; } /// @@ -21,6 +27,9 @@ public class FinancialAccountFeaturesDepositInsuranceStatusDetail : StripeEntity /// One of: contact_stripe, provide_information, or remove_restriction. /// [JsonProperty("resolution")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("resolution")] +#endif public string Resolution { get; set; } /// @@ -28,6 +37,9 @@ public class FinancialAccountFeaturesDepositInsuranceStatusDetail : StripeEntity /// One of: inbound_flows, or outbound_flows. /// [JsonProperty("restriction")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("restriction")] +#endif public string Restriction { get; set; } } } diff --git a/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesFinancialAddresses.cs b/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesFinancialAddresses.cs index cf1b6f0e33..d4b6f91f1c 100644 --- a/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesFinancialAddresses.cs +++ b/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesFinancialAddresses.cs @@ -2,6 +2,9 @@ namespace Stripe.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class FinancialAccountFeaturesFinancialAddresses : StripeEntity { @@ -9,6 +12,9 @@ public class FinancialAccountFeaturesFinancialAddresses : StripeEntity [JsonProperty("aba")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("aba")] +#endif public FinancialAccountFeaturesFinancialAddressesAba Aba { get; set; } } } diff --git a/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesFinancialAddressesAba.cs b/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesFinancialAddressesAba.cs index 2cc350d1de..8763deb5b2 100644 --- a/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesFinancialAddressesAba.cs +++ b/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesFinancialAddressesAba.cs @@ -3,6 +3,9 @@ namespace Stripe.Treasury { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class FinancialAccountFeaturesFinancialAddressesAba : StripeEntity { @@ -10,6 +13,9 @@ public class FinancialAccountFeaturesFinancialAddressesAba : StripeEntity [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif public bool Requested { get; set; } /// @@ -17,12 +23,18 @@ public class FinancialAccountFeaturesFinancialAddressesAba : StripeEntityactive, pending, or restricted. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } /// /// Additional details; includes at least one entry when the status is not active. /// [JsonProperty("status_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status_details")] +#endif public List StatusDetails { get; set; } } } diff --git a/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesFinancialAddressesAbaStatusDetail.cs b/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesFinancialAddressesAbaStatusDetail.cs index f8591e7219..b3bb3b2c72 100644 --- a/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesFinancialAddressesAbaStatusDetail.cs +++ b/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesFinancialAddressesAbaStatusDetail.cs @@ -2,6 +2,9 @@ namespace Stripe.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class FinancialAccountFeaturesFinancialAddressesAbaStatusDetail : StripeEntity { @@ -14,6 +17,9 @@ public class FinancialAccountFeaturesFinancialAddressesAbaStatusDetail : StripeE /// restricted_other. /// [JsonProperty("code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("code")] +#endif public string Code { get; set; } /// @@ -21,6 +27,9 @@ public class FinancialAccountFeaturesFinancialAddressesAbaStatusDetail : StripeE /// One of: contact_stripe, provide_information, or remove_restriction. /// [JsonProperty("resolution")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("resolution")] +#endif public string Resolution { get; set; } /// @@ -28,6 +37,9 @@ public class FinancialAccountFeaturesFinancialAddressesAbaStatusDetail : StripeE /// One of: inbound_flows, or outbound_flows. /// [JsonProperty("restriction")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("restriction")] +#endif public string Restriction { get; set; } } } diff --git a/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesInboundTransfers.cs b/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesInboundTransfers.cs index 52a930ebc3..81508fa4d9 100644 --- a/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesInboundTransfers.cs +++ b/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesInboundTransfers.cs @@ -2,6 +2,9 @@ namespace Stripe.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class FinancialAccountFeaturesInboundTransfers : StripeEntity { @@ -9,6 +12,9 @@ public class FinancialAccountFeaturesInboundTransfers : StripeEntity [JsonProperty("ach")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ach")] +#endif public FinancialAccountFeaturesInboundTransfersAch Ach { get; set; } } } diff --git a/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesInboundTransfersAch.cs b/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesInboundTransfersAch.cs index 89ef7e751e..780d642adc 100644 --- a/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesInboundTransfersAch.cs +++ b/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesInboundTransfersAch.cs @@ -3,6 +3,9 @@ namespace Stripe.Treasury { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class FinancialAccountFeaturesInboundTransfersAch : StripeEntity { @@ -10,6 +13,9 @@ public class FinancialAccountFeaturesInboundTransfersAch : StripeEntity [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif public bool Requested { get; set; } /// @@ -17,12 +23,18 @@ public class FinancialAccountFeaturesInboundTransfersAch : StripeEntityactive, pending, or restricted. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } /// /// Additional details; includes at least one entry when the status is not active. /// [JsonProperty("status_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status_details")] +#endif public List StatusDetails { get; set; } } } diff --git a/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesInboundTransfersAchStatusDetail.cs b/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesInboundTransfersAchStatusDetail.cs index 4338055b36..382f7d580b 100644 --- a/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesInboundTransfersAchStatusDetail.cs +++ b/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesInboundTransfersAchStatusDetail.cs @@ -2,6 +2,9 @@ namespace Stripe.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class FinancialAccountFeaturesInboundTransfersAchStatusDetail : StripeEntity { @@ -14,6 +17,9 @@ public class FinancialAccountFeaturesInboundTransfersAchStatusDetail : StripeEnt /// restricted_other. /// [JsonProperty("code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("code")] +#endif public string Code { get; set; } /// @@ -21,6 +27,9 @@ public class FinancialAccountFeaturesInboundTransfersAchStatusDetail : StripeEnt /// One of: contact_stripe, provide_information, or remove_restriction. /// [JsonProperty("resolution")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("resolution")] +#endif public string Resolution { get; set; } /// @@ -28,6 +37,9 @@ public class FinancialAccountFeaturesInboundTransfersAchStatusDetail : StripeEnt /// One of: inbound_flows, or outbound_flows. /// [JsonProperty("restriction")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("restriction")] +#endif public string Restriction { get; set; } } } diff --git a/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesIntraStripeFlows.cs b/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesIntraStripeFlows.cs index 41127304c6..123cd27333 100644 --- a/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesIntraStripeFlows.cs +++ b/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesIntraStripeFlows.cs @@ -3,6 +3,9 @@ namespace Stripe.Treasury { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class FinancialAccountFeaturesIntraStripeFlows : StripeEntity { @@ -10,6 +13,9 @@ public class FinancialAccountFeaturesIntraStripeFlows : StripeEntity [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif public bool Requested { get; set; } /// @@ -17,12 +23,18 @@ public class FinancialAccountFeaturesIntraStripeFlows : StripeEntityactive, pending, or restricted. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } /// /// Additional details; includes at least one entry when the status is not active. /// [JsonProperty("status_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status_details")] +#endif public List StatusDetails { get; set; } } } diff --git a/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesIntraStripeFlowsStatusDetail.cs b/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesIntraStripeFlowsStatusDetail.cs index e854763180..e5e953b510 100644 --- a/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesIntraStripeFlowsStatusDetail.cs +++ b/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesIntraStripeFlowsStatusDetail.cs @@ -2,6 +2,9 @@ namespace Stripe.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class FinancialAccountFeaturesIntraStripeFlowsStatusDetail : StripeEntity { @@ -14,6 +17,9 @@ public class FinancialAccountFeaturesIntraStripeFlowsStatusDetail : StripeEntity /// restricted_other. /// [JsonProperty("code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("code")] +#endif public string Code { get; set; } /// @@ -21,6 +27,9 @@ public class FinancialAccountFeaturesIntraStripeFlowsStatusDetail : StripeEntity /// One of: contact_stripe, provide_information, or remove_restriction. /// [JsonProperty("resolution")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("resolution")] +#endif public string Resolution { get; set; } /// @@ -28,6 +37,9 @@ public class FinancialAccountFeaturesIntraStripeFlowsStatusDetail : StripeEntity /// One of: inbound_flows, or outbound_flows. /// [JsonProperty("restriction")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("restriction")] +#endif public string Restriction { get; set; } } } diff --git a/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesOutboundPayments.cs b/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesOutboundPayments.cs index 6bcd8b988d..27371b22cb 100644 --- a/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesOutboundPayments.cs +++ b/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesOutboundPayments.cs @@ -2,6 +2,9 @@ namespace Stripe.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class FinancialAccountFeaturesOutboundPayments : StripeEntity { @@ -9,12 +12,18 @@ public class FinancialAccountFeaturesOutboundPayments : StripeEntity [JsonProperty("ach")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ach")] +#endif public FinancialAccountFeaturesOutboundPaymentsAch Ach { get; set; } /// /// Toggle settings for enabling/disabling a feature. /// [JsonProperty("us_domestic_wire")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("us_domestic_wire")] +#endif public FinancialAccountFeaturesOutboundPaymentsUsDomesticWire UsDomesticWire { get; set; } } } diff --git a/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesOutboundPaymentsAch.cs b/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesOutboundPaymentsAch.cs index 7546d24698..4f35a7f798 100644 --- a/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesOutboundPaymentsAch.cs +++ b/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesOutboundPaymentsAch.cs @@ -3,6 +3,9 @@ namespace Stripe.Treasury { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class FinancialAccountFeaturesOutboundPaymentsAch : StripeEntity { @@ -10,6 +13,9 @@ public class FinancialAccountFeaturesOutboundPaymentsAch : StripeEntity [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif public bool Requested { get; set; } /// @@ -17,12 +23,18 @@ public class FinancialAccountFeaturesOutboundPaymentsAch : StripeEntityactive, pending, or restricted. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } /// /// Additional details; includes at least one entry when the status is not active. /// [JsonProperty("status_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status_details")] +#endif public List StatusDetails { get; set; } } } diff --git a/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesOutboundPaymentsAchStatusDetail.cs b/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesOutboundPaymentsAchStatusDetail.cs index 7accdce114..8a4cca5973 100644 --- a/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesOutboundPaymentsAchStatusDetail.cs +++ b/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesOutboundPaymentsAchStatusDetail.cs @@ -2,6 +2,9 @@ namespace Stripe.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class FinancialAccountFeaturesOutboundPaymentsAchStatusDetail : StripeEntity { @@ -14,6 +17,9 @@ public class FinancialAccountFeaturesOutboundPaymentsAchStatusDetail : StripeEnt /// restricted_other. /// [JsonProperty("code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("code")] +#endif public string Code { get; set; } /// @@ -21,6 +27,9 @@ public class FinancialAccountFeaturesOutboundPaymentsAchStatusDetail : StripeEnt /// One of: contact_stripe, provide_information, or remove_restriction. /// [JsonProperty("resolution")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("resolution")] +#endif public string Resolution { get; set; } /// @@ -28,6 +37,9 @@ public class FinancialAccountFeaturesOutboundPaymentsAchStatusDetail : StripeEnt /// One of: inbound_flows, or outbound_flows. /// [JsonProperty("restriction")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("restriction")] +#endif public string Restriction { get; set; } } } diff --git a/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesOutboundPaymentsUsDomesticWire.cs b/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesOutboundPaymentsUsDomesticWire.cs index 28e5b50774..32418f5600 100644 --- a/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesOutboundPaymentsUsDomesticWire.cs +++ b/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesOutboundPaymentsUsDomesticWire.cs @@ -3,6 +3,9 @@ namespace Stripe.Treasury { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class FinancialAccountFeaturesOutboundPaymentsUsDomesticWire : StripeEntity { @@ -10,6 +13,9 @@ public class FinancialAccountFeaturesOutboundPaymentsUsDomesticWire : StripeEnti /// Whether the FinancialAccount should have the Feature. /// [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif public bool Requested { get; set; } /// @@ -17,12 +23,18 @@ public class FinancialAccountFeaturesOutboundPaymentsUsDomesticWire : StripeEnti /// One of: active, pending, or restricted. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } /// /// Additional details; includes at least one entry when the status is not active. /// [JsonProperty("status_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status_details")] +#endif public List StatusDetails { get; set; } } } diff --git a/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesOutboundPaymentsUsDomesticWireStatusDetail.cs b/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesOutboundPaymentsUsDomesticWireStatusDetail.cs index 17f0b3d999..20da0ae0ed 100644 --- a/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesOutboundPaymentsUsDomesticWireStatusDetail.cs +++ b/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesOutboundPaymentsUsDomesticWireStatusDetail.cs @@ -2,6 +2,9 @@ namespace Stripe.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class FinancialAccountFeaturesOutboundPaymentsUsDomesticWireStatusDetail : StripeEntity { @@ -14,6 +17,9 @@ public class FinancialAccountFeaturesOutboundPaymentsUsDomesticWireStatusDetail /// restricted_other. /// [JsonProperty("code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("code")] +#endif public string Code { get; set; } /// @@ -21,6 +27,9 @@ public class FinancialAccountFeaturesOutboundPaymentsUsDomesticWireStatusDetail /// One of: contact_stripe, provide_information, or remove_restriction. /// [JsonProperty("resolution")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("resolution")] +#endif public string Resolution { get; set; } /// @@ -28,6 +37,9 @@ public class FinancialAccountFeaturesOutboundPaymentsUsDomesticWireStatusDetail /// One of: inbound_flows, or outbound_flows. /// [JsonProperty("restriction")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("restriction")] +#endif public string Restriction { get; set; } } } diff --git a/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesOutboundTransfers.cs b/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesOutboundTransfers.cs index 1b2de07767..25870da5e6 100644 --- a/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesOutboundTransfers.cs +++ b/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesOutboundTransfers.cs @@ -2,6 +2,9 @@ namespace Stripe.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class FinancialAccountFeaturesOutboundTransfers : StripeEntity { @@ -9,12 +12,18 @@ public class FinancialAccountFeaturesOutboundTransfers : StripeEntity [JsonProperty("ach")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ach")] +#endif public FinancialAccountFeaturesOutboundTransfersAch Ach { get; set; } /// /// Toggle settings for enabling/disabling a feature. /// [JsonProperty("us_domestic_wire")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("us_domestic_wire")] +#endif public FinancialAccountFeaturesOutboundTransfersUsDomesticWire UsDomesticWire { get; set; } } } diff --git a/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesOutboundTransfersAch.cs b/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesOutboundTransfersAch.cs index fbe6a93ccf..7903694fc6 100644 --- a/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesOutboundTransfersAch.cs +++ b/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesOutboundTransfersAch.cs @@ -3,6 +3,9 @@ namespace Stripe.Treasury { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class FinancialAccountFeaturesOutboundTransfersAch : StripeEntity { @@ -10,6 +13,9 @@ public class FinancialAccountFeaturesOutboundTransfersAch : StripeEntity [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif public bool Requested { get; set; } /// @@ -17,12 +23,18 @@ public class FinancialAccountFeaturesOutboundTransfersAch : StripeEntityactive, pending, or restricted. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } /// /// Additional details; includes at least one entry when the status is not active. /// [JsonProperty("status_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status_details")] +#endif public List StatusDetails { get; set; } } } diff --git a/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesOutboundTransfersAchStatusDetail.cs b/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesOutboundTransfersAchStatusDetail.cs index 5e37b3e141..41df368e0d 100644 --- a/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesOutboundTransfersAchStatusDetail.cs +++ b/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesOutboundTransfersAchStatusDetail.cs @@ -2,6 +2,9 @@ namespace Stripe.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class FinancialAccountFeaturesOutboundTransfersAchStatusDetail : StripeEntity { @@ -14,6 +17,9 @@ public class FinancialAccountFeaturesOutboundTransfersAchStatusDetail : StripeEn /// restricted_other. /// [JsonProperty("code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("code")] +#endif public string Code { get; set; } /// @@ -21,6 +27,9 @@ public class FinancialAccountFeaturesOutboundTransfersAchStatusDetail : StripeEn /// One of: contact_stripe, provide_information, or remove_restriction. /// [JsonProperty("resolution")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("resolution")] +#endif public string Resolution { get; set; } /// @@ -28,6 +37,9 @@ public class FinancialAccountFeaturesOutboundTransfersAchStatusDetail : StripeEn /// One of: inbound_flows, or outbound_flows. /// [JsonProperty("restriction")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("restriction")] +#endif public string Restriction { get; set; } } } diff --git a/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesOutboundTransfersUsDomesticWire.cs b/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesOutboundTransfersUsDomesticWire.cs index 0034ddcb84..d679d36f53 100644 --- a/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesOutboundTransfersUsDomesticWire.cs +++ b/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesOutboundTransfersUsDomesticWire.cs @@ -3,6 +3,9 @@ namespace Stripe.Treasury { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class FinancialAccountFeaturesOutboundTransfersUsDomesticWire : StripeEntity { @@ -10,6 +13,9 @@ public class FinancialAccountFeaturesOutboundTransfersUsDomesticWire : StripeEnt /// Whether the FinancialAccount should have the Feature. /// [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif public bool Requested { get; set; } /// @@ -17,12 +23,18 @@ public class FinancialAccountFeaturesOutboundTransfersUsDomesticWire : StripeEnt /// One of: active, pending, or restricted. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } /// /// Additional details; includes at least one entry when the status is not active. /// [JsonProperty("status_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status_details")] +#endif public List StatusDetails { get; set; } } } diff --git a/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesOutboundTransfersUsDomesticWireStatusDetail.cs b/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesOutboundTransfersUsDomesticWireStatusDetail.cs index c98aa3a6af..d425108ef9 100644 --- a/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesOutboundTransfersUsDomesticWireStatusDetail.cs +++ b/src/Stripe.net/Entities/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesOutboundTransfersUsDomesticWireStatusDetail.cs @@ -2,6 +2,9 @@ namespace Stripe.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class FinancialAccountFeaturesOutboundTransfersUsDomesticWireStatusDetail : StripeEntity { @@ -14,6 +17,9 @@ public class FinancialAccountFeaturesOutboundTransfersUsDomesticWireStatusDetail /// restricted_other. /// [JsonProperty("code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("code")] +#endif public string Code { get; set; } /// @@ -21,6 +27,9 @@ public class FinancialAccountFeaturesOutboundTransfersUsDomesticWireStatusDetail /// One of: contact_stripe, provide_information, or remove_restriction. /// [JsonProperty("resolution")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("resolution")] +#endif public string Resolution { get; set; } /// @@ -28,6 +37,9 @@ public class FinancialAccountFeaturesOutboundTransfersUsDomesticWireStatusDetail /// One of: inbound_flows, or outbound_flows. /// [JsonProperty("restriction")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("restriction")] +#endif public string Restriction { get; set; } } } diff --git a/src/Stripe.net/Entities/Treasury/FinancialAccounts/FinancialAccount.cs b/src/Stripe.net/Entities/Treasury/FinancialAccounts/FinancialAccount.cs index 5c6c194c53..b0b5d5a71d 100644 --- a/src/Stripe.net/Entities/Treasury/FinancialAccounts/FinancialAccount.cs +++ b/src/Stripe.net/Entities/Treasury/FinancialAccounts/FinancialAccount.cs @@ -5,6 +5,9 @@ namespace Stripe.Treasury using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// Stripe Treasury provides users with a container for money called a FinancialAccount that @@ -17,12 +20,18 @@ public class FinancialAccount : StripeEntity, IHasId, IHasMeta /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// @@ -34,12 +43,18 @@ public class FinancialAccount : StripeEntity, IHasId, IHasMeta /// outbound_transfers.us_domestic_wire, or remote_deposit_capture. /// [JsonProperty("active_features")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("active_features")] +#endif public List ActiveFeatures { get; set; } /// /// Balance information for the FinancialAccount. /// [JsonProperty("balance")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("balance")] +#endif public FinancialAccountBalance Balance { get; set; } /// @@ -47,6 +62,9 @@ public class FinancialAccount : StripeEntity, IHasId, IHasMeta /// 3166-1 alpha-2). /// [JsonProperty("country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country")] +#endif public string Country { get; set; } /// @@ -54,6 +72,10 @@ public class FinancialAccount : StripeEntity, IHasId, IHasMeta /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -62,12 +84,18 @@ public class FinancialAccount : StripeEntity, IHasId, IHasMeta /// control Features via the requested field. /// [JsonProperty("features")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("features")] +#endif public FinancialAccountFeatures Features { get; set; } /// /// The set of credentials that resolve to a FinancialAccount. /// [JsonProperty("financial_addresses")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("financial_addresses")] +#endif public List FinancialAddresses { get; set; } /// @@ -75,6 +103,9 @@ public class FinancialAccount : StripeEntity, IHasId, IHasMeta /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// @@ -83,6 +114,9 @@ public class FinancialAccount : StripeEntity, IHasId, IHasMeta /// object in a structured format. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -94,12 +128,18 @@ public class FinancialAccount : StripeEntity, IHasId, IHasMeta /// outbound_transfers.us_domestic_wire, or remote_deposit_capture. /// [JsonProperty("pending_features")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("pending_features")] +#endif public List PendingFeatures { get; set; } /// /// The set of functionalities that the platform can restrict on the FinancialAccount. /// [JsonProperty("platform_restrictions")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("platform_restrictions")] +#endif public FinancialAccountPlatformRestrictions PlatformRestrictions { get; set; } /// @@ -111,6 +151,9 @@ public class FinancialAccount : StripeEntity, IHasId, IHasMeta /// outbound_transfers.us_domestic_wire, or remote_deposit_capture. /// [JsonProperty("restricted_features")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("restricted_features")] +#endif public List RestrictedFeatures { get; set; } /// @@ -118,9 +161,15 @@ public class FinancialAccount : StripeEntity, IHasId, IHasMeta /// One of: closed, or open. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } [JsonProperty("status_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status_details")] +#endif public FinancialAccountStatusDetails StatusDetails { get; set; } /// @@ -129,6 +178,9 @@ public class FinancialAccount : StripeEntity, IHasId, IHasMeta /// lowercase. /// [JsonProperty("supported_currencies")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("supported_currencies")] +#endif public List SupportedCurrencies { get; set; } } } diff --git a/src/Stripe.net/Entities/Treasury/FinancialAccounts/FinancialAccountBalance.cs b/src/Stripe.net/Entities/Treasury/FinancialAccounts/FinancialAccountBalance.cs index 085e4577ca..4dbb718ad7 100644 --- a/src/Stripe.net/Entities/Treasury/FinancialAccounts/FinancialAccountBalance.cs +++ b/src/Stripe.net/Entities/Treasury/FinancialAccounts/FinancialAccountBalance.cs @@ -3,6 +3,9 @@ namespace Stripe.Treasury { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class FinancialAccountBalance : StripeEntity { @@ -10,12 +13,18 @@ public class FinancialAccountBalance : StripeEntity /// Funds the user can spend right now. /// [JsonProperty("cash")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cash")] +#endif public Dictionary Cash { get; set; } /// /// Funds not spendable yet, but will become available at a later time. /// [JsonProperty("inbound_pending")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("inbound_pending")] +#endif public Dictionary InboundPending { get; set; } /// @@ -23,6 +32,9 @@ public class FinancialAccountBalance : StripeEntity /// flows. /// [JsonProperty("outbound_pending")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("outbound_pending")] +#endif public Dictionary OutboundPending { get; set; } } } diff --git a/src/Stripe.net/Entities/Treasury/FinancialAccounts/FinancialAccountFinancialAddress.cs b/src/Stripe.net/Entities/Treasury/FinancialAccounts/FinancialAccountFinancialAddress.cs index 318d6163fa..c3bc0566ec 100644 --- a/src/Stripe.net/Entities/Treasury/FinancialAccounts/FinancialAccountFinancialAddress.cs +++ b/src/Stripe.net/Entities/Treasury/FinancialAccounts/FinancialAccountFinancialAddress.cs @@ -3,6 +3,9 @@ namespace Stripe.Treasury { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class FinancialAccountFinancialAddress : StripeEntity { @@ -10,6 +13,9 @@ public class FinancialAccountFinancialAddress : StripeEntity [JsonProperty("aba")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("aba")] +#endif public FinancialAccountFinancialAddressAba Aba { get; set; } /// @@ -17,12 +23,18 @@ public class FinancialAccountFinancialAddress : StripeEntityach, or us_domestic_wire. /// [JsonProperty("supported_networks")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("supported_networks")] +#endif public List SupportedNetworks { get; set; } /// /// The type of financial address. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Treasury/FinancialAccounts/FinancialAccountFinancialAddressAba.cs b/src/Stripe.net/Entities/Treasury/FinancialAccounts/FinancialAccountFinancialAddressAba.cs index 64bbf9e7bb..759cda1c76 100644 --- a/src/Stripe.net/Entities/Treasury/FinancialAccounts/FinancialAccountFinancialAddressAba.cs +++ b/src/Stripe.net/Entities/Treasury/FinancialAccounts/FinancialAccountFinancialAddressAba.cs @@ -2,6 +2,9 @@ namespace Stripe.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class FinancialAccountFinancialAddressAba : StripeEntity { @@ -9,30 +12,45 @@ public class FinancialAccountFinancialAddressAba : StripeEntity [JsonProperty("account_holder_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_holder_name")] +#endif public string AccountHolderName { get; set; } /// /// The account number. /// [JsonProperty("account_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_number")] +#endif public string AccountNumber { get; set; } /// /// The last four characters of the account number. /// [JsonProperty("account_number_last4")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_number_last4")] +#endif public string AccountNumberLast4 { get; set; } /// /// Name of the bank. /// [JsonProperty("bank_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_name")] +#endif public string BankName { get; set; } /// /// Routing number for the account. /// [JsonProperty("routing_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("routing_number")] +#endif public string RoutingNumber { get; set; } } } diff --git a/src/Stripe.net/Entities/Treasury/FinancialAccounts/FinancialAccountPlatformRestrictions.cs b/src/Stripe.net/Entities/Treasury/FinancialAccounts/FinancialAccountPlatformRestrictions.cs index f0cfc6983b..c02bc0e05b 100644 --- a/src/Stripe.net/Entities/Treasury/FinancialAccounts/FinancialAccountPlatformRestrictions.cs +++ b/src/Stripe.net/Entities/Treasury/FinancialAccounts/FinancialAccountPlatformRestrictions.cs @@ -2,6 +2,9 @@ namespace Stripe.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class FinancialAccountPlatformRestrictions : StripeEntity { @@ -10,6 +13,9 @@ public class FinancialAccountPlatformRestrictions : StripeEntityrestricted, or unrestricted. /// [JsonProperty("inbound_flows")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("inbound_flows")] +#endif public string InboundFlows { get; set; } /// @@ -17,6 +23,9 @@ public class FinancialAccountPlatformRestrictions : StripeEntityrestricted, or unrestricted. /// [JsonProperty("outbound_flows")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("outbound_flows")] +#endif public string OutboundFlows { get; set; } } } diff --git a/src/Stripe.net/Entities/Treasury/FinancialAccounts/FinancialAccountStatusDetails.cs b/src/Stripe.net/Entities/Treasury/FinancialAccounts/FinancialAccountStatusDetails.cs index cddf186675..2d99ab2088 100644 --- a/src/Stripe.net/Entities/Treasury/FinancialAccounts/FinancialAccountStatusDetails.cs +++ b/src/Stripe.net/Entities/Treasury/FinancialAccounts/FinancialAccountStatusDetails.cs @@ -2,6 +2,9 @@ namespace Stripe.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class FinancialAccountStatusDetails : StripeEntity { @@ -9,6 +12,9 @@ public class FinancialAccountStatusDetails : StripeEntity [JsonProperty("closed")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("closed")] +#endif public FinancialAccountStatusDetailsClosed Closed { get; set; } } } diff --git a/src/Stripe.net/Entities/Treasury/FinancialAccounts/FinancialAccountStatusDetailsClosed.cs b/src/Stripe.net/Entities/Treasury/FinancialAccounts/FinancialAccountStatusDetailsClosed.cs index 846257b357..8d13ecf7b7 100644 --- a/src/Stripe.net/Entities/Treasury/FinancialAccounts/FinancialAccountStatusDetailsClosed.cs +++ b/src/Stripe.net/Entities/Treasury/FinancialAccounts/FinancialAccountStatusDetailsClosed.cs @@ -3,6 +3,9 @@ namespace Stripe.Treasury { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class FinancialAccountStatusDetailsClosed : StripeEntity { @@ -11,6 +14,9 @@ public class FinancialAccountStatusDetailsClosed : StripeEntityaccount_rejected, closed_by_platform, or other. /// [JsonProperty("reasons")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reasons")] +#endif public List Reasons { get; set; } } } diff --git a/src/Stripe.net/Entities/Treasury/InboundTransfers/InboundTransfer.cs b/src/Stripe.net/Entities/Treasury/InboundTransfers/InboundTransfer.cs index 83fcab2fae..17935374ae 100644 --- a/src/Stripe.net/Entities/Treasury/InboundTransfers/InboundTransfer.cs +++ b/src/Stripe.net/Entities/Treasury/InboundTransfers/InboundTransfer.cs @@ -5,6 +5,9 @@ namespace Stripe.Treasury using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// Use Moving /// money with Treasury using InboundTransfer objects. /// +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class InboundTransfer : StripeEntity, IHasId, IHasMetadata, IHasObject { /// /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// /// Amount (in cents) transferred. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long Amount { get; set; } /// /// Returns true if the InboundTransfer is able to be canceled. /// [JsonProperty("cancelable")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cancelable")] +#endif public bool Cancelable { get; set; } /// @@ -48,6 +66,10 @@ public class InboundTransfer : StripeEntity, IHasId, IHasMetada /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -56,24 +78,36 @@ public class InboundTransfer : StripeEntity, IHasId, IHasMetada /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// /// An arbitrary string attached to the object. Often useful for displaying to users. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// /// Details about this InboundTransfer's failure. Only set when status is failed. /// [JsonProperty("failure_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("failure_details")] +#endif public InboundTransferFailureDetails FailureDetails { get; set; } /// /// The FinancialAccount that received the funds. /// [JsonProperty("financial_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("financial_account")] +#endif public string FinancialAccount { get; set; } /// @@ -82,9 +116,15 @@ public class InboundTransfer : StripeEntity, IHasId, IHasMetada /// under Stripe's money transmission licenses. /// [JsonProperty("hosted_regulatory_receipt_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("hosted_regulatory_receipt_url")] +#endif public string HostedRegulatoryReceiptUrl { get; set; } [JsonProperty("linked_flows")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("linked_flows")] +#endif public InboundTransferLinkedFlows LinkedFlows { get; set; } /// @@ -92,6 +132,9 @@ public class InboundTransfer : StripeEntity, IHasId, IHasMetada /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// @@ -100,18 +143,27 @@ public class InboundTransfer : StripeEntity, IHasId, IHasMetada /// object in a structured format. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// The origin payment method to be debited for an InboundTransfer. /// [JsonProperty("origin_payment_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("origin_payment_method")] +#endif public string OriginPaymentMethod { get; set; } /// /// Details about the PaymentMethod for an InboundTransfer. /// [JsonProperty("origin_payment_method_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("origin_payment_method_details")] +#endif public InboundTransferOriginPaymentMethodDetails OriginPaymentMethodDetails { get; set; } /// @@ -119,6 +171,9 @@ public class InboundTransfer : StripeEntity, IHasId, IHasMetada /// InboundTransfer went to the succeeded state. /// [JsonProperty("returned")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("returned")] +#endif public bool? Returned { get; set; } /// @@ -126,6 +181,9 @@ public class InboundTransfer : StripeEntity, IHasId, IHasMetada /// networks support statement_descriptor. /// [JsonProperty("statement_descriptor")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("statement_descriptor")] +#endif public string StatementDescriptor { get; set; } /// @@ -137,9 +195,15 @@ public class InboundTransfer : StripeEntity, IHasId, IHasMetada /// One of: canceled, failed, processing, or succeeded. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } [JsonProperty("status_transitions")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status_transitions")] +#endif public InboundTransferStatusTransitions StatusTransitions { get; set; } #region Expandable Transaction @@ -149,6 +213,9 @@ public class InboundTransfer : StripeEntity, IHasId, IHasMetada /// The Transaction associated with this object. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string TransactionId { get => this.InternalTransaction?.Id; @@ -162,6 +229,9 @@ public string TransactionId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Transaction Transaction { get => this.InternalTransaction?.ExpandedObject; @@ -170,6 +240,10 @@ public Transaction Transaction [JsonProperty("transaction")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transaction")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalTransaction { get; set; } #endregion } diff --git a/src/Stripe.net/Entities/Treasury/InboundTransfers/InboundTransferFailureDetails.cs b/src/Stripe.net/Entities/Treasury/InboundTransfers/InboundTransferFailureDetails.cs index 84db26597e..6842e2801c 100644 --- a/src/Stripe.net/Entities/Treasury/InboundTransfers/InboundTransferFailureDetails.cs +++ b/src/Stripe.net/Entities/Treasury/InboundTransfers/InboundTransferFailureDetails.cs @@ -2,6 +2,9 @@ namespace Stripe.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InboundTransferFailureDetails : StripeEntity { @@ -15,6 +18,9 @@ public class InboundTransferFailureDetails : StripeEntityother. /// [JsonProperty("code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("code")] +#endif public string Code { get; set; } } } diff --git a/src/Stripe.net/Entities/Treasury/InboundTransfers/InboundTransferLinkedFlows.cs b/src/Stripe.net/Entities/Treasury/InboundTransfers/InboundTransferLinkedFlows.cs index 06a40a0802..1edc91a98e 100644 --- a/src/Stripe.net/Entities/Treasury/InboundTransfers/InboundTransferLinkedFlows.cs +++ b/src/Stripe.net/Entities/Treasury/InboundTransfers/InboundTransferLinkedFlows.cs @@ -2,6 +2,9 @@ namespace Stripe.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InboundTransferLinkedFlows : StripeEntity { @@ -10,6 +13,9 @@ public class InboundTransferLinkedFlows : StripeEntity [JsonProperty("received_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("received_debit")] +#endif public string ReceivedDebit { get; set; } } } diff --git a/src/Stripe.net/Entities/Treasury/InboundTransfers/InboundTransferOriginPaymentMethodDetails.cs b/src/Stripe.net/Entities/Treasury/InboundTransfers/InboundTransferOriginPaymentMethodDetails.cs index 42277db259..98c1e9cabe 100644 --- a/src/Stripe.net/Entities/Treasury/InboundTransfers/InboundTransferOriginPaymentMethodDetails.cs +++ b/src/Stripe.net/Entities/Treasury/InboundTransfers/InboundTransferOriginPaymentMethodDetails.cs @@ -2,19 +2,31 @@ namespace Stripe.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InboundTransferOriginPaymentMethodDetails : StripeEntity { [JsonProperty("billing_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_details")] +#endif public InboundTransferOriginPaymentMethodDetailsBillingDetails BillingDetails { get; set; } /// /// The type of the payment method used in the InboundTransfer. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } [JsonProperty("us_bank_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("us_bank_account")] +#endif public InboundTransferOriginPaymentMethodDetailsUsBankAccount UsBankAccount { get; set; } } } diff --git a/src/Stripe.net/Entities/Treasury/InboundTransfers/InboundTransferOriginPaymentMethodDetailsBillingDetails.cs b/src/Stripe.net/Entities/Treasury/InboundTransfers/InboundTransferOriginPaymentMethodDetailsBillingDetails.cs index 7d8eabcc86..b5fd1b23c1 100644 --- a/src/Stripe.net/Entities/Treasury/InboundTransfers/InboundTransferOriginPaymentMethodDetailsBillingDetails.cs +++ b/src/Stripe.net/Entities/Treasury/InboundTransfers/InboundTransferOriginPaymentMethodDetailsBillingDetails.cs @@ -2,22 +2,34 @@ namespace Stripe.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InboundTransferOriginPaymentMethodDetailsBillingDetails : StripeEntity { [JsonProperty("address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address")] +#endif public Address Address { get; set; } /// /// Email address. /// [JsonProperty("email")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("email")] +#endif public string Email { get; set; } /// /// Full name. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } } } diff --git a/src/Stripe.net/Entities/Treasury/InboundTransfers/InboundTransferOriginPaymentMethodDetailsUsBankAccount.cs b/src/Stripe.net/Entities/Treasury/InboundTransfers/InboundTransferOriginPaymentMethodDetailsUsBankAccount.cs index 3632eaf378..23da87aa45 100644 --- a/src/Stripe.net/Entities/Treasury/InboundTransfers/InboundTransferOriginPaymentMethodDetailsUsBankAccount.cs +++ b/src/Stripe.net/Entities/Treasury/InboundTransfers/InboundTransferOriginPaymentMethodDetailsUsBankAccount.cs @@ -3,7 +3,13 @@ namespace Stripe.Treasury { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class InboundTransferOriginPaymentMethodDetailsUsBankAccount : StripeEntity { /// @@ -11,6 +17,9 @@ public class InboundTransferOriginPaymentMethodDetailsUsBankAccount : StripeEnti /// One of: company, or individual. /// [JsonProperty("account_holder_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_holder_type")] +#endif public string AccountHolderType { get; set; } /// @@ -18,12 +27,18 @@ public class InboundTransferOriginPaymentMethodDetailsUsBankAccount : StripeEnti /// One of: checking, or savings. /// [JsonProperty("account_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_type")] +#endif public string AccountType { get; set; } /// /// Name of the bank associated with the bank account. /// [JsonProperty("bank_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_name")] +#endif public string BankName { get; set; } /// @@ -31,12 +46,18 @@ public class InboundTransferOriginPaymentMethodDetailsUsBankAccount : StripeEnti /// whether two bank accounts are the same. /// [JsonProperty("fingerprint")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fingerprint")] +#endif public string Fingerprint { get; set; } /// /// Last four digits of the bank account number. /// [JsonProperty("last4")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last4")] +#endif public string Last4 { get; set; } #region Expandable Mandate @@ -46,6 +67,9 @@ public class InboundTransferOriginPaymentMethodDetailsUsBankAccount : StripeEnti /// ID of the mandate used to make this payment. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string MandateId { get => this.InternalMandate?.Id; @@ -59,6 +83,9 @@ public string MandateId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Mandate Mandate { get => this.InternalMandate?.ExpandedObject; @@ -67,6 +94,10 @@ public Mandate Mandate [JsonProperty("mandate")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mandate")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalMandate { get; set; } #endregion @@ -76,12 +107,18 @@ public Mandate Mandate /// about money movement timelines for each network type. /// [JsonProperty("network")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("network")] +#endif public string Network { get; set; } /// /// Routing number of the bank account. /// [JsonProperty("routing_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("routing_number")] +#endif public string RoutingNumber { get; set; } } } diff --git a/src/Stripe.net/Entities/Treasury/InboundTransfers/InboundTransferStatusTransitions.cs b/src/Stripe.net/Entities/Treasury/InboundTransfers/InboundTransferStatusTransitions.cs index 6140f90b6b..72489dedd9 100644 --- a/src/Stripe.net/Entities/Treasury/InboundTransfers/InboundTransferStatusTransitions.cs +++ b/src/Stripe.net/Entities/Treasury/InboundTransfers/InboundTransferStatusTransitions.cs @@ -4,6 +4,9 @@ namespace Stripe.Treasury using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InboundTransferStatusTransitions : StripeEntity { @@ -12,6 +15,10 @@ public class InboundTransferStatusTransitions : StripeEntity [JsonProperty("canceled_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("canceled_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? CanceledAt { get; set; } /// @@ -19,6 +26,10 @@ public class InboundTransferStatusTransitions : StripeEntity [JsonProperty("failed_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("failed_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? FailedAt { get; set; } /// @@ -26,6 +37,10 @@ public class InboundTransferStatusTransitions : StripeEntity [JsonProperty("succeeded_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("succeeded_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? SucceededAt { get; set; } } } diff --git a/src/Stripe.net/Entities/Treasury/OutboundPayments/OutboundPayment.cs b/src/Stripe.net/Entities/Treasury/OutboundPayments/OutboundPayment.cs index 8ef2e5d39b..64045b8350 100644 --- a/src/Stripe.net/Entities/Treasury/OutboundPayments/OutboundPayment.cs +++ b/src/Stripe.net/Entities/Treasury/OutboundPayments/OutboundPayment.cs @@ -5,6 +5,9 @@ namespace Stripe.Treasury using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// Use Moving /// money with Treasury using OutboundPayment objects. /// +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class OutboundPayment : StripeEntity, IHasId, IHasMetadata, IHasObject { /// /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// /// Amount (in cents) transferred. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long Amount { get; set; } /// /// Returns true if the object can be canceled, and false otherwise. /// [JsonProperty("cancelable")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cancelable")] +#endif public bool Cancelable { get; set; } /// @@ -53,6 +71,10 @@ public class OutboundPayment : StripeEntity, IHasId, IHasMetada /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -61,6 +83,9 @@ public class OutboundPayment : StripeEntity, IHasId, IHasMetada /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// @@ -68,12 +93,18 @@ public class OutboundPayment : StripeEntity, IHasId, IHasMetada /// OutboundPayment is sent. /// [JsonProperty("customer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] +#endif public string Customer { get; set; } /// /// An arbitrary string attached to the object. Often useful for displaying to users. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// @@ -81,18 +112,27 @@ public class OutboundPayment : StripeEntity, IHasId, IHasMetada /// OutboundPayment was created using destination_payment_method_data. /// [JsonProperty("destination_payment_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("destination_payment_method")] +#endif public string DestinationPaymentMethod { get; set; } /// /// Details about the PaymentMethod for an OutboundPayment. /// [JsonProperty("destination_payment_method_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("destination_payment_method_details")] +#endif public OutboundPaymentDestinationPaymentMethodDetails DestinationPaymentMethodDetails { get; set; } /// /// Details about the end user. /// [JsonProperty("end_user_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("end_user_details")] +#endif public OutboundPaymentEndUserDetails EndUserDetails { get; set; } /// @@ -100,12 +140,19 @@ public class OutboundPayment : StripeEntity, IHasId, IHasMetada /// [JsonProperty("expected_arrival_date")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("expected_arrival_date")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime ExpectedArrivalDate { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// /// The FinancialAccount that funds were pulled from. /// [JsonProperty("financial_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("financial_account")] +#endif public string FinancialAccount { get; set; } /// @@ -114,6 +161,9 @@ public class OutboundPayment : StripeEntity, IHasId, IHasMetada /// under Stripe's money transmission licenses. /// [JsonProperty("hosted_regulatory_receipt_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("hosted_regulatory_receipt_url")] +#endif public string HostedRegulatoryReceiptUrl { get; set; } /// @@ -121,6 +171,9 @@ public class OutboundPayment : StripeEntity, IHasId, IHasMetada /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// @@ -129,12 +182,18 @@ public class OutboundPayment : StripeEntity, IHasId, IHasMetada /// object in a structured format. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// Details about a returned OutboundPayment. Only set when the status is returned. /// [JsonProperty("returned_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("returned_details")] +#endif public OutboundPaymentReturnedDetails ReturnedDetails { get; set; } /// @@ -142,6 +201,9 @@ public class OutboundPayment : StripeEntity, IHasId, IHasMetada /// bank statement for external bank transfer). /// [JsonProperty("statement_descriptor")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("statement_descriptor")] +#endif public string StatementDescriptor { get; set; } /// @@ -155,15 +217,24 @@ public class OutboundPayment : StripeEntity, IHasId, IHasMetada /// returned. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } [JsonProperty("status_transitions")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status_transitions")] +#endif public OutboundPaymentStatusTransitions StatusTransitions { get; set; } /// /// Details about network-specific tracking information if available. /// [JsonProperty("tracking_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tracking_details")] +#endif public OutboundPaymentTrackingDetails TrackingDetails { get; set; } #region Expandable Transaction @@ -173,6 +244,9 @@ public class OutboundPayment : StripeEntity, IHasId, IHasMetada /// The Transaction associated with this object. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string TransactionId { get => this.InternalTransaction?.Id; @@ -186,6 +260,9 @@ public string TransactionId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Transaction Transaction { get => this.InternalTransaction?.ExpandedObject; @@ -194,6 +271,10 @@ public Transaction Transaction [JsonProperty("transaction")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transaction")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalTransaction { get; set; } #endregion } diff --git a/src/Stripe.net/Entities/Treasury/OutboundPayments/OutboundPaymentDestinationPaymentMethodDetails.cs b/src/Stripe.net/Entities/Treasury/OutboundPayments/OutboundPaymentDestinationPaymentMethodDetails.cs index 60a0621323..9fe448fbc6 100644 --- a/src/Stripe.net/Entities/Treasury/OutboundPayments/OutboundPaymentDestinationPaymentMethodDetails.cs +++ b/src/Stripe.net/Entities/Treasury/OutboundPayments/OutboundPaymentDestinationPaymentMethodDetails.cs @@ -2,13 +2,22 @@ namespace Stripe.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class OutboundPaymentDestinationPaymentMethodDetails : StripeEntity { [JsonProperty("billing_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_details")] +#endif public OutboundPaymentDestinationPaymentMethodDetailsBillingDetails BillingDetails { get; set; } [JsonProperty("financial_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("financial_account")] +#endif public OutboundPaymentDestinationPaymentMethodDetailsFinancialAccount FinancialAccount { get; set; } /// @@ -16,9 +25,15 @@ public class OutboundPaymentDestinationPaymentMethodDetails : StripeEntityfinancial_account, or us_bank_account. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } [JsonProperty("us_bank_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("us_bank_account")] +#endif public OutboundPaymentDestinationPaymentMethodDetailsUsBankAccount UsBankAccount { get; set; } } } diff --git a/src/Stripe.net/Entities/Treasury/OutboundPayments/OutboundPaymentDestinationPaymentMethodDetailsBillingDetails.cs b/src/Stripe.net/Entities/Treasury/OutboundPayments/OutboundPaymentDestinationPaymentMethodDetailsBillingDetails.cs index 46a6476240..fc3294c3fb 100644 --- a/src/Stripe.net/Entities/Treasury/OutboundPayments/OutboundPaymentDestinationPaymentMethodDetailsBillingDetails.cs +++ b/src/Stripe.net/Entities/Treasury/OutboundPayments/OutboundPaymentDestinationPaymentMethodDetailsBillingDetails.cs @@ -2,22 +2,34 @@ namespace Stripe.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class OutboundPaymentDestinationPaymentMethodDetailsBillingDetails : StripeEntity { [JsonProperty("address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address")] +#endif public Address Address { get; set; } /// /// Email address. /// [JsonProperty("email")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("email")] +#endif public string Email { get; set; } /// /// Full name. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } } } diff --git a/src/Stripe.net/Entities/Treasury/OutboundPayments/OutboundPaymentDestinationPaymentMethodDetailsFinancialAccount.cs b/src/Stripe.net/Entities/Treasury/OutboundPayments/OutboundPaymentDestinationPaymentMethodDetailsFinancialAccount.cs index 0a600bd1b9..f34c3e92a9 100644 --- a/src/Stripe.net/Entities/Treasury/OutboundPayments/OutboundPaymentDestinationPaymentMethodDetailsFinancialAccount.cs +++ b/src/Stripe.net/Entities/Treasury/OutboundPayments/OutboundPaymentDestinationPaymentMethodDetailsFinancialAccount.cs @@ -2,6 +2,9 @@ namespace Stripe.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class OutboundPaymentDestinationPaymentMethodDetailsFinancialAccount : StripeEntity, IHasId { @@ -9,12 +12,18 @@ public class OutboundPaymentDestinationPaymentMethodDetailsFinancialAccount : St /// Token of the FinancialAccount. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// The rails used to send funds. /// [JsonProperty("network")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("network")] +#endif public string Network { get; set; } } } diff --git a/src/Stripe.net/Entities/Treasury/OutboundPayments/OutboundPaymentDestinationPaymentMethodDetailsUsBankAccount.cs b/src/Stripe.net/Entities/Treasury/OutboundPayments/OutboundPaymentDestinationPaymentMethodDetailsUsBankAccount.cs index a38ba79b26..af7749cb3a 100644 --- a/src/Stripe.net/Entities/Treasury/OutboundPayments/OutboundPaymentDestinationPaymentMethodDetailsUsBankAccount.cs +++ b/src/Stripe.net/Entities/Treasury/OutboundPayments/OutboundPaymentDestinationPaymentMethodDetailsUsBankAccount.cs @@ -3,7 +3,13 @@ namespace Stripe.Treasury { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class OutboundPaymentDestinationPaymentMethodDetailsUsBankAccount : StripeEntity { /// @@ -11,6 +17,9 @@ public class OutboundPaymentDestinationPaymentMethodDetailsUsBankAccount : Strip /// One of: company, or individual. /// [JsonProperty("account_holder_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_holder_type")] +#endif public string AccountHolderType { get; set; } /// @@ -18,12 +27,18 @@ public class OutboundPaymentDestinationPaymentMethodDetailsUsBankAccount : Strip /// One of: checking, or savings. /// [JsonProperty("account_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_type")] +#endif public string AccountType { get; set; } /// /// Name of the bank associated with the bank account. /// [JsonProperty("bank_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_name")] +#endif public string BankName { get; set; } /// @@ -31,12 +46,18 @@ public class OutboundPaymentDestinationPaymentMethodDetailsUsBankAccount : Strip /// whether two bank accounts are the same. /// [JsonProperty("fingerprint")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fingerprint")] +#endif public string Fingerprint { get; set; } /// /// Last four digits of the bank account number. /// [JsonProperty("last4")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last4")] +#endif public string Last4 { get; set; } #region Expandable Mandate @@ -46,6 +67,9 @@ public class OutboundPaymentDestinationPaymentMethodDetailsUsBankAccount : Strip /// ID of the mandate used to make this payment. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string MandateId { get => this.InternalMandate?.Id; @@ -59,6 +83,9 @@ public string MandateId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Mandate Mandate { get => this.InternalMandate?.ExpandedObject; @@ -67,6 +94,10 @@ public Mandate Mandate [JsonProperty("mandate")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mandate")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalMandate { get; set; } #endregion @@ -77,12 +108,18 @@ public Mandate Mandate /// One of: ach, or us_domestic_wire. /// [JsonProperty("network")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("network")] +#endif public string Network { get; set; } /// /// Routing number of the bank account. /// [JsonProperty("routing_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("routing_number")] +#endif public string RoutingNumber { get; set; } } } diff --git a/src/Stripe.net/Entities/Treasury/OutboundPayments/OutboundPaymentEndUserDetails.cs b/src/Stripe.net/Entities/Treasury/OutboundPayments/OutboundPaymentEndUserDetails.cs index d9b281aee6..13842fc597 100644 --- a/src/Stripe.net/Entities/Treasury/OutboundPayments/OutboundPaymentEndUserDetails.cs +++ b/src/Stripe.net/Entities/Treasury/OutboundPayments/OutboundPaymentEndUserDetails.cs @@ -2,6 +2,9 @@ namespace Stripe.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class OutboundPaymentEndUserDetails : StripeEntity { @@ -12,6 +15,9 @@ public class OutboundPaymentEndUserDetails : StripeEntity [JsonProperty("ip_address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ip_address")] +#endif public string IpAddress { get; set; } /// @@ -19,6 +25,9 @@ public class OutboundPaymentEndUserDetails : StripeEntityfalse. /// [JsonProperty("present")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("present")] +#endif public bool Present { get; set; } } } diff --git a/src/Stripe.net/Entities/Treasury/OutboundPayments/OutboundPaymentReturnedDetails.cs b/src/Stripe.net/Entities/Treasury/OutboundPayments/OutboundPaymentReturnedDetails.cs index d497542377..eaaf53e006 100644 --- a/src/Stripe.net/Entities/Treasury/OutboundPayments/OutboundPaymentReturnedDetails.cs +++ b/src/Stripe.net/Entities/Treasury/OutboundPayments/OutboundPaymentReturnedDetails.cs @@ -3,7 +3,13 @@ namespace Stripe.Treasury { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class OutboundPaymentReturnedDetails : StripeEntity { /// @@ -14,6 +20,9 @@ public class OutboundPaymentReturnedDetails : StripeEntityother. /// [JsonProperty("code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("code")] +#endif public string Code { get; set; } #region Expandable Transaction @@ -23,6 +32,9 @@ public class OutboundPaymentReturnedDetails : StripeEntity [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string TransactionId { get => this.InternalTransaction?.Id; @@ -36,6 +48,9 @@ public string TransactionId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Transaction Transaction { get => this.InternalTransaction?.ExpandedObject; @@ -44,6 +59,10 @@ public Transaction Transaction [JsonProperty("transaction")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transaction")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalTransaction { get; set; } #endregion } diff --git a/src/Stripe.net/Entities/Treasury/OutboundPayments/OutboundPaymentStatusTransitions.cs b/src/Stripe.net/Entities/Treasury/OutboundPayments/OutboundPaymentStatusTransitions.cs index 7150774d70..a907aae5f3 100644 --- a/src/Stripe.net/Entities/Treasury/OutboundPayments/OutboundPaymentStatusTransitions.cs +++ b/src/Stripe.net/Entities/Treasury/OutboundPayments/OutboundPaymentStatusTransitions.cs @@ -4,6 +4,9 @@ namespace Stripe.Treasury using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class OutboundPaymentStatusTransitions : StripeEntity { @@ -12,6 +15,10 @@ public class OutboundPaymentStatusTransitions : StripeEntity [JsonProperty("canceled_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("canceled_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? CanceledAt { get; set; } /// @@ -19,6 +26,10 @@ public class OutboundPaymentStatusTransitions : StripeEntity [JsonProperty("failed_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("failed_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? FailedAt { get; set; } /// @@ -26,6 +37,10 @@ public class OutboundPaymentStatusTransitions : StripeEntity [JsonProperty("posted_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("posted_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? PostedAt { get; set; } /// @@ -33,6 +48,10 @@ public class OutboundPaymentStatusTransitions : StripeEntity [JsonProperty("returned_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("returned_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? ReturnedAt { get; set; } } } diff --git a/src/Stripe.net/Entities/Treasury/OutboundPayments/OutboundPaymentTrackingDetails.cs b/src/Stripe.net/Entities/Treasury/OutboundPayments/OutboundPaymentTrackingDetails.cs index c3b4ec4431..7779cb9a9f 100644 --- a/src/Stripe.net/Entities/Treasury/OutboundPayments/OutboundPaymentTrackingDetails.cs +++ b/src/Stripe.net/Entities/Treasury/OutboundPayments/OutboundPaymentTrackingDetails.cs @@ -2,10 +2,16 @@ namespace Stripe.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class OutboundPaymentTrackingDetails : StripeEntity { [JsonProperty("ach")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ach")] +#endif public OutboundPaymentTrackingDetailsAch Ach { get; set; } /// @@ -13,9 +19,15 @@ public class OutboundPaymentTrackingDetails : StripeEntityach, or us_domestic_wire. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } [JsonProperty("us_domestic_wire")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("us_domestic_wire")] +#endif public OutboundPaymentTrackingDetailsUsDomesticWire UsDomesticWire { get; set; } } } diff --git a/src/Stripe.net/Entities/Treasury/OutboundPayments/OutboundPaymentTrackingDetailsAch.cs b/src/Stripe.net/Entities/Treasury/OutboundPayments/OutboundPaymentTrackingDetailsAch.cs index 3641758310..dd208d9096 100644 --- a/src/Stripe.net/Entities/Treasury/OutboundPayments/OutboundPaymentTrackingDetailsAch.cs +++ b/src/Stripe.net/Entities/Treasury/OutboundPayments/OutboundPaymentTrackingDetailsAch.cs @@ -2,6 +2,9 @@ namespace Stripe.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class OutboundPaymentTrackingDetailsAch : StripeEntity { @@ -9,6 +12,9 @@ public class OutboundPaymentTrackingDetailsAch : StripeEntityach network. /// [JsonProperty("trace_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("trace_id")] +#endif public string TraceId { get; set; } } } diff --git a/src/Stripe.net/Entities/Treasury/OutboundPayments/OutboundPaymentTrackingDetailsUsDomesticWire.cs b/src/Stripe.net/Entities/Treasury/OutboundPayments/OutboundPaymentTrackingDetailsUsDomesticWire.cs index 179e8c6053..e31b34d53f 100644 --- a/src/Stripe.net/Entities/Treasury/OutboundPayments/OutboundPaymentTrackingDetailsUsDomesticWire.cs +++ b/src/Stripe.net/Entities/Treasury/OutboundPayments/OutboundPaymentTrackingDetailsUsDomesticWire.cs @@ -2,6 +2,9 @@ namespace Stripe.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class OutboundPaymentTrackingDetailsUsDomesticWire : StripeEntity { @@ -10,18 +13,27 @@ public class OutboundPaymentTrackingDetailsUsDomesticWire : StripeEntityus_domestic_wire network. /// [JsonProperty("chips")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("chips")] +#endif public string Chips { get; set; } /// /// IMAD of the OutboundPayment for payments sent over the us_domestic_wire network. /// [JsonProperty("imad")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("imad")] +#endif public string Imad { get; set; } /// /// OMAD of the OutboundPayment for payments sent over the us_domestic_wire network. /// [JsonProperty("omad")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("omad")] +#endif public string Omad { get; set; } } } diff --git a/src/Stripe.net/Entities/Treasury/OutboundTransfers/OutboundTransfer.cs b/src/Stripe.net/Entities/Treasury/OutboundTransfers/OutboundTransfer.cs index 0377349d62..c1acd40549 100644 --- a/src/Stripe.net/Entities/Treasury/OutboundTransfers/OutboundTransfer.cs +++ b/src/Stripe.net/Entities/Treasury/OutboundTransfers/OutboundTransfer.cs @@ -5,6 +5,9 @@ namespace Stripe.Treasury using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// Use Moving /// money with Treasury using OutboundTransfer objects. /// +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class OutboundTransfer : StripeEntity, IHasId, IHasMetadata, IHasObject { /// /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// /// Amount (in cents) transferred. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long Amount { get; set; } /// /// Returns true if the object can be canceled, and false otherwise. /// [JsonProperty("cancelable")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cancelable")] +#endif public bool Cancelable { get; set; } /// @@ -55,6 +73,10 @@ public class OutboundTransfer : StripeEntity, IHasId, IHasMeta /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -63,21 +85,33 @@ public class OutboundTransfer : StripeEntity, IHasId, IHasMeta /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// /// An arbitrary string attached to the object. Often useful for displaying to users. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// /// The PaymentMethod used as the payment instrument for an OutboundTransfer. /// [JsonProperty("destination_payment_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("destination_payment_method")] +#endif public string DestinationPaymentMethod { get; set; } [JsonProperty("destination_payment_method_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("destination_payment_method_details")] +#endif public OutboundTransferDestinationPaymentMethodDetails DestinationPaymentMethodDetails { get; set; } /// @@ -85,12 +119,19 @@ public class OutboundTransfer : StripeEntity, IHasId, IHasMeta /// [JsonProperty("expected_arrival_date")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("expected_arrival_date")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime ExpectedArrivalDate { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// /// The FinancialAccount that funds were pulled from. /// [JsonProperty("financial_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("financial_account")] +#endif public string FinancialAccount { get; set; } /// @@ -99,6 +140,9 @@ public class OutboundTransfer : StripeEntity, IHasId, IHasMeta /// under Stripe's money transmission licenses. /// [JsonProperty("hosted_regulatory_receipt_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("hosted_regulatory_receipt_url")] +#endif public string HostedRegulatoryReceiptUrl { get; set; } /// @@ -106,6 +150,9 @@ public class OutboundTransfer : StripeEntity, IHasId, IHasMeta /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// @@ -114,18 +161,27 @@ public class OutboundTransfer : StripeEntity, IHasId, IHasMeta /// object in a structured format. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// Details about a returned OutboundTransfer. Only set when the status is returned. /// [JsonProperty("returned_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("returned_details")] +#endif public OutboundTransferReturnedDetails ReturnedDetails { get; set; } /// /// Information about the OutboundTransfer to be sent to the recipient account. /// [JsonProperty("statement_descriptor")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("statement_descriptor")] +#endif public string StatementDescriptor { get; set; } /// @@ -139,15 +195,24 @@ public class OutboundTransfer : StripeEntity, IHasId, IHasMeta /// returned. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } [JsonProperty("status_transitions")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status_transitions")] +#endif public OutboundTransferStatusTransitions StatusTransitions { get; set; } /// /// Details about network-specific tracking information if available. /// [JsonProperty("tracking_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tracking_details")] +#endif public OutboundTransferTrackingDetails TrackingDetails { get; set; } #region Expandable Transaction @@ -157,6 +222,9 @@ public class OutboundTransfer : StripeEntity, IHasId, IHasMeta /// The Transaction associated with this object. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string TransactionId { get => this.InternalTransaction?.Id; @@ -170,6 +238,9 @@ public string TransactionId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Transaction Transaction { get => this.InternalTransaction?.ExpandedObject; @@ -178,6 +249,10 @@ public Transaction Transaction [JsonProperty("transaction")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transaction")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalTransaction { get; set; } #endregion } diff --git a/src/Stripe.net/Entities/Treasury/OutboundTransfers/OutboundTransferDestinationPaymentMethodDetails.cs b/src/Stripe.net/Entities/Treasury/OutboundTransfers/OutboundTransferDestinationPaymentMethodDetails.cs index 022c3749c6..4e728e3fe6 100644 --- a/src/Stripe.net/Entities/Treasury/OutboundTransfers/OutboundTransferDestinationPaymentMethodDetails.cs +++ b/src/Stripe.net/Entities/Treasury/OutboundTransfers/OutboundTransferDestinationPaymentMethodDetails.cs @@ -2,19 +2,31 @@ namespace Stripe.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class OutboundTransferDestinationPaymentMethodDetails : StripeEntity { [JsonProperty("billing_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_details")] +#endif public OutboundTransferDestinationPaymentMethodDetailsBillingDetails BillingDetails { get; set; } /// /// The type of the payment method used in the OutboundTransfer. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } [JsonProperty("us_bank_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("us_bank_account")] +#endif public OutboundTransferDestinationPaymentMethodDetailsUsBankAccount UsBankAccount { get; set; } } } diff --git a/src/Stripe.net/Entities/Treasury/OutboundTransfers/OutboundTransferDestinationPaymentMethodDetailsBillingDetails.cs b/src/Stripe.net/Entities/Treasury/OutboundTransfers/OutboundTransferDestinationPaymentMethodDetailsBillingDetails.cs index 70af92cf5c..e2f374fe1a 100644 --- a/src/Stripe.net/Entities/Treasury/OutboundTransfers/OutboundTransferDestinationPaymentMethodDetailsBillingDetails.cs +++ b/src/Stripe.net/Entities/Treasury/OutboundTransfers/OutboundTransferDestinationPaymentMethodDetailsBillingDetails.cs @@ -2,22 +2,34 @@ namespace Stripe.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class OutboundTransferDestinationPaymentMethodDetailsBillingDetails : StripeEntity { [JsonProperty("address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address")] +#endif public Address Address { get; set; } /// /// Email address. /// [JsonProperty("email")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("email")] +#endif public string Email { get; set; } /// /// Full name. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } } } diff --git a/src/Stripe.net/Entities/Treasury/OutboundTransfers/OutboundTransferDestinationPaymentMethodDetailsUsBankAccount.cs b/src/Stripe.net/Entities/Treasury/OutboundTransfers/OutboundTransferDestinationPaymentMethodDetailsUsBankAccount.cs index 8c4ff29947..883232db4f 100644 --- a/src/Stripe.net/Entities/Treasury/OutboundTransfers/OutboundTransferDestinationPaymentMethodDetailsUsBankAccount.cs +++ b/src/Stripe.net/Entities/Treasury/OutboundTransfers/OutboundTransferDestinationPaymentMethodDetailsUsBankAccount.cs @@ -3,7 +3,13 @@ namespace Stripe.Treasury { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class OutboundTransferDestinationPaymentMethodDetailsUsBankAccount : StripeEntity { /// @@ -11,6 +17,9 @@ public class OutboundTransferDestinationPaymentMethodDetailsUsBankAccount : Stri /// One of: company, or individual. /// [JsonProperty("account_holder_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_holder_type")] +#endif public string AccountHolderType { get; set; } /// @@ -18,12 +27,18 @@ public class OutboundTransferDestinationPaymentMethodDetailsUsBankAccount : Stri /// One of: checking, or savings. /// [JsonProperty("account_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_type")] +#endif public string AccountType { get; set; } /// /// Name of the bank associated with the bank account. /// [JsonProperty("bank_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_name")] +#endif public string BankName { get; set; } /// @@ -31,12 +46,18 @@ public class OutboundTransferDestinationPaymentMethodDetailsUsBankAccount : Stri /// whether two bank accounts are the same. /// [JsonProperty("fingerprint")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fingerprint")] +#endif public string Fingerprint { get; set; } /// /// Last four digits of the bank account number. /// [JsonProperty("last4")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last4")] +#endif public string Last4 { get; set; } #region Expandable Mandate @@ -46,6 +67,9 @@ public class OutboundTransferDestinationPaymentMethodDetailsUsBankAccount : Stri /// ID of the mandate used to make this payment. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string MandateId { get => this.InternalMandate?.Id; @@ -59,6 +83,9 @@ public string MandateId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Mandate Mandate { get => this.InternalMandate?.ExpandedObject; @@ -67,6 +94,10 @@ public Mandate Mandate [JsonProperty("mandate")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mandate")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalMandate { get; set; } #endregion @@ -77,12 +108,18 @@ public Mandate Mandate /// One of: ach, or us_domestic_wire. /// [JsonProperty("network")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("network")] +#endif public string Network { get; set; } /// /// Routing number of the bank account. /// [JsonProperty("routing_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("routing_number")] +#endif public string RoutingNumber { get; set; } } } diff --git a/src/Stripe.net/Entities/Treasury/OutboundTransfers/OutboundTransferReturnedDetails.cs b/src/Stripe.net/Entities/Treasury/OutboundTransfers/OutboundTransferReturnedDetails.cs index 1e4859c9f6..973baed018 100644 --- a/src/Stripe.net/Entities/Treasury/OutboundTransfers/OutboundTransferReturnedDetails.cs +++ b/src/Stripe.net/Entities/Treasury/OutboundTransfers/OutboundTransferReturnedDetails.cs @@ -3,7 +3,13 @@ namespace Stripe.Treasury { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class OutboundTransferReturnedDetails : StripeEntity { /// @@ -14,6 +20,9 @@ public class OutboundTransferReturnedDetails : StripeEntityother. /// [JsonProperty("code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("code")] +#endif public string Code { get; set; } #region Expandable Transaction @@ -23,6 +32,9 @@ public class OutboundTransferReturnedDetails : StripeEntity [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string TransactionId { get => this.InternalTransaction?.Id; @@ -36,6 +48,9 @@ public string TransactionId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Transaction Transaction { get => this.InternalTransaction?.ExpandedObject; @@ -44,6 +59,10 @@ public Transaction Transaction [JsonProperty("transaction")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transaction")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalTransaction { get; set; } #endregion } diff --git a/src/Stripe.net/Entities/Treasury/OutboundTransfers/OutboundTransferStatusTransitions.cs b/src/Stripe.net/Entities/Treasury/OutboundTransfers/OutboundTransferStatusTransitions.cs index eb48106813..3851fd4680 100644 --- a/src/Stripe.net/Entities/Treasury/OutboundTransfers/OutboundTransferStatusTransitions.cs +++ b/src/Stripe.net/Entities/Treasury/OutboundTransfers/OutboundTransferStatusTransitions.cs @@ -4,6 +4,9 @@ namespace Stripe.Treasury using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class OutboundTransferStatusTransitions : StripeEntity { @@ -12,6 +15,10 @@ public class OutboundTransferStatusTransitions : StripeEntity [JsonProperty("canceled_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("canceled_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? CanceledAt { get; set; } /// @@ -19,6 +26,10 @@ public class OutboundTransferStatusTransitions : StripeEntity [JsonProperty("failed_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("failed_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? FailedAt { get; set; } /// @@ -26,6 +37,10 @@ public class OutboundTransferStatusTransitions : StripeEntity [JsonProperty("posted_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("posted_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? PostedAt { get; set; } /// @@ -33,6 +48,10 @@ public class OutboundTransferStatusTransitions : StripeEntity [JsonProperty("returned_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("returned_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? ReturnedAt { get; set; } } } diff --git a/src/Stripe.net/Entities/Treasury/OutboundTransfers/OutboundTransferTrackingDetails.cs b/src/Stripe.net/Entities/Treasury/OutboundTransfers/OutboundTransferTrackingDetails.cs index de26414e0c..53b5b9a8d6 100644 --- a/src/Stripe.net/Entities/Treasury/OutboundTransfers/OutboundTransferTrackingDetails.cs +++ b/src/Stripe.net/Entities/Treasury/OutboundTransfers/OutboundTransferTrackingDetails.cs @@ -2,10 +2,16 @@ namespace Stripe.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class OutboundTransferTrackingDetails : StripeEntity { [JsonProperty("ach")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ach")] +#endif public OutboundTransferTrackingDetailsAch Ach { get; set; } /// @@ -13,9 +19,15 @@ public class OutboundTransferTrackingDetails : StripeEntityach, or us_domestic_wire. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } [JsonProperty("us_domestic_wire")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("us_domestic_wire")] +#endif public OutboundTransferTrackingDetailsUsDomesticWire UsDomesticWire { get; set; } } } diff --git a/src/Stripe.net/Entities/Treasury/OutboundTransfers/OutboundTransferTrackingDetailsAch.cs b/src/Stripe.net/Entities/Treasury/OutboundTransfers/OutboundTransferTrackingDetailsAch.cs index 0a5e4e37f1..2f95e3475d 100644 --- a/src/Stripe.net/Entities/Treasury/OutboundTransfers/OutboundTransferTrackingDetailsAch.cs +++ b/src/Stripe.net/Entities/Treasury/OutboundTransfers/OutboundTransferTrackingDetailsAch.cs @@ -2,6 +2,9 @@ namespace Stripe.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class OutboundTransferTrackingDetailsAch : StripeEntity { @@ -9,6 +12,9 @@ public class OutboundTransferTrackingDetailsAch : StripeEntityach network. /// [JsonProperty("trace_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("trace_id")] +#endif public string TraceId { get; set; } } } diff --git a/src/Stripe.net/Entities/Treasury/OutboundTransfers/OutboundTransferTrackingDetailsUsDomesticWire.cs b/src/Stripe.net/Entities/Treasury/OutboundTransfers/OutboundTransferTrackingDetailsUsDomesticWire.cs index 6f68de05a9..2ac9d73eef 100644 --- a/src/Stripe.net/Entities/Treasury/OutboundTransfers/OutboundTransferTrackingDetailsUsDomesticWire.cs +++ b/src/Stripe.net/Entities/Treasury/OutboundTransfers/OutboundTransferTrackingDetailsUsDomesticWire.cs @@ -2,6 +2,9 @@ namespace Stripe.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class OutboundTransferTrackingDetailsUsDomesticWire : StripeEntity { @@ -10,6 +13,9 @@ public class OutboundTransferTrackingDetailsUsDomesticWire : StripeEntityus_domestic_wire network. /// [JsonProperty("chips")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("chips")] +#endif public string Chips { get; set; } /// @@ -17,6 +23,9 @@ public class OutboundTransferTrackingDetailsUsDomesticWire : StripeEntity [JsonProperty("imad")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("imad")] +#endif public string Imad { get; set; } /// @@ -24,6 +33,9 @@ public class OutboundTransferTrackingDetailsUsDomesticWire : StripeEntity [JsonProperty("omad")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("omad")] +#endif public string Omad { get; set; } } } diff --git a/src/Stripe.net/Entities/Treasury/ReceivedCredits/ReceivedCredit.cs b/src/Stripe.net/Entities/Treasury/ReceivedCredits/ReceivedCredit.cs index 894652d633..547c12d94f 100644 --- a/src/Stripe.net/Entities/Treasury/ReceivedCredits/ReceivedCredit.cs +++ b/src/Stripe.net/Entities/Treasury/ReceivedCredits/ReceivedCredit.cs @@ -4,30 +4,45 @@ namespace Stripe.Treasury using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// ReceivedCredits represent funds sent to a FinancialAccount (for example, /// via ACH or wire). These money movements are not initiated from the FinancialAccount. /// +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class ReceivedCredit : StripeEntity, IHasId, IHasObject { /// /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// /// Amount (in cents) transferred. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long Amount { get; set; } /// @@ -35,6 +50,10 @@ public class ReceivedCredit : StripeEntity, IHasId, IHasObject /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -43,12 +62,18 @@ public class ReceivedCredit : StripeEntity, IHasId, IHasObject /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// /// An arbitrary string attached to the object. Often useful for displaying to users. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// @@ -58,12 +83,18 @@ public class ReceivedCredit : StripeEntity, IHasId, IHasObject /// or other. /// [JsonProperty("failure_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("failure_code")] +#endif public string FailureCode { get; set; } /// /// The FinancialAccount that received the funds. /// [JsonProperty("financial_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("financial_account")] +#endif public string FinancialAccount { get; set; } /// @@ -72,12 +103,21 @@ public class ReceivedCredit : StripeEntity, IHasId, IHasObject /// under Stripe's money transmission licenses. /// [JsonProperty("hosted_regulatory_receipt_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("hosted_regulatory_receipt_url")] +#endif public string HostedRegulatoryReceiptUrl { get; set; } [JsonProperty("initiating_payment_method_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("initiating_payment_method_details")] +#endif public ReceivedCreditInitiatingPaymentMethodDetails InitiatingPaymentMethodDetails { get; set; } [JsonProperty("linked_flows")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("linked_flows")] +#endif public ReceivedCreditLinkedFlows LinkedFlows { get; set; } /// @@ -85,6 +125,9 @@ public class ReceivedCredit : StripeEntity, IHasId, IHasObject /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// @@ -92,12 +135,18 @@ public class ReceivedCredit : StripeEntity, IHasId, IHasObject /// One of: ach, card, stripe, or us_domestic_wire. /// [JsonProperty("network")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("network")] +#endif public string Network { get; set; } /// /// Details describing when a ReceivedCredit may be reversed. /// [JsonProperty("reversal_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reversal_details")] +#endif public ReceivedCreditReversalDetails ReversalDetails { get; set; } /// @@ -107,6 +156,9 @@ public class ReceivedCredit : StripeEntity, IHasId, IHasObject /// One of: failed, or succeeded. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } #region Expandable Transaction @@ -116,6 +168,9 @@ public class ReceivedCredit : StripeEntity, IHasId, IHasObject /// The Transaction associated with this object. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string TransactionId { get => this.InternalTransaction?.Id; @@ -129,6 +184,9 @@ public string TransactionId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Transaction Transaction { get => this.InternalTransaction?.ExpandedObject; @@ -137,6 +195,10 @@ public Transaction Transaction [JsonProperty("transaction")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transaction")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalTransaction { get; set; } #endregion } diff --git a/src/Stripe.net/Entities/Treasury/ReceivedCredits/ReceivedCreditInitiatingPaymentMethodDetails.cs b/src/Stripe.net/Entities/Treasury/ReceivedCredits/ReceivedCreditInitiatingPaymentMethodDetails.cs index c611ce27a8..e5754c0b5c 100644 --- a/src/Stripe.net/Entities/Treasury/ReceivedCredits/ReceivedCreditInitiatingPaymentMethodDetails.cs +++ b/src/Stripe.net/Entities/Treasury/ReceivedCredits/ReceivedCreditInitiatingPaymentMethodDetails.cs @@ -2,6 +2,9 @@ namespace Stripe.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ReceivedCreditInitiatingPaymentMethodDetails : StripeEntity { @@ -9,12 +12,21 @@ public class ReceivedCreditInitiatingPaymentMethodDetails : StripeEntitytype is balance. /// [JsonProperty("balance")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("balance")] +#endif public string Balance { get; set; } [JsonProperty("billing_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_details")] +#endif public ReceivedCreditInitiatingPaymentMethodDetailsBillingDetails BillingDetails { get; set; } [JsonProperty("financial_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("financial_account")] +#endif public ReceivedCreditInitiatingPaymentMethodDetailsFinancialAccount FinancialAccount { get; set; } /// @@ -22,6 +34,9 @@ public class ReceivedCreditInitiatingPaymentMethodDetails : StripeEntityIssuing Card ID. /// [JsonProperty("issuing_card")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("issuing_card")] +#endif public string IssuingCard { get; set; } /// @@ -31,9 +46,15 @@ public class ReceivedCreditInitiatingPaymentMethodDetails : StripeEntityus_bank_account. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } [JsonProperty("us_bank_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("us_bank_account")] +#endif public ReceivedCreditInitiatingPaymentMethodDetailsUsBankAccount UsBankAccount { get; set; } } } diff --git a/src/Stripe.net/Entities/Treasury/ReceivedCredits/ReceivedCreditInitiatingPaymentMethodDetailsBillingDetails.cs b/src/Stripe.net/Entities/Treasury/ReceivedCredits/ReceivedCreditInitiatingPaymentMethodDetailsBillingDetails.cs index d8e750c56f..d2d6b4ca6a 100644 --- a/src/Stripe.net/Entities/Treasury/ReceivedCredits/ReceivedCreditInitiatingPaymentMethodDetailsBillingDetails.cs +++ b/src/Stripe.net/Entities/Treasury/ReceivedCredits/ReceivedCreditInitiatingPaymentMethodDetailsBillingDetails.cs @@ -2,22 +2,34 @@ namespace Stripe.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ReceivedCreditInitiatingPaymentMethodDetailsBillingDetails : StripeEntity { [JsonProperty("address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address")] +#endif public Address Address { get; set; } /// /// Email address. /// [JsonProperty("email")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("email")] +#endif public string Email { get; set; } /// /// Full name. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } } } diff --git a/src/Stripe.net/Entities/Treasury/ReceivedCredits/ReceivedCreditInitiatingPaymentMethodDetailsFinancialAccount.cs b/src/Stripe.net/Entities/Treasury/ReceivedCredits/ReceivedCreditInitiatingPaymentMethodDetailsFinancialAccount.cs index 402ed22516..e3729984d8 100644 --- a/src/Stripe.net/Entities/Treasury/ReceivedCredits/ReceivedCreditInitiatingPaymentMethodDetailsFinancialAccount.cs +++ b/src/Stripe.net/Entities/Treasury/ReceivedCredits/ReceivedCreditInitiatingPaymentMethodDetailsFinancialAccount.cs @@ -2,6 +2,9 @@ namespace Stripe.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ReceivedCreditInitiatingPaymentMethodDetailsFinancialAccount : StripeEntity, IHasId { @@ -9,6 +12,9 @@ public class ReceivedCreditInitiatingPaymentMethodDetailsFinancialAccount : Stri /// The FinancialAccount ID. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// @@ -16,6 +22,9 @@ public class ReceivedCreditInitiatingPaymentMethodDetailsFinancialAccount : Stri /// stripe. /// [JsonProperty("network")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("network")] +#endif public string Network { get; set; } } } diff --git a/src/Stripe.net/Entities/Treasury/ReceivedCredits/ReceivedCreditInitiatingPaymentMethodDetailsUsBankAccount.cs b/src/Stripe.net/Entities/Treasury/ReceivedCredits/ReceivedCreditInitiatingPaymentMethodDetailsUsBankAccount.cs index f5a4e14d76..c415747327 100644 --- a/src/Stripe.net/Entities/Treasury/ReceivedCredits/ReceivedCreditInitiatingPaymentMethodDetailsUsBankAccount.cs +++ b/src/Stripe.net/Entities/Treasury/ReceivedCredits/ReceivedCreditInitiatingPaymentMethodDetailsUsBankAccount.cs @@ -2,6 +2,9 @@ namespace Stripe.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ReceivedCreditInitiatingPaymentMethodDetailsUsBankAccount : StripeEntity { @@ -9,18 +12,27 @@ public class ReceivedCreditInitiatingPaymentMethodDetailsUsBankAccount : StripeE /// Bank name. /// [JsonProperty("bank_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_name")] +#endif public string BankName { get; set; } /// /// The last four digits of the bank account number. /// [JsonProperty("last4")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last4")] +#endif public string Last4 { get; set; } /// /// The routing number for the bank account. /// [JsonProperty("routing_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("routing_number")] +#endif public string RoutingNumber { get; set; } } } diff --git a/src/Stripe.net/Entities/Treasury/ReceivedCredits/ReceivedCreditLinkedFlows.cs b/src/Stripe.net/Entities/Treasury/ReceivedCredits/ReceivedCreditLinkedFlows.cs index ee18217c26..2f05060454 100644 --- a/src/Stripe.net/Entities/Treasury/ReceivedCredits/ReceivedCreditLinkedFlows.cs +++ b/src/Stripe.net/Entities/Treasury/ReceivedCredits/ReceivedCreditLinkedFlows.cs @@ -2,6 +2,9 @@ namespace Stripe.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ReceivedCreditLinkedFlows : StripeEntity { @@ -9,6 +12,9 @@ public class ReceivedCreditLinkedFlows : StripeEntity /// The CreditReversal created as a result of this ReceivedCredit being reversed. /// [JsonProperty("credit_reversal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("credit_reversal")] +#endif public string CreditReversal { get; set; } /// @@ -17,6 +23,9 @@ public class ReceivedCreditLinkedFlows : StripeEntity /// object. /// [JsonProperty("issuing_authorization")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("issuing_authorization")] +#endif public string IssuingAuthorization { get; set; } /// @@ -24,6 +33,9 @@ public class ReceivedCreditLinkedFlows : StripeEntity /// href="https://stripe.com/docs/api#issuing_transactions">Issuing transaction object. /// [JsonProperty("issuing_transaction")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("issuing_transaction")] +#endif public string IssuingTransaction { get; set; } /// @@ -32,12 +44,18 @@ public class ReceivedCreditLinkedFlows : StripeEntity /// CreditReversals. /// [JsonProperty("source_flow")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("source_flow")] +#endif public string SourceFlow { get; set; } /// /// The expandable object of the source flow. /// [JsonProperty("source_flow_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("source_flow_details")] +#endif public ReceivedCreditLinkedFlowsSourceFlowDetails SourceFlowDetails { get; set; } /// @@ -45,6 +63,9 @@ public class ReceivedCreditLinkedFlows : StripeEntity /// outbound_payment). /// [JsonProperty("source_flow_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("source_flow_type")] +#endif public string SourceFlowType { get; set; } } } diff --git a/src/Stripe.net/Entities/Treasury/ReceivedCredits/ReceivedCreditLinkedFlowsSourceFlowDetails.cs b/src/Stripe.net/Entities/Treasury/ReceivedCredits/ReceivedCreditLinkedFlowsSourceFlowDetails.cs index fde9a1517d..d0c167977c 100644 --- a/src/Stripe.net/Entities/Treasury/ReceivedCredits/ReceivedCreditLinkedFlowsSourceFlowDetails.cs +++ b/src/Stripe.net/Entities/Treasury/ReceivedCredits/ReceivedCreditLinkedFlowsSourceFlowDetails.cs @@ -2,6 +2,9 @@ namespace Stripe.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ReceivedCreditLinkedFlowsSourceFlowDetails : StripeEntity { @@ -12,6 +15,9 @@ public class ReceivedCreditLinkedFlowsSourceFlowDetails : StripeEntity [JsonProperty("credit_reversal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("credit_reversal")] +#endif public CreditReversal CreditReversal { get; set; } /// @@ -31,6 +37,9 @@ public class ReceivedCreditLinkedFlowsSourceFlowDetails : StripeEntity. /// [JsonProperty("outbound_payment")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("outbound_payment")] +#endif public OutboundPayment OutboundPayment { get; set; } /// @@ -44,6 +53,9 @@ public class ReceivedCreditLinkedFlowsSourceFlowDetails : StripeEntityReceiving payouts. /// [JsonProperty("payout")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payout")] +#endif public Payout Payout { get; set; } /// @@ -51,6 +63,9 @@ public class ReceivedCreditLinkedFlowsSourceFlowDetails : StripeEntitycredit_reversal, other, outbound_payment, or payout. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Treasury/ReceivedCredits/ReceivedCreditReversalDetails.cs b/src/Stripe.net/Entities/Treasury/ReceivedCredits/ReceivedCreditReversalDetails.cs index ca0e04a69f..5f06db71a8 100644 --- a/src/Stripe.net/Entities/Treasury/ReceivedCredits/ReceivedCreditReversalDetails.cs +++ b/src/Stripe.net/Entities/Treasury/ReceivedCredits/ReceivedCreditReversalDetails.cs @@ -4,6 +4,9 @@ namespace Stripe.Treasury using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ReceivedCreditReversalDetails : StripeEntity { @@ -12,6 +15,10 @@ public class ReceivedCreditReversalDetails : StripeEntity [JsonProperty("deadline")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("deadline")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? Deadline { get; set; } /// @@ -20,6 +27,9 @@ public class ReceivedCreditReversalDetails : StripeEntityother, or source_flow_restricted. /// [JsonProperty("restricted_reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("restricted_reason")] +#endif public string RestrictedReason { get; set; } } } diff --git a/src/Stripe.net/Entities/Treasury/ReceivedDebits/ReceivedDebit.cs b/src/Stripe.net/Entities/Treasury/ReceivedDebits/ReceivedDebit.cs index f8403945f9..d9867440b0 100644 --- a/src/Stripe.net/Entities/Treasury/ReceivedDebits/ReceivedDebit.cs +++ b/src/Stripe.net/Entities/Treasury/ReceivedDebits/ReceivedDebit.cs @@ -4,30 +4,45 @@ namespace Stripe.Treasury using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// ReceivedDebits represent funds pulled from a FinancialAccount. These are /// not initiated from the FinancialAccount. /// +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class ReceivedDebit : StripeEntity, IHasId, IHasObject { /// /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// /// Amount (in cents) transferred. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long Amount { get; set; } /// @@ -35,6 +50,10 @@ public class ReceivedDebit : StripeEntity, IHasId, IHasObject /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -43,12 +62,18 @@ public class ReceivedDebit : StripeEntity, IHasId, IHasObject /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// /// An arbitrary string attached to the object. Often useful for displaying to users. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// @@ -58,12 +83,18 @@ public class ReceivedDebit : StripeEntity, IHasId, IHasObject /// international_transaction, or other. /// [JsonProperty("failure_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("failure_code")] +#endif public string FailureCode { get; set; } /// /// The FinancialAccount that funds were pulled from. /// [JsonProperty("financial_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("financial_account")] +#endif public string FinancialAccount { get; set; } /// @@ -72,12 +103,21 @@ public class ReceivedDebit : StripeEntity, IHasId, IHasObject /// under Stripe's money transmission licenses. /// [JsonProperty("hosted_regulatory_receipt_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("hosted_regulatory_receipt_url")] +#endif public string HostedRegulatoryReceiptUrl { get; set; } [JsonProperty("initiating_payment_method_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("initiating_payment_method_details")] +#endif public ReceivedDebitInitiatingPaymentMethodDetails InitiatingPaymentMethodDetails { get; set; } [JsonProperty("linked_flows")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("linked_flows")] +#endif public ReceivedDebitLinkedFlows LinkedFlows { get; set; } /// @@ -85,6 +125,9 @@ public class ReceivedDebit : StripeEntity, IHasId, IHasObject /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// @@ -92,12 +135,18 @@ public class ReceivedDebit : StripeEntity, IHasId, IHasObject /// One of: ach, card, or stripe. /// [JsonProperty("network")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("network")] +#endif public string Network { get; set; } /// /// Details describing when a ReceivedDebit might be reversed. /// [JsonProperty("reversal_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reversal_details")] +#endif public ReceivedDebitReversalDetails ReversalDetails { get; set; } /// @@ -107,6 +156,9 @@ public class ReceivedDebit : StripeEntity, IHasId, IHasObject /// One of: failed, or succeeded. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } #region Expandable Transaction @@ -116,6 +168,9 @@ public class ReceivedDebit : StripeEntity, IHasId, IHasObject /// The Transaction associated with this object. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string TransactionId { get => this.InternalTransaction?.Id; @@ -129,6 +184,9 @@ public string TransactionId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Transaction Transaction { get => this.InternalTransaction?.ExpandedObject; @@ -137,6 +195,10 @@ public Transaction Transaction [JsonProperty("transaction")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transaction")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalTransaction { get; set; } #endregion } diff --git a/src/Stripe.net/Entities/Treasury/ReceivedDebits/ReceivedDebitInitiatingPaymentMethodDetails.cs b/src/Stripe.net/Entities/Treasury/ReceivedDebits/ReceivedDebitInitiatingPaymentMethodDetails.cs index 4d27865ebc..078aee4bdc 100644 --- a/src/Stripe.net/Entities/Treasury/ReceivedDebits/ReceivedDebitInitiatingPaymentMethodDetails.cs +++ b/src/Stripe.net/Entities/Treasury/ReceivedDebits/ReceivedDebitInitiatingPaymentMethodDetails.cs @@ -2,6 +2,9 @@ namespace Stripe.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ReceivedDebitInitiatingPaymentMethodDetails : StripeEntity { @@ -9,12 +12,21 @@ public class ReceivedDebitInitiatingPaymentMethodDetails : StripeEntitytype is balance. /// [JsonProperty("balance")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("balance")] +#endif public string Balance { get; set; } [JsonProperty("billing_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_details")] +#endif public ReceivedDebitInitiatingPaymentMethodDetailsBillingDetails BillingDetails { get; set; } [JsonProperty("financial_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("financial_account")] +#endif public ReceivedDebitInitiatingPaymentMethodDetailsFinancialAccount FinancialAccount { get; set; } /// @@ -22,6 +34,9 @@ public class ReceivedDebitInitiatingPaymentMethodDetails : StripeEntityIssuing Card ID. /// [JsonProperty("issuing_card")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("issuing_card")] +#endif public string IssuingCard { get; set; } /// @@ -31,9 +46,15 @@ public class ReceivedDebitInitiatingPaymentMethodDetails : StripeEntityus_bank_account. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } [JsonProperty("us_bank_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("us_bank_account")] +#endif public ReceivedDebitInitiatingPaymentMethodDetailsUsBankAccount UsBankAccount { get; set; } } } diff --git a/src/Stripe.net/Entities/Treasury/ReceivedDebits/ReceivedDebitInitiatingPaymentMethodDetailsBillingDetails.cs b/src/Stripe.net/Entities/Treasury/ReceivedDebits/ReceivedDebitInitiatingPaymentMethodDetailsBillingDetails.cs index 3835222b04..18c138690b 100644 --- a/src/Stripe.net/Entities/Treasury/ReceivedDebits/ReceivedDebitInitiatingPaymentMethodDetailsBillingDetails.cs +++ b/src/Stripe.net/Entities/Treasury/ReceivedDebits/ReceivedDebitInitiatingPaymentMethodDetailsBillingDetails.cs @@ -2,22 +2,34 @@ namespace Stripe.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ReceivedDebitInitiatingPaymentMethodDetailsBillingDetails : StripeEntity { [JsonProperty("address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address")] +#endif public Address Address { get; set; } /// /// Email address. /// [JsonProperty("email")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("email")] +#endif public string Email { get; set; } /// /// Full name. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } } } diff --git a/src/Stripe.net/Entities/Treasury/ReceivedDebits/ReceivedDebitInitiatingPaymentMethodDetailsFinancialAccount.cs b/src/Stripe.net/Entities/Treasury/ReceivedDebits/ReceivedDebitInitiatingPaymentMethodDetailsFinancialAccount.cs index 5e8c6835ba..03e37f27a5 100644 --- a/src/Stripe.net/Entities/Treasury/ReceivedDebits/ReceivedDebitInitiatingPaymentMethodDetailsFinancialAccount.cs +++ b/src/Stripe.net/Entities/Treasury/ReceivedDebits/ReceivedDebitInitiatingPaymentMethodDetailsFinancialAccount.cs @@ -2,6 +2,9 @@ namespace Stripe.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ReceivedDebitInitiatingPaymentMethodDetailsFinancialAccount : StripeEntity, IHasId { @@ -9,6 +12,9 @@ public class ReceivedDebitInitiatingPaymentMethodDetailsFinancialAccount : Strip /// The FinancialAccount ID. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// @@ -16,6 +22,9 @@ public class ReceivedDebitInitiatingPaymentMethodDetailsFinancialAccount : Strip /// stripe. /// [JsonProperty("network")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("network")] +#endif public string Network { get; set; } } } diff --git a/src/Stripe.net/Entities/Treasury/ReceivedDebits/ReceivedDebitInitiatingPaymentMethodDetailsUsBankAccount.cs b/src/Stripe.net/Entities/Treasury/ReceivedDebits/ReceivedDebitInitiatingPaymentMethodDetailsUsBankAccount.cs index 263a7fbc66..2b4f65b135 100644 --- a/src/Stripe.net/Entities/Treasury/ReceivedDebits/ReceivedDebitInitiatingPaymentMethodDetailsUsBankAccount.cs +++ b/src/Stripe.net/Entities/Treasury/ReceivedDebits/ReceivedDebitInitiatingPaymentMethodDetailsUsBankAccount.cs @@ -2,6 +2,9 @@ namespace Stripe.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ReceivedDebitInitiatingPaymentMethodDetailsUsBankAccount : StripeEntity { @@ -9,18 +12,27 @@ public class ReceivedDebitInitiatingPaymentMethodDetailsUsBankAccount : StripeEn /// Bank name. /// [JsonProperty("bank_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_name")] +#endif public string BankName { get; set; } /// /// The last four digits of the bank account number. /// [JsonProperty("last4")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last4")] +#endif public string Last4 { get; set; } /// /// The routing number for the bank account. /// [JsonProperty("routing_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("routing_number")] +#endif public string RoutingNumber { get; set; } } } diff --git a/src/Stripe.net/Entities/Treasury/ReceivedDebits/ReceivedDebitLinkedFlows.cs b/src/Stripe.net/Entities/Treasury/ReceivedDebits/ReceivedDebitLinkedFlows.cs index fc37bc1fb1..075e688efa 100644 --- a/src/Stripe.net/Entities/Treasury/ReceivedDebits/ReceivedDebitLinkedFlows.cs +++ b/src/Stripe.net/Entities/Treasury/ReceivedDebits/ReceivedDebitLinkedFlows.cs @@ -2,6 +2,9 @@ namespace Stripe.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ReceivedDebitLinkedFlows : StripeEntity { @@ -9,12 +12,18 @@ public class ReceivedDebitLinkedFlows : StripeEntity /// The DebitReversal created as a result of this ReceivedDebit being reversed. /// [JsonProperty("debit_reversal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("debit_reversal")] +#endif public string DebitReversal { get; set; } /// /// Set if the ReceivedDebit is associated with an InboundTransfer's return of funds. /// [JsonProperty("inbound_transfer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("inbound_transfer")] +#endif public string InboundTransfer { get; set; } /// @@ -23,6 +32,9 @@ public class ReceivedDebitLinkedFlows : StripeEntity /// object. /// [JsonProperty("issuing_authorization")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("issuing_authorization")] +#endif public string IssuingAuthorization { get; set; } /// @@ -30,6 +42,9 @@ public class ReceivedDebitLinkedFlows : StripeEntity /// href="https://stripe.com/docs/api#issuing_disputes">Issuing Dispute object. /// [JsonProperty("issuing_transaction")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("issuing_transaction")] +#endif public string IssuingTransaction { get; set; } /// @@ -37,6 +52,9 @@ public class ReceivedDebitLinkedFlows : StripeEntity /// href="https://stripe.com/docs/api#payouts">Payout object. /// [JsonProperty("payout")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payout")] +#endif public string Payout { get; set; } } } diff --git a/src/Stripe.net/Entities/Treasury/ReceivedDebits/ReceivedDebitReversalDetails.cs b/src/Stripe.net/Entities/Treasury/ReceivedDebits/ReceivedDebitReversalDetails.cs index 5099b3f573..16a77f3929 100644 --- a/src/Stripe.net/Entities/Treasury/ReceivedDebits/ReceivedDebitReversalDetails.cs +++ b/src/Stripe.net/Entities/Treasury/ReceivedDebits/ReceivedDebitReversalDetails.cs @@ -4,6 +4,9 @@ namespace Stripe.Treasury using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ReceivedDebitReversalDetails : StripeEntity { @@ -12,6 +15,10 @@ public class ReceivedDebitReversalDetails : StripeEntity [JsonProperty("deadline")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("deadline")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? Deadline { get; set; } /// @@ -20,6 +27,9 @@ public class ReceivedDebitReversalDetails : StripeEntityother, or source_flow_restricted. /// [JsonProperty("restricted_reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("restricted_reason")] +#endif public string RestrictedReason { get; set; } } } diff --git a/src/Stripe.net/Entities/Treasury/TransactionEntries/TransactionEntry.cs b/src/Stripe.net/Entities/Treasury/TransactionEntries/TransactionEntry.cs index 0021f82eac..d2f188eab2 100644 --- a/src/Stripe.net/Entities/Treasury/TransactionEntries/TransactionEntry.cs +++ b/src/Stripe.net/Entities/Treasury/TransactionEntries/TransactionEntry.cs @@ -4,29 +4,44 @@ namespace Stripe.Treasury using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// TransactionEntries represent individual units of money movements within a single Transaction. /// +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif public class TransactionEntry : StripeEntity, IHasId, IHasObject { /// /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// /// Change to a FinancialAccount's balance. /// [JsonProperty("balance_impact")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("balance_impact")] +#endif public TransactionEntryBalanceImpact BalanceImpact { get; set; } /// @@ -34,6 +49,10 @@ public class TransactionEntry : StripeEntity, IHasId, IHasObje /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -42,6 +61,9 @@ public class TransactionEntry : StripeEntity, IHasId, IHasObje /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// @@ -49,24 +71,37 @@ public class TransactionEntry : StripeEntity, IHasId, IHasObje /// [JsonProperty("effective_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("effective_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime EffectiveAt { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// /// The FinancialAccount associated with this object. /// [JsonProperty("financial_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("financial_account")] +#endif public string FinancialAccount { get; set; } /// /// Token of the flow associated with the TransactionEntry. /// [JsonProperty("flow")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("flow")] +#endif public string Flow { get; set; } /// /// Details of the flow associated with the TransactionEntry. /// [JsonProperty("flow_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("flow_details")] +#endif public TransactionEntryFlowDetails FlowDetails { get; set; } /// @@ -76,6 +111,9 @@ public class TransactionEntry : StripeEntity, IHasId, IHasObje /// outbound_transfer, received_credit, or received_debit. /// [JsonProperty("flow_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("flow_type")] +#endif public string FlowType { get; set; } /// @@ -83,6 +121,9 @@ public class TransactionEntry : StripeEntity, IHasId, IHasObje /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } #region Expandable Transaction @@ -92,6 +133,9 @@ public class TransactionEntry : StripeEntity, IHasId, IHasObje /// The Transaction associated with this object. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string TransactionId { get => this.InternalTransaction?.Id; @@ -105,6 +149,9 @@ public string TransactionId /// For more information, see the expand documentation. /// [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public Transaction Transaction { get => this.InternalTransaction?.ExpandedObject; @@ -113,6 +160,10 @@ public Transaction Transaction [JsonProperty("transaction")] [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transaction")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif internal ExpandableField InternalTransaction { get; set; } #endregion @@ -129,6 +180,9 @@ public Transaction Transaction /// received_credit, or received_debit. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Treasury/TransactionEntries/TransactionEntryBalanceImpact.cs b/src/Stripe.net/Entities/Treasury/TransactionEntries/TransactionEntryBalanceImpact.cs index 1147aa749e..3c97b18d33 100644 --- a/src/Stripe.net/Entities/Treasury/TransactionEntries/TransactionEntryBalanceImpact.cs +++ b/src/Stripe.net/Entities/Treasury/TransactionEntries/TransactionEntryBalanceImpact.cs @@ -2,6 +2,9 @@ namespace Stripe.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TransactionEntryBalanceImpact : StripeEntity { @@ -9,6 +12,9 @@ public class TransactionEntryBalanceImpact : StripeEntity [JsonProperty("cash")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cash")] +#endif public long Cash { get; set; } /// @@ -16,6 +22,9 @@ public class TransactionEntryBalanceImpact : StripeEntity [JsonProperty("inbound_pending")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("inbound_pending")] +#endif public long InboundPending { get; set; } /// @@ -23,6 +32,9 @@ public class TransactionEntryBalanceImpact : StripeEntity [JsonProperty("outbound_pending")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("outbound_pending")] +#endif public long OutboundPending { get; set; } } } diff --git a/src/Stripe.net/Entities/Treasury/TransactionEntries/TransactionEntryFlowDetails.cs b/src/Stripe.net/Entities/Treasury/TransactionEntries/TransactionEntryFlowDetails.cs index e442fdad6a..250cd5f94a 100644 --- a/src/Stripe.net/Entities/Treasury/TransactionEntries/TransactionEntryFlowDetails.cs +++ b/src/Stripe.net/Entities/Treasury/TransactionEntries/TransactionEntryFlowDetails.cs @@ -2,6 +2,9 @@ namespace Stripe.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TransactionEntryFlowDetails : StripeEntity { @@ -12,6 +15,9 @@ public class TransactionEntryFlowDetails : StripeEntity [JsonProperty("credit_reversal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("credit_reversal")] +#endif public CreditReversal CreditReversal { get; set; } /// @@ -21,6 +27,9 @@ public class TransactionEntryFlowDetails : StripeEntity [JsonProperty("debit_reversal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("debit_reversal")] +#endif public DebitReversal DebitReversal { get; set; } /// @@ -35,6 +44,9 @@ public class TransactionEntryFlowDetails : StripeEntity. /// [JsonProperty("inbound_transfer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("inbound_transfer")] +#endif public InboundTransfer InboundTransfer { get; set; } /// @@ -47,6 +59,9 @@ public class TransactionEntryFlowDetails : StripeEntity. /// [JsonProperty("issuing_authorization")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("issuing_authorization")] +#endif public Issuing.Authorization IssuingAuthorization { get; set; } /// @@ -66,6 +81,9 @@ public class TransactionEntryFlowDetails : StripeEntity. /// [JsonProperty("outbound_payment")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("outbound_payment")] +#endif public OutboundPayment OutboundPayment { get; set; } /// @@ -87,6 +105,9 @@ public class TransactionEntryFlowDetails : StripeEntity. /// [JsonProperty("outbound_transfer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("outbound_transfer")] +#endif public OutboundTransfer OutboundTransfer { get; set; } /// @@ -95,6 +116,9 @@ public class TransactionEntryFlowDetails : StripeEntity [JsonProperty("received_credit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("received_credit")] +#endif public ReceivedCredit ReceivedCredit { get; set; } /// @@ -103,6 +127,9 @@ public class TransactionEntryFlowDetails : StripeEntity [JsonProperty("received_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("received_debit")] +#endif public ReceivedDebit ReceivedDebit { get; set; } /// @@ -113,6 +140,9 @@ public class TransactionEntryFlowDetails : StripeEntityoutbound_transfer, received_credit, or received_debit. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Treasury/Transactions/Transaction.cs b/src/Stripe.net/Entities/Treasury/Transactions/Transaction.cs index b6e2243993..0b8e766eb4 100644 --- a/src/Stripe.net/Entities/Treasury/Transactions/Transaction.cs +++ b/src/Stripe.net/Entities/Treasury/Transactions/Transaction.cs @@ -4,6 +4,9 @@ namespace Stripe.Treasury using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// Transactions represent changes to a , IHasId, IHasObject /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// /// Amount (in cents) transferred. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long Amount { get; set; } /// /// Change to a FinancialAccount's balance. /// [JsonProperty("balance_impact")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("balance_impact")] +#endif public TransactionBalanceImpact BalanceImpact { get; set; } /// @@ -40,6 +55,10 @@ public class Transaction : StripeEntity, IHasId, IHasObject /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -48,12 +67,18 @@ public class Transaction : StripeEntity, IHasId, IHasObject /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// /// An arbitrary string attached to the object. Often useful for displaying to users. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// @@ -61,24 +86,36 @@ public class Transaction : StripeEntity, IHasId, IHasObject /// in any list endpoints. /// [JsonProperty("entries")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("entries")] +#endif public StripeList Entries { get; set; } /// /// The FinancialAccount associated with this object. /// [JsonProperty("financial_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("financial_account")] +#endif public string FinancialAccount { get; set; } /// /// ID of the flow that created the Transaction. /// [JsonProperty("flow")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("flow")] +#endif public string Flow { get; set; } /// /// Details of the flow that created the Transaction. /// [JsonProperty("flow_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("flow_details")] +#endif public TransactionFlowDetails FlowDetails { get; set; } /// @@ -88,6 +125,9 @@ public class Transaction : StripeEntity, IHasId, IHasObject /// outbound_transfer, received_credit, or received_debit. /// [JsonProperty("flow_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("flow_type")] +#endif public string FlowType { get; set; } /// @@ -95,6 +135,9 @@ public class Transaction : StripeEntity, IHasId, IHasObject /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// @@ -102,9 +145,15 @@ public class Transaction : StripeEntity, IHasId, IHasObject /// One of: open, posted, or void. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } [JsonProperty("status_transitions")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status_transitions")] +#endif public TransactionStatusTransitions StatusTransitions { get; set; } } } diff --git a/src/Stripe.net/Entities/Treasury/Transactions/TransactionBalanceImpact.cs b/src/Stripe.net/Entities/Treasury/Transactions/TransactionBalanceImpact.cs index 3659e6cac0..418471a0f8 100644 --- a/src/Stripe.net/Entities/Treasury/Transactions/TransactionBalanceImpact.cs +++ b/src/Stripe.net/Entities/Treasury/Transactions/TransactionBalanceImpact.cs @@ -2,6 +2,9 @@ namespace Stripe.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TransactionBalanceImpact : StripeEntity { @@ -9,6 +12,9 @@ public class TransactionBalanceImpact : StripeEntity /// The change made to funds the user can spend right now. /// [JsonProperty("cash")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cash")] +#endif public long Cash { get; set; } /// @@ -16,6 +22,9 @@ public class TransactionBalanceImpact : StripeEntity /// later time. /// [JsonProperty("inbound_pending")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("inbound_pending")] +#endif public long InboundPending { get; set; } /// @@ -23,6 +32,9 @@ public class TransactionBalanceImpact : StripeEntity /// for pending outbound flows. /// [JsonProperty("outbound_pending")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("outbound_pending")] +#endif public long OutboundPending { get; set; } } } diff --git a/src/Stripe.net/Entities/Treasury/Transactions/TransactionFlowDetails.cs b/src/Stripe.net/Entities/Treasury/Transactions/TransactionFlowDetails.cs index 6041c5252f..1cec6a2892 100644 --- a/src/Stripe.net/Entities/Treasury/Transactions/TransactionFlowDetails.cs +++ b/src/Stripe.net/Entities/Treasury/Transactions/TransactionFlowDetails.cs @@ -2,6 +2,9 @@ namespace Stripe.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TransactionFlowDetails : StripeEntity { @@ -12,6 +15,9 @@ public class TransactionFlowDetails : StripeEntity /// object known as a CreditReversal. /// [JsonProperty("credit_reversal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("credit_reversal")] +#endif public CreditReversal CreditReversal { get; set; } /// @@ -21,6 +27,9 @@ public class TransactionFlowDetails : StripeEntity /// known as a DebitReversal. /// [JsonProperty("debit_reversal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("debit_reversal")] +#endif public DebitReversal DebitReversal { get; set; } /// @@ -35,6 +44,9 @@ public class TransactionFlowDetails : StripeEntity /// money with Treasury using InboundTransfer objects. /// [JsonProperty("inbound_transfer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("inbound_transfer")] +#endif public InboundTransfer InboundTransfer { get; set; } /// @@ -47,6 +59,9 @@ public class TransactionFlowDetails : StripeEntity /// card authorizations. /// [JsonProperty("issuing_authorization")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("issuing_authorization")] +#endif public Issuing.Authorization IssuingAuthorization { get; set; } /// @@ -66,6 +81,9 @@ public class TransactionFlowDetails : StripeEntity /// money with Treasury using OutboundPayment objects. /// [JsonProperty("outbound_payment")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("outbound_payment")] +#endif public OutboundPayment OutboundPayment { get; set; } /// @@ -87,6 +105,9 @@ public class TransactionFlowDetails : StripeEntity /// money with Treasury using OutboundTransfer objects. /// [JsonProperty("outbound_transfer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("outbound_transfer")] +#endif public OutboundTransfer OutboundTransfer { get; set; } /// @@ -95,6 +116,9 @@ public class TransactionFlowDetails : StripeEntity /// via ACH or wire). These money movements are not initiated from the FinancialAccount. /// [JsonProperty("received_credit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("received_credit")] +#endif public ReceivedCredit ReceivedCredit { get; set; } /// @@ -103,6 +127,9 @@ public class TransactionFlowDetails : StripeEntity /// not initiated from the FinancialAccount. /// [JsonProperty("received_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("received_debit")] +#endif public ReceivedDebit ReceivedDebit { get; set; } /// @@ -113,6 +140,9 @@ public class TransactionFlowDetails : StripeEntity /// outbound_transfer, received_credit, or received_debit. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/Treasury/Transactions/TransactionStatusTransitions.cs b/src/Stripe.net/Entities/Treasury/Transactions/TransactionStatusTransitions.cs index e11b508215..638dc64e94 100644 --- a/src/Stripe.net/Entities/Treasury/Transactions/TransactionStatusTransitions.cs +++ b/src/Stripe.net/Entities/Treasury/Transactions/TransactionStatusTransitions.cs @@ -4,6 +4,9 @@ namespace Stripe.Treasury using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TransactionStatusTransitions : StripeEntity { @@ -12,6 +15,10 @@ public class TransactionStatusTransitions : StripeEntity [JsonProperty("posted_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("posted_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? PostedAt { get; set; } /// @@ -19,6 +26,10 @@ public class TransactionStatusTransitions : StripeEntity [JsonProperty("void_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("void_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? VoidAt { get; set; } } } diff --git a/src/Stripe.net/Entities/UsageRecordSummaries/UsageRecordSummary.cs b/src/Stripe.net/Entities/UsageRecordSummaries/UsageRecordSummary.cs index aa3465e3ae..3fc12372b3 100644 --- a/src/Stripe.net/Entities/UsageRecordSummaries/UsageRecordSummary.cs +++ b/src/Stripe.net/Entities/UsageRecordSummaries/UsageRecordSummary.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// A usage record summary represents an aggregated view of how much usage was accrued for a @@ -13,18 +16,27 @@ public class UsageRecordSummary : StripeEntity, IHasId, IHas /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// /// The invoice in which this usage period has been billed for. /// [JsonProperty("invoice")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("invoice")] +#endif public string Invoice { get; set; } /// @@ -32,21 +44,33 @@ public class UsageRecordSummary : StripeEntity, IHasId, IHas /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } [JsonProperty("period")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("period")] +#endif public UsageRecordSummaryPeriod Period { get; set; } /// /// The ID of the subscription item this summary is describing. /// [JsonProperty("subscription_item")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("subscription_item")] +#endif public string SubscriptionItem { get; set; } /// /// The total usage within this usage period. /// [JsonProperty("total_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("total_usage")] +#endif public long TotalUsage { get; set; } } } diff --git a/src/Stripe.net/Entities/UsageRecordSummaries/UsageRecordSummaryPeriod.cs b/src/Stripe.net/Entities/UsageRecordSummaries/UsageRecordSummaryPeriod.cs index 85c56c2352..63bd9c42b5 100644 --- a/src/Stripe.net/Entities/UsageRecordSummaries/UsageRecordSummaryPeriod.cs +++ b/src/Stripe.net/Entities/UsageRecordSummaries/UsageRecordSummaryPeriod.cs @@ -4,6 +4,9 @@ namespace Stripe using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class UsageRecordSummaryPeriod : StripeEntity { @@ -13,6 +16,10 @@ public class UsageRecordSummaryPeriod : StripeEntity /// [JsonProperty("end")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("end")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? End { get; set; } /// @@ -20,6 +27,10 @@ public class UsageRecordSummaryPeriod : StripeEntity /// [JsonProperty("start")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("start")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? Start { get; set; } } } diff --git a/src/Stripe.net/Entities/UsageRecords/UsageRecord.cs b/src/Stripe.net/Entities/UsageRecords/UsageRecord.cs index d039a5a049..c23657a212 100644 --- a/src/Stripe.net/Entities/UsageRecords/UsageRecord.cs +++ b/src/Stripe.net/Entities/UsageRecords/UsageRecord.cs @@ -4,6 +4,9 @@ namespace Stripe using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// Usage records allow you to report customer usage and metrics to Stripe for metered @@ -22,12 +25,18 @@ public class UsageRecord : StripeEntity, IHasId, IHasObject /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// @@ -35,18 +44,27 @@ public class UsageRecord : StripeEntity, IHasId, IHasObject /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// /// The usage quantity for the specified date. /// [JsonProperty("quantity")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("quantity")] +#endif public long Quantity { get; set; } /// /// The ID of the subscription item this usage record contains data for. /// [JsonProperty("subscription_item")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("subscription_item")] +#endif public string SubscriptionItem { get; set; } /// @@ -54,6 +72,10 @@ public class UsageRecord : StripeEntity, IHasId, IHasObject /// [JsonProperty("timestamp")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("timestamp")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Timestamp { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; } } diff --git a/src/Stripe.net/Entities/V2/Billing/MeterEventAdjustments/MeterEventAdjustment.cs b/src/Stripe.net/Entities/V2/Billing/MeterEventAdjustments/MeterEventAdjustment.cs index 47e4df60eb..8b5037d4fc 100644 --- a/src/Stripe.net/Entities/V2/Billing/MeterEventAdjustments/MeterEventAdjustment.cs +++ b/src/Stripe.net/Entities/V2/Billing/MeterEventAdjustments/MeterEventAdjustment.cs @@ -3,6 +3,9 @@ namespace Stripe.V2.Billing { using System; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class MeterEventAdjustment : StripeEntity, IHasId, IHasObject { @@ -10,6 +13,9 @@ public class MeterEventAdjustment : StripeEntity, IHasId, /// The unique id of this meter event adjustment. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// @@ -17,24 +23,36 @@ public class MeterEventAdjustment : StripeEntity, IHasId, /// the object field. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// /// Specifies which event to cancel. /// [JsonProperty("cancel")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cancel")] +#endif public MeterEventAdjustmentCancel Cancel { get; set; } /// /// The time the adjustment was created. /// [JsonProperty("created")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// /// The name of the meter event. Corresponds with the event_name field on a meter. /// [JsonProperty("event_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("event_name")] +#endif public string EventName { get; set; } /// @@ -42,6 +60,9 @@ public class MeterEventAdjustment : StripeEntity, IHasId, /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// @@ -49,6 +70,9 @@ public class MeterEventAdjustment : StripeEntity, IHasId, /// One of: complete, or pending. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } /// @@ -56,6 +80,9 @@ public class MeterEventAdjustment : StripeEntity, IHasId, /// period. Time period cancellation is not supported yet. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/V2/Billing/MeterEventAdjustments/MeterEventAdjustmentCancel.cs b/src/Stripe.net/Entities/V2/Billing/MeterEventAdjustments/MeterEventAdjustmentCancel.cs index 1dc0d7d2f7..b4a92e6204 100644 --- a/src/Stripe.net/Entities/V2/Billing/MeterEventAdjustments/MeterEventAdjustmentCancel.cs +++ b/src/Stripe.net/Entities/V2/Billing/MeterEventAdjustments/MeterEventAdjustmentCancel.cs @@ -2,6 +2,9 @@ namespace Stripe.V2.Billing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class MeterEventAdjustmentCancel : StripeEntity { @@ -10,6 +13,9 @@ public class MeterEventAdjustmentCancel : StripeEntity [JsonProperty("identifier")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("identifier")] +#endif public string Identifier { get; set; } } } diff --git a/src/Stripe.net/Entities/V2/Billing/MeterEventSessions/MeterEventSession.cs b/src/Stripe.net/Entities/V2/Billing/MeterEventSessions/MeterEventSession.cs index 04a074a544..f12f3d8d27 100644 --- a/src/Stripe.net/Entities/V2/Billing/MeterEventSessions/MeterEventSession.cs +++ b/src/Stripe.net/Entities/V2/Billing/MeterEventSessions/MeterEventSession.cs @@ -3,6 +3,9 @@ namespace Stripe.V2.Billing { using System; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class MeterEventSession : StripeEntity, IHasId, IHasObject { @@ -10,6 +13,9 @@ public class MeterEventSession : StripeEntity, IHasId, IHasOb /// The unique id of this auth session. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// @@ -17,6 +23,9 @@ public class MeterEventSession : StripeEntity, IHasId, IHasOb /// the object field. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// @@ -24,18 +33,27 @@ public class MeterEventSession : StripeEntity, IHasId, IHasOb /// high-throughput meter event API. /// [JsonProperty("authentication_token")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("authentication_token")] +#endif public string AuthenticationToken { get; set; } /// /// The creation time of this session. /// [JsonProperty("created")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// /// The time at which this session will expire. /// [JsonProperty("expires_at")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("expires_at")] +#endif public DateTime ExpiresAt { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -43,6 +61,9 @@ public class MeterEventSession : StripeEntity, IHasId, IHasOb /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } } } diff --git a/src/Stripe.net/Entities/V2/Billing/MeterEvents/MeterEvent.cs b/src/Stripe.net/Entities/V2/Billing/MeterEvents/MeterEvent.cs index cc8ee0f028..df61bde2da 100644 --- a/src/Stripe.net/Entities/V2/Billing/MeterEvents/MeterEvent.cs +++ b/src/Stripe.net/Entities/V2/Billing/MeterEvents/MeterEvent.cs @@ -4,6 +4,9 @@ namespace Stripe.V2.Billing using System; using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// Fix me empty_doc_string. @@ -15,18 +18,27 @@ public class MeterEvent : StripeEntity, IHasObject /// the object field. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// /// The creation time of this meter event. /// [JsonProperty("created")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// /// The name of the meter event. Corresponds with the event_name field on a meter. /// [JsonProperty("event_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("event_name")] +#endif public string EventName { get; set; } /// @@ -35,6 +47,9 @@ public class MeterEvent : StripeEntity, IHasObject /// 24 hour period. /// [JsonProperty("identifier")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("identifier")] +#endif public string Identifier { get; set; } /// @@ -42,6 +57,9 @@ public class MeterEvent : StripeEntity, IHasObject /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// @@ -51,6 +69,9 @@ public class MeterEvent : StripeEntity, IHasObject /// payload. /// [JsonProperty("payload")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payload")] +#endif public Dictionary Payload { get; set; } /// @@ -58,6 +79,9 @@ public class MeterEvent : StripeEntity, IHasObject /// the future. Defaults to current timestamp if not specified. /// [JsonProperty("timestamp")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("timestamp")] +#endif public DateTime Timestamp { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; } } diff --git a/src/Stripe.net/Entities/V2/EventDestinations/EventDestination.cs b/src/Stripe.net/Entities/V2/EventDestinations/EventDestination.cs index 192aba7bc0..b530c5e1d8 100644 --- a/src/Stripe.net/Entities/V2/EventDestinations/EventDestination.cs +++ b/src/Stripe.net/Entities/V2/EventDestinations/EventDestination.cs @@ -4,6 +4,9 @@ namespace Stripe.V2 using System; using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class EventDestination : StripeEntity, IHasId, IHasMetadata, IHasObject { @@ -11,6 +14,9 @@ public class EventDestination : StripeEntity, IHasId, IHasMeta /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// @@ -18,30 +24,45 @@ public class EventDestination : StripeEntity, IHasId, IHasMeta /// the object field. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// /// Amazon EventBridge configuration. /// [JsonProperty("amazon_eventbridge")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amazon_eventbridge")] +#endif public EventDestinationAmazonEventbridge AmazonEventbridge { get; set; } /// /// Time at which the object was created. /// [JsonProperty("created")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// /// An optional description of what the event destination is used for. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// /// The list of events to enable for this endpoint. /// [JsonProperty("enabled_events")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled_events")] +#endif public List EnabledEvents { get; set; } /// @@ -49,6 +70,9 @@ public class EventDestination : StripeEntity, IHasId, IHasMeta /// One of: snapshot, or thin. /// [JsonProperty("event_payload")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("event_payload")] +#endif public string EventPayload { get; set; } /// @@ -56,6 +80,9 @@ public class EventDestination : StripeEntity, IHasId, IHasMeta /// One of: other_accounts, or self. /// [JsonProperty("events_from")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("events_from")] +#endif public List EventsFrom { get; set; } /// @@ -63,24 +90,36 @@ public class EventDestination : StripeEntity, IHasId, IHasMeta /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// /// Metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// Event destination name. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } /// /// If using the snapshot event payload, the API version events are rendered as. /// [JsonProperty("snapshot_api_version")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("snapshot_api_version")] +#endif public string SnapshotApiVersion { get; set; } /// @@ -88,12 +127,18 @@ public class EventDestination : StripeEntity, IHasId, IHasMeta /// One of: disabled, or enabled. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } /// /// Additional information about event destination status. /// [JsonProperty("status_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status_details")] +#endif public EventDestinationStatusDetails StatusDetails { get; set; } /// @@ -101,18 +146,27 @@ public class EventDestination : StripeEntity, IHasId, IHasMeta /// One of: amazon_eventbridge, or webhook_endpoint. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } /// /// Time at which the object was last updated. /// [JsonProperty("updated")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("updated")] +#endif public DateTime Updated { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// /// Webhook endpoint configuration. /// [JsonProperty("webhook_endpoint")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("webhook_endpoint")] +#endif public EventDestinationWebhookEndpoint WebhookEndpoint { get; set; } } } diff --git a/src/Stripe.net/Entities/V2/EventDestinations/EventDestinationAmazonEventbridge.cs b/src/Stripe.net/Entities/V2/EventDestinations/EventDestinationAmazonEventbridge.cs index 0c2c9435df..7cb8c95369 100644 --- a/src/Stripe.net/Entities/V2/EventDestinations/EventDestinationAmazonEventbridge.cs +++ b/src/Stripe.net/Entities/V2/EventDestinations/EventDestinationAmazonEventbridge.cs @@ -2,6 +2,9 @@ namespace Stripe.V2 { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class EventDestinationAmazonEventbridge : StripeEntity { @@ -9,12 +12,18 @@ public class EventDestinationAmazonEventbridge : StripeEntity [JsonProperty("aws_account_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("aws_account_id")] +#endif public string AwsAccountId { get; set; } /// /// The ARN of the AWS event source. /// [JsonProperty("aws_event_source_arn")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("aws_event_source_arn")] +#endif public string AwsEventSourceArn { get; set; } /// @@ -22,6 +31,9 @@ public class EventDestinationAmazonEventbridge : StripeEntityactive, deleted, pending, or unknown. /// [JsonProperty("aws_event_source_status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("aws_event_source_status")] +#endif public string AwsEventSourceStatus { get; set; } } } diff --git a/src/Stripe.net/Entities/V2/EventDestinations/EventDestinationStatusDetails.cs b/src/Stripe.net/Entities/V2/EventDestinations/EventDestinationStatusDetails.cs index 683ee719d6..6b5e5793ea 100644 --- a/src/Stripe.net/Entities/V2/EventDestinations/EventDestinationStatusDetails.cs +++ b/src/Stripe.net/Entities/V2/EventDestinations/EventDestinationStatusDetails.cs @@ -2,6 +2,9 @@ namespace Stripe.V2 { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class EventDestinationStatusDetails : StripeEntity { @@ -9,6 +12,9 @@ public class EventDestinationStatusDetails : StripeEntity [JsonProperty("disabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("disabled")] +#endif public EventDestinationStatusDetailsDisabled Disabled { get; set; } } } diff --git a/src/Stripe.net/Entities/V2/EventDestinations/EventDestinationStatusDetailsDisabled.cs b/src/Stripe.net/Entities/V2/EventDestinations/EventDestinationStatusDetailsDisabled.cs index 8a9380f5ac..ef2456a2b4 100644 --- a/src/Stripe.net/Entities/V2/EventDestinations/EventDestinationStatusDetailsDisabled.cs +++ b/src/Stripe.net/Entities/V2/EventDestinations/EventDestinationStatusDetailsDisabled.cs @@ -2,6 +2,9 @@ namespace Stripe.V2 { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class EventDestinationStatusDetailsDisabled : StripeEntity { @@ -10,6 +13,9 @@ public class EventDestinationStatusDetailsDisabled : StripeEntityno_aws_event_source_exists, or user. /// [JsonProperty("reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reason")] +#endif public string Reason { get; set; } } } diff --git a/src/Stripe.net/Entities/V2/EventDestinations/EventDestinationWebhookEndpoint.cs b/src/Stripe.net/Entities/V2/EventDestinations/EventDestinationWebhookEndpoint.cs index 8c9d6f1200..f58033edf5 100644 --- a/src/Stripe.net/Entities/V2/EventDestinations/EventDestinationWebhookEndpoint.cs +++ b/src/Stripe.net/Entities/V2/EventDestinations/EventDestinationWebhookEndpoint.cs @@ -2,6 +2,9 @@ namespace Stripe.V2 { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class EventDestinationWebhookEndpoint : StripeEntity { @@ -9,12 +12,18 @@ public class EventDestinationWebhookEndpoint : StripeEntity [JsonProperty("signing_secret")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("signing_secret")] +#endif public string SigningSecret { get; set; } /// /// The URL of the webhook endpoint, includable. /// [JsonProperty("url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("url")] +#endif public string Url { get; set; } } } diff --git a/src/Stripe.net/Entities/V2/Events/Event.cs b/src/Stripe.net/Entities/V2/Events/Event.cs index 38afede2bd..713f7ef2cf 100644 --- a/src/Stripe.net/Entities/V2/Events/Event.cs +++ b/src/Stripe.net/Entities/V2/Events/Event.cs @@ -3,6 +3,9 @@ namespace Stripe.V2 { using System; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// Code generated portion of Thin Event. @@ -13,6 +16,9 @@ public partial class Event : StripeEntity, IHasId, IHasObject /// Unique identifier for the event. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// @@ -20,18 +26,27 @@ public partial class Event : StripeEntity, IHasId, IHasObject /// the object field. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// /// Authentication context needed to fetch the event or related object. /// [JsonProperty("context")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("context")] +#endif public string Context { get; set; } /// /// Time at which the object was created. /// [JsonProperty("created")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// @@ -39,18 +54,27 @@ public partial class Event : StripeEntity, IHasId, IHasObject /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// /// Reason for the event. /// [JsonProperty("reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reason")] +#endif public EventReason Reason { get; set; } /// /// The type of the event. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/V2/Events/EventReason.cs b/src/Stripe.net/Entities/V2/Events/EventReason.cs index 685a03f932..2db0006cad 100644 --- a/src/Stripe.net/Entities/V2/Events/EventReason.cs +++ b/src/Stripe.net/Entities/V2/Events/EventReason.cs @@ -2,6 +2,9 @@ namespace Stripe.V2 { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class EventReason : StripeEntity { @@ -9,12 +12,18 @@ public class EventReason : StripeEntity /// Event reason type. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } /// /// Information on the API request that instigated the event. /// [JsonProperty("request")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("request")] +#endif public EventReasonRequest Request { get; set; } } } diff --git a/src/Stripe.net/Entities/V2/Events/EventReasonRequest.cs b/src/Stripe.net/Entities/V2/Events/EventReasonRequest.cs index 9f42d72af3..373500ee68 100644 --- a/src/Stripe.net/Entities/V2/Events/EventReasonRequest.cs +++ b/src/Stripe.net/Entities/V2/Events/EventReasonRequest.cs @@ -2,6 +2,9 @@ namespace Stripe.V2 { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class EventReasonRequest : StripeEntity, IHasId { @@ -9,12 +12,18 @@ public class EventReasonRequest : StripeEntity, IHasId /// ID of the API request that caused the event. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// The idempotency key transmitted during the request. /// [JsonProperty("idempotency_key")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("idempotency_key")] +#endif public string IdempotencyKey { get; set; } } } diff --git a/src/Stripe.net/Entities/WebhookEndpoints/WebhookEndpoint.cs b/src/Stripe.net/Entities/WebhookEndpoints/WebhookEndpoint.cs index 8d4178339d..996b54b618 100644 --- a/src/Stripe.net/Entities/WebhookEndpoints/WebhookEndpoint.cs +++ b/src/Stripe.net/Entities/WebhookEndpoints/WebhookEndpoint.cs @@ -5,6 +5,9 @@ namespace Stripe using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// You can configure webhook endpoints via @@ -24,24 +27,36 @@ public class WebhookEndpoint : StripeEntity, IHasId, IHasMetada /// Unique identifier for the object. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// String representing the object's type. Objects of the same type share the same value. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } /// /// The API version events are rendered as for this webhook endpoint. /// [JsonProperty("api_version")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("api_version")] +#endif public string ApiVersion { get; set; } /// /// The ID of the associated Connect application. /// [JsonProperty("application")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("application")] +#endif public string Application { get; set; } /// @@ -49,18 +64,29 @@ public class WebhookEndpoint : StripeEntity, IHasId, IHasMetada /// [JsonProperty("created")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// /// Whether this object is deleted or not. /// [JsonProperty("deleted", NullValueHandling = NullValueHandling.Ignore)] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("deleted")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] +#endif public bool? Deleted { get; set; } /// /// An optional description of what the webhook is used for. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// @@ -68,6 +94,9 @@ public class WebhookEndpoint : StripeEntity, IHasId, IHasMetada /// are enabled, except those that require explicit selection. /// [JsonProperty("enabled_events")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled_events")] +#endif public List EnabledEvents { get; set; } /// @@ -75,6 +104,9 @@ public class WebhookEndpoint : StripeEntity, IHasId, IHasMetada /// the object exists in test mode. /// [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif public bool Livemode { get; set; } /// @@ -83,6 +115,9 @@ public class WebhookEndpoint : StripeEntity, IHasId, IHasMetada /// object in a structured format. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -91,18 +126,27 @@ public class WebhookEndpoint : StripeEntity, IHasId, IHasMetada /// at creation. /// [JsonProperty("secret")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("secret")] +#endif public string Secret { get; set; } /// /// The status of the webhook. It can be enabled or disabled. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } /// /// The URL of the webhook endpoint. /// [JsonProperty("url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("url")] +#endif public string Url { get; set; } } } diff --git a/src/Stripe.net/Events/V1BillingMeterErrorReportTriggeredEvent.cs b/src/Stripe.net/Events/V1BillingMeterErrorReportTriggeredEvent.cs index 82b6e1f933..00660b6d62 100644 --- a/src/Stripe.net/Events/V1BillingMeterErrorReportTriggeredEvent.cs +++ b/src/Stripe.net/Events/V1BillingMeterErrorReportTriggeredEvent.cs @@ -3,6 +3,9 @@ namespace Stripe.Events { using System.Threading.Tasks; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// This event occurs when there are invalid async usage events for a given meter. @@ -14,6 +17,10 @@ public class V1BillingMeterErrorReportTriggeredEvent : V2.Event /// [JsonProperty("data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("data")] +#endif + public V1BillingMeterErrorReportTriggeredEventData Data { get; set; } /// @@ -21,6 +28,10 @@ public class V1BillingMeterErrorReportTriggeredEvent : V2.Event /// [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + public V2.EventRelatedObject RelatedObject { get; set; } /// diff --git a/src/Stripe.net/Events/V1BillingMeterErrorReportTriggeredEventData.cs b/src/Stripe.net/Events/V1BillingMeterErrorReportTriggeredEventData.cs index ffa905a301..4b7dce3f3e 100644 --- a/src/Stripe.net/Events/V1BillingMeterErrorReportTriggeredEventData.cs +++ b/src/Stripe.net/Events/V1BillingMeterErrorReportTriggeredEventData.cs @@ -4,6 +4,9 @@ namespace Stripe.Events using System; using System.Threading.Tasks; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class V1BillingMeterErrorReportTriggeredEventData : StripeEntity { @@ -11,24 +14,36 @@ public class V1BillingMeterErrorReportTriggeredEventData : StripeEntitydata when fetched from /v2/events. /// [JsonProperty("developer_message_summary")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("developer_message_summary")] +#endif public string DeveloperMessageSummary { get; set; } /// /// This contains information about why meter error happens. /// [JsonProperty("reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reason")] +#endif public V1BillingMeterErrorReportTriggeredEventDataReason Reason { get; set; } /// /// The end of the window that is encapsulated by this summary. /// [JsonProperty("validation_end")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("validation_end")] +#endif public DateTime ValidationEnd { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// /// The start of the window that is encapsulated by this summary. /// [JsonProperty("validation_start")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("validation_start")] +#endif public DateTime ValidationStart { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; } } diff --git a/src/Stripe.net/Events/V1BillingMeterErrorReportTriggeredEventDataReason.cs b/src/Stripe.net/Events/V1BillingMeterErrorReportTriggeredEventDataReason.cs index d10fc3b8ad..bd2f07cbd7 100644 --- a/src/Stripe.net/Events/V1BillingMeterErrorReportTriggeredEventDataReason.cs +++ b/src/Stripe.net/Events/V1BillingMeterErrorReportTriggeredEventDataReason.cs @@ -4,6 +4,9 @@ namespace Stripe.Events using System.Collections.Generic; using System.Threading.Tasks; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class V1BillingMeterErrorReportTriggeredEventDataReason : StripeEntity { @@ -11,12 +14,18 @@ public class V1BillingMeterErrorReportTriggeredEventDataReason : StripeEntity [JsonProperty("error_count")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("error_count")] +#endif public long ErrorCount { get; set; } /// /// The error details. /// [JsonProperty("error_types")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("error_types")] +#endif public List ErrorTypes { get; set; } } } diff --git a/src/Stripe.net/Events/V1BillingMeterErrorReportTriggeredEventDataReasonErrorType.cs b/src/Stripe.net/Events/V1BillingMeterErrorReportTriggeredEventDataReasonErrorType.cs index f6ff3832bc..ec0b915481 100644 --- a/src/Stripe.net/Events/V1BillingMeterErrorReportTriggeredEventDataReasonErrorType.cs +++ b/src/Stripe.net/Events/V1BillingMeterErrorReportTriggeredEventDataReasonErrorType.cs @@ -4,6 +4,9 @@ namespace Stripe.Events using System.Collections.Generic; using System.Threading.Tasks; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class V1BillingMeterErrorReportTriggeredEventDataReasonErrorType : StripeEntity { @@ -15,18 +18,27 @@ public class V1BillingMeterErrorReportTriggeredEventDataReasonErrorType : Stripe /// no_meter, timestamp_in_future, or timestamp_too_far_in_past. /// [JsonProperty("code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("code")] +#endif public string Code { get; set; } /// /// The number of errors of this type. /// [JsonProperty("error_count")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("error_count")] +#endif public long ErrorCount { get; set; } /// /// A list of sample errors of this type. /// [JsonProperty("sample_errors")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sample_errors")] +#endif public List SampleErrors { get; set; } } } diff --git a/src/Stripe.net/Events/V1BillingMeterErrorReportTriggeredEventDataReasonErrorTypeSampleError.cs b/src/Stripe.net/Events/V1BillingMeterErrorReportTriggeredEventDataReasonErrorTypeSampleError.cs index 0d7b25f660..97eb6bba70 100644 --- a/src/Stripe.net/Events/V1BillingMeterErrorReportTriggeredEventDataReasonErrorTypeSampleError.cs +++ b/src/Stripe.net/Events/V1BillingMeterErrorReportTriggeredEventDataReasonErrorTypeSampleError.cs @@ -3,6 +3,9 @@ namespace Stripe.Events { using System.Threading.Tasks; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class V1BillingMeterErrorReportTriggeredEventDataReasonErrorTypeSampleError : StripeEntity { @@ -10,12 +13,18 @@ public class V1BillingMeterErrorReportTriggeredEventDataReasonErrorTypeSampleErr /// The error message. /// [JsonProperty("error_message")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("error_message")] +#endif public string ErrorMessage { get; set; } /// /// The request causes the error. /// [JsonProperty("request")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("request")] +#endif public V1BillingMeterErrorReportTriggeredEventDataReasonErrorTypeSampleErrorRequest Request { get; set; } } } diff --git a/src/Stripe.net/Events/V1BillingMeterErrorReportTriggeredEventDataReasonErrorTypeSampleErrorRequest.cs b/src/Stripe.net/Events/V1BillingMeterErrorReportTriggeredEventDataReasonErrorTypeSampleErrorRequest.cs index c6b56c9ecc..cac57de703 100644 --- a/src/Stripe.net/Events/V1BillingMeterErrorReportTriggeredEventDataReasonErrorTypeSampleErrorRequest.cs +++ b/src/Stripe.net/Events/V1BillingMeterErrorReportTriggeredEventDataReasonErrorTypeSampleErrorRequest.cs @@ -3,6 +3,9 @@ namespace Stripe.Events { using System.Threading.Tasks; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class V1BillingMeterErrorReportTriggeredEventDataReasonErrorTypeSampleErrorRequest : StripeEntity { @@ -10,6 +13,9 @@ public class V1BillingMeterErrorReportTriggeredEventDataReasonErrorTypeSampleErr /// The request idempotency key. /// [JsonProperty("identifier")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("identifier")] +#endif public string Identifier { get; set; } } } diff --git a/src/Stripe.net/Events/V1BillingMeterNoMeterFoundEvent.cs b/src/Stripe.net/Events/V1BillingMeterNoMeterFoundEvent.cs index be4e1a345d..b1de205176 100644 --- a/src/Stripe.net/Events/V1BillingMeterNoMeterFoundEvent.cs +++ b/src/Stripe.net/Events/V1BillingMeterNoMeterFoundEvent.cs @@ -3,6 +3,9 @@ namespace Stripe.Events { using System.Threading.Tasks; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif /// /// This event occurs when async usage events have missing or invalid meter ids. @@ -14,6 +17,10 @@ public class V1BillingMeterNoMeterFoundEvent : V2.Event /// [JsonProperty("data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("data")] +#endif + public V1BillingMeterNoMeterFoundEventData Data { get; set; } } } diff --git a/src/Stripe.net/Events/V1BillingMeterNoMeterFoundEventData.cs b/src/Stripe.net/Events/V1BillingMeterNoMeterFoundEventData.cs index b1ac8517f1..55792ce736 100644 --- a/src/Stripe.net/Events/V1BillingMeterNoMeterFoundEventData.cs +++ b/src/Stripe.net/Events/V1BillingMeterNoMeterFoundEventData.cs @@ -4,6 +4,9 @@ namespace Stripe.Events using System; using System.Threading.Tasks; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class V1BillingMeterNoMeterFoundEventData : StripeEntity { @@ -11,24 +14,36 @@ public class V1BillingMeterNoMeterFoundEventData : StripeEntitydata when fetched from /v2/events. /// [JsonProperty("developer_message_summary")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("developer_message_summary")] +#endif public string DeveloperMessageSummary { get; set; } /// /// This contains information about why meter error happens. /// [JsonProperty("reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reason")] +#endif public V1BillingMeterNoMeterFoundEventDataReason Reason { get; set; } /// /// The end of the window that is encapsulated by this summary. /// [JsonProperty("validation_end")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("validation_end")] +#endif public DateTime ValidationEnd { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// /// The start of the window that is encapsulated by this summary. /// [JsonProperty("validation_start")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("validation_start")] +#endif public DateTime ValidationStart { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; } } diff --git a/src/Stripe.net/Events/V1BillingMeterNoMeterFoundEventDataReason.cs b/src/Stripe.net/Events/V1BillingMeterNoMeterFoundEventDataReason.cs index dd275359b5..3a74404440 100644 --- a/src/Stripe.net/Events/V1BillingMeterNoMeterFoundEventDataReason.cs +++ b/src/Stripe.net/Events/V1BillingMeterNoMeterFoundEventDataReason.cs @@ -4,6 +4,9 @@ namespace Stripe.Events using System.Collections.Generic; using System.Threading.Tasks; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class V1BillingMeterNoMeterFoundEventDataReason : StripeEntity { @@ -11,12 +14,18 @@ public class V1BillingMeterNoMeterFoundEventDataReason : StripeEntity [JsonProperty("error_count")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("error_count")] +#endif public long ErrorCount { get; set; } /// /// The error details. /// [JsonProperty("error_types")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("error_types")] +#endif public List ErrorTypes { get; set; } } } diff --git a/src/Stripe.net/Events/V1BillingMeterNoMeterFoundEventDataReasonErrorType.cs b/src/Stripe.net/Events/V1BillingMeterNoMeterFoundEventDataReasonErrorType.cs index c0bf5e9768..25795810fe 100644 --- a/src/Stripe.net/Events/V1BillingMeterNoMeterFoundEventDataReasonErrorType.cs +++ b/src/Stripe.net/Events/V1BillingMeterNoMeterFoundEventDataReasonErrorType.cs @@ -4,6 +4,9 @@ namespace Stripe.Events using System.Collections.Generic; using System.Threading.Tasks; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class V1BillingMeterNoMeterFoundEventDataReasonErrorType : StripeEntity { @@ -15,18 +18,27 @@ public class V1BillingMeterNoMeterFoundEventDataReasonErrorType : StripeEntityno_meter, timestamp_in_future, or timestamp_too_far_in_past. /// [JsonProperty("code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("code")] +#endif public string Code { get; set; } /// /// The number of errors of this type. /// [JsonProperty("error_count")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("error_count")] +#endif public long ErrorCount { get; set; } /// /// A list of sample errors of this type. /// [JsonProperty("sample_errors")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sample_errors")] +#endif public List SampleErrors { get; set; } } } diff --git a/src/Stripe.net/Events/V1BillingMeterNoMeterFoundEventDataReasonErrorTypeSampleError.cs b/src/Stripe.net/Events/V1BillingMeterNoMeterFoundEventDataReasonErrorTypeSampleError.cs index a83dc818fc..6358e1cf90 100644 --- a/src/Stripe.net/Events/V1BillingMeterNoMeterFoundEventDataReasonErrorTypeSampleError.cs +++ b/src/Stripe.net/Events/V1BillingMeterNoMeterFoundEventDataReasonErrorTypeSampleError.cs @@ -3,6 +3,9 @@ namespace Stripe.Events { using System.Threading.Tasks; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class V1BillingMeterNoMeterFoundEventDataReasonErrorTypeSampleError : StripeEntity { @@ -10,12 +13,18 @@ public class V1BillingMeterNoMeterFoundEventDataReasonErrorTypeSampleError : Str /// The error message. /// [JsonProperty("error_message")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("error_message")] +#endif public string ErrorMessage { get; set; } /// /// The request causes the error. /// [JsonProperty("request")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("request")] +#endif public V1BillingMeterNoMeterFoundEventDataReasonErrorTypeSampleErrorRequest Request { get; set; } } } diff --git a/src/Stripe.net/Events/V1BillingMeterNoMeterFoundEventDataReasonErrorTypeSampleErrorRequest.cs b/src/Stripe.net/Events/V1BillingMeterNoMeterFoundEventDataReasonErrorTypeSampleErrorRequest.cs index 6427470427..71a35a38ed 100644 --- a/src/Stripe.net/Events/V1BillingMeterNoMeterFoundEventDataReasonErrorTypeSampleErrorRequest.cs +++ b/src/Stripe.net/Events/V1BillingMeterNoMeterFoundEventDataReasonErrorTypeSampleErrorRequest.cs @@ -3,6 +3,9 @@ namespace Stripe.Events { using System.Threading.Tasks; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class V1BillingMeterNoMeterFoundEventDataReasonErrorTypeSampleErrorRequest : StripeEntity { @@ -10,6 +13,9 @@ public class V1BillingMeterNoMeterFoundEventDataReasonErrorTypeSampleErrorReques /// The request idempotency key. /// [JsonProperty("identifier")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("identifier")] +#endif public string Identifier { get; set; } } } diff --git a/src/Stripe.net/Services/AccountCapabilities/AccountCapabilityUpdateOptions.cs b/src/Stripe.net/Services/AccountCapabilities/AccountCapabilityUpdateOptions.cs index cb65f445ba..2cde2282f3 100644 --- a/src/Stripe.net/Services/AccountCapabilities/AccountCapabilityUpdateOptions.cs +++ b/src/Stripe.net/Services/AccountCapabilities/AccountCapabilityUpdateOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountCapabilityUpdateOptions : BaseOptions { @@ -15,6 +18,9 @@ public class AccountCapabilityUpdateOptions : BaseOptions /// permanent capability returns an error. /// [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif public bool? Requested { get; set; } } } diff --git a/src/Stripe.net/Services/AccountExternalAccounts/AccountExternalAccountBankAccountOptions.cs b/src/Stripe.net/Services/AccountExternalAccounts/AccountExternalAccountBankAccountOptions.cs index 0cbdda6263..102615c397 100644 --- a/src/Stripe.net/Services/AccountExternalAccounts/AccountExternalAccountBankAccountOptions.cs +++ b/src/Stripe.net/Services/AccountExternalAccounts/AccountExternalAccountBankAccountOptions.cs @@ -2,10 +2,16 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountExternalAccountBankAccountOptions : INestedOptions, IHasObject { [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } = "bank_account"; /// @@ -13,6 +19,9 @@ public class AccountExternalAccountBankAccountOptions : INestedOptions, IHasObje /// when attaching the bank account to a Customer object. /// [JsonProperty("account_holder_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_holder_name")] +#endif public string AccountHolderName { get; set; } /// @@ -22,18 +31,27 @@ public class AccountExternalAccountBankAccountOptions : INestedOptions, IHasObje /// One of: company, or individual. /// [JsonProperty("account_holder_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_holder_type")] +#endif public string AccountHolderType { get; set; } /// /// The account number for the bank account, in string form. Must be a checking account. /// [JsonProperty("account_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_number")] +#endif public string AccountNumber { get; set; } /// /// The country in which the bank account is located. /// [JsonProperty("country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country")] +#endif public string Country { get; set; } /// @@ -41,6 +59,9 @@ public class AccountExternalAccountBankAccountOptions : INestedOptions, IHasObje /// href="docs/payouts">Stripe supports.. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// @@ -50,6 +71,9 @@ public class AccountExternalAccountBankAccountOptions : INestedOptions, IHasObje /// foraccount_number, this field is not required. /// [JsonProperty("routing_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("routing_number")] +#endif public string RoutingNumber { get; set; } } } diff --git a/src/Stripe.net/Services/AccountExternalAccounts/AccountExternalAccountCardOptions.cs b/src/Stripe.net/Services/AccountExternalAccounts/AccountExternalAccountCardOptions.cs index 4a28be8ad6..03fadcbd36 100644 --- a/src/Stripe.net/Services/AccountExternalAccounts/AccountExternalAccountCardOptions.cs +++ b/src/Stripe.net/Services/AccountExternalAccounts/AccountExternalAccountCardOptions.cs @@ -3,46 +3,88 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountExternalAccountCardOptions : INestedOptions, IHasMetadata, IHasObject { [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } = "card"; [JsonProperty("address_city")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_city")] +#endif public string AddressCity { get; set; } [JsonProperty("address_country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_country")] +#endif public string AddressCountry { get; set; } [JsonProperty("address_line1")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_line1")] +#endif public string AddressLine1 { get; set; } [JsonProperty("address_line2")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_line2")] +#endif public string AddressLine2 { get; set; } [JsonProperty("address_state")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_state")] +#endif public string AddressState { get; set; } [JsonProperty("address_zip")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_zip")] +#endif public string AddressZip { get; set; } [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } [JsonProperty("cvc")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cvc")] +#endif public string Cvc { get; set; } [JsonProperty("exp_month")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("exp_month")] +#endif public long? ExpMonth { get; set; } [JsonProperty("exp_year")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("exp_year")] +#endif public long? ExpYear { get; set; } [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } [JsonProperty("number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("number")] +#endif public string Number { get; set; } /// @@ -51,6 +93,9 @@ public class AccountExternalAccountCardOptions : INestedOptions, IHasMetadata, I /// object in a structured format. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } } } diff --git a/src/Stripe.net/Services/AccountExternalAccounts/AccountExternalAccountCardTokenOptions.cs b/src/Stripe.net/Services/AccountExternalAccounts/AccountExternalAccountCardTokenOptions.cs index 431f235177..1200f7bc47 100644 --- a/src/Stripe.net/Services/AccountExternalAccounts/AccountExternalAccountCardTokenOptions.cs +++ b/src/Stripe.net/Services/AccountExternalAccounts/AccountExternalAccountCardTokenOptions.cs @@ -2,16 +2,28 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountExternalAccountCardTokenOptions : INestedOptions, IHasObject { [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } = "card"; [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } [JsonProperty("token")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("token")] +#endif public string Token { get; set; } } } diff --git a/src/Stripe.net/Services/AccountExternalAccounts/AccountExternalAccountCreateOptions.cs b/src/Stripe.net/Services/AccountExternalAccounts/AccountExternalAccountCreateOptions.cs index 04139de9cc..a8b771bfd4 100644 --- a/src/Stripe.net/Services/AccountExternalAccounts/AccountExternalAccountCreateOptions.cs +++ b/src/Stripe.net/Services/AccountExternalAccounts/AccountExternalAccountCreateOptions.cs @@ -4,6 +4,9 @@ namespace Stripe using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountExternalAccountCreateOptions : BaseOptions, IHasMetadata { @@ -12,6 +15,9 @@ public class AccountExternalAccountCreateOptions : BaseOptions, IHasMetadata /// account becomes the default external account for its currency. /// [JsonProperty("default_for_currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("default_for_currency")] +#endif public bool? DefaultForCurrency { get; set; } /// @@ -19,6 +25,10 @@ public class AccountExternalAccountCreateOptions : BaseOptions, IHasMetadata /// [JsonProperty("external_account")] [JsonConverter(typeof(AnyOfConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("external_account")] + [STJS.JsonConverter(typeof(STJAnyOfConverter))] +#endif public AnyOf ExternalAccount { get; set; } /// @@ -28,6 +38,9 @@ public class AccountExternalAccountCreateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } } } diff --git a/src/Stripe.net/Services/AccountExternalAccounts/AccountExternalAccountDocumentsBankAccountOwnershipVerificationOptions.cs b/src/Stripe.net/Services/AccountExternalAccounts/AccountExternalAccountDocumentsBankAccountOwnershipVerificationOptions.cs index 087a11362a..07f925ff63 100644 --- a/src/Stripe.net/Services/AccountExternalAccounts/AccountExternalAccountDocumentsBankAccountOwnershipVerificationOptions.cs +++ b/src/Stripe.net/Services/AccountExternalAccounts/AccountExternalAccountDocumentsBankAccountOwnershipVerificationOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountExternalAccountDocumentsBankAccountOwnershipVerificationOptions : INestedOptions { @@ -12,6 +15,9 @@ public class AccountExternalAccountDocumentsBankAccountOwnershipVerificationOpti /// value of account_requirement. /// [JsonProperty("files")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("files")] +#endif public List Files { get; set; } } } diff --git a/src/Stripe.net/Services/AccountExternalAccounts/AccountExternalAccountDocumentsOptions.cs b/src/Stripe.net/Services/AccountExternalAccounts/AccountExternalAccountDocumentsOptions.cs index fe5204684a..419ccf9561 100644 --- a/src/Stripe.net/Services/AccountExternalAccounts/AccountExternalAccountDocumentsOptions.cs +++ b/src/Stripe.net/Services/AccountExternalAccounts/AccountExternalAccountDocumentsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountExternalAccountDocumentsOptions : INestedOptions { @@ -13,6 +16,9 @@ public class AccountExternalAccountDocumentsOptions : INestedOptions /// or a check. /// [JsonProperty("bank_account_ownership_verification")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_account_ownership_verification")] +#endif public AccountExternalAccountDocumentsBankAccountOwnershipVerificationOptions BankAccountOwnershipVerification { get; set; } } } diff --git a/src/Stripe.net/Services/AccountExternalAccounts/AccountExternalAccountListOptions.cs b/src/Stripe.net/Services/AccountExternalAccounts/AccountExternalAccountListOptions.cs index 18842c21fa..a9972450f6 100644 --- a/src/Stripe.net/Services/AccountExternalAccounts/AccountExternalAccountListOptions.cs +++ b/src/Stripe.net/Services/AccountExternalAccounts/AccountExternalAccountListOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountExternalAccountListOptions : ListOptions, IHasObject { @@ -10,6 +13,9 @@ public class AccountExternalAccountListOptions : ListOptions, IHasObject /// One of: bank_account, or card. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } } } diff --git a/src/Stripe.net/Services/AccountExternalAccounts/AccountExternalAccountUpdateOptions.cs b/src/Stripe.net/Services/AccountExternalAccounts/AccountExternalAccountUpdateOptions.cs index cec2bd8da1..354ba24e52 100644 --- a/src/Stripe.net/Services/AccountExternalAccounts/AccountExternalAccountUpdateOptions.cs +++ b/src/Stripe.net/Services/AccountExternalAccounts/AccountExternalAccountUpdateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountExternalAccountUpdateOptions : BaseOptions, IHasMetadata { @@ -10,6 +13,9 @@ public class AccountExternalAccountUpdateOptions : BaseOptions, IHasMetadata /// The name of the person or business that owns the bank account. /// [JsonProperty("account_holder_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_holder_name")] +#endif public string AccountHolderName { get; set; } /// @@ -18,6 +24,9 @@ public class AccountExternalAccountUpdateOptions : BaseOptions, IHasMetadata /// One of: company, or individual. /// [JsonProperty("account_holder_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_holder_type")] +#endif public string AccountHolderType { get; set; } /// @@ -26,66 +35,99 @@ public class AccountExternalAccountUpdateOptions : BaseOptions, IHasMetadata /// One of: checking, futsu, savings, or toza. /// [JsonProperty("account_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_type")] +#endif public string AccountType { get; set; } /// /// City/District/Suburb/Town/Village. /// [JsonProperty("address_city")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_city")] +#endif public string AddressCity { get; set; } /// /// Billing address country, if provided when creating card. /// [JsonProperty("address_country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_country")] +#endif public string AddressCountry { get; set; } /// /// Address line 1 (Street address/PO Box/Company name). /// [JsonProperty("address_line1")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_line1")] +#endif public string AddressLine1 { get; set; } /// /// Address line 2 (Apartment/Suite/Unit/Building). /// [JsonProperty("address_line2")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_line2")] +#endif public string AddressLine2 { get; set; } /// /// State/County/Province/Region. /// [JsonProperty("address_state")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_state")] +#endif public string AddressState { get; set; } /// /// ZIP or postal code. /// [JsonProperty("address_zip")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_zip")] +#endif public string AddressZip { get; set; } /// /// When set to true, this becomes the default external account for its currency. /// [JsonProperty("default_for_currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("default_for_currency")] +#endif public bool? DefaultForCurrency { get; set; } /// /// Documents that may be submitted to satisfy various informational requests. /// [JsonProperty("documents")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("documents")] +#endif public AccountExternalAccountDocumentsOptions Documents { get; set; } /// /// Two digit number representing the card’s expiration month. /// [JsonProperty("exp_month")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("exp_month")] +#endif public string ExpMonth { get; set; } /// /// Four digit number representing the card’s expiration year. /// [JsonProperty("exp_year")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("exp_year")] +#endif public string ExpYear { get; set; } /// @@ -95,12 +137,18 @@ public class AccountExternalAccountUpdateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// Cardholder name. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } } } diff --git a/src/Stripe.net/Services/AccountLinks/AccountLinkCollectionOptionsOptions.cs b/src/Stripe.net/Services/AccountLinks/AccountLinkCollectionOptionsOptions.cs index f5470213c5..ea26950998 100644 --- a/src/Stripe.net/Services/AccountLinks/AccountLinkCollectionOptionsOptions.cs +++ b/src/Stripe.net/Services/AccountLinks/AccountLinkCollectionOptionsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountLinkCollectionOptionsOptions : INestedOptions { @@ -13,6 +16,9 @@ public class AccountLinkCollectionOptionsOptions : INestedOptions /// One of: currently_due, or eventually_due. /// [JsonProperty("fields")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fields")] +#endif public string Fields { get; set; } /// @@ -21,6 +27,9 @@ public class AccountLinkCollectionOptionsOptions : INestedOptions /// One of: include, or omit. /// [JsonProperty("future_requirements")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("future_requirements")] +#endif public string FutureRequirements { get; set; } } } diff --git a/src/Stripe.net/Services/AccountLinks/AccountLinkCreateOptions.cs b/src/Stripe.net/Services/AccountLinks/AccountLinkCreateOptions.cs index a967f6f79a..c8199f6046 100644 --- a/src/Stripe.net/Services/AccountLinks/AccountLinkCreateOptions.cs +++ b/src/Stripe.net/Services/AccountLinks/AccountLinkCreateOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountLinkCreateOptions : BaseOptions { @@ -9,6 +12,9 @@ public class AccountLinkCreateOptions : BaseOptions /// The identifier of the account to create an account link for. /// [JsonProperty("account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account")] +#endif public string Account { get; set; } /// @@ -16,6 +22,9 @@ public class AccountLinkCreateOptions : BaseOptions /// One of: currently_due, or eventually_due. /// [JsonProperty("collect")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("collect")] +#endif public string Collect { get; set; } /// @@ -23,6 +32,9 @@ public class AccountLinkCreateOptions : BaseOptions /// Onboarding flow. /// [JsonProperty("collection_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("collection_options")] +#endif public AccountLinkCollectionOptionsOptions CollectionOptions { get; set; } /// @@ -34,12 +46,18 @@ public class AccountLinkCreateOptions : BaseOptions /// should display a useful error to the user. /// [JsonProperty("refresh_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("refresh_url")] +#endif public string RefreshUrl { get; set; } /// /// The URL that the user will be redirected to upon leaving or completing the linked flow. /// [JsonProperty("return_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("return_url")] +#endif public string ReturnUrl { get; set; } /// @@ -48,6 +66,9 @@ public class AccountLinkCreateOptions : BaseOptions /// One of: account_onboarding, or account_update. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/AccountPersons/AccountPersonAdditionalTosAcceptancesAccountOptions.cs b/src/Stripe.net/Services/AccountPersons/AccountPersonAdditionalTosAcceptancesAccountOptions.cs index 26eb38bac1..f050d60db6 100644 --- a/src/Stripe.net/Services/AccountPersons/AccountPersonAdditionalTosAcceptancesAccountOptions.cs +++ b/src/Stripe.net/Services/AccountPersons/AccountPersonAdditionalTosAcceptancesAccountOptions.cs @@ -4,6 +4,9 @@ namespace Stripe using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountPersonAdditionalTosAcceptancesAccountOptions : INestedOptions { @@ -13,12 +16,19 @@ public class AccountPersonAdditionalTosAcceptancesAccountOptions : INestedOption /// [JsonProperty("date")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("date")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? Date { get; set; } /// /// The IP address from which the account representative accepted the service agreement. /// [JsonProperty("ip")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ip")] +#endif public string Ip { get; set; } /// @@ -26,6 +36,9 @@ public class AccountPersonAdditionalTosAcceptancesAccountOptions : INestedOption /// agreement. /// [JsonProperty("user_agent")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("user_agent")] +#endif public string UserAgent { get; set; } } } diff --git a/src/Stripe.net/Services/AccountPersons/AccountPersonAdditionalTosAcceptancesOptions.cs b/src/Stripe.net/Services/AccountPersons/AccountPersonAdditionalTosAcceptancesOptions.cs index 23ab05be2e..18f135a758 100644 --- a/src/Stripe.net/Services/AccountPersons/AccountPersonAdditionalTosAcceptancesOptions.cs +++ b/src/Stripe.net/Services/AccountPersons/AccountPersonAdditionalTosAcceptancesOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountPersonAdditionalTosAcceptancesOptions : INestedOptions { @@ -9,6 +12,9 @@ public class AccountPersonAdditionalTosAcceptancesOptions : INestedOptions /// Details on the legal guardian's acceptance of the main Stripe service agreement. /// [JsonProperty("account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account")] +#endif public AccountPersonAdditionalTosAcceptancesAccountOptions Account { get; set; } } } diff --git a/src/Stripe.net/Services/AccountPersons/AccountPersonCreateOptions.cs b/src/Stripe.net/Services/AccountPersons/AccountPersonCreateOptions.cs index cd9486f1b9..6a22347540 100644 --- a/src/Stripe.net/Services/AccountPersons/AccountPersonCreateOptions.cs +++ b/src/Stripe.net/Services/AccountPersons/AccountPersonCreateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountPersonCreateOptions : BaseOptions, IHasMetadata { @@ -11,72 +14,108 @@ public class AccountPersonCreateOptions : BaseOptions, IHasMetadata /// agreements. /// [JsonProperty("additional_tos_acceptances")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("additional_tos_acceptances")] +#endif public AccountPersonAdditionalTosAcceptancesOptions AdditionalTosAcceptances { get; set; } /// /// The person's address. /// [JsonProperty("address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address")] +#endif public AddressOptions Address { get; set; } /// /// The Kana variation of the person's address (Japan only). /// [JsonProperty("address_kana")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_kana")] +#endif public AddressJapanOptions AddressKana { get; set; } /// /// The Kanji variation of the person's address (Japan only). /// [JsonProperty("address_kanji")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_kanji")] +#endif public AddressJapanOptions AddressKanji { get; set; } /// /// The person's date of birth. /// [JsonProperty("dob")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("dob")] +#endif public AccountPersonDobOptions Dob { get; set; } /// /// Documents that may be submitted to satisfy various informational requests. /// [JsonProperty("documents")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("documents")] +#endif public AccountPersonDocumentsOptions Documents { get; set; } /// /// The person's email address. /// [JsonProperty("email")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("email")] +#endif public string Email { get; set; } /// /// The person's first name. /// [JsonProperty("first_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("first_name")] +#endif public string FirstName { get; set; } /// /// The Kana variation of the person's first name (Japan only). /// [JsonProperty("first_name_kana")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("first_name_kana")] +#endif public string FirstNameKana { get; set; } /// /// The Kanji variation of the person's first name (Japan only). /// [JsonProperty("first_name_kanji")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("first_name_kanji")] +#endif public string FirstNameKanji { get; set; } /// /// A list of alternate names or aliases that the person is known by. /// [JsonProperty("full_name_aliases")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("full_name_aliases")] +#endif public List FullNameAliases { get; set; } /// /// The person's gender (International regulations require either "male" or "female"). /// [JsonProperty("gender")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("gender")] +#endif public string Gender { get; set; } /// @@ -87,6 +126,9 @@ public class AccountPersonCreateOptions : BaseOptions, IHasMetadata /// Stripe.js. /// [JsonProperty("id_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id_number")] +#endif public string IdNumber { get; set; } /// @@ -97,30 +139,45 @@ public class AccountPersonCreateOptions : BaseOptions, IHasMetadata /// Stripe.js. /// [JsonProperty("id_number_secondary")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id_number_secondary")] +#endif public string IdNumberSecondary { get; set; } /// /// The person's last name. /// [JsonProperty("last_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last_name")] +#endif public string LastName { get; set; } /// /// The Kana variation of the person's last name (Japan only). /// [JsonProperty("last_name_kana")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last_name_kana")] +#endif public string LastNameKana { get; set; } /// /// The Kanji variation of the person's last name (Japan only). /// [JsonProperty("last_name_kanji")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last_name_kanji")] +#endif public string LastNameKanji { get; set; } /// /// The person's maiden name. /// [JsonProperty("maiden_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("maiden_name")] +#endif public string MaidenName { get; set; } /// @@ -130,6 +187,9 @@ public class AccountPersonCreateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -138,6 +198,9 @@ public class AccountPersonCreateOptions : BaseOptions, IHasMetadata /// if unavailable. /// [JsonProperty("nationality")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("nationality")] +#endif public string Nationality { get; set; } /// @@ -145,12 +208,18 @@ public class AccountPersonCreateOptions : BaseOptions, IHasMetadata /// securely provide details to the person. /// [JsonProperty("person_token")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("person_token")] +#endif public string PersonToken { get; set; } /// /// The person's phone number. /// [JsonProperty("phone")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("phone")] +#endif public string Phone { get; set; } /// @@ -159,30 +228,45 @@ public class AccountPersonCreateOptions : BaseOptions, IHasMetadata /// function, in any jurisdiction. /// [JsonProperty("political_exposure")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("political_exposure")] +#endif public string PoliticalExposure { get; set; } /// /// The person's registered address. /// [JsonProperty("registered_address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("registered_address")] +#endif public AddressOptions RegisteredAddress { get; set; } /// /// The relationship that this person has with the account's legal entity. /// [JsonProperty("relationship")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("relationship")] +#endif public AccountPersonRelationshipOptions Relationship { get; set; } /// /// The last four digits of the person's Social Security number (U.S. only). /// [JsonProperty("ssn_last_4")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ssn_last_4")] +#endif public string SsnLast4 { get; set; } /// /// The person's verification status. /// [JsonProperty("verification")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("verification")] +#endif public AccountPersonVerificationOptions Verification { get; set; } } } diff --git a/src/Stripe.net/Services/AccountPersons/AccountPersonDobOptions.cs b/src/Stripe.net/Services/AccountPersons/AccountPersonDobOptions.cs index e17819f479..ebe4dec184 100644 --- a/src/Stripe.net/Services/AccountPersons/AccountPersonDobOptions.cs +++ b/src/Stripe.net/Services/AccountPersons/AccountPersonDobOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountPersonDobOptions : INestedOptions { @@ -9,18 +12,27 @@ public class AccountPersonDobOptions : INestedOptions /// The day of birth, between 1 and 31. /// [JsonProperty("day")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("day")] +#endif public long? Day { get; set; } /// /// The month of birth, between 1 and 12. /// [JsonProperty("month")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("month")] +#endif public long? Month { get; set; } /// /// The four-digit year of birth. /// [JsonProperty("year")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("year")] +#endif public long? Year { get; set; } } } diff --git a/src/Stripe.net/Services/AccountPersons/AccountPersonDocumentsCompanyAuthorizationOptions.cs b/src/Stripe.net/Services/AccountPersons/AccountPersonDocumentsCompanyAuthorizationOptions.cs index 454e3f3b97..7c74aec4bc 100644 --- a/src/Stripe.net/Services/AccountPersons/AccountPersonDocumentsCompanyAuthorizationOptions.cs +++ b/src/Stripe.net/Services/AccountPersons/AccountPersonDocumentsCompanyAuthorizationOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountPersonDocumentsCompanyAuthorizationOptions : INestedOptions { @@ -12,6 +15,9 @@ public class AccountPersonDocumentsCompanyAuthorizationOptions : INestedOptions /// value of account_requirement. /// [JsonProperty("files")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("files")] +#endif public List Files { get; set; } } } diff --git a/src/Stripe.net/Services/AccountPersons/AccountPersonDocumentsOptions.cs b/src/Stripe.net/Services/AccountPersons/AccountPersonDocumentsOptions.cs index ee18dc6b41..d22c6ef3ac 100644 --- a/src/Stripe.net/Services/AccountPersons/AccountPersonDocumentsOptions.cs +++ b/src/Stripe.net/Services/AccountPersons/AccountPersonDocumentsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountPersonDocumentsOptions : INestedOptions { @@ -10,12 +13,18 @@ public class AccountPersonDocumentsOptions : INestedOptions /// the company. /// [JsonProperty("company_authorization")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("company_authorization")] +#endif public AccountPersonDocumentsCompanyAuthorizationOptions CompanyAuthorization { get; set; } /// /// One or more documents showing the person's passport page with photo and personal data. /// [JsonProperty("passport")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("passport")] +#endif public AccountPersonDocumentsPassportOptions Passport { get; set; } /// @@ -23,6 +32,9 @@ public class AccountPersonDocumentsOptions : INestedOptions /// they are residing. /// [JsonProperty("visa")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("visa")] +#endif public AccountPersonDocumentsVisaOptions Visa { get; set; } } } diff --git a/src/Stripe.net/Services/AccountPersons/AccountPersonDocumentsPassportOptions.cs b/src/Stripe.net/Services/AccountPersons/AccountPersonDocumentsPassportOptions.cs index 0de955d482..ddbe761237 100644 --- a/src/Stripe.net/Services/AccountPersons/AccountPersonDocumentsPassportOptions.cs +++ b/src/Stripe.net/Services/AccountPersons/AccountPersonDocumentsPassportOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountPersonDocumentsPassportOptions : INestedOptions { @@ -12,6 +15,9 @@ public class AccountPersonDocumentsPassportOptions : INestedOptions /// value of account_requirement. /// [JsonProperty("files")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("files")] +#endif public List Files { get; set; } } } diff --git a/src/Stripe.net/Services/AccountPersons/AccountPersonDocumentsVisaOptions.cs b/src/Stripe.net/Services/AccountPersons/AccountPersonDocumentsVisaOptions.cs index 3ac6ad2ae5..02430d47f4 100644 --- a/src/Stripe.net/Services/AccountPersons/AccountPersonDocumentsVisaOptions.cs +++ b/src/Stripe.net/Services/AccountPersons/AccountPersonDocumentsVisaOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountPersonDocumentsVisaOptions : INestedOptions { @@ -12,6 +15,9 @@ public class AccountPersonDocumentsVisaOptions : INestedOptions /// value of account_requirement. /// [JsonProperty("files")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("files")] +#endif public List Files { get; set; } } } diff --git a/src/Stripe.net/Services/AccountPersons/AccountPersonListOptions.cs b/src/Stripe.net/Services/AccountPersons/AccountPersonListOptions.cs index 79c30c8b0c..bb28549d78 100644 --- a/src/Stripe.net/Services/AccountPersons/AccountPersonListOptions.cs +++ b/src/Stripe.net/Services/AccountPersons/AccountPersonListOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountPersonListOptions : ListOptions { @@ -10,6 +13,9 @@ public class AccountPersonListOptions : ListOptions /// account's company. /// [JsonProperty("relationship")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("relationship")] +#endif public AccountPersonRelationshipOptions Relationship { get; set; } } } diff --git a/src/Stripe.net/Services/AccountPersons/AccountPersonRelationshipOptions.cs b/src/Stripe.net/Services/AccountPersons/AccountPersonRelationshipOptions.cs index 16b0d77960..0e77d1f60a 100644 --- a/src/Stripe.net/Services/AccountPersons/AccountPersonRelationshipOptions.cs +++ b/src/Stripe.net/Services/AccountPersons/AccountPersonRelationshipOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountPersonRelationshipOptions : INestedOptions { @@ -10,6 +13,9 @@ public class AccountPersonRelationshipOptions : INestedOptions /// the account's representative. /// [JsonProperty("authorizer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("authorizer")] +#endif public bool? Authorizer { get; set; } /// @@ -18,6 +24,9 @@ public class AccountPersonRelationshipOptions : INestedOptions /// meets its regulatory obligations. /// [JsonProperty("director")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("director")] +#endif public bool? Director { get; set; } /// @@ -25,6 +34,9 @@ public class AccountPersonRelationshipOptions : INestedOptions /// the account's company. /// [JsonProperty("executive")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("executive")] +#endif public bool? Executive { get; set; } /// @@ -32,6 +44,9 @@ public class AccountPersonRelationshipOptions : INestedOptions /// guardians of the account's representative. /// [JsonProperty("legal_guardian")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("legal_guardian")] +#endif public bool? LegalGuardian { get; set; } /// @@ -39,12 +54,18 @@ public class AccountPersonRelationshipOptions : INestedOptions /// account's company. /// [JsonProperty("owner")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("owner")] +#endif public bool? Owner { get; set; } /// /// The percent owned by the person of the account's legal entity. /// [JsonProperty("percent_ownership")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("percent_ownership")] +#endif public decimal? PercentOwnership { get; set; } /// @@ -55,12 +76,18 @@ public class AccountPersonRelationshipOptions : INestedOptions /// responsible for opening the account. /// [JsonProperty("representative")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("representative")] +#endif public bool? Representative { get; set; } /// /// The person's title (e.g., CEO, Support Engineer). /// [JsonProperty("title")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("title")] +#endif public string Title { get; set; } } } diff --git a/src/Stripe.net/Services/AccountPersons/AccountPersonUpdateOptions.cs b/src/Stripe.net/Services/AccountPersons/AccountPersonUpdateOptions.cs index 3eb2b3a6d2..a5deee9118 100644 --- a/src/Stripe.net/Services/AccountPersons/AccountPersonUpdateOptions.cs +++ b/src/Stripe.net/Services/AccountPersons/AccountPersonUpdateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountPersonUpdateOptions : BaseOptions, IHasMetadata { @@ -11,72 +14,108 @@ public class AccountPersonUpdateOptions : BaseOptions, IHasMetadata /// agreements. /// [JsonProperty("additional_tos_acceptances")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("additional_tos_acceptances")] +#endif public AccountPersonAdditionalTosAcceptancesOptions AdditionalTosAcceptances { get; set; } /// /// The person's address. /// [JsonProperty("address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address")] +#endif public AddressOptions Address { get; set; } /// /// The Kana variation of the person's address (Japan only). /// [JsonProperty("address_kana")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_kana")] +#endif public AddressJapanOptions AddressKana { get; set; } /// /// The Kanji variation of the person's address (Japan only). /// [JsonProperty("address_kanji")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_kanji")] +#endif public AddressJapanOptions AddressKanji { get; set; } /// /// The person's date of birth. /// [JsonProperty("dob")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("dob")] +#endif public AccountPersonDobOptions Dob { get; set; } /// /// Documents that may be submitted to satisfy various informational requests. /// [JsonProperty("documents")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("documents")] +#endif public AccountPersonDocumentsOptions Documents { get; set; } /// /// The person's email address. /// [JsonProperty("email")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("email")] +#endif public string Email { get; set; } /// /// The person's first name. /// [JsonProperty("first_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("first_name")] +#endif public string FirstName { get; set; } /// /// The Kana variation of the person's first name (Japan only). /// [JsonProperty("first_name_kana")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("first_name_kana")] +#endif public string FirstNameKana { get; set; } /// /// The Kanji variation of the person's first name (Japan only). /// [JsonProperty("first_name_kanji")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("first_name_kanji")] +#endif public string FirstNameKanji { get; set; } /// /// A list of alternate names or aliases that the person is known by. /// [JsonProperty("full_name_aliases")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("full_name_aliases")] +#endif public List FullNameAliases { get; set; } /// /// The person's gender (International regulations require either "male" or "female"). /// [JsonProperty("gender")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("gender")] +#endif public string Gender { get; set; } /// @@ -87,6 +126,9 @@ public class AccountPersonUpdateOptions : BaseOptions, IHasMetadata /// Stripe.js. /// [JsonProperty("id_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id_number")] +#endif public string IdNumber { get; set; } /// @@ -97,30 +139,45 @@ public class AccountPersonUpdateOptions : BaseOptions, IHasMetadata /// Stripe.js. /// [JsonProperty("id_number_secondary")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id_number_secondary")] +#endif public string IdNumberSecondary { get; set; } /// /// The person's last name. /// [JsonProperty("last_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last_name")] +#endif public string LastName { get; set; } /// /// The Kana variation of the person's last name (Japan only). /// [JsonProperty("last_name_kana")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last_name_kana")] +#endif public string LastNameKana { get; set; } /// /// The Kanji variation of the person's last name (Japan only). /// [JsonProperty("last_name_kanji")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last_name_kanji")] +#endif public string LastNameKanji { get; set; } /// /// The person's maiden name. /// [JsonProperty("maiden_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("maiden_name")] +#endif public string MaidenName { get; set; } /// @@ -130,6 +187,9 @@ public class AccountPersonUpdateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -138,6 +198,9 @@ public class AccountPersonUpdateOptions : BaseOptions, IHasMetadata /// if unavailable. /// [JsonProperty("nationality")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("nationality")] +#endif public string Nationality { get; set; } /// @@ -145,12 +208,18 @@ public class AccountPersonUpdateOptions : BaseOptions, IHasMetadata /// securely provide details to the person. /// [JsonProperty("person_token")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("person_token")] +#endif public string PersonToken { get; set; } /// /// The person's phone number. /// [JsonProperty("phone")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("phone")] +#endif public string Phone { get; set; } /// @@ -159,30 +228,45 @@ public class AccountPersonUpdateOptions : BaseOptions, IHasMetadata /// function, in any jurisdiction. /// [JsonProperty("political_exposure")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("political_exposure")] +#endif public string PoliticalExposure { get; set; } /// /// The person's registered address. /// [JsonProperty("registered_address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("registered_address")] +#endif public AddressOptions RegisteredAddress { get; set; } /// /// The relationship that this person has with the account's legal entity. /// [JsonProperty("relationship")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("relationship")] +#endif public AccountPersonRelationshipOptions Relationship { get; set; } /// /// The last four digits of the person's Social Security number (U.S. only). /// [JsonProperty("ssn_last_4")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ssn_last_4")] +#endif public string SsnLast4 { get; set; } /// /// The person's verification status. /// [JsonProperty("verification")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("verification")] +#endif public AccountPersonVerificationOptions Verification { get; set; } } } diff --git a/src/Stripe.net/Services/AccountPersons/AccountPersonVerificationAdditionalDocumentOptions.cs b/src/Stripe.net/Services/AccountPersons/AccountPersonVerificationAdditionalDocumentOptions.cs index 42fdae74e6..73ded0f35b 100644 --- a/src/Stripe.net/Services/AccountPersons/AccountPersonVerificationAdditionalDocumentOptions.cs +++ b/src/Stripe.net/Services/AccountPersons/AccountPersonVerificationAdditionalDocumentOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountPersonVerificationAdditionalDocumentOptions : INestedOptions { @@ -12,6 +15,9 @@ public class AccountPersonVerificationAdditionalDocumentOptions : INestedOptions /// and less than 10 MB in size. /// [JsonProperty("back")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("back")] +#endif public string Back { get; set; } /// @@ -21,6 +27,9 @@ public class AccountPersonVerificationAdditionalDocumentOptions : INestedOptions /// and less than 10 MB in size. /// [JsonProperty("front")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("front")] +#endif public string Front { get; set; } } } diff --git a/src/Stripe.net/Services/AccountPersons/AccountPersonVerificationDocumentOptions.cs b/src/Stripe.net/Services/AccountPersons/AccountPersonVerificationDocumentOptions.cs index aa2e532fba..a7668082ca 100644 --- a/src/Stripe.net/Services/AccountPersons/AccountPersonVerificationDocumentOptions.cs +++ b/src/Stripe.net/Services/AccountPersons/AccountPersonVerificationDocumentOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountPersonVerificationDocumentOptions : INestedOptions { @@ -12,6 +15,9 @@ public class AccountPersonVerificationDocumentOptions : INestedOptions /// and less than 10 MB in size. /// [JsonProperty("back")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("back")] +#endif public string Back { get; set; } /// @@ -21,6 +27,9 @@ public class AccountPersonVerificationDocumentOptions : INestedOptions /// and less than 10 MB in size. /// [JsonProperty("front")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("front")] +#endif public string Front { get; set; } } } diff --git a/src/Stripe.net/Services/AccountPersons/AccountPersonVerificationOptions.cs b/src/Stripe.net/Services/AccountPersons/AccountPersonVerificationOptions.cs index b5cb9ca950..1c3994abde 100644 --- a/src/Stripe.net/Services/AccountPersons/AccountPersonVerificationOptions.cs +++ b/src/Stripe.net/Services/AccountPersons/AccountPersonVerificationOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountPersonVerificationOptions : INestedOptions { @@ -10,12 +13,18 @@ public class AccountPersonVerificationOptions : INestedOptions /// well-known utility company. /// [JsonProperty("additional_document")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("additional_document")] +#endif public AccountPersonVerificationAdditionalDocumentOptions AdditionalDocument { get; set; } /// /// An identifying document, either a passport or local ID card. /// [JsonProperty("document")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("document")] +#endif public AccountPersonVerificationDocumentOptions Document { get; set; } } } diff --git a/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsAccountManagementFeaturesOptions.cs b/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsAccountManagementFeaturesOptions.cs index 68ccd0120a..9dcb5db43f 100644 --- a/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsAccountManagementFeaturesOptions.cs +++ b/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsAccountManagementFeaturesOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountSessionComponentsAccountManagementFeaturesOptions : INestedOptions { @@ -13,6 +16,9 @@ public class AccountSessionComponentsAccountManagementFeaturesOptions : INestedO /// otherwise. /// [JsonProperty("disable_stripe_user_authentication")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("disable_stripe_user_authentication")] +#endif public bool? DisableStripeUserAuthentication { get; set; } /// @@ -23,6 +29,9 @@ public class AccountSessionComponentsAccountManagementFeaturesOptions : INestedO /// The default value for this feature is true. /// [JsonProperty("external_account_collection")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("external_account_collection")] +#endif public bool? ExternalAccountCollection { get; set; } } } diff --git a/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsAccountManagementOptions.cs b/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsAccountManagementOptions.cs index 2cb591e3c3..647a7528f5 100644 --- a/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsAccountManagementOptions.cs +++ b/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsAccountManagementOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountSessionComponentsAccountManagementOptions : INestedOptions { @@ -9,12 +12,18 @@ public class AccountSessionComponentsAccountManagementOptions : INestedOptions /// Whether the embedded component is enabled. /// [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool? Enabled { get; set; } /// /// The list of features enabled in the embedded component. /// [JsonProperty("features")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("features")] +#endif public AccountSessionComponentsAccountManagementFeaturesOptions Features { get; set; } } } diff --git a/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsAccountOnboardingFeaturesOptions.cs b/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsAccountOnboardingFeaturesOptions.cs index f0ec01c832..b1058d6888 100644 --- a/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsAccountOnboardingFeaturesOptions.cs +++ b/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsAccountOnboardingFeaturesOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountSessionComponentsAccountOnboardingFeaturesOptions : INestedOptions { @@ -13,6 +16,9 @@ public class AccountSessionComponentsAccountOnboardingFeaturesOptions : INestedO /// otherwise. /// [JsonProperty("disable_stripe_user_authentication")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("disable_stripe_user_authentication")] +#endif public bool? DisableStripeUserAuthentication { get; set; } /// @@ -23,6 +29,9 @@ public class AccountSessionComponentsAccountOnboardingFeaturesOptions : INestedO /// The default value for this feature is true. /// [JsonProperty("external_account_collection")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("external_account_collection")] +#endif public bool? ExternalAccountCollection { get; set; } } } diff --git a/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsAccountOnboardingOptions.cs b/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsAccountOnboardingOptions.cs index 8b6e843ae6..95a767942a 100644 --- a/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsAccountOnboardingOptions.cs +++ b/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsAccountOnboardingOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountSessionComponentsAccountOnboardingOptions : INestedOptions { @@ -9,12 +12,18 @@ public class AccountSessionComponentsAccountOnboardingOptions : INestedOptions /// Whether the embedded component is enabled. /// [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool? Enabled { get; set; } /// /// The list of features enabled in the embedded component. /// [JsonProperty("features")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("features")] +#endif public AccountSessionComponentsAccountOnboardingFeaturesOptions Features { get; set; } } } diff --git a/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsBalancesFeaturesOptions.cs b/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsBalancesFeaturesOptions.cs index f36d312acd..9f5972c6b4 100644 --- a/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsBalancesFeaturesOptions.cs +++ b/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsBalancesFeaturesOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountSessionComponentsBalancesFeaturesOptions : INestedOptions { @@ -13,6 +16,9 @@ public class AccountSessionComponentsBalancesFeaturesOptions : INestedOptions /// otherwise. /// [JsonProperty("disable_stripe_user_authentication")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("disable_stripe_user_authentication")] +#endif public bool? DisableStripeUserAuthentication { get; set; } /// @@ -20,6 +26,9 @@ public class AccountSessionComponentsBalancesFeaturesOptions : INestedOptions /// Loss Liability, default false otherwise. /// [JsonProperty("edit_payout_schedule")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("edit_payout_schedule")] +#endif public bool? EditPayoutSchedule { get; set; } /// @@ -30,6 +39,9 @@ public class AccountSessionComponentsBalancesFeaturesOptions : INestedOptions /// The default value for this feature is true. /// [JsonProperty("external_account_collection")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("external_account_collection")] +#endif public bool? ExternalAccountCollection { get; set; } /// @@ -37,6 +49,9 @@ public class AccountSessionComponentsBalancesFeaturesOptions : INestedOptions /// Liability, default false otherwise. /// [JsonProperty("instant_payouts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("instant_payouts")] +#endif public bool? InstantPayouts { get; set; } /// @@ -44,6 +59,9 @@ public class AccountSessionComponentsBalancesFeaturesOptions : INestedOptions /// Liability, default false otherwise. /// [JsonProperty("standard_payouts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("standard_payouts")] +#endif public bool? StandardPayouts { get; set; } } } diff --git a/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsBalancesOptions.cs b/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsBalancesOptions.cs index 8b55c9849d..54578f6067 100644 --- a/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsBalancesOptions.cs +++ b/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsBalancesOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountSessionComponentsBalancesOptions : INestedOptions { @@ -9,12 +12,18 @@ public class AccountSessionComponentsBalancesOptions : INestedOptions /// Whether the embedded component is enabled. /// [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool? Enabled { get; set; } /// /// The list of features enabled in the embedded component. /// [JsonProperty("features")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("features")] +#endif public AccountSessionComponentsBalancesFeaturesOptions Features { get; set; } } } diff --git a/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsDocumentsOptions.cs b/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsDocumentsOptions.cs index aa94a1c473..af0e67ede5 100644 --- a/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsDocumentsOptions.cs +++ b/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsDocumentsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountSessionComponentsDocumentsOptions : INestedOptions { @@ -9,12 +12,18 @@ public class AccountSessionComponentsDocumentsOptions : INestedOptions /// Whether the embedded component is enabled. /// [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool? Enabled { get; set; } /// /// The list of features enabled in the embedded component. /// [JsonProperty("features")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("features")] +#endif public AccountSessionComponentsDocumentsFeaturesOptions Features { get; set; } } } diff --git a/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsNotificationBannerFeaturesOptions.cs b/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsNotificationBannerFeaturesOptions.cs index 8c71ecba66..bcf056a810 100644 --- a/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsNotificationBannerFeaturesOptions.cs +++ b/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsNotificationBannerFeaturesOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountSessionComponentsNotificationBannerFeaturesOptions : INestedOptions { @@ -13,6 +16,9 @@ public class AccountSessionComponentsNotificationBannerFeaturesOptions : INested /// otherwise. /// [JsonProperty("disable_stripe_user_authentication")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("disable_stripe_user_authentication")] +#endif public bool? DisableStripeUserAuthentication { get; set; } /// @@ -23,6 +29,9 @@ public class AccountSessionComponentsNotificationBannerFeaturesOptions : INested /// The default value for this feature is true. /// [JsonProperty("external_account_collection")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("external_account_collection")] +#endif public bool? ExternalAccountCollection { get; set; } } } diff --git a/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsNotificationBannerOptions.cs b/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsNotificationBannerOptions.cs index a3c8257276..bfc169890c 100644 --- a/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsNotificationBannerOptions.cs +++ b/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsNotificationBannerOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountSessionComponentsNotificationBannerOptions : INestedOptions { @@ -9,12 +12,18 @@ public class AccountSessionComponentsNotificationBannerOptions : INestedOptions /// Whether the embedded component is enabled. /// [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool? Enabled { get; set; } /// /// The list of features enabled in the embedded component. /// [JsonProperty("features")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("features")] +#endif public AccountSessionComponentsNotificationBannerFeaturesOptions Features { get; set; } } } diff --git a/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsOptions.cs b/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsOptions.cs index 22ebb7786b..a00d6e7e4d 100644 --- a/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsOptions.cs +++ b/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountSessionComponentsOptions : INestedOptions { @@ -9,66 +12,99 @@ public class AccountSessionComponentsOptions : INestedOptions /// Configuration for the account management embedded component. /// [JsonProperty("account_management")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_management")] +#endif public AccountSessionComponentsAccountManagementOptions AccountManagement { get; set; } /// /// Configuration for the account onboarding embedded component. /// [JsonProperty("account_onboarding")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_onboarding")] +#endif public AccountSessionComponentsAccountOnboardingOptions AccountOnboarding { get; set; } /// /// Configuration for the balances embedded component. /// [JsonProperty("balances")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("balances")] +#endif public AccountSessionComponentsBalancesOptions Balances { get; set; } /// /// Configuration for the documents embedded component. /// [JsonProperty("documents")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("documents")] +#endif public AccountSessionComponentsDocumentsOptions Documents { get; set; } /// /// Configuration for the notification banner embedded component. /// [JsonProperty("notification_banner")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("notification_banner")] +#endif public AccountSessionComponentsNotificationBannerOptions NotificationBanner { get; set; } /// /// Configuration for the payment details embedded component. /// [JsonProperty("payment_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_details")] +#endif public AccountSessionComponentsPaymentDetailsOptions PaymentDetails { get; set; } /// /// Configuration for the payments embedded component. /// [JsonProperty("payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payments")] +#endif public AccountSessionComponentsPaymentsOptions Payments { get; set; } /// /// Configuration for the payouts embedded component. /// [JsonProperty("payouts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payouts")] +#endif public AccountSessionComponentsPayoutsOptions Payouts { get; set; } /// /// Configuration for the payouts list embedded component. /// [JsonProperty("payouts_list")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payouts_list")] +#endif public AccountSessionComponentsPayoutsListOptions PayoutsList { get; set; } /// /// Configuration for the tax registrations embedded component. /// [JsonProperty("tax_registrations")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_registrations")] +#endif public AccountSessionComponentsTaxRegistrationsOptions TaxRegistrations { get; set; } /// /// Configuration for the tax settings embedded component. /// [JsonProperty("tax_settings")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_settings")] +#endif public AccountSessionComponentsTaxSettingsOptions TaxSettings { get; set; } } } diff --git a/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsPaymentDetailsFeaturesOptions.cs b/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsPaymentDetailsFeaturesOptions.cs index 5e3487a340..3a60210fd0 100644 --- a/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsPaymentDetailsFeaturesOptions.cs +++ b/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsPaymentDetailsFeaturesOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountSessionComponentsPaymentDetailsFeaturesOptions : INestedOptions { @@ -10,6 +13,9 @@ public class AccountSessionComponentsPaymentDetailsFeaturesOptions : INestedOpti /// default. /// [JsonProperty("capture_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("capture_payments")] +#endif public bool? CapturePayments { get; set; } /// @@ -17,6 +23,9 @@ public class AccountSessionComponentsPaymentDetailsFeaturesOptions : INestedOpti /// behalf of them. This is false by default. /// [JsonProperty("destination_on_behalf_of_charge_management")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("destination_on_behalf_of_charge_management")] +#endif public bool? DestinationOnBehalfOfChargeManagement { get; set; } /// @@ -24,12 +33,18 @@ public class AccountSessionComponentsPaymentDetailsFeaturesOptions : INestedOpti /// disputes. This is true by default. /// [JsonProperty("dispute_management")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("dispute_management")] +#endif public bool? DisputeManagement { get; set; } /// /// Whether to allow sending refunds. This is true by default. /// [JsonProperty("refund_management")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("refund_management")] +#endif public bool? RefundManagement { get; set; } } } diff --git a/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsPaymentDetailsOptions.cs b/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsPaymentDetailsOptions.cs index 3227b4d168..b497cbd63a 100644 --- a/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsPaymentDetailsOptions.cs +++ b/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsPaymentDetailsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountSessionComponentsPaymentDetailsOptions : INestedOptions { @@ -9,12 +12,18 @@ public class AccountSessionComponentsPaymentDetailsOptions : INestedOptions /// Whether the embedded component is enabled. /// [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool? Enabled { get; set; } /// /// The list of features enabled in the embedded component. /// [JsonProperty("features")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("features")] +#endif public AccountSessionComponentsPaymentDetailsFeaturesOptions Features { get; set; } } } diff --git a/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsPaymentsFeaturesOptions.cs b/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsPaymentsFeaturesOptions.cs index b65c38aee3..e6d3bf810f 100644 --- a/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsPaymentsFeaturesOptions.cs +++ b/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsPaymentsFeaturesOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountSessionComponentsPaymentsFeaturesOptions : INestedOptions { @@ -10,6 +13,9 @@ public class AccountSessionComponentsPaymentsFeaturesOptions : INestedOptions /// default. /// [JsonProperty("capture_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("capture_payments")] +#endif public bool? CapturePayments { get; set; } /// @@ -17,6 +23,9 @@ public class AccountSessionComponentsPaymentsFeaturesOptions : INestedOptions /// behalf of them. This is false by default. /// [JsonProperty("destination_on_behalf_of_charge_management")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("destination_on_behalf_of_charge_management")] +#endif public bool? DestinationOnBehalfOfChargeManagement { get; set; } /// @@ -24,12 +33,18 @@ public class AccountSessionComponentsPaymentsFeaturesOptions : INestedOptions /// disputes. This is true by default. /// [JsonProperty("dispute_management")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("dispute_management")] +#endif public bool? DisputeManagement { get; set; } /// /// Whether to allow sending refunds. This is true by default. /// [JsonProperty("refund_management")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("refund_management")] +#endif public bool? RefundManagement { get; set; } } } diff --git a/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsPaymentsOptions.cs b/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsPaymentsOptions.cs index 4d118ae7aa..79c8de3ac6 100644 --- a/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsPaymentsOptions.cs +++ b/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsPaymentsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountSessionComponentsPaymentsOptions : INestedOptions { @@ -9,12 +12,18 @@ public class AccountSessionComponentsPaymentsOptions : INestedOptions /// Whether the embedded component is enabled. /// [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool? Enabled { get; set; } /// /// The list of features enabled in the embedded component. /// [JsonProperty("features")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("features")] +#endif public AccountSessionComponentsPaymentsFeaturesOptions Features { get; set; } } } diff --git a/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsPayoutsFeaturesOptions.cs b/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsPayoutsFeaturesOptions.cs index 93521c2573..bf315e23e7 100644 --- a/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsPayoutsFeaturesOptions.cs +++ b/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsPayoutsFeaturesOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountSessionComponentsPayoutsFeaturesOptions : INestedOptions { @@ -13,6 +16,9 @@ public class AccountSessionComponentsPayoutsFeaturesOptions : INestedOptions /// otherwise. /// [JsonProperty("disable_stripe_user_authentication")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("disable_stripe_user_authentication")] +#endif public bool? DisableStripeUserAuthentication { get; set; } /// @@ -20,6 +26,9 @@ public class AccountSessionComponentsPayoutsFeaturesOptions : INestedOptions /// Loss Liability, default false otherwise. /// [JsonProperty("edit_payout_schedule")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("edit_payout_schedule")] +#endif public bool? EditPayoutSchedule { get; set; } /// @@ -30,6 +39,9 @@ public class AccountSessionComponentsPayoutsFeaturesOptions : INestedOptions /// The default value for this feature is true. /// [JsonProperty("external_account_collection")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("external_account_collection")] +#endif public bool? ExternalAccountCollection { get; set; } /// @@ -37,6 +49,9 @@ public class AccountSessionComponentsPayoutsFeaturesOptions : INestedOptions /// Liability, default false otherwise. /// [JsonProperty("instant_payouts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("instant_payouts")] +#endif public bool? InstantPayouts { get; set; } /// @@ -44,6 +59,9 @@ public class AccountSessionComponentsPayoutsFeaturesOptions : INestedOptions /// Liability, default false otherwise. /// [JsonProperty("standard_payouts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("standard_payouts")] +#endif public bool? StandardPayouts { get; set; } } } diff --git a/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsPayoutsListOptions.cs b/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsPayoutsListOptions.cs index e1b926bba8..73501338ba 100644 --- a/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsPayoutsListOptions.cs +++ b/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsPayoutsListOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountSessionComponentsPayoutsListOptions : INestedOptions { @@ -9,12 +12,18 @@ public class AccountSessionComponentsPayoutsListOptions : INestedOptions /// Whether the embedded component is enabled. /// [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool? Enabled { get; set; } /// /// The list of features enabled in the embedded component. /// [JsonProperty("features")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("features")] +#endif public AccountSessionComponentsPayoutsListFeaturesOptions Features { get; set; } } } diff --git a/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsPayoutsOptions.cs b/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsPayoutsOptions.cs index 5a97cbc2b3..8dda859b5c 100644 --- a/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsPayoutsOptions.cs +++ b/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsPayoutsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountSessionComponentsPayoutsOptions : INestedOptions { @@ -9,12 +12,18 @@ public class AccountSessionComponentsPayoutsOptions : INestedOptions /// Whether the embedded component is enabled. /// [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool? Enabled { get; set; } /// /// The list of features enabled in the embedded component. /// [JsonProperty("features")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("features")] +#endif public AccountSessionComponentsPayoutsFeaturesOptions Features { get; set; } } } diff --git a/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsTaxRegistrationsOptions.cs b/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsTaxRegistrationsOptions.cs index 5f0cfa7049..53dd3eebb4 100644 --- a/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsTaxRegistrationsOptions.cs +++ b/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsTaxRegistrationsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountSessionComponentsTaxRegistrationsOptions : INestedOptions { @@ -9,12 +12,18 @@ public class AccountSessionComponentsTaxRegistrationsOptions : INestedOptions /// Whether the embedded component is enabled. /// [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool? Enabled { get; set; } /// /// The list of features enabled in the embedded component. /// [JsonProperty("features")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("features")] +#endif public AccountSessionComponentsTaxRegistrationsFeaturesOptions Features { get; set; } } } diff --git a/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsTaxSettingsOptions.cs b/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsTaxSettingsOptions.cs index 7a8020a36a..8727d9acb7 100644 --- a/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsTaxSettingsOptions.cs +++ b/src/Stripe.net/Services/AccountSessions/AccountSessionComponentsTaxSettingsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountSessionComponentsTaxSettingsOptions : INestedOptions { @@ -9,12 +12,18 @@ public class AccountSessionComponentsTaxSettingsOptions : INestedOptions /// Whether the embedded component is enabled. /// [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool? Enabled { get; set; } /// /// The list of features enabled in the embedded component. /// [JsonProperty("features")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("features")] +#endif public AccountSessionComponentsTaxSettingsFeaturesOptions Features { get; set; } } } diff --git a/src/Stripe.net/Services/AccountSessions/AccountSessionCreateOptions.cs b/src/Stripe.net/Services/AccountSessions/AccountSessionCreateOptions.cs index 8231e54a3c..5369e50ce5 100644 --- a/src/Stripe.net/Services/AccountSessions/AccountSessionCreateOptions.cs +++ b/src/Stripe.net/Services/AccountSessions/AccountSessionCreateOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountSessionCreateOptions : BaseOptions { @@ -9,6 +12,9 @@ public class AccountSessionCreateOptions : BaseOptions /// The identifier of the account to create an Account Session for. /// [JsonProperty("account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account")] +#endif public string Account { get; set; } /// @@ -16,6 +22,9 @@ public class AccountSessionCreateOptions : BaseOptions /// maps to its configuration (e.g. whether it has been enabled or not). /// [JsonProperty("components")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("components")] +#endif public AccountSessionComponentsOptions Components { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountBankAccountOptions.cs b/src/Stripe.net/Services/Accounts/AccountBankAccountOptions.cs index c29640ec3b..66db03e17b 100644 --- a/src/Stripe.net/Services/Accounts/AccountBankAccountOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountBankAccountOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountBankAccountOptions : INestedOptions, IHasObject { @@ -10,6 +13,9 @@ public class AccountBankAccountOptions : INestedOptions, IHasObject /// when attaching the bank account to a Customer object. /// [JsonProperty("account_holder_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_holder_name")] +#endif public string AccountHolderName { get; set; } /// @@ -19,18 +25,27 @@ public class AccountBankAccountOptions : INestedOptions, IHasObject /// One of: company, or individual. /// [JsonProperty("account_holder_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_holder_type")] +#endif public string AccountHolderType { get; set; } /// /// The account number for the bank account, in string form. Must be a checking account. /// [JsonProperty("account_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_number")] +#endif public string AccountNumber { get; set; } /// /// The country in which the bank account is located. /// [JsonProperty("country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country")] +#endif public string Country { get; set; } /// @@ -38,9 +53,15 @@ public class AccountBankAccountOptions : INestedOptions, IHasObject /// href="docs/payouts">Stripe supports.. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } = "bank_account"; /// @@ -50,6 +71,9 @@ public class AccountBankAccountOptions : INestedOptions, IHasObject /// foraccount_number, this field is not required. /// [JsonProperty("routing_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("routing_number")] +#endif public string RoutingNumber { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountBusinessProfileAnnualRevenueOptions.cs b/src/Stripe.net/Services/Accounts/AccountBusinessProfileAnnualRevenueOptions.cs index 973e353ccf..b132e5ae6b 100644 --- a/src/Stripe.net/Services/Accounts/AccountBusinessProfileAnnualRevenueOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountBusinessProfileAnnualRevenueOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountBusinessProfileAnnualRevenueOptions : INestedOptions { @@ -10,6 +13,9 @@ public class AccountBusinessProfileAnnualRevenueOptions : INestedOptions /// href="https://stripe.com/currencies#zero-decimal">smallest currency unit. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long? Amount { get; set; } /// @@ -18,6 +24,9 @@ public class AccountBusinessProfileAnnualRevenueOptions : INestedOptions /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// @@ -25,6 +34,9 @@ public class AccountBusinessProfileAnnualRevenueOptions : INestedOptions /// the 31st of December, 2023. /// [JsonProperty("fiscal_year_end")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fiscal_year_end")] +#endif public string FiscalYearEnd { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountBusinessProfileMonthlyEstimatedRevenueOptions.cs b/src/Stripe.net/Services/Accounts/AccountBusinessProfileMonthlyEstimatedRevenueOptions.cs index 8477b09198..0fc33ac284 100644 --- a/src/Stripe.net/Services/Accounts/AccountBusinessProfileMonthlyEstimatedRevenueOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountBusinessProfileMonthlyEstimatedRevenueOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountBusinessProfileMonthlyEstimatedRevenueOptions : INestedOptions { @@ -10,6 +13,9 @@ public class AccountBusinessProfileMonthlyEstimatedRevenueOptions : INestedOptio /// href="https://stripe.com/currencies#zero-decimal">smallest currency unit. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long? Amount { get; set; } /// @@ -18,6 +24,9 @@ public class AccountBusinessProfileMonthlyEstimatedRevenueOptions : INestedOptio /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountBusinessProfileOptions.cs b/src/Stripe.net/Services/Accounts/AccountBusinessProfileOptions.cs index 455372c14d..0f889bc606 100644 --- a/src/Stripe.net/Services/Accounts/AccountBusinessProfileOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountBusinessProfileOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountBusinessProfileOptions : INestedOptions { @@ -9,6 +12,9 @@ public class AccountBusinessProfileOptions : INestedOptions /// The applicant's gross annual revenue for its preceding fiscal year. /// [JsonProperty("annual_revenue")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("annual_revenue")] +#endif public AccountBusinessProfileAnnualRevenueOptions AnnualRevenue { get; set; } /// @@ -16,6 +22,9 @@ public class AccountBusinessProfileOptions : INestedOptions /// the business. /// [JsonProperty("estimated_worker_count")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("estimated_worker_count")] +#endif public long? EstimatedWorkerCount { get; set; } /// @@ -24,6 +33,9 @@ public class AccountBusinessProfileOptions : INestedOptions /// provide. /// [JsonProperty("mcc")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mcc")] +#endif public string Mcc { get; set; } /// @@ -31,12 +43,18 @@ public class AccountBusinessProfileOptions : INestedOptions /// and India. /// [JsonProperty("monthly_estimated_revenue")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("monthly_estimated_revenue")] +#endif public AccountBusinessProfileMonthlyEstimatedRevenueOptions MonthlyEstimatedRevenue { get; set; } /// /// The customer-facing business name. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } /// @@ -44,36 +62,54 @@ public class AccountBusinessProfileOptions : INestedOptions /// Used by Stripe for risk and underwriting purposes. /// [JsonProperty("product_description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("product_description")] +#endif public string ProductDescription { get; set; } /// /// A publicly available mailing address for sending support issues to. /// [JsonProperty("support_address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("support_address")] +#endif public AddressOptions SupportAddress { get; set; } /// /// A publicly available email address for sending support issues to. /// [JsonProperty("support_email")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("support_email")] +#endif public string SupportEmail { get; set; } /// /// A publicly available phone number to call with support issues. /// [JsonProperty("support_phone")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("support_phone")] +#endif public string SupportPhone { get; set; } /// /// A publicly available website for handling support issues. /// [JsonProperty("support_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("support_url")] +#endif public string SupportUrl { get; set; } /// /// The business's publicly available website. /// [JsonProperty("url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("url")] +#endif public string Url { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountCapabilitiesAcssDebitPaymentsOptions.cs b/src/Stripe.net/Services/Accounts/AccountCapabilitiesAcssDebitPaymentsOptions.cs index 5ddd4e4904..e696c6607c 100644 --- a/src/Stripe.net/Services/Accounts/AccountCapabilitiesAcssDebitPaymentsOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountCapabilitiesAcssDebitPaymentsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountCapabilitiesAcssDebitPaymentsOptions : INestedOptions { @@ -11,6 +14,9 @@ public class AccountCapabilitiesAcssDebitPaymentsOptions : INestedOptions /// capability are returned in the requirements arrays. /// [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif public bool? Requested { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountCapabilitiesAffirmPaymentsOptions.cs b/src/Stripe.net/Services/Accounts/AccountCapabilitiesAffirmPaymentsOptions.cs index 1258ff0b98..84dc9397ce 100644 --- a/src/Stripe.net/Services/Accounts/AccountCapabilitiesAffirmPaymentsOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountCapabilitiesAffirmPaymentsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountCapabilitiesAffirmPaymentsOptions : INestedOptions { @@ -11,6 +14,9 @@ public class AccountCapabilitiesAffirmPaymentsOptions : INestedOptions /// capability are returned in the requirements arrays. /// [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif public bool? Requested { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountCapabilitiesAfterpayClearpayPaymentsOptions.cs b/src/Stripe.net/Services/Accounts/AccountCapabilitiesAfterpayClearpayPaymentsOptions.cs index 074531df1c..7026ca431d 100644 --- a/src/Stripe.net/Services/Accounts/AccountCapabilitiesAfterpayClearpayPaymentsOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountCapabilitiesAfterpayClearpayPaymentsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountCapabilitiesAfterpayClearpayPaymentsOptions : INestedOptions { @@ -11,6 +14,9 @@ public class AccountCapabilitiesAfterpayClearpayPaymentsOptions : INestedOptions /// capability are returned in the requirements arrays. /// [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif public bool? Requested { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountCapabilitiesAlmaPaymentsOptions.cs b/src/Stripe.net/Services/Accounts/AccountCapabilitiesAlmaPaymentsOptions.cs index d58002787f..81a01d64bc 100644 --- a/src/Stripe.net/Services/Accounts/AccountCapabilitiesAlmaPaymentsOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountCapabilitiesAlmaPaymentsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountCapabilitiesAlmaPaymentsOptions : INestedOptions { @@ -11,6 +14,9 @@ public class AccountCapabilitiesAlmaPaymentsOptions : INestedOptions /// capability are returned in the requirements arrays. /// [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif public bool? Requested { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountCapabilitiesAmazonPayPaymentsOptions.cs b/src/Stripe.net/Services/Accounts/AccountCapabilitiesAmazonPayPaymentsOptions.cs index e2fc40a286..7a8a8e768b 100644 --- a/src/Stripe.net/Services/Accounts/AccountCapabilitiesAmazonPayPaymentsOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountCapabilitiesAmazonPayPaymentsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountCapabilitiesAmazonPayPaymentsOptions : INestedOptions { @@ -11,6 +14,9 @@ public class AccountCapabilitiesAmazonPayPaymentsOptions : INestedOptions /// capability are returned in the requirements arrays. /// [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif public bool? Requested { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountCapabilitiesAuBecsDebitPaymentsOptions.cs b/src/Stripe.net/Services/Accounts/AccountCapabilitiesAuBecsDebitPaymentsOptions.cs index 68c2d4c385..ba30528504 100644 --- a/src/Stripe.net/Services/Accounts/AccountCapabilitiesAuBecsDebitPaymentsOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountCapabilitiesAuBecsDebitPaymentsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountCapabilitiesAuBecsDebitPaymentsOptions : INestedOptions { @@ -11,6 +14,9 @@ public class AccountCapabilitiesAuBecsDebitPaymentsOptions : INestedOptions /// capability are returned in the requirements arrays. /// [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif public bool? Requested { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountCapabilitiesBacsDebitPaymentsOptions.cs b/src/Stripe.net/Services/Accounts/AccountCapabilitiesBacsDebitPaymentsOptions.cs index f9dbf85efe..a84510c881 100644 --- a/src/Stripe.net/Services/Accounts/AccountCapabilitiesBacsDebitPaymentsOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountCapabilitiesBacsDebitPaymentsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountCapabilitiesBacsDebitPaymentsOptions : INestedOptions { @@ -11,6 +14,9 @@ public class AccountCapabilitiesBacsDebitPaymentsOptions : INestedOptions /// capability are returned in the requirements arrays. /// [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif public bool? Requested { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountCapabilitiesBancontactPaymentsOptions.cs b/src/Stripe.net/Services/Accounts/AccountCapabilitiesBancontactPaymentsOptions.cs index e19f328615..2e60245415 100644 --- a/src/Stripe.net/Services/Accounts/AccountCapabilitiesBancontactPaymentsOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountCapabilitiesBancontactPaymentsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountCapabilitiesBancontactPaymentsOptions : INestedOptions { @@ -11,6 +14,9 @@ public class AccountCapabilitiesBancontactPaymentsOptions : INestedOptions /// capability are returned in the requirements arrays. /// [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif public bool? Requested { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountCapabilitiesBankTransferPaymentsOptions.cs b/src/Stripe.net/Services/Accounts/AccountCapabilitiesBankTransferPaymentsOptions.cs index 2bc55c3305..8f289e3582 100644 --- a/src/Stripe.net/Services/Accounts/AccountCapabilitiesBankTransferPaymentsOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountCapabilitiesBankTransferPaymentsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountCapabilitiesBankTransferPaymentsOptions : INestedOptions { @@ -11,6 +14,9 @@ public class AccountCapabilitiesBankTransferPaymentsOptions : INestedOptions /// capability are returned in the requirements arrays. /// [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif public bool? Requested { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountCapabilitiesBlikPaymentsOptions.cs b/src/Stripe.net/Services/Accounts/AccountCapabilitiesBlikPaymentsOptions.cs index bbbce3b0d9..21a3fec207 100644 --- a/src/Stripe.net/Services/Accounts/AccountCapabilitiesBlikPaymentsOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountCapabilitiesBlikPaymentsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountCapabilitiesBlikPaymentsOptions : INestedOptions { @@ -11,6 +14,9 @@ public class AccountCapabilitiesBlikPaymentsOptions : INestedOptions /// capability are returned in the requirements arrays. /// [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif public bool? Requested { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountCapabilitiesBoletoPaymentsOptions.cs b/src/Stripe.net/Services/Accounts/AccountCapabilitiesBoletoPaymentsOptions.cs index 4b6e5c3d69..58d8e7e7fc 100644 --- a/src/Stripe.net/Services/Accounts/AccountCapabilitiesBoletoPaymentsOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountCapabilitiesBoletoPaymentsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountCapabilitiesBoletoPaymentsOptions : INestedOptions { @@ -11,6 +14,9 @@ public class AccountCapabilitiesBoletoPaymentsOptions : INestedOptions /// capability are returned in the requirements arrays. /// [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif public bool? Requested { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountCapabilitiesCardIssuingOptions.cs b/src/Stripe.net/Services/Accounts/AccountCapabilitiesCardIssuingOptions.cs index b391916d2e..5c91a51f38 100644 --- a/src/Stripe.net/Services/Accounts/AccountCapabilitiesCardIssuingOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountCapabilitiesCardIssuingOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountCapabilitiesCardIssuingOptions : INestedOptions { @@ -11,6 +14,9 @@ public class AccountCapabilitiesCardIssuingOptions : INestedOptions /// capability are returned in the requirements arrays. /// [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif public bool? Requested { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountCapabilitiesCardPaymentsOptions.cs b/src/Stripe.net/Services/Accounts/AccountCapabilitiesCardPaymentsOptions.cs index c9dd039cae..b2032e4ba0 100644 --- a/src/Stripe.net/Services/Accounts/AccountCapabilitiesCardPaymentsOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountCapabilitiesCardPaymentsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountCapabilitiesCardPaymentsOptions : INestedOptions { @@ -11,6 +14,9 @@ public class AccountCapabilitiesCardPaymentsOptions : INestedOptions /// capability are returned in the requirements arrays. /// [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif public bool? Requested { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountCapabilitiesCartesBancairesPaymentsOptions.cs b/src/Stripe.net/Services/Accounts/AccountCapabilitiesCartesBancairesPaymentsOptions.cs index 843ef4f0f1..07381a0cb9 100644 --- a/src/Stripe.net/Services/Accounts/AccountCapabilitiesCartesBancairesPaymentsOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountCapabilitiesCartesBancairesPaymentsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountCapabilitiesCartesBancairesPaymentsOptions : INestedOptions { @@ -11,6 +14,9 @@ public class AccountCapabilitiesCartesBancairesPaymentsOptions : INestedOptions /// capability are returned in the requirements arrays. /// [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif public bool? Requested { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountCapabilitiesCashappPaymentsOptions.cs b/src/Stripe.net/Services/Accounts/AccountCapabilitiesCashappPaymentsOptions.cs index 4314e414ff..002073c887 100644 --- a/src/Stripe.net/Services/Accounts/AccountCapabilitiesCashappPaymentsOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountCapabilitiesCashappPaymentsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountCapabilitiesCashappPaymentsOptions : INestedOptions { @@ -11,6 +14,9 @@ public class AccountCapabilitiesCashappPaymentsOptions : INestedOptions /// capability are returned in the requirements arrays. /// [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif public bool? Requested { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountCapabilitiesEpsPaymentsOptions.cs b/src/Stripe.net/Services/Accounts/AccountCapabilitiesEpsPaymentsOptions.cs index 559443a033..fd2cc550b9 100644 --- a/src/Stripe.net/Services/Accounts/AccountCapabilitiesEpsPaymentsOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountCapabilitiesEpsPaymentsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountCapabilitiesEpsPaymentsOptions : INestedOptions { @@ -11,6 +14,9 @@ public class AccountCapabilitiesEpsPaymentsOptions : INestedOptions /// capability are returned in the requirements arrays. /// [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif public bool? Requested { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountCapabilitiesFpxPaymentsOptions.cs b/src/Stripe.net/Services/Accounts/AccountCapabilitiesFpxPaymentsOptions.cs index 8927bc2a9e..b602b7b1ee 100644 --- a/src/Stripe.net/Services/Accounts/AccountCapabilitiesFpxPaymentsOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountCapabilitiesFpxPaymentsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountCapabilitiesFpxPaymentsOptions : INestedOptions { @@ -11,6 +14,9 @@ public class AccountCapabilitiesFpxPaymentsOptions : INestedOptions /// capability are returned in the requirements arrays. /// [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif public bool? Requested { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountCapabilitiesGbBankTransferPaymentsOptions.cs b/src/Stripe.net/Services/Accounts/AccountCapabilitiesGbBankTransferPaymentsOptions.cs index 5efda499b7..e9062aa05d 100644 --- a/src/Stripe.net/Services/Accounts/AccountCapabilitiesGbBankTransferPaymentsOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountCapabilitiesGbBankTransferPaymentsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountCapabilitiesGbBankTransferPaymentsOptions : INestedOptions { @@ -11,6 +14,9 @@ public class AccountCapabilitiesGbBankTransferPaymentsOptions : INestedOptions /// capability are returned in the requirements arrays. /// [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif public bool? Requested { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountCapabilitiesGiropayPaymentsOptions.cs b/src/Stripe.net/Services/Accounts/AccountCapabilitiesGiropayPaymentsOptions.cs index 036259f3a5..5a8c961585 100644 --- a/src/Stripe.net/Services/Accounts/AccountCapabilitiesGiropayPaymentsOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountCapabilitiesGiropayPaymentsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountCapabilitiesGiropayPaymentsOptions : INestedOptions { @@ -11,6 +14,9 @@ public class AccountCapabilitiesGiropayPaymentsOptions : INestedOptions /// capability are returned in the requirements arrays. /// [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif public bool? Requested { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountCapabilitiesGrabpayPaymentsOptions.cs b/src/Stripe.net/Services/Accounts/AccountCapabilitiesGrabpayPaymentsOptions.cs index 6f586d8531..e3f460e092 100644 --- a/src/Stripe.net/Services/Accounts/AccountCapabilitiesGrabpayPaymentsOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountCapabilitiesGrabpayPaymentsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountCapabilitiesGrabpayPaymentsOptions : INestedOptions { @@ -11,6 +14,9 @@ public class AccountCapabilitiesGrabpayPaymentsOptions : INestedOptions /// capability are returned in the requirements arrays. /// [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif public bool? Requested { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountCapabilitiesIdealPaymentsOptions.cs b/src/Stripe.net/Services/Accounts/AccountCapabilitiesIdealPaymentsOptions.cs index 74df36c227..8f6a60bb3b 100644 --- a/src/Stripe.net/Services/Accounts/AccountCapabilitiesIdealPaymentsOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountCapabilitiesIdealPaymentsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountCapabilitiesIdealPaymentsOptions : INestedOptions { @@ -11,6 +14,9 @@ public class AccountCapabilitiesIdealPaymentsOptions : INestedOptions /// capability are returned in the requirements arrays. /// [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif public bool? Requested { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountCapabilitiesIndiaInternationalPaymentsOptions.cs b/src/Stripe.net/Services/Accounts/AccountCapabilitiesIndiaInternationalPaymentsOptions.cs index 87e4fc3f7d..71b244efc8 100644 --- a/src/Stripe.net/Services/Accounts/AccountCapabilitiesIndiaInternationalPaymentsOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountCapabilitiesIndiaInternationalPaymentsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountCapabilitiesIndiaInternationalPaymentsOptions : INestedOptions { @@ -11,6 +14,9 @@ public class AccountCapabilitiesIndiaInternationalPaymentsOptions : INestedOptio /// capability are returned in the requirements arrays. /// [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif public bool? Requested { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountCapabilitiesJcbPaymentsOptions.cs b/src/Stripe.net/Services/Accounts/AccountCapabilitiesJcbPaymentsOptions.cs index c83b875235..3225127a70 100644 --- a/src/Stripe.net/Services/Accounts/AccountCapabilitiesJcbPaymentsOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountCapabilitiesJcbPaymentsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountCapabilitiesJcbPaymentsOptions : INestedOptions { @@ -11,6 +14,9 @@ public class AccountCapabilitiesJcbPaymentsOptions : INestedOptions /// capability are returned in the requirements arrays. /// [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif public bool? Requested { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountCapabilitiesJpBankTransferPaymentsOptions.cs b/src/Stripe.net/Services/Accounts/AccountCapabilitiesJpBankTransferPaymentsOptions.cs index fe1ad75ea4..dac6152764 100644 --- a/src/Stripe.net/Services/Accounts/AccountCapabilitiesJpBankTransferPaymentsOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountCapabilitiesJpBankTransferPaymentsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountCapabilitiesJpBankTransferPaymentsOptions : INestedOptions { @@ -11,6 +14,9 @@ public class AccountCapabilitiesJpBankTransferPaymentsOptions : INestedOptions /// capability are returned in the requirements arrays. /// [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif public bool? Requested { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountCapabilitiesKakaoPayPaymentsOptions.cs b/src/Stripe.net/Services/Accounts/AccountCapabilitiesKakaoPayPaymentsOptions.cs index fd831ed037..b02208e26f 100644 --- a/src/Stripe.net/Services/Accounts/AccountCapabilitiesKakaoPayPaymentsOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountCapabilitiesKakaoPayPaymentsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountCapabilitiesKakaoPayPaymentsOptions : INestedOptions { @@ -11,6 +14,9 @@ public class AccountCapabilitiesKakaoPayPaymentsOptions : INestedOptions /// capability are returned in the requirements arrays. /// [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif public bool? Requested { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountCapabilitiesKlarnaPaymentsOptions.cs b/src/Stripe.net/Services/Accounts/AccountCapabilitiesKlarnaPaymentsOptions.cs index 50d65bb5e7..472386b1ea 100644 --- a/src/Stripe.net/Services/Accounts/AccountCapabilitiesKlarnaPaymentsOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountCapabilitiesKlarnaPaymentsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountCapabilitiesKlarnaPaymentsOptions : INestedOptions { @@ -11,6 +14,9 @@ public class AccountCapabilitiesKlarnaPaymentsOptions : INestedOptions /// capability are returned in the requirements arrays. /// [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif public bool? Requested { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountCapabilitiesKonbiniPaymentsOptions.cs b/src/Stripe.net/Services/Accounts/AccountCapabilitiesKonbiniPaymentsOptions.cs index b9bd16cd86..1c3ae8d37d 100644 --- a/src/Stripe.net/Services/Accounts/AccountCapabilitiesKonbiniPaymentsOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountCapabilitiesKonbiniPaymentsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountCapabilitiesKonbiniPaymentsOptions : INestedOptions { @@ -11,6 +14,9 @@ public class AccountCapabilitiesKonbiniPaymentsOptions : INestedOptions /// capability are returned in the requirements arrays. /// [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif public bool? Requested { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountCapabilitiesKrCardPaymentsOptions.cs b/src/Stripe.net/Services/Accounts/AccountCapabilitiesKrCardPaymentsOptions.cs index 209b9b2f2e..726fcd19ff 100644 --- a/src/Stripe.net/Services/Accounts/AccountCapabilitiesKrCardPaymentsOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountCapabilitiesKrCardPaymentsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountCapabilitiesKrCardPaymentsOptions : INestedOptions { @@ -11,6 +14,9 @@ public class AccountCapabilitiesKrCardPaymentsOptions : INestedOptions /// capability are returned in the requirements arrays. /// [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif public bool? Requested { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountCapabilitiesLegacyPaymentsOptions.cs b/src/Stripe.net/Services/Accounts/AccountCapabilitiesLegacyPaymentsOptions.cs index 726cfd1379..07fc80096e 100644 --- a/src/Stripe.net/Services/Accounts/AccountCapabilitiesLegacyPaymentsOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountCapabilitiesLegacyPaymentsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountCapabilitiesLegacyPaymentsOptions : INestedOptions { @@ -11,6 +14,9 @@ public class AccountCapabilitiesLegacyPaymentsOptions : INestedOptions /// capability are returned in the requirements arrays. /// [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif public bool? Requested { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountCapabilitiesLinkPaymentsOptions.cs b/src/Stripe.net/Services/Accounts/AccountCapabilitiesLinkPaymentsOptions.cs index 36de901b45..8407594f78 100644 --- a/src/Stripe.net/Services/Accounts/AccountCapabilitiesLinkPaymentsOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountCapabilitiesLinkPaymentsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountCapabilitiesLinkPaymentsOptions : INestedOptions { @@ -11,6 +14,9 @@ public class AccountCapabilitiesLinkPaymentsOptions : INestedOptions /// capability are returned in the requirements arrays. /// [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif public bool? Requested { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountCapabilitiesMobilepayPaymentsOptions.cs b/src/Stripe.net/Services/Accounts/AccountCapabilitiesMobilepayPaymentsOptions.cs index 00b94592f8..b96bda2e40 100644 --- a/src/Stripe.net/Services/Accounts/AccountCapabilitiesMobilepayPaymentsOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountCapabilitiesMobilepayPaymentsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountCapabilitiesMobilepayPaymentsOptions : INestedOptions { @@ -11,6 +14,9 @@ public class AccountCapabilitiesMobilepayPaymentsOptions : INestedOptions /// capability are returned in the requirements arrays. /// [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif public bool? Requested { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountCapabilitiesMultibancoPaymentsOptions.cs b/src/Stripe.net/Services/Accounts/AccountCapabilitiesMultibancoPaymentsOptions.cs index df68411233..54e3ce5df4 100644 --- a/src/Stripe.net/Services/Accounts/AccountCapabilitiesMultibancoPaymentsOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountCapabilitiesMultibancoPaymentsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountCapabilitiesMultibancoPaymentsOptions : INestedOptions { @@ -11,6 +14,9 @@ public class AccountCapabilitiesMultibancoPaymentsOptions : INestedOptions /// capability are returned in the requirements arrays. /// [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif public bool? Requested { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountCapabilitiesMxBankTransferPaymentsOptions.cs b/src/Stripe.net/Services/Accounts/AccountCapabilitiesMxBankTransferPaymentsOptions.cs index ad59f5382d..b687c84ebf 100644 --- a/src/Stripe.net/Services/Accounts/AccountCapabilitiesMxBankTransferPaymentsOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountCapabilitiesMxBankTransferPaymentsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountCapabilitiesMxBankTransferPaymentsOptions : INestedOptions { @@ -11,6 +14,9 @@ public class AccountCapabilitiesMxBankTransferPaymentsOptions : INestedOptions /// capability are returned in the requirements arrays. /// [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif public bool? Requested { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountCapabilitiesNaverPayPaymentsOptions.cs b/src/Stripe.net/Services/Accounts/AccountCapabilitiesNaverPayPaymentsOptions.cs index f2a39aa457..0cdeabe9b6 100644 --- a/src/Stripe.net/Services/Accounts/AccountCapabilitiesNaverPayPaymentsOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountCapabilitiesNaverPayPaymentsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountCapabilitiesNaverPayPaymentsOptions : INestedOptions { @@ -11,6 +14,9 @@ public class AccountCapabilitiesNaverPayPaymentsOptions : INestedOptions /// capability are returned in the requirements arrays. /// [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif public bool? Requested { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountCapabilitiesOptions.cs b/src/Stripe.net/Services/Accounts/AccountCapabilitiesOptions.cs index fe3777e915..100bed775e 100644 --- a/src/Stripe.net/Services/Accounts/AccountCapabilitiesOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountCapabilitiesOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountCapabilitiesOptions : INestedOptions { @@ -9,318 +12,477 @@ public class AccountCapabilitiesOptions : INestedOptions /// The acss_debit_payments capability. /// [JsonProperty("acss_debit_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("acss_debit_payments")] +#endif public AccountCapabilitiesAcssDebitPaymentsOptions AcssDebitPayments { get; set; } /// /// The affirm_payments capability. /// [JsonProperty("affirm_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("affirm_payments")] +#endif public AccountCapabilitiesAffirmPaymentsOptions AffirmPayments { get; set; } /// /// The afterpay_clearpay_payments capability. /// [JsonProperty("afterpay_clearpay_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("afterpay_clearpay_payments")] +#endif public AccountCapabilitiesAfterpayClearpayPaymentsOptions AfterpayClearpayPayments { get; set; } /// /// The alma_payments capability. /// [JsonProperty("alma_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("alma_payments")] +#endif public AccountCapabilitiesAlmaPaymentsOptions AlmaPayments { get; set; } /// /// The amazon_pay_payments capability. /// [JsonProperty("amazon_pay_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amazon_pay_payments")] +#endif public AccountCapabilitiesAmazonPayPaymentsOptions AmazonPayPayments { get; set; } /// /// The au_becs_debit_payments capability. /// [JsonProperty("au_becs_debit_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("au_becs_debit_payments")] +#endif public AccountCapabilitiesAuBecsDebitPaymentsOptions AuBecsDebitPayments { get; set; } /// /// The bacs_debit_payments capability. /// [JsonProperty("bacs_debit_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bacs_debit_payments")] +#endif public AccountCapabilitiesBacsDebitPaymentsOptions BacsDebitPayments { get; set; } /// /// The bancontact_payments capability. /// [JsonProperty("bancontact_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bancontact_payments")] +#endif public AccountCapabilitiesBancontactPaymentsOptions BancontactPayments { get; set; } /// /// The bank_transfer_payments capability. /// [JsonProperty("bank_transfer_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_transfer_payments")] +#endif public AccountCapabilitiesBankTransferPaymentsOptions BankTransferPayments { get; set; } /// /// The blik_payments capability. /// [JsonProperty("blik_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("blik_payments")] +#endif public AccountCapabilitiesBlikPaymentsOptions BlikPayments { get; set; } /// /// The boleto_payments capability. /// [JsonProperty("boleto_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("boleto_payments")] +#endif public AccountCapabilitiesBoletoPaymentsOptions BoletoPayments { get; set; } /// /// The card_issuing capability. /// [JsonProperty("card_issuing")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card_issuing")] +#endif public AccountCapabilitiesCardIssuingOptions CardIssuing { get; set; } /// /// The card_payments capability. /// [JsonProperty("card_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card_payments")] +#endif public AccountCapabilitiesCardPaymentsOptions CardPayments { get; set; } /// /// The cartes_bancaires_payments capability. /// [JsonProperty("cartes_bancaires_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cartes_bancaires_payments")] +#endif public AccountCapabilitiesCartesBancairesPaymentsOptions CartesBancairesPayments { get; set; } /// /// The cashapp_payments capability. /// [JsonProperty("cashapp_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cashapp_payments")] +#endif public AccountCapabilitiesCashappPaymentsOptions CashappPayments { get; set; } /// /// The eps_payments capability. /// [JsonProperty("eps_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("eps_payments")] +#endif public AccountCapabilitiesEpsPaymentsOptions EpsPayments { get; set; } /// /// The fpx_payments capability. /// [JsonProperty("fpx_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fpx_payments")] +#endif public AccountCapabilitiesFpxPaymentsOptions FpxPayments { get; set; } /// /// The gb_bank_transfer_payments capability. /// [JsonProperty("gb_bank_transfer_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("gb_bank_transfer_payments")] +#endif public AccountCapabilitiesGbBankTransferPaymentsOptions GbBankTransferPayments { get; set; } /// /// The giropay_payments capability. /// [JsonProperty("giropay_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("giropay_payments")] +#endif public AccountCapabilitiesGiropayPaymentsOptions GiropayPayments { get; set; } /// /// The grabpay_payments capability. /// [JsonProperty("grabpay_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("grabpay_payments")] +#endif public AccountCapabilitiesGrabpayPaymentsOptions GrabpayPayments { get; set; } /// /// The ideal_payments capability. /// [JsonProperty("ideal_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ideal_payments")] +#endif public AccountCapabilitiesIdealPaymentsOptions IdealPayments { get; set; } /// /// The india_international_payments capability. /// [JsonProperty("india_international_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("india_international_payments")] +#endif public AccountCapabilitiesIndiaInternationalPaymentsOptions IndiaInternationalPayments { get; set; } /// /// The jcb_payments capability. /// [JsonProperty("jcb_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("jcb_payments")] +#endif public AccountCapabilitiesJcbPaymentsOptions JcbPayments { get; set; } /// /// The jp_bank_transfer_payments capability. /// [JsonProperty("jp_bank_transfer_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("jp_bank_transfer_payments")] +#endif public AccountCapabilitiesJpBankTransferPaymentsOptions JpBankTransferPayments { get; set; } /// /// The kakao_pay_payments capability. /// [JsonProperty("kakao_pay_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("kakao_pay_payments")] +#endif public AccountCapabilitiesKakaoPayPaymentsOptions KakaoPayPayments { get; set; } /// /// The klarna_payments capability. /// [JsonProperty("klarna_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("klarna_payments")] +#endif public AccountCapabilitiesKlarnaPaymentsOptions KlarnaPayments { get; set; } /// /// The konbini_payments capability. /// [JsonProperty("konbini_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("konbini_payments")] +#endif public AccountCapabilitiesKonbiniPaymentsOptions KonbiniPayments { get; set; } /// /// The kr_card_payments capability. /// [JsonProperty("kr_card_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("kr_card_payments")] +#endif public AccountCapabilitiesKrCardPaymentsOptions KrCardPayments { get; set; } /// /// The legacy_payments capability. /// [JsonProperty("legacy_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("legacy_payments")] +#endif public AccountCapabilitiesLegacyPaymentsOptions LegacyPayments { get; set; } /// /// The link_payments capability. /// [JsonProperty("link_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("link_payments")] +#endif public AccountCapabilitiesLinkPaymentsOptions LinkPayments { get; set; } /// /// The mobilepay_payments capability. /// [JsonProperty("mobilepay_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mobilepay_payments")] +#endif public AccountCapabilitiesMobilepayPaymentsOptions MobilepayPayments { get; set; } /// /// The multibanco_payments capability. /// [JsonProperty("multibanco_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("multibanco_payments")] +#endif public AccountCapabilitiesMultibancoPaymentsOptions MultibancoPayments { get; set; } /// /// The mx_bank_transfer_payments capability. /// [JsonProperty("mx_bank_transfer_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mx_bank_transfer_payments")] +#endif public AccountCapabilitiesMxBankTransferPaymentsOptions MxBankTransferPayments { get; set; } /// /// The naver_pay_payments capability. /// [JsonProperty("naver_pay_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("naver_pay_payments")] +#endif public AccountCapabilitiesNaverPayPaymentsOptions NaverPayPayments { get; set; } /// /// The oxxo_payments capability. /// [JsonProperty("oxxo_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("oxxo_payments")] +#endif public AccountCapabilitiesOxxoPaymentsOptions OxxoPayments { get; set; } /// /// The p24_payments capability. /// [JsonProperty("p24_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("p24_payments")] +#endif public AccountCapabilitiesP24PaymentsOptions P24Payments { get; set; } /// /// The payco_payments capability. /// [JsonProperty("payco_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payco_payments")] +#endif public AccountCapabilitiesPaycoPaymentsOptions PaycoPayments { get; set; } /// /// The paynow_payments capability. /// [JsonProperty("paynow_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("paynow_payments")] +#endif public AccountCapabilitiesPaynowPaymentsOptions PaynowPayments { get; set; } /// /// The promptpay_payments capability. /// [JsonProperty("promptpay_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("promptpay_payments")] +#endif public AccountCapabilitiesPromptpayPaymentsOptions PromptpayPayments { get; set; } /// /// The revolut_pay_payments capability. /// [JsonProperty("revolut_pay_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("revolut_pay_payments")] +#endif public AccountCapabilitiesRevolutPayPaymentsOptions RevolutPayPayments { get; set; } /// /// The samsung_pay_payments capability. /// [JsonProperty("samsung_pay_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("samsung_pay_payments")] +#endif public AccountCapabilitiesSamsungPayPaymentsOptions SamsungPayPayments { get; set; } /// /// The sepa_bank_transfer_payments capability. /// [JsonProperty("sepa_bank_transfer_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sepa_bank_transfer_payments")] +#endif public AccountCapabilitiesSepaBankTransferPaymentsOptions SepaBankTransferPayments { get; set; } /// /// The sepa_debit_payments capability. /// [JsonProperty("sepa_debit_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sepa_debit_payments")] +#endif public AccountCapabilitiesSepaDebitPaymentsOptions SepaDebitPayments { get; set; } /// /// The sofort_payments capability. /// [JsonProperty("sofort_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sofort_payments")] +#endif public AccountCapabilitiesSofortPaymentsOptions SofortPayments { get; set; } /// /// The swish_payments capability. /// [JsonProperty("swish_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("swish_payments")] +#endif public AccountCapabilitiesSwishPaymentsOptions SwishPayments { get; set; } /// /// The tax_reporting_us_1099_k capability. /// [JsonProperty("tax_reporting_us_1099_k")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_reporting_us_1099_k")] +#endif public AccountCapabilitiesTaxReportingUs1099KOptions TaxReportingUs1099K { get; set; } /// /// The tax_reporting_us_1099_misc capability. /// [JsonProperty("tax_reporting_us_1099_misc")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_reporting_us_1099_misc")] +#endif public AccountCapabilitiesTaxReportingUs1099MiscOptions TaxReportingUs1099Misc { get; set; } /// /// The transfers capability. /// [JsonProperty("transfers")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transfers")] +#endif public AccountCapabilitiesTransfersOptions Transfers { get; set; } /// /// The treasury capability. /// [JsonProperty("treasury")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("treasury")] +#endif public AccountCapabilitiesTreasuryOptions Treasury { get; set; } /// /// The twint_payments capability. /// [JsonProperty("twint_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("twint_payments")] +#endif public AccountCapabilitiesTwintPaymentsOptions TwintPayments { get; set; } /// /// The us_bank_account_ach_payments capability. /// [JsonProperty("us_bank_account_ach_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("us_bank_account_ach_payments")] +#endif public AccountCapabilitiesUsBankAccountAchPaymentsOptions UsBankAccountAchPayments { get; set; } /// /// The us_bank_transfer_payments capability. /// [JsonProperty("us_bank_transfer_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("us_bank_transfer_payments")] +#endif public AccountCapabilitiesUsBankTransferPaymentsOptions UsBankTransferPayments { get; set; } /// /// The zip_payments capability. /// [JsonProperty("zip_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("zip_payments")] +#endif public AccountCapabilitiesZipPaymentsOptions ZipPayments { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountCapabilitiesOxxoPaymentsOptions.cs b/src/Stripe.net/Services/Accounts/AccountCapabilitiesOxxoPaymentsOptions.cs index 2ef5c8c060..117b109001 100644 --- a/src/Stripe.net/Services/Accounts/AccountCapabilitiesOxxoPaymentsOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountCapabilitiesOxxoPaymentsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountCapabilitiesOxxoPaymentsOptions : INestedOptions { @@ -11,6 +14,9 @@ public class AccountCapabilitiesOxxoPaymentsOptions : INestedOptions /// capability are returned in the requirements arrays. /// [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif public bool? Requested { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountCapabilitiesP24PaymentsOptions.cs b/src/Stripe.net/Services/Accounts/AccountCapabilitiesP24PaymentsOptions.cs index 1f13e786c7..3ca25426ad 100644 --- a/src/Stripe.net/Services/Accounts/AccountCapabilitiesP24PaymentsOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountCapabilitiesP24PaymentsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountCapabilitiesP24PaymentsOptions : INestedOptions { @@ -11,6 +14,9 @@ public class AccountCapabilitiesP24PaymentsOptions : INestedOptions /// capability are returned in the requirements arrays. /// [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif public bool? Requested { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountCapabilitiesPaycoPaymentsOptions.cs b/src/Stripe.net/Services/Accounts/AccountCapabilitiesPaycoPaymentsOptions.cs index 4564e8f1f4..677253bdad 100644 --- a/src/Stripe.net/Services/Accounts/AccountCapabilitiesPaycoPaymentsOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountCapabilitiesPaycoPaymentsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountCapabilitiesPaycoPaymentsOptions : INestedOptions { @@ -11,6 +14,9 @@ public class AccountCapabilitiesPaycoPaymentsOptions : INestedOptions /// capability are returned in the requirements arrays. /// [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif public bool? Requested { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountCapabilitiesPaynowPaymentsOptions.cs b/src/Stripe.net/Services/Accounts/AccountCapabilitiesPaynowPaymentsOptions.cs index 61678cd74d..057ab0d865 100644 --- a/src/Stripe.net/Services/Accounts/AccountCapabilitiesPaynowPaymentsOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountCapabilitiesPaynowPaymentsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountCapabilitiesPaynowPaymentsOptions : INestedOptions { @@ -11,6 +14,9 @@ public class AccountCapabilitiesPaynowPaymentsOptions : INestedOptions /// capability are returned in the requirements arrays. /// [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif public bool? Requested { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountCapabilitiesPromptpayPaymentsOptions.cs b/src/Stripe.net/Services/Accounts/AccountCapabilitiesPromptpayPaymentsOptions.cs index d45dbeaf68..0a87cbb6cc 100644 --- a/src/Stripe.net/Services/Accounts/AccountCapabilitiesPromptpayPaymentsOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountCapabilitiesPromptpayPaymentsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountCapabilitiesPromptpayPaymentsOptions : INestedOptions { @@ -11,6 +14,9 @@ public class AccountCapabilitiesPromptpayPaymentsOptions : INestedOptions /// capability are returned in the requirements arrays. /// [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif public bool? Requested { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountCapabilitiesRevolutPayPaymentsOptions.cs b/src/Stripe.net/Services/Accounts/AccountCapabilitiesRevolutPayPaymentsOptions.cs index d1a2468414..c74c337c44 100644 --- a/src/Stripe.net/Services/Accounts/AccountCapabilitiesRevolutPayPaymentsOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountCapabilitiesRevolutPayPaymentsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountCapabilitiesRevolutPayPaymentsOptions : INestedOptions { @@ -11,6 +14,9 @@ public class AccountCapabilitiesRevolutPayPaymentsOptions : INestedOptions /// capability are returned in the requirements arrays. /// [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif public bool? Requested { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountCapabilitiesSamsungPayPaymentsOptions.cs b/src/Stripe.net/Services/Accounts/AccountCapabilitiesSamsungPayPaymentsOptions.cs index 80be6a75dc..44889f426b 100644 --- a/src/Stripe.net/Services/Accounts/AccountCapabilitiesSamsungPayPaymentsOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountCapabilitiesSamsungPayPaymentsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountCapabilitiesSamsungPayPaymentsOptions : INestedOptions { @@ -11,6 +14,9 @@ public class AccountCapabilitiesSamsungPayPaymentsOptions : INestedOptions /// capability are returned in the requirements arrays. /// [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif public bool? Requested { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountCapabilitiesSepaBankTransferPaymentsOptions.cs b/src/Stripe.net/Services/Accounts/AccountCapabilitiesSepaBankTransferPaymentsOptions.cs index aabceb537d..c19ffbb973 100644 --- a/src/Stripe.net/Services/Accounts/AccountCapabilitiesSepaBankTransferPaymentsOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountCapabilitiesSepaBankTransferPaymentsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountCapabilitiesSepaBankTransferPaymentsOptions : INestedOptions { @@ -11,6 +14,9 @@ public class AccountCapabilitiesSepaBankTransferPaymentsOptions : INestedOptions /// capability are returned in the requirements arrays. /// [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif public bool? Requested { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountCapabilitiesSepaDebitPaymentsOptions.cs b/src/Stripe.net/Services/Accounts/AccountCapabilitiesSepaDebitPaymentsOptions.cs index 7377115ef7..b865e68acb 100644 --- a/src/Stripe.net/Services/Accounts/AccountCapabilitiesSepaDebitPaymentsOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountCapabilitiesSepaDebitPaymentsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountCapabilitiesSepaDebitPaymentsOptions : INestedOptions { @@ -11,6 +14,9 @@ public class AccountCapabilitiesSepaDebitPaymentsOptions : INestedOptions /// capability are returned in the requirements arrays. /// [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif public bool? Requested { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountCapabilitiesSofortPaymentsOptions.cs b/src/Stripe.net/Services/Accounts/AccountCapabilitiesSofortPaymentsOptions.cs index 8588198144..00b2490404 100644 --- a/src/Stripe.net/Services/Accounts/AccountCapabilitiesSofortPaymentsOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountCapabilitiesSofortPaymentsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountCapabilitiesSofortPaymentsOptions : INestedOptions { @@ -11,6 +14,9 @@ public class AccountCapabilitiesSofortPaymentsOptions : INestedOptions /// capability are returned in the requirements arrays. /// [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif public bool? Requested { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountCapabilitiesSwishPaymentsOptions.cs b/src/Stripe.net/Services/Accounts/AccountCapabilitiesSwishPaymentsOptions.cs index 793ce58775..1eb6ea35c5 100644 --- a/src/Stripe.net/Services/Accounts/AccountCapabilitiesSwishPaymentsOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountCapabilitiesSwishPaymentsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountCapabilitiesSwishPaymentsOptions : INestedOptions { @@ -11,6 +14,9 @@ public class AccountCapabilitiesSwishPaymentsOptions : INestedOptions /// capability are returned in the requirements arrays. /// [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif public bool? Requested { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountCapabilitiesTaxReportingUs1099KOptions.cs b/src/Stripe.net/Services/Accounts/AccountCapabilitiesTaxReportingUs1099KOptions.cs index 2e39486adb..4556de5c4e 100644 --- a/src/Stripe.net/Services/Accounts/AccountCapabilitiesTaxReportingUs1099KOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountCapabilitiesTaxReportingUs1099KOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountCapabilitiesTaxReportingUs1099KOptions : INestedOptions { @@ -11,6 +14,9 @@ public class AccountCapabilitiesTaxReportingUs1099KOptions : INestedOptions /// capability are returned in the requirements arrays. /// [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif public bool? Requested { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountCapabilitiesTaxReportingUs1099MiscOptions.cs b/src/Stripe.net/Services/Accounts/AccountCapabilitiesTaxReportingUs1099MiscOptions.cs index c2bd10f174..d2cabdc55c 100644 --- a/src/Stripe.net/Services/Accounts/AccountCapabilitiesTaxReportingUs1099MiscOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountCapabilitiesTaxReportingUs1099MiscOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountCapabilitiesTaxReportingUs1099MiscOptions : INestedOptions { @@ -11,6 +14,9 @@ public class AccountCapabilitiesTaxReportingUs1099MiscOptions : INestedOptions /// capability are returned in the requirements arrays. /// [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif public bool? Requested { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountCapabilitiesTransfersOptions.cs b/src/Stripe.net/Services/Accounts/AccountCapabilitiesTransfersOptions.cs index 5a312c7db7..27e0f0d66e 100644 --- a/src/Stripe.net/Services/Accounts/AccountCapabilitiesTransfersOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountCapabilitiesTransfersOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountCapabilitiesTransfersOptions : INestedOptions { @@ -11,6 +14,9 @@ public class AccountCapabilitiesTransfersOptions : INestedOptions /// capability are returned in the requirements arrays. /// [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif public bool? Requested { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountCapabilitiesTreasuryOptions.cs b/src/Stripe.net/Services/Accounts/AccountCapabilitiesTreasuryOptions.cs index c8a4342955..a85269d364 100644 --- a/src/Stripe.net/Services/Accounts/AccountCapabilitiesTreasuryOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountCapabilitiesTreasuryOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountCapabilitiesTreasuryOptions : INestedOptions { @@ -11,6 +14,9 @@ public class AccountCapabilitiesTreasuryOptions : INestedOptions /// capability are returned in the requirements arrays. /// [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif public bool? Requested { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountCapabilitiesTwintPaymentsOptions.cs b/src/Stripe.net/Services/Accounts/AccountCapabilitiesTwintPaymentsOptions.cs index a6cc4d2f76..1f61bebe24 100644 --- a/src/Stripe.net/Services/Accounts/AccountCapabilitiesTwintPaymentsOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountCapabilitiesTwintPaymentsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountCapabilitiesTwintPaymentsOptions : INestedOptions { @@ -11,6 +14,9 @@ public class AccountCapabilitiesTwintPaymentsOptions : INestedOptions /// capability are returned in the requirements arrays. /// [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif public bool? Requested { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountCapabilitiesUsBankAccountAchPaymentsOptions.cs b/src/Stripe.net/Services/Accounts/AccountCapabilitiesUsBankAccountAchPaymentsOptions.cs index bedaf1b349..e30aba9efa 100644 --- a/src/Stripe.net/Services/Accounts/AccountCapabilitiesUsBankAccountAchPaymentsOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountCapabilitiesUsBankAccountAchPaymentsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountCapabilitiesUsBankAccountAchPaymentsOptions : INestedOptions { @@ -11,6 +14,9 @@ public class AccountCapabilitiesUsBankAccountAchPaymentsOptions : INestedOptions /// capability are returned in the requirements arrays. /// [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif public bool? Requested { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountCapabilitiesUsBankTransferPaymentsOptions.cs b/src/Stripe.net/Services/Accounts/AccountCapabilitiesUsBankTransferPaymentsOptions.cs index 55d8c34e97..567bc11281 100644 --- a/src/Stripe.net/Services/Accounts/AccountCapabilitiesUsBankTransferPaymentsOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountCapabilitiesUsBankTransferPaymentsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountCapabilitiesUsBankTransferPaymentsOptions : INestedOptions { @@ -11,6 +14,9 @@ public class AccountCapabilitiesUsBankTransferPaymentsOptions : INestedOptions /// capability are returned in the requirements arrays. /// [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif public bool? Requested { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountCapabilitiesZipPaymentsOptions.cs b/src/Stripe.net/Services/Accounts/AccountCapabilitiesZipPaymentsOptions.cs index 1e3afb1fb1..4e2782c2fe 100644 --- a/src/Stripe.net/Services/Accounts/AccountCapabilitiesZipPaymentsOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountCapabilitiesZipPaymentsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountCapabilitiesZipPaymentsOptions : INestedOptions { @@ -11,6 +14,9 @@ public class AccountCapabilitiesZipPaymentsOptions : INestedOptions /// capability are returned in the requirements arrays. /// [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif public bool? Requested { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountCardOptions.cs b/src/Stripe.net/Services/Accounts/AccountCardOptions.cs index 7c9885aaaa..363d9be11c 100644 --- a/src/Stripe.net/Services/Accounts/AccountCardOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountCardOptions.cs @@ -3,40 +3,76 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountCardOptions : INestedOptions, IHasMetadata, IHasObject { [JsonProperty("address_city")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_city")] +#endif public string AddressCity { get; set; } [JsonProperty("address_country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_country")] +#endif public string AddressCountry { get; set; } [JsonProperty("address_line1")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_line1")] +#endif public string AddressLine1 { get; set; } [JsonProperty("address_line2")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_line2")] +#endif public string AddressLine2 { get; set; } [JsonProperty("address_state")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_state")] +#endif public string AddressState { get; set; } [JsonProperty("address_zip")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_zip")] +#endif public string AddressZip { get; set; } [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } [JsonProperty("cvc")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cvc")] +#endif public string Cvc { get; set; } [JsonProperty("default_for_currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("default_for_currency")] +#endif public bool? DefaultForCurrency { get; set; } [JsonProperty("exp_month")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("exp_month")] +#endif public long? ExpMonth { get; set; } [JsonProperty("exp_year")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("exp_year")] +#endif public long? ExpYear { get; set; } /// @@ -45,15 +81,27 @@ public class AccountCardOptions : INestedOptions, IHasMetadata, IHasObject /// object in a structured format. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } [JsonProperty("number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("number")] +#endif public string Number { get; set; } [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } = "card"; } } diff --git a/src/Stripe.net/Services/Accounts/AccountCompanyOptions.cs b/src/Stripe.net/Services/Accounts/AccountCompanyOptions.cs index c707557485..95dd27a921 100644 --- a/src/Stripe.net/Services/Accounts/AccountCompanyOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountCompanyOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountCompanyOptions : INestedOptions { @@ -9,18 +12,27 @@ public class AccountCompanyOptions : INestedOptions /// The company's primary address. /// [JsonProperty("address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address")] +#endif public AddressOptions Address { get; set; } /// /// The Kana variation of the company's primary address (Japan only). /// [JsonProperty("address_kana")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_kana")] +#endif public AddressJapanOptions AddressKana { get; set; } /// /// The Kanji variation of the company's primary address (Japan only). /// [JsonProperty("address_kanji")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_kanji")] +#endif public AddressJapanOptions AddressKanji { get; set; } /// @@ -32,6 +44,9 @@ public class AccountCompanyOptions : INestedOptions /// directors have been provided. /// [JsonProperty("directors_provided")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("directors_provided")] +#endif public bool? DirectorsProvided { get; set; } /// @@ -41,6 +56,9 @@ public class AccountCompanyOptions : INestedOptions /// relationship.executive requirement. /// [JsonProperty("executives_provided")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("executives_provided")] +#endif public bool? ExecutivesProvided { get; set; } /// @@ -48,30 +66,45 @@ public class AccountCompanyOptions : INestedOptions /// only). /// [JsonProperty("export_license_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("export_license_id")] +#endif public string ExportLicenseId { get; set; } /// /// The purpose code to use for export transactions (India only). /// [JsonProperty("export_purpose_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("export_purpose_code")] +#endif public string ExportPurposeCode { get; set; } /// /// The company's legal name. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } /// /// The Kana variation of the company's legal name (Japan only). /// [JsonProperty("name_kana")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name_kana")] +#endif public string NameKana { get; set; } /// /// The Kanji variation of the company's legal name (Japan only). /// [JsonProperty("name_kanji")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name_kanji")] +#endif public string NameKanji { get; set; } /// @@ -80,6 +113,9 @@ public class AccountCompanyOptions : INestedOptions /// Persons API for accounts with a relationship.owner requirement. /// [JsonProperty("owners_provided")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("owners_provided")] +#endif public bool? OwnersProvided { get; set; } /// @@ -87,12 +123,18 @@ public class AccountCompanyOptions : INestedOptions /// both current and correct. /// [JsonProperty("ownership_declaration")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ownership_declaration")] +#endif public AccountCompanyOwnershipDeclarationOptions OwnershipDeclaration { get; set; } /// /// The company's phone number (used for verification). /// [JsonProperty("phone")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("phone")] +#endif public string Phone { get; set; } /// @@ -102,6 +144,9 @@ public class AccountCompanyOptions : INestedOptions /// Hong Kong). /// [JsonProperty("registration_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("registration_number")] +#endif public string RegistrationNumber { get; set; } /// @@ -120,6 +165,9 @@ public class AccountCompanyOptions : INestedOptions /// unincorporated_partnership. /// [JsonProperty("structure")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("structure")] +#endif public string Structure { get; set; } /// @@ -128,6 +176,9 @@ public class AccountCompanyOptions : INestedOptions /// Company Number in the UK.). /// [JsonProperty("tax_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_id")] +#endif public string TaxId { get; set; } /// @@ -135,18 +186,27 @@ public class AccountCompanyOptions : INestedOptions /// only). /// [JsonProperty("tax_id_registrar")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_id_registrar")] +#endif public string TaxIdRegistrar { get; set; } /// /// The VAT number of the company. /// [JsonProperty("vat_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("vat_id")] +#endif public string VatId { get; set; } /// /// Information on the verification state of the company. /// [JsonProperty("verification")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("verification")] +#endif public AccountCompanyVerificationOptions Verification { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountCompanyOwnershipDeclarationOptions.cs b/src/Stripe.net/Services/Accounts/AccountCompanyOwnershipDeclarationOptions.cs index 268cbb34d6..d37d49e715 100644 --- a/src/Stripe.net/Services/Accounts/AccountCompanyOwnershipDeclarationOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountCompanyOwnershipDeclarationOptions.cs @@ -4,6 +4,9 @@ namespace Stripe using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountCompanyOwnershipDeclarationOptions : INestedOptions { @@ -12,18 +15,28 @@ public class AccountCompanyOwnershipDeclarationOptions : INestedOptions /// [JsonProperty("date")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("date")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? Date { get; set; } /// /// The IP address from which the beneficial owner attestation was made. /// [JsonProperty("ip")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ip")] +#endif public string Ip { get; set; } /// /// The user agent of the browser from which the beneficial owner attestation was made. /// [JsonProperty("user_agent")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("user_agent")] +#endif public string UserAgent { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountCompanyVerificationDocumentOptions.cs b/src/Stripe.net/Services/Accounts/AccountCompanyVerificationDocumentOptions.cs index 3a3060d18a..de5c994c8d 100644 --- a/src/Stripe.net/Services/Accounts/AccountCompanyVerificationDocumentOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountCompanyVerificationDocumentOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountCompanyVerificationDocumentOptions : INestedOptions { @@ -13,6 +16,9 @@ public class AccountCompanyVerificationDocumentOptions : INestedOptions /// size. /// [JsonProperty("back")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("back")] +#endif public string Back { get; set; } /// @@ -23,6 +29,9 @@ public class AccountCompanyVerificationDocumentOptions : INestedOptions /// size. /// [JsonProperty("front")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("front")] +#endif public string Front { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountCompanyVerificationOptions.cs b/src/Stripe.net/Services/Accounts/AccountCompanyVerificationOptions.cs index 3193526faa..5e4ce5f315 100644 --- a/src/Stripe.net/Services/Accounts/AccountCompanyVerificationOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountCompanyVerificationOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountCompanyVerificationOptions : INestedOptions { @@ -9,6 +12,9 @@ public class AccountCompanyVerificationOptions : INestedOptions /// A document verifying the business. /// [JsonProperty("document")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("document")] +#endif public AccountCompanyVerificationDocumentOptions Document { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountControllerFeesOptions.cs b/src/Stripe.net/Services/Accounts/AccountControllerFeesOptions.cs index 109d36808e..0e5ee8dfcb 100644 --- a/src/Stripe.net/Services/Accounts/AccountControllerFeesOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountControllerFeesOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountControllerFeesOptions : INestedOptions { @@ -13,6 +16,9 @@ public class AccountControllerFeesOptions : INestedOptions /// One of: account, or application. /// [JsonProperty("payer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payer")] +#endif public string Payer { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountControllerLossesOptions.cs b/src/Stripe.net/Services/Accounts/AccountControllerLossesOptions.cs index 96b1f71376..e402ee0854 100644 --- a/src/Stripe.net/Services/Accounts/AccountControllerLossesOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountControllerLossesOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountControllerLossesOptions : INestedOptions { @@ -11,6 +14,9 @@ public class AccountControllerLossesOptions : INestedOptions /// One of: application, or stripe. /// [JsonProperty("payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payments")] +#endif public string Payments { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountControllerOptions.cs b/src/Stripe.net/Services/Accounts/AccountControllerOptions.cs index 8f114acb85..d547592bbc 100644 --- a/src/Stripe.net/Services/Accounts/AccountControllerOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountControllerOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountControllerOptions : INestedOptions { @@ -9,6 +12,9 @@ public class AccountControllerOptions : INestedOptions /// A hash of configuration for who pays Stripe fees for product usage on this account. /// [JsonProperty("fees")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fees")] +#endif public AccountControllerFeesOptions Fees { get; set; } /// @@ -16,6 +22,9 @@ public class AccountControllerOptions : INestedOptions /// Stripe or a Connect application is responsible for them. /// [JsonProperty("losses")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("losses")] +#endif public AccountControllerLossesOptions Losses { get; set; } /// @@ -24,12 +33,18 @@ public class AccountControllerOptions : INestedOptions /// One of: application, or stripe. /// [JsonProperty("requirement_collection")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requirement_collection")] +#endif public string RequirementCollection { get; set; } /// /// A hash of configuration for Stripe-hosted dashboards. /// [JsonProperty("stripe_dashboard")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("stripe_dashboard")] +#endif public AccountControllerStripeDashboardOptions StripeDashboard { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountControllerStripeDashboardOptions.cs b/src/Stripe.net/Services/Accounts/AccountControllerStripeDashboardOptions.cs index 0122f1cc3b..a15922dbb3 100644 --- a/src/Stripe.net/Services/Accounts/AccountControllerStripeDashboardOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountControllerStripeDashboardOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountControllerStripeDashboardOptions : INestedOptions { @@ -12,6 +15,9 @@ public class AccountControllerStripeDashboardOptions : INestedOptions /// One of: express, full, or none. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountCreateOptions.cs b/src/Stripe.net/Services/Accounts/AccountCreateOptions.cs index 76bda13239..93d0baa6b3 100644 --- a/src/Stripe.net/Services/Accounts/AccountCreateOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountCreateOptions.cs @@ -4,6 +4,9 @@ namespace Stripe using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountCreateOptions : BaseOptions, IHasMetadata { @@ -12,12 +15,18 @@ public class AccountCreateOptions : BaseOptions, IHasMetadata /// securely provide details to the account. /// [JsonProperty("account_token")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_token")] +#endif public string AccountToken { get; set; } /// /// Business information about the account. /// [JsonProperty("business_profile")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("business_profile")] +#endif public AccountBusinessProfileOptions BusinessProfile { get; set; } /// @@ -31,6 +40,9 @@ public class AccountCreateOptions : BaseOptions, IHasMetadata /// non_profit. /// [JsonProperty("business_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("business_type")] +#endif public string BusinessType { get; set; } /// @@ -44,6 +56,9 @@ public class AccountCreateOptions : BaseOptions, IHasMetadata /// is none, which includes Custom accounts. /// [JsonProperty("capabilities")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("capabilities")] +#endif public AccountCapabilitiesOptions Capabilities { get; set; } /// @@ -56,12 +71,18 @@ public class AccountCreateOptions : BaseOptions, IHasMetadata /// is application, which includes Custom accounts. /// [JsonProperty("company")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("company")] +#endif public AccountCompanyOptions Company { get; set; } /// /// A hash of configuration describing the account controller's attributes. /// [JsonProperty("controller")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("controller")] +#endif public AccountControllerOptions Controller { get; set; } /// @@ -75,6 +96,9 @@ public class AccountCreateOptions : BaseOptions, IHasMetadata /// supported. /// [JsonProperty("country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country")] +#endif public string Country { get; set; } /// @@ -83,12 +107,18 @@ public class AccountCreateOptions : BaseOptions, IHasMetadata /// account's country. /// [JsonProperty("default_currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("default_currency")] +#endif public string DefaultCurrency { get; set; } /// /// Documents that may be submitted to satisfy various informational requests. /// [JsonProperty("documents")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("documents")] +#endif public AccountDocumentsOptions Documents { get; set; } /// @@ -99,6 +129,9 @@ public class AccountCreateOptions : BaseOptions, IHasMetadata /// without your consent. /// [JsonProperty("email")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("email")] +#endif public string Email { get; set; } /// @@ -121,6 +154,10 @@ public class AccountCreateOptions : BaseOptions, IHasMetadata /// [JsonProperty("external_account")] [JsonConverter(typeof(AnyOfConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("external_account")] + [STJS.JsonConverter(typeof(STJAnyOfConverter))] +#endif public AnyOf ExternalAccount { get; set; } /// @@ -128,6 +165,9 @@ public class AccountCreateOptions : BaseOptions, IHasMetadata /// added to. /// [JsonProperty("groups")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("groups")] +#endif public AccountGroupsOptions Groups { get; set; } /// @@ -140,6 +180,9 @@ public class AccountCreateOptions : BaseOptions, IHasMetadata /// is application, which includes Custom accounts. /// [JsonProperty("individual")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("individual")] +#endif public AccountIndividualOptions Individual { get; set; } /// @@ -149,12 +192,18 @@ public class AccountCreateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// Options for customizing how the account functions within Stripe. /// [JsonProperty("settings")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("settings")] +#endif public AccountSettingsOptions Settings { get; set; } /// @@ -166,6 +215,9 @@ public class AccountCreateOptions : BaseOptions, IHasMetadata /// full service agreement when empty. /// [JsonProperty("tos_acceptance")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tos_acceptance")] +#endif public AccountTosAcceptanceOptions TosAcceptance { get; set; } /// @@ -174,6 +226,9 @@ public class AccountCreateOptions : BaseOptions, IHasMetadata /// One of: custom, express, or standard. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountDocumentsBankAccountOwnershipVerificationOptions.cs b/src/Stripe.net/Services/Accounts/AccountDocumentsBankAccountOwnershipVerificationOptions.cs index 2edbea6495..4aac3a8df5 100644 --- a/src/Stripe.net/Services/Accounts/AccountDocumentsBankAccountOwnershipVerificationOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountDocumentsBankAccountOwnershipVerificationOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountDocumentsBankAccountOwnershipVerificationOptions : INestedOptions { @@ -12,6 +15,9 @@ public class AccountDocumentsBankAccountOwnershipVerificationOptions : INestedOp /// value of account_requirement. /// [JsonProperty("files")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("files")] +#endif public List Files { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountDocumentsCompanyLicenseOptions.cs b/src/Stripe.net/Services/Accounts/AccountDocumentsCompanyLicenseOptions.cs index 9fa2ce8ce5..de42013e87 100644 --- a/src/Stripe.net/Services/Accounts/AccountDocumentsCompanyLicenseOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountDocumentsCompanyLicenseOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountDocumentsCompanyLicenseOptions : INestedOptions { @@ -12,6 +15,9 @@ public class AccountDocumentsCompanyLicenseOptions : INestedOptions /// value of account_requirement. /// [JsonProperty("files")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("files")] +#endif public List Files { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountDocumentsCompanyMemorandumOfAssociationOptions.cs b/src/Stripe.net/Services/Accounts/AccountDocumentsCompanyMemorandumOfAssociationOptions.cs index 052cb20697..1665d97d45 100644 --- a/src/Stripe.net/Services/Accounts/AccountDocumentsCompanyMemorandumOfAssociationOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountDocumentsCompanyMemorandumOfAssociationOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountDocumentsCompanyMemorandumOfAssociationOptions : INestedOptions { @@ -12,6 +15,9 @@ public class AccountDocumentsCompanyMemorandumOfAssociationOptions : INestedOpti /// value of account_requirement. /// [JsonProperty("files")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("files")] +#endif public List Files { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountDocumentsCompanyMinisterialDecreeOptions.cs b/src/Stripe.net/Services/Accounts/AccountDocumentsCompanyMinisterialDecreeOptions.cs index 3ddb1b3a67..204840bfaa 100644 --- a/src/Stripe.net/Services/Accounts/AccountDocumentsCompanyMinisterialDecreeOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountDocumentsCompanyMinisterialDecreeOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountDocumentsCompanyMinisterialDecreeOptions : INestedOptions { @@ -12,6 +15,9 @@ public class AccountDocumentsCompanyMinisterialDecreeOptions : INestedOptions /// value of account_requirement. /// [JsonProperty("files")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("files")] +#endif public List Files { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountDocumentsCompanyRegistrationVerificationOptions.cs b/src/Stripe.net/Services/Accounts/AccountDocumentsCompanyRegistrationVerificationOptions.cs index 2fc438f714..f79d860b96 100644 --- a/src/Stripe.net/Services/Accounts/AccountDocumentsCompanyRegistrationVerificationOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountDocumentsCompanyRegistrationVerificationOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountDocumentsCompanyRegistrationVerificationOptions : INestedOptions { @@ -12,6 +15,9 @@ public class AccountDocumentsCompanyRegistrationVerificationOptions : INestedOpt /// value of account_requirement. /// [JsonProperty("files")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("files")] +#endif public List Files { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountDocumentsCompanyTaxIdVerificationOptions.cs b/src/Stripe.net/Services/Accounts/AccountDocumentsCompanyTaxIdVerificationOptions.cs index 1af9489c86..3d700be618 100644 --- a/src/Stripe.net/Services/Accounts/AccountDocumentsCompanyTaxIdVerificationOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountDocumentsCompanyTaxIdVerificationOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountDocumentsCompanyTaxIdVerificationOptions : INestedOptions { @@ -12,6 +15,9 @@ public class AccountDocumentsCompanyTaxIdVerificationOptions : INestedOptions /// value of account_requirement. /// [JsonProperty("files")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("files")] +#endif public List Files { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountDocumentsOptions.cs b/src/Stripe.net/Services/Accounts/AccountDocumentsOptions.cs index 86955c4635..495017bf83 100644 --- a/src/Stripe.net/Services/Accounts/AccountDocumentsOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountDocumentsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountDocumentsOptions : INestedOptions { @@ -13,18 +16,27 @@ public class AccountDocumentsOptions : INestedOptions /// number, either a statement or a check. /// [JsonProperty("bank_account_ownership_verification")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_account_ownership_verification")] +#endif public AccountDocumentsBankAccountOwnershipVerificationOptions BankAccountOwnershipVerification { get; set; } /// /// One or more documents that demonstrate proof of a company's license to operate. /// [JsonProperty("company_license")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("company_license")] +#endif public AccountDocumentsCompanyLicenseOptions CompanyLicense { get; set; } /// /// One or more documents showing the company's Memorandum of Association. /// [JsonProperty("company_memorandum_of_association")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("company_memorandum_of_association")] +#endif public AccountDocumentsCompanyMemorandumOfAssociationOptions CompanyMemorandumOfAssociation { get; set; } /// @@ -32,6 +44,9 @@ public class AccountDocumentsOptions : INestedOptions /// the company's establishment. /// [JsonProperty("company_ministerial_decree")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("company_ministerial_decree")] +#endif public AccountDocumentsCompanyMinisterialDecreeOptions CompanyMinisterialDecree { get; set; } /// @@ -39,12 +54,18 @@ public class AccountDocumentsOptions : INestedOptions /// appropriate local authorities. /// [JsonProperty("company_registration_verification")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("company_registration_verification")] +#endif public AccountDocumentsCompanyRegistrationVerificationOptions CompanyRegistrationVerification { get; set; } /// /// One or more documents that demonstrate proof of a company's tax ID. /// [JsonProperty("company_tax_id_verification")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("company_tax_id_verification")] +#endif public AccountDocumentsCompanyTaxIdVerificationOptions CompanyTaxIdVerification { get; set; } /// @@ -52,6 +73,9 @@ public class AccountDocumentsOptions : INestedOptions /// business registry. /// [JsonProperty("proof_of_registration")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("proof_of_registration")] +#endif public AccountDocumentsProofOfRegistrationOptions ProofOfRegistration { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountDocumentsProofOfRegistrationOptions.cs b/src/Stripe.net/Services/Accounts/AccountDocumentsProofOfRegistrationOptions.cs index d386e0caf4..af8510cd3e 100644 --- a/src/Stripe.net/Services/Accounts/AccountDocumentsProofOfRegistrationOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountDocumentsProofOfRegistrationOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountDocumentsProofOfRegistrationOptions : INestedOptions { @@ -12,6 +15,9 @@ public class AccountDocumentsProofOfRegistrationOptions : INestedOptions /// value of account_requirement. /// [JsonProperty("files")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("files")] +#endif public List Files { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountGroupsOptions.cs b/src/Stripe.net/Services/Accounts/AccountGroupsOptions.cs index 8e3f7dc6d0..4f5ad8a0a0 100644 --- a/src/Stripe.net/Services/Accounts/AccountGroupsOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountGroupsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountGroupsOptions : INestedOptions { @@ -12,6 +15,9 @@ public class AccountGroupsOptions : INestedOptions /// tool documentation for details. /// [JsonProperty("payments_pricing")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payments_pricing")] +#endif public string PaymentsPricing { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountIndividualOptions.cs b/src/Stripe.net/Services/Accounts/AccountIndividualOptions.cs index 1c4b82914f..8a86ff5805 100644 --- a/src/Stripe.net/Services/Accounts/AccountIndividualOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountIndividualOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountIndividualOptions : INestedOptions, IHasMetadata { @@ -10,60 +13,90 @@ public class AccountIndividualOptions : INestedOptions, IHasMetadata /// The individual's primary address. /// [JsonProperty("address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address")] +#endif public AddressOptions Address { get; set; } /// /// The Kana variation of the individual's primary address (Japan only). /// [JsonProperty("address_kana")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_kana")] +#endif public AddressJapanOptions AddressKana { get; set; } /// /// The Kanji variation of the individual's primary address (Japan only). /// [JsonProperty("address_kanji")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_kanji")] +#endif public AddressJapanOptions AddressKanji { get; set; } /// /// The individual's date of birth. /// [JsonProperty("dob")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("dob")] +#endif public DobOptions Dob { get; set; } /// /// The individual's email address. /// [JsonProperty("email")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("email")] +#endif public string Email { get; set; } /// /// The individual's first name. /// [JsonProperty("first_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("first_name")] +#endif public string FirstName { get; set; } /// /// The Kana variation of the individual's first name (Japan only). /// [JsonProperty("first_name_kana")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("first_name_kana")] +#endif public string FirstNameKana { get; set; } /// /// The Kanji variation of the individual's first name (Japan only). /// [JsonProperty("first_name_kanji")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("first_name_kanji")] +#endif public string FirstNameKanji { get; set; } /// /// A list of alternate names or aliases that the individual is known by. /// [JsonProperty("full_name_aliases")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("full_name_aliases")] +#endif public List FullNameAliases { get; set; } /// /// The individual's gender. /// [JsonProperty("gender")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("gender")] +#endif public string Gender { get; set; } /// @@ -74,6 +107,9 @@ public class AccountIndividualOptions : INestedOptions, IHasMetadata /// Stripe.js. /// [JsonProperty("id_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id_number")] +#endif public string IdNumber { get; set; } /// @@ -85,30 +121,45 @@ public class AccountIndividualOptions : INestedOptions, IHasMetadata /// Stripe.js. /// [JsonProperty("id_number_secondary")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id_number_secondary")] +#endif public string IdNumberSecondary { get; set; } /// /// The individual's last name. /// [JsonProperty("last_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last_name")] +#endif public string LastName { get; set; } /// /// The Kana variation of the individual's last name (Japan only). /// [JsonProperty("last_name_kana")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last_name_kana")] +#endif public string LastNameKana { get; set; } /// /// The Kanji variation of the individual's last name (Japan only). /// [JsonProperty("last_name_kanji")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last_name_kanji")] +#endif public string LastNameKanji { get; set; } /// /// The individual's maiden name. /// [JsonProperty("maiden_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("maiden_name")] +#endif public string MaidenName { get; set; } /// @@ -118,12 +169,18 @@ public class AccountIndividualOptions : INestedOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// The individual's phone number. /// [JsonProperty("phone")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("phone")] +#endif public string Phone { get; set; } /// @@ -133,30 +190,45 @@ public class AccountIndividualOptions : INestedOptions, IHasMetadata /// One of: existing, or none. /// [JsonProperty("political_exposure")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("political_exposure")] +#endif public string PoliticalExposure { get; set; } /// /// The individual's registered address. /// [JsonProperty("registered_address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("registered_address")] +#endif public AddressOptions RegisteredAddress { get; set; } /// /// Describes the person’s relationship to the account. /// [JsonProperty("relationship")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("relationship")] +#endif public AccountIndividualRelationshipOptions Relationship { get; set; } /// /// The last four digits of the individual's Social Security Number (U.S. only). /// [JsonProperty("ssn_last_4")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ssn_last_4")] +#endif public string SsnLast4 { get; set; } /// /// The individual's verification document information. /// [JsonProperty("verification")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("verification")] +#endif public AccountIndividualVerificationOptions Verification { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountIndividualRelationshipOptions.cs b/src/Stripe.net/Services/Accounts/AccountIndividualRelationshipOptions.cs index 25b4210a37..a426912827 100644 --- a/src/Stripe.net/Services/Accounts/AccountIndividualRelationshipOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountIndividualRelationshipOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountIndividualRelationshipOptions : INestedOptions { @@ -11,6 +14,9 @@ public class AccountIndividualRelationshipOptions : INestedOptions /// meets its regulatory obligations. /// [JsonProperty("director")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("director")] +#endif public bool? Director { get; set; } /// @@ -18,24 +24,36 @@ public class AccountIndividualRelationshipOptions : INestedOptions /// organization. /// [JsonProperty("executive")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("executive")] +#endif public bool? Executive { get; set; } /// /// Whether the person is an owner of the account’s legal entity. /// [JsonProperty("owner")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("owner")] +#endif public bool? Owner { get; set; } /// /// The percent owned by the person of the account's legal entity. /// [JsonProperty("percent_ownership")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("percent_ownership")] +#endif public decimal? PercentOwnership { get; set; } /// /// The person's title (e.g., CEO, Support Engineer). /// [JsonProperty("title")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("title")] +#endif public string Title { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountIndividualVerificationAdditionalDocumentOptions.cs b/src/Stripe.net/Services/Accounts/AccountIndividualVerificationAdditionalDocumentOptions.cs index fcc8f43ab6..2cc82a3691 100644 --- a/src/Stripe.net/Services/Accounts/AccountIndividualVerificationAdditionalDocumentOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountIndividualVerificationAdditionalDocumentOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountIndividualVerificationAdditionalDocumentOptions : INestedOptions { @@ -12,6 +15,9 @@ public class AccountIndividualVerificationAdditionalDocumentOptions : INestedOpt /// and less than 10 MB in size. /// [JsonProperty("back")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("back")] +#endif public string Back { get; set; } /// @@ -21,6 +27,9 @@ public class AccountIndividualVerificationAdditionalDocumentOptions : INestedOpt /// and less than 10 MB in size. /// [JsonProperty("front")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("front")] +#endif public string Front { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountIndividualVerificationDocumentOptions.cs b/src/Stripe.net/Services/Accounts/AccountIndividualVerificationDocumentOptions.cs index cf5fd12c46..e5ab42a0c4 100644 --- a/src/Stripe.net/Services/Accounts/AccountIndividualVerificationDocumentOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountIndividualVerificationDocumentOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountIndividualVerificationDocumentOptions : INestedOptions { @@ -12,6 +15,9 @@ public class AccountIndividualVerificationDocumentOptions : INestedOptions /// and less than 10 MB in size. /// [JsonProperty("back")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("back")] +#endif public string Back { get; set; } /// @@ -21,6 +27,9 @@ public class AccountIndividualVerificationDocumentOptions : INestedOptions /// and less than 10 MB in size. /// [JsonProperty("front")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("front")] +#endif public string Front { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountIndividualVerificationOptions.cs b/src/Stripe.net/Services/Accounts/AccountIndividualVerificationOptions.cs index 5701dd4d0c..e751661e71 100644 --- a/src/Stripe.net/Services/Accounts/AccountIndividualVerificationOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountIndividualVerificationOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountIndividualVerificationOptions : INestedOptions { @@ -10,12 +13,18 @@ public class AccountIndividualVerificationOptions : INestedOptions /// well-known utility company. /// [JsonProperty("additional_document")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("additional_document")] +#endif public AccountIndividualVerificationAdditionalDocumentOptions AdditionalDocument { get; set; } /// /// An identifying document, either a passport or local ID card. /// [JsonProperty("document")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("document")] +#endif public AccountIndividualVerificationDocumentOptions Document { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountRejectOptions.cs b/src/Stripe.net/Services/Accounts/AccountRejectOptions.cs index 2863bd0dde..9cc2623c27 100644 --- a/src/Stripe.net/Services/Accounts/AccountRejectOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountRejectOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountRejectOptions : BaseOptions { @@ -10,6 +13,9 @@ public class AccountRejectOptions : BaseOptions /// other. /// [JsonProperty("reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reason")] +#endif public string Reason { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountSettingsBacsDebitPaymentsOptions.cs b/src/Stripe.net/Services/Accounts/AccountSettingsBacsDebitPaymentsOptions.cs index 9d52062b9b..1a5378b218 100644 --- a/src/Stripe.net/Services/Accounts/AccountSettingsBacsDebitPaymentsOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountSettingsBacsDebitPaymentsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountSettingsBacsDebitPaymentsOptions : INestedOptions { @@ -15,6 +18,9 @@ public class AccountSettingsBacsDebitPaymentsOptions : INestedOptions /// branding, which is free. /// [JsonProperty("display_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_name")] +#endif public string DisplayName { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountSettingsBrandingOptions.cs b/src/Stripe.net/Services/Accounts/AccountSettingsBrandingOptions.cs index 7ac516ce16..5c57de1fe0 100644 --- a/src/Stripe.net/Services/Accounts/AccountSettingsBrandingOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountSettingsBrandingOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountSettingsBrandingOptions : INestedOptions { @@ -10,6 +13,9 @@ public class AccountSettingsBrandingOptions : INestedOptions /// for the account. Must be square and at least 128px x 128px. /// [JsonProperty("icon")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("icon")] +#endif public string Icon { get; set; } /// @@ -18,18 +24,27 @@ public class AccountSettingsBrandingOptions : INestedOptions /// account's name next to it if provided. Must be at least 128px x 128px. /// [JsonProperty("logo")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("logo")] +#endif public string Logo { get; set; } /// /// A CSS hex color value representing the primary branding color for this account. /// [JsonProperty("primary_color")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("primary_color")] +#endif public string PrimaryColor { get; set; } /// /// A CSS hex color value representing the secondary branding color for this account. /// [JsonProperty("secondary_color")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("secondary_color")] +#endif public string SecondaryColor { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountSettingsCardIssuingOptions.cs b/src/Stripe.net/Services/Accounts/AccountSettingsCardIssuingOptions.cs index aefb939883..9f775b8296 100644 --- a/src/Stripe.net/Services/Accounts/AccountSettingsCardIssuingOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountSettingsCardIssuingOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountSettingsCardIssuingOptions : INestedOptions { @@ -11,6 +14,9 @@ public class AccountSettingsCardIssuingOptions : INestedOptions /// Disclosures. /// [JsonProperty("tos_acceptance")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tos_acceptance")] +#endif public AccountSettingsCardIssuingTosAcceptanceOptions TosAcceptance { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountSettingsCardIssuingTosAcceptanceOptions.cs b/src/Stripe.net/Services/Accounts/AccountSettingsCardIssuingTosAcceptanceOptions.cs index 52a390093c..0973b07136 100644 --- a/src/Stripe.net/Services/Accounts/AccountSettingsCardIssuingTosAcceptanceOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountSettingsCardIssuingTosAcceptanceOptions.cs @@ -4,6 +4,9 @@ namespace Stripe using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountSettingsCardIssuingTosAcceptanceOptions : INestedOptions { @@ -13,12 +16,19 @@ public class AccountSettingsCardIssuingTosAcceptanceOptions : INestedOptions /// [JsonProperty("date")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("date")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? Date { get; set; } /// /// The IP address from which the account representative accepted the service agreement. /// [JsonProperty("ip")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ip")] +#endif public string Ip { get; set; } /// @@ -26,6 +36,9 @@ public class AccountSettingsCardIssuingTosAcceptanceOptions : INestedOptions /// agreement. /// [JsonProperty("user_agent")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("user_agent")] +#endif public string UserAgent { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountSettingsCardPaymentsDeclineOnOptions.cs b/src/Stripe.net/Services/Accounts/AccountSettingsCardPaymentsDeclineOnOptions.cs index 97e5d2f0d9..c94637c2c0 100644 --- a/src/Stripe.net/Services/Accounts/AccountSettingsCardPaymentsDeclineOnOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountSettingsCardPaymentsDeclineOnOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountSettingsCardPaymentsDeclineOnOptions : INestedOptions { @@ -11,6 +14,9 @@ public class AccountSettingsCardPaymentsDeclineOnOptions : INestedOptions /// verification. /// [JsonProperty("avs_failure")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("avs_failure")] +#endif public bool? AvsFailure { get; set; } /// @@ -18,6 +24,9 @@ public class AccountSettingsCardPaymentsDeclineOnOptions : INestedOptions /// applies when a CVC is provided and it fails bank verification. /// [JsonProperty("cvc_failure")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cvc_failure")] +#endif public bool? CvcFailure { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountSettingsCardPaymentsOptions.cs b/src/Stripe.net/Services/Accounts/AccountSettingsCardPaymentsOptions.cs index be62d1847d..7431c1d997 100644 --- a/src/Stripe.net/Services/Accounts/AccountSettingsCardPaymentsOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountSettingsCardPaymentsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountSettingsCardPaymentsOptions : INestedOptions { @@ -10,6 +13,9 @@ public class AccountSettingsCardPaymentsOptions : INestedOptions /// accepted or declined the charge. /// [JsonProperty("decline_on")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("decline_on")] +#endif public AccountSettingsCardPaymentsDeclineOnOptions DeclineOn { get; set; } /// @@ -19,6 +25,9 @@ public class AccountSettingsCardPaymentsOptions : INestedOptions /// dynamic portion. /// [JsonProperty("statement_descriptor_prefix")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("statement_descriptor_prefix")] +#endif public string StatementDescriptorPrefix { get; set; } /// @@ -29,6 +38,9 @@ public class AccountSettingsCardPaymentsOptions : INestedOptions /// the dynamic portion. /// [JsonProperty("statement_descriptor_prefix_kana")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("statement_descriptor_prefix_kana")] +#endif public string StatementDescriptorPrefixKana { get; set; } /// @@ -39,6 +51,9 @@ public class AccountSettingsCardPaymentsOptions : INestedOptions /// the dynamic portion. /// [JsonProperty("statement_descriptor_prefix_kanji")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("statement_descriptor_prefix_kanji")] +#endif public string StatementDescriptorPrefixKanji { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountSettingsInvoicesOptions.cs b/src/Stripe.net/Services/Accounts/AccountSettingsInvoicesOptions.cs index b5522c09af..edbed5cbe6 100644 --- a/src/Stripe.net/Services/Accounts/AccountSettingsInvoicesOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountSettingsInvoicesOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountSettingsInvoicesOptions : INestedOptions { @@ -11,6 +14,9 @@ public class AccountSettingsInvoicesOptions : INestedOptions /// IDs get added when an invoice is finalized. /// [JsonProperty("default_account_tax_ids")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("default_account_tax_ids")] +#endif public List DefaultAccountTaxIds { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountSettingsOptions.cs b/src/Stripe.net/Services/Accounts/AccountSettingsOptions.cs index 651052619b..cfa9e61ac1 100644 --- a/src/Stripe.net/Services/Accounts/AccountSettingsOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountSettingsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountSettingsOptions : INestedOptions { @@ -9,6 +12,9 @@ public class AccountSettingsOptions : INestedOptions /// Settings specific to Bacs Direct Debit payments. /// [JsonProperty("bacs_debit_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bacs_debit_payments")] +#endif public AccountSettingsBacsDebitPaymentsOptions BacsDebitPayments { get; set; } /// @@ -16,42 +22,63 @@ public class AccountSettingsOptions : INestedOptions /// other products. /// [JsonProperty("branding")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("branding")] +#endif public AccountSettingsBrandingOptions Branding { get; set; } /// /// Settings specific to the account's use of the Card Issuing product. /// [JsonProperty("card_issuing")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card_issuing")] +#endif public AccountSettingsCardIssuingOptions CardIssuing { get; set; } /// /// Settings specific to card charging on the account. /// [JsonProperty("card_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card_payments")] +#endif public AccountSettingsCardPaymentsOptions CardPayments { get; set; } /// /// Settings specific to the account's use of Invoices. /// [JsonProperty("invoices")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("invoices")] +#endif public AccountSettingsInvoicesOptions Invoices { get; set; } /// /// Settings that apply across payment methods for charging on the account. /// [JsonProperty("payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payments")] +#endif public AccountSettingsPaymentsOptions Payments { get; set; } /// /// Settings specific to the account's payouts. /// [JsonProperty("payouts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payouts")] +#endif public AccountSettingsPayoutsOptions Payouts { get; set; } /// /// Settings specific to the account's Treasury FinancialAccounts. /// [JsonProperty("treasury")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("treasury")] +#endif public AccountSettingsTreasuryOptions Treasury { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountSettingsPaymentsOptions.cs b/src/Stripe.net/Services/Accounts/AccountSettingsPaymentsOptions.cs index 1d3b74f6dd..94fc683e9c 100644 --- a/src/Stripe.net/Services/Accounts/AccountSettingsPaymentsOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountSettingsPaymentsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountSettingsPaymentsOptions : INestedOptions { @@ -16,6 +19,9 @@ public class AccountSettingsPaymentsOptions : INestedOptions /// settings documentation. /// [JsonProperty("statement_descriptor")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("statement_descriptor")] +#endif public string StatementDescriptor { get; set; } /// @@ -25,6 +31,9 @@ public class AccountSettingsPaymentsOptions : INestedOptions /// requirements. /// [JsonProperty("statement_descriptor_kana")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("statement_descriptor_kana")] +#endif public string StatementDescriptorKana { get; set; } /// @@ -34,6 +43,9 @@ public class AccountSettingsPaymentsOptions : INestedOptions /// requirements. /// [JsonProperty("statement_descriptor_kanji")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("statement_descriptor_kanji")] +#endif public string StatementDescriptorKanji { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountSettingsPayoutsOptions.cs b/src/Stripe.net/Services/Accounts/AccountSettingsPayoutsOptions.cs index 586a32f62c..28d62dcb0c 100644 --- a/src/Stripe.net/Services/Accounts/AccountSettingsPayoutsOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountSettingsPayoutsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountSettingsPayoutsOptions : INestedOptions { @@ -12,6 +15,9 @@ public class AccountSettingsPayoutsOptions : INestedOptions /// Balances. /// [JsonProperty("debit_negative_balances")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("debit_negative_balances")] +#endif public bool? DebitNegativeBalances { get; set; } /// @@ -21,6 +27,9 @@ public class AccountSettingsPayoutsOptions : INestedOptions /// Debit Card Payouts documentation. /// [JsonProperty("schedule")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("schedule")] +#endif public AccountSettingsPayoutsScheduleOptions Schedule { get; set; } /// @@ -28,6 +37,9 @@ public class AccountSettingsPayoutsOptions : INestedOptions /// defaults to the platform's bank descriptor as set in the Dashboard. /// [JsonProperty("statement_descriptor")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("statement_descriptor")] +#endif public string StatementDescriptor { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountSettingsPayoutsScheduleOptions.cs b/src/Stripe.net/Services/Accounts/AccountSettingsPayoutsScheduleOptions.cs index 4e8821abc5..8e8a387056 100644 --- a/src/Stripe.net/Services/Accounts/AccountSettingsPayoutsScheduleOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountSettingsPayoutsScheduleOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountSettingsPayoutsScheduleOptions : INestedOptions { @@ -16,6 +19,10 @@ public class AccountSettingsPayoutsScheduleOptions : INestedOptions /// [JsonProperty("delay_days")] [JsonConverter(typeof(AnyOfConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("delay_days")] + [STJS.JsonConverter(typeof(STJAnyOfConverter))] +#endif public AnyOf DelayDays { get; set; } /// @@ -24,6 +31,9 @@ public class AccountSettingsPayoutsScheduleOptions : INestedOptions /// One of: daily, manual, monthly, or weekly. /// [JsonProperty("interval")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interval")] +#endif public string Interval { get; set; } /// @@ -33,6 +43,9 @@ public class AccountSettingsPayoutsScheduleOptions : INestedOptions /// is monthly. /// [JsonProperty("monthly_anchor")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("monthly_anchor")] +#endif public long? MonthlyAnchor { get; set; } /// @@ -42,6 +55,9 @@ public class AccountSettingsPayoutsScheduleOptions : INestedOptions /// tuesday, or wednesday. /// [JsonProperty("weekly_anchor")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("weekly_anchor")] +#endif public string WeeklyAnchor { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountSettingsTreasuryOptions.cs b/src/Stripe.net/Services/Accounts/AccountSettingsTreasuryOptions.cs index 89c98844da..dda28ff296 100644 --- a/src/Stripe.net/Services/Accounts/AccountSettingsTreasuryOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountSettingsTreasuryOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountSettingsTreasuryOptions : INestedOptions { @@ -9,6 +12,9 @@ public class AccountSettingsTreasuryOptions : INestedOptions /// Details on the account's acceptance of the Stripe Treasury Services Agreement. /// [JsonProperty("tos_acceptance")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tos_acceptance")] +#endif public AccountSettingsTreasuryTosAcceptanceOptions TosAcceptance { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountSettingsTreasuryTosAcceptanceOptions.cs b/src/Stripe.net/Services/Accounts/AccountSettingsTreasuryTosAcceptanceOptions.cs index 082713e1dd..9543e65d78 100644 --- a/src/Stripe.net/Services/Accounts/AccountSettingsTreasuryTosAcceptanceOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountSettingsTreasuryTosAcceptanceOptions.cs @@ -4,6 +4,9 @@ namespace Stripe using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountSettingsTreasuryTosAcceptanceOptions : INestedOptions { @@ -13,12 +16,19 @@ public class AccountSettingsTreasuryTosAcceptanceOptions : INestedOptions /// [JsonProperty("date")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("date")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? Date { get; set; } /// /// The IP address from which the account representative accepted the service agreement. /// [JsonProperty("ip")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ip")] +#endif public string Ip { get; set; } /// @@ -26,6 +36,9 @@ public class AccountSettingsTreasuryTosAcceptanceOptions : INestedOptions /// agreement. /// [JsonProperty("user_agent")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("user_agent")] +#endif public string UserAgent { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountTosAcceptanceOptions.cs b/src/Stripe.net/Services/Accounts/AccountTosAcceptanceOptions.cs index 83a0d41ec0..13e65d7644 100644 --- a/src/Stripe.net/Services/Accounts/AccountTosAcceptanceOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountTosAcceptanceOptions.cs @@ -4,6 +4,9 @@ namespace Stripe using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountTosAcceptanceOptions : INestedOptions { @@ -13,18 +16,28 @@ public class AccountTosAcceptanceOptions : INestedOptions /// [JsonProperty("date")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("date")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? Date { get; set; } /// /// The IP address from which the account representative accepted their service agreement. /// [JsonProperty("ip")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ip")] +#endif public string Ip { get; set; } /// /// The user's service agreement type. /// [JsonProperty("service_agreement")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("service_agreement")] +#endif public string ServiceAgreement { get; set; } /// @@ -32,6 +45,9 @@ public class AccountTosAcceptanceOptions : INestedOptions /// service agreement. /// [JsonProperty("user_agent")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("user_agent")] +#endif public string UserAgent { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/AccountUpdateOptions.cs b/src/Stripe.net/Services/Accounts/AccountUpdateOptions.cs index 52f4a54806..f6e0e36d08 100644 --- a/src/Stripe.net/Services/Accounts/AccountUpdateOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountUpdateOptions.cs @@ -4,6 +4,9 @@ namespace Stripe using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountUpdateOptions : BaseOptions, IHasMetadata { @@ -12,12 +15,18 @@ public class AccountUpdateOptions : BaseOptions, IHasMetadata /// securely provide details to the account. /// [JsonProperty("account_token")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_token")] +#endif public string AccountToken { get; set; } /// /// Business information about the account. /// [JsonProperty("business_profile")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("business_profile")] +#endif public AccountBusinessProfileOptions BusinessProfile { get; set; } /// @@ -31,6 +40,9 @@ public class AccountUpdateOptions : BaseOptions, IHasMetadata /// non_profit. /// [JsonProperty("business_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("business_type")] +#endif public string BusinessType { get; set; } /// @@ -44,6 +56,9 @@ public class AccountUpdateOptions : BaseOptions, IHasMetadata /// is none, which includes Custom accounts. /// [JsonProperty("capabilities")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("capabilities")] +#endif public AccountCapabilitiesOptions Capabilities { get; set; } /// @@ -56,6 +71,9 @@ public class AccountUpdateOptions : BaseOptions, IHasMetadata /// is application, which includes Custom accounts. /// [JsonProperty("company")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("company")] +#endif public AccountCompanyOptions Company { get; set; } /// @@ -64,12 +82,18 @@ public class AccountUpdateOptions : BaseOptions, IHasMetadata /// account's country. /// [JsonProperty("default_currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("default_currency")] +#endif public string DefaultCurrency { get; set; } /// /// Documents that may be submitted to satisfy various informational requests. /// [JsonProperty("documents")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("documents")] +#endif public AccountDocumentsOptions Documents { get; set; } /// @@ -80,6 +104,9 @@ public class AccountUpdateOptions : BaseOptions, IHasMetadata /// without your consent. /// [JsonProperty("email")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("email")] +#endif public string Email { get; set; } /// @@ -102,6 +129,10 @@ public class AccountUpdateOptions : BaseOptions, IHasMetadata /// [JsonProperty("external_account")] [JsonConverter(typeof(AnyOfConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("external_account")] + [STJS.JsonConverter(typeof(STJAnyOfConverter))] +#endif public AnyOf ExternalAccount { get; set; } /// @@ -109,6 +140,9 @@ public class AccountUpdateOptions : BaseOptions, IHasMetadata /// added to. /// [JsonProperty("groups")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("groups")] +#endif public AccountGroupsOptions Groups { get; set; } /// @@ -121,6 +155,9 @@ public class AccountUpdateOptions : BaseOptions, IHasMetadata /// is application, which includes Custom accounts. /// [JsonProperty("individual")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("individual")] +#endif public AccountIndividualOptions Individual { get; set; } /// @@ -130,12 +167,18 @@ public class AccountUpdateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// Options for customizing how the account functions within Stripe. /// [JsonProperty("settings")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("settings")] +#endif public AccountSettingsOptions Settings { get; set; } /// @@ -147,6 +190,9 @@ public class AccountUpdateOptions : BaseOptions, IHasMetadata /// full service agreement when empty. /// [JsonProperty("tos_acceptance")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tos_acceptance")] +#endif public AccountTosAcceptanceOptions TosAcceptance { get; set; } } } diff --git a/src/Stripe.net/Services/Accounts/DobOptions.cs b/src/Stripe.net/Services/Accounts/DobOptions.cs index 8d0a31ebf5..8275d17bc6 100644 --- a/src/Stripe.net/Services/Accounts/DobOptions.cs +++ b/src/Stripe.net/Services/Accounts/DobOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class DobOptions : INestedOptions { @@ -9,18 +12,27 @@ public class DobOptions : INestedOptions /// The day of birth, between 1 and 31. /// [JsonProperty("day")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("day")] +#endif public long? Day { get; set; } /// /// The month of birth, between 1 and 12. /// [JsonProperty("month")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("month")] +#endif public long? Month { get; set; } /// /// The four-digit year of birth. /// [JsonProperty("year")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("year")] +#endif public long? Year { get; set; } } } diff --git a/src/Stripe.net/Services/ApplePayDomains/ApplePayDomainCreateOptions.cs b/src/Stripe.net/Services/ApplePayDomains/ApplePayDomainCreateOptions.cs index 9d2f60387d..cf15baf69f 100644 --- a/src/Stripe.net/Services/ApplePayDomains/ApplePayDomainCreateOptions.cs +++ b/src/Stripe.net/Services/ApplePayDomains/ApplePayDomainCreateOptions.cs @@ -2,10 +2,16 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ApplePayDomainCreateOptions : BaseOptions { [JsonProperty("domain_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("domain_name")] +#endif public string DomainName { get; set; } } } diff --git a/src/Stripe.net/Services/ApplePayDomains/ApplePayDomainListOptions.cs b/src/Stripe.net/Services/ApplePayDomains/ApplePayDomainListOptions.cs index 226d018488..c0b7dceb14 100644 --- a/src/Stripe.net/Services/ApplePayDomains/ApplePayDomainListOptions.cs +++ b/src/Stripe.net/Services/ApplePayDomains/ApplePayDomainListOptions.cs @@ -2,10 +2,16 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ApplePayDomainListOptions : ListOptions { [JsonProperty("domain_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("domain_name")] +#endif public string DomainName { get; set; } } } diff --git a/src/Stripe.net/Services/ApplicationFeeRefunds/ApplicationFeeRefundCreateOptions.cs b/src/Stripe.net/Services/ApplicationFeeRefunds/ApplicationFeeRefundCreateOptions.cs index 8eeb6307a7..07e16a1c87 100644 --- a/src/Stripe.net/Services/ApplicationFeeRefunds/ApplicationFeeRefundCreateOptions.cs +++ b/src/Stripe.net/Services/ApplicationFeeRefunds/ApplicationFeeRefundCreateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ApplicationFeeRefundCreateOptions : BaseOptions, IHasMetadata { @@ -11,6 +14,9 @@ public class ApplicationFeeRefundCreateOptions : BaseOptions, IHasMetadata /// this fee to refund. Can refund only up to the remaining unrefunded amount of the fee. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long? Amount { get; set; } /// @@ -20,6 +26,9 @@ public class ApplicationFeeRefundCreateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } } } diff --git a/src/Stripe.net/Services/ApplicationFeeRefunds/ApplicationFeeRefundUpdateOptions.cs b/src/Stripe.net/Services/ApplicationFeeRefunds/ApplicationFeeRefundUpdateOptions.cs index c16d4b737c..0e55e9761f 100644 --- a/src/Stripe.net/Services/ApplicationFeeRefunds/ApplicationFeeRefundUpdateOptions.cs +++ b/src/Stripe.net/Services/ApplicationFeeRefunds/ApplicationFeeRefundUpdateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ApplicationFeeRefundUpdateOptions : BaseOptions, IHasMetadata { @@ -13,6 +16,9 @@ public class ApplicationFeeRefundUpdateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } } } diff --git a/src/Stripe.net/Services/ApplicationFees/ApplicationFeeListOptions.cs b/src/Stripe.net/Services/ApplicationFees/ApplicationFeeListOptions.cs index 7276f3ebef..782b453170 100644 --- a/src/Stripe.net/Services/ApplicationFees/ApplicationFeeListOptions.cs +++ b/src/Stripe.net/Services/ApplicationFees/ApplicationFeeListOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ApplicationFeeListOptions : ListOptionsWithCreated { @@ -9,6 +12,9 @@ public class ApplicationFeeListOptions : ListOptionsWithCreated /// Only return application fees for the charge specified by this charge ID. /// [JsonProperty("charge")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("charge")] +#endif public string Charge { get; set; } } } diff --git a/src/Stripe.net/Services/Apps/Secrets/SecretCreateOptions.cs b/src/Stripe.net/Services/Apps/Secrets/SecretCreateOptions.cs index 47a3c8858e..6115178901 100644 --- a/src/Stripe.net/Services/Apps/Secrets/SecretCreateOptions.cs +++ b/src/Stripe.net/Services/Apps/Secrets/SecretCreateOptions.cs @@ -4,6 +4,9 @@ namespace Stripe.Apps using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SecretCreateOptions : BaseOptions { @@ -12,18 +15,28 @@ public class SecretCreateOptions : BaseOptions /// [JsonProperty("expires_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("expires_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? ExpiresAt { get; set; } /// /// A name for the secret that's unique within the scope. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } /// /// The plaintext secret value to be stored. /// [JsonProperty("payload")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payload")] +#endif public string Payload { get; set; } /// @@ -31,6 +44,9 @@ public class SecretCreateOptions : BaseOptions /// access account-scoped secrets or secrets scoped to their own user. /// [JsonProperty("scope")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("scope")] +#endif public SecretScopeOptions Scope { get; set; } } } diff --git a/src/Stripe.net/Services/Apps/Secrets/SecretDeleteWhereOptions.cs b/src/Stripe.net/Services/Apps/Secrets/SecretDeleteWhereOptions.cs index d363e1f85c..3e5ef8901d 100644 --- a/src/Stripe.net/Services/Apps/Secrets/SecretDeleteWhereOptions.cs +++ b/src/Stripe.net/Services/Apps/Secrets/SecretDeleteWhereOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Apps { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SecretDeleteWhereOptions : BaseOptions { @@ -9,6 +12,9 @@ public class SecretDeleteWhereOptions : BaseOptions /// A name for the secret that's unique within the scope. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } /// @@ -16,6 +22,9 @@ public class SecretDeleteWhereOptions : BaseOptions /// access account-scoped secrets or secrets scoped to their own user. /// [JsonProperty("scope")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("scope")] +#endif public SecretScopeOptions Scope { get; set; } } } diff --git a/src/Stripe.net/Services/Apps/Secrets/SecretFindOptions.cs b/src/Stripe.net/Services/Apps/Secrets/SecretFindOptions.cs index 72199316be..f59557d27b 100644 --- a/src/Stripe.net/Services/Apps/Secrets/SecretFindOptions.cs +++ b/src/Stripe.net/Services/Apps/Secrets/SecretFindOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Apps { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SecretFindOptions : BaseOptions { @@ -9,6 +12,9 @@ public class SecretFindOptions : BaseOptions /// A name for the secret that's unique within the scope. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } /// @@ -16,6 +22,9 @@ public class SecretFindOptions : BaseOptions /// access account-scoped secrets or secrets scoped to their own user. /// [JsonProperty("scope")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("scope")] +#endif public SecretScopeOptions Scope { get; set; } } } diff --git a/src/Stripe.net/Services/Apps/Secrets/SecretListOptions.cs b/src/Stripe.net/Services/Apps/Secrets/SecretListOptions.cs index a9eea4fa09..d5e1a48f60 100644 --- a/src/Stripe.net/Services/Apps/Secrets/SecretListOptions.cs +++ b/src/Stripe.net/Services/Apps/Secrets/SecretListOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Apps { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SecretListOptions : ListOptions { @@ -10,6 +13,9 @@ public class SecretListOptions : ListOptions /// access account-scoped secrets or secrets scoped to their own user. /// [JsonProperty("scope")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("scope")] +#endif public SecretScopeOptions Scope { get; set; } } } diff --git a/src/Stripe.net/Services/Apps/Secrets/SecretScopeOptions.cs b/src/Stripe.net/Services/Apps/Secrets/SecretScopeOptions.cs index b149af4e58..c9a8408033 100644 --- a/src/Stripe.net/Services/Apps/Secrets/SecretScopeOptions.cs +++ b/src/Stripe.net/Services/Apps/Secrets/SecretScopeOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Apps { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SecretScopeOptions : INestedOptions { @@ -10,6 +13,9 @@ public class SecretScopeOptions : INestedOptions /// One of: account, or user. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } /// @@ -17,6 +23,9 @@ public class SecretScopeOptions : INestedOptions /// be provided if type is set to account. /// [JsonProperty("user")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("user")] +#endif public string User { get; set; } } } diff --git a/src/Stripe.net/Services/BalanceTransactions/BalanceTransactionListOptions.cs b/src/Stripe.net/Services/BalanceTransactions/BalanceTransactionListOptions.cs index 23a0c58d27..c1e14d27f9 100644 --- a/src/Stripe.net/Services/BalanceTransactions/BalanceTransactionListOptions.cs +++ b/src/Stripe.net/Services/BalanceTransactions/BalanceTransactionListOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class BalanceTransactionListOptions : ListOptionsWithCreated { @@ -12,6 +15,9 @@ public class BalanceTransactionListOptions : ListOptionsWithCreated /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// @@ -19,12 +25,18 @@ public class BalanceTransactionListOptions : ListOptionsWithCreated /// specified payout ID. /// [JsonProperty("payout")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payout")] +#endif public string Payout { get; set; } /// /// Only returns the original transaction. /// [JsonProperty("source")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("source")] +#endif public string Source { get; set; } /// @@ -44,6 +56,9 @@ public class BalanceTransactionListOptions : ListOptionsWithCreated /// or transfer_refund. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/BankAccounts/BankAccountDocumentsBankAccountOwnershipVerificationOptions.cs b/src/Stripe.net/Services/BankAccounts/BankAccountDocumentsBankAccountOwnershipVerificationOptions.cs index 8f62d580f2..f44274c84c 100644 --- a/src/Stripe.net/Services/BankAccounts/BankAccountDocumentsBankAccountOwnershipVerificationOptions.cs +++ b/src/Stripe.net/Services/BankAccounts/BankAccountDocumentsBankAccountOwnershipVerificationOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class BankAccountDocumentsBankAccountOwnershipVerificationOptions : INestedOptions { @@ -12,6 +15,9 @@ public class BankAccountDocumentsBankAccountOwnershipVerificationOptions : INest /// value of account_requirement. /// [JsonProperty("files")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("files")] +#endif public List Files { get; set; } } } diff --git a/src/Stripe.net/Services/BankAccounts/BankAccountDocumentsOptions.cs b/src/Stripe.net/Services/BankAccounts/BankAccountDocumentsOptions.cs index 9295c3a8c0..8a164b8cf1 100644 --- a/src/Stripe.net/Services/BankAccounts/BankAccountDocumentsOptions.cs +++ b/src/Stripe.net/Services/BankAccounts/BankAccountDocumentsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class BankAccountDocumentsOptions : INestedOptions { @@ -13,6 +16,9 @@ public class BankAccountDocumentsOptions : INestedOptions /// or a check. /// [JsonProperty("bank_account_ownership_verification")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_account_ownership_verification")] +#endif public BankAccountDocumentsBankAccountOwnershipVerificationOptions BankAccountOwnershipVerification { get; set; } } } diff --git a/src/Stripe.net/Services/BankAccounts/BankAccountUpdateOptions.cs b/src/Stripe.net/Services/BankAccounts/BankAccountUpdateOptions.cs index 1fa8139288..bfd1c2cc91 100644 --- a/src/Stripe.net/Services/BankAccounts/BankAccountUpdateOptions.cs +++ b/src/Stripe.net/Services/BankAccounts/BankAccountUpdateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class BankAccountUpdateOptions : BaseOptions, IHasMetadata { @@ -10,6 +13,9 @@ public class BankAccountUpdateOptions : BaseOptions, IHasMetadata /// The name of the person or business that owns the bank account. /// [JsonProperty("account_holder_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_holder_name")] +#endif public string AccountHolderName { get; set; } /// @@ -18,6 +24,9 @@ public class BankAccountUpdateOptions : BaseOptions, IHasMetadata /// One of: company, or individual. /// [JsonProperty("account_holder_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_holder_type")] +#endif public string AccountHolderType { get; set; } /// @@ -26,12 +35,18 @@ public class BankAccountUpdateOptions : BaseOptions, IHasMetadata /// One of: checking, futsu, savings, or toza. /// [JsonProperty("account_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_type")] +#endif public string AccountType { get; set; } /// /// Documents that may be submitted to satisfy various informational requests. /// [JsonProperty("documents")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("documents")] +#endif public BankAccountDocumentsOptions Documents { get; set; } /// @@ -41,6 +56,9 @@ public class BankAccountUpdateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } } } diff --git a/src/Stripe.net/Services/BankAccounts/BankAccountVerifyOptions.cs b/src/Stripe.net/Services/BankAccounts/BankAccountVerifyOptions.cs index 902bb486d0..55ddff4b47 100644 --- a/src/Stripe.net/Services/BankAccounts/BankAccountVerifyOptions.cs +++ b/src/Stripe.net/Services/BankAccounts/BankAccountVerifyOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class BankAccountVerifyOptions : BaseOptions { @@ -11,6 +14,9 @@ public class BankAccountVerifyOptions : BaseOptions /// to the bank account. /// [JsonProperty("amounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amounts")] +#endif public List Amounts { get; set; } } } diff --git a/src/Stripe.net/Services/Billing/Alerts/AlertCreateOptions.cs b/src/Stripe.net/Services/Billing/Alerts/AlertCreateOptions.cs index 023ac5c210..ad5897476a 100644 --- a/src/Stripe.net/Services/Billing/Alerts/AlertCreateOptions.cs +++ b/src/Stripe.net/Services/Billing/Alerts/AlertCreateOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Billing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AlertCreateOptions : BaseOptions { @@ -9,18 +12,27 @@ public class AlertCreateOptions : BaseOptions /// The type of alert to create. /// [JsonProperty("alert_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("alert_type")] +#endif public string AlertType { get; set; } /// /// The title of the alert. /// [JsonProperty("title")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("title")] +#endif public string Title { get; set; } /// /// The configuration of the usage threshold. /// [JsonProperty("usage_threshold")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("usage_threshold")] +#endif public AlertUsageThresholdOptions UsageThreshold { get; set; } } } diff --git a/src/Stripe.net/Services/Billing/Alerts/AlertListOptions.cs b/src/Stripe.net/Services/Billing/Alerts/AlertListOptions.cs index b088e01bb2..c6c95a2c2e 100644 --- a/src/Stripe.net/Services/Billing/Alerts/AlertListOptions.cs +++ b/src/Stripe.net/Services/Billing/Alerts/AlertListOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Billing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AlertListOptions : ListOptions { @@ -9,12 +12,18 @@ public class AlertListOptions : ListOptions /// Filter results to only include this type of alert. /// [JsonProperty("alert_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("alert_type")] +#endif public string AlertType { get; set; } /// /// Filter results to only include alerts with the given meter. /// [JsonProperty("meter")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("meter")] +#endif public string Meter { get; set; } } } diff --git a/src/Stripe.net/Services/Billing/Alerts/AlertUsageThresholdFilterOptions.cs b/src/Stripe.net/Services/Billing/Alerts/AlertUsageThresholdFilterOptions.cs index 988a304ab0..7d4aa5ba69 100644 --- a/src/Stripe.net/Services/Billing/Alerts/AlertUsageThresholdFilterOptions.cs +++ b/src/Stripe.net/Services/Billing/Alerts/AlertUsageThresholdFilterOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Billing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AlertUsageThresholdFilterOptions : INestedOptions { @@ -9,12 +12,18 @@ public class AlertUsageThresholdFilterOptions : INestedOptions /// Limit the scope to this usage alert only to this customer. /// [JsonProperty("customer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] +#endif public string Customer { get; set; } /// /// What type of filter is being applied to this usage alert. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Billing/Alerts/AlertUsageThresholdOptions.cs b/src/Stripe.net/Services/Billing/Alerts/AlertUsageThresholdOptions.cs index 3b8359cca1..16647366a9 100644 --- a/src/Stripe.net/Services/Billing/Alerts/AlertUsageThresholdOptions.cs +++ b/src/Stripe.net/Services/Billing/Alerts/AlertUsageThresholdOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.Billing { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AlertUsageThresholdOptions : INestedOptions { @@ -11,12 +14,18 @@ public class AlertUsageThresholdOptions : INestedOptions /// one filter at this time. /// [JsonProperty("filters")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("filters")] +#endif public List Filters { get; set; } /// /// Defines at which value the alert will fire. /// [JsonProperty("gte")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("gte")] +#endif public long? Gte { get; set; } /// @@ -24,12 +33,18 @@ public class AlertUsageThresholdOptions : INestedOptions /// monitored. /// [JsonProperty("meter")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("meter")] +#endif public string Meter { get; set; } /// /// Whether the alert should only fire only once, or once per billing cycle. /// [JsonProperty("recurrence")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("recurrence")] +#endif public string Recurrence { get; set; } } } diff --git a/src/Stripe.net/Services/Billing/CreditBalanceSummaries/CreditBalanceSummaryFilterApplicabilityScopeOptions.cs b/src/Stripe.net/Services/Billing/CreditBalanceSummaries/CreditBalanceSummaryFilterApplicabilityScopeOptions.cs index 16808a8646..873656b7a1 100644 --- a/src/Stripe.net/Services/Billing/CreditBalanceSummaries/CreditBalanceSummaryFilterApplicabilityScopeOptions.cs +++ b/src/Stripe.net/Services/Billing/CreditBalanceSummaries/CreditBalanceSummaryFilterApplicabilityScopeOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Billing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CreditBalanceSummaryFilterApplicabilityScopeOptions : INestedOptions { @@ -10,6 +13,9 @@ public class CreditBalanceSummaryFilterApplicabilityScopeOptions : INestedOption /// metered price type. /// [JsonProperty("price_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("price_type")] +#endif public string PriceType { get; set; } } } diff --git a/src/Stripe.net/Services/Billing/CreditBalanceSummaries/CreditBalanceSummaryFilterOptions.cs b/src/Stripe.net/Services/Billing/CreditBalanceSummaries/CreditBalanceSummaryFilterOptions.cs index 64a9f2555b..047ef057ac 100644 --- a/src/Stripe.net/Services/Billing/CreditBalanceSummaries/CreditBalanceSummaryFilterOptions.cs +++ b/src/Stripe.net/Services/Billing/CreditBalanceSummaries/CreditBalanceSummaryFilterOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Billing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CreditBalanceSummaryFilterOptions : INestedOptions { @@ -9,12 +12,18 @@ public class CreditBalanceSummaryFilterOptions : INestedOptions /// The billing credit applicability scope for which to fetch credit balance summary. /// [JsonProperty("applicability_scope")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("applicability_scope")] +#endif public CreditBalanceSummaryFilterApplicabilityScopeOptions ApplicabilityScope { get; set; } /// /// The credit grant for which to fetch credit balance summary. /// [JsonProperty("credit_grant")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("credit_grant")] +#endif public string CreditGrant { get; set; } /// @@ -22,6 +31,9 @@ public class CreditBalanceSummaryFilterOptions : INestedOptions /// One of: applicability_scope, or credit_grant. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Billing/CreditBalanceSummaries/CreditBalanceSummaryGetOptions.cs b/src/Stripe.net/Services/Billing/CreditBalanceSummaries/CreditBalanceSummaryGetOptions.cs index 8b81eefd8a..830e2e5d1b 100644 --- a/src/Stripe.net/Services/Billing/CreditBalanceSummaries/CreditBalanceSummaryGetOptions.cs +++ b/src/Stripe.net/Services/Billing/CreditBalanceSummaries/CreditBalanceSummaryGetOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Billing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CreditBalanceSummaryGetOptions : BaseOptions { @@ -9,12 +12,18 @@ public class CreditBalanceSummaryGetOptions : BaseOptions /// The customer for which to fetch credit balance summary. /// [JsonProperty("customer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] +#endif public string Customer { get; set; } /// /// The filter criteria for the credit balance summary. /// [JsonProperty("filter")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("filter")] +#endif public CreditBalanceSummaryFilterOptions Filter { get; set; } } } diff --git a/src/Stripe.net/Services/Billing/CreditBalanceTransactions/CreditBalanceTransactionListOptions.cs b/src/Stripe.net/Services/Billing/CreditBalanceTransactions/CreditBalanceTransactionListOptions.cs index 88addf4b6e..ae7eda774d 100644 --- a/src/Stripe.net/Services/Billing/CreditBalanceTransactions/CreditBalanceTransactionListOptions.cs +++ b/src/Stripe.net/Services/Billing/CreditBalanceTransactions/CreditBalanceTransactionListOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Billing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CreditBalanceTransactionListOptions : ListOptions { @@ -9,12 +12,18 @@ public class CreditBalanceTransactionListOptions : ListOptions /// The credit grant for which to fetch credit balance transactions. /// [JsonProperty("credit_grant")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("credit_grant")] +#endif public string CreditGrant { get; set; } /// /// The customer for which to fetch credit balance transactions. /// [JsonProperty("customer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] +#endif public string Customer { get; set; } } } diff --git a/src/Stripe.net/Services/Billing/CreditGrants/CreditGrantAmountMonetaryOptions.cs b/src/Stripe.net/Services/Billing/CreditGrants/CreditGrantAmountMonetaryOptions.cs index 75434afaa7..338c4197d3 100644 --- a/src/Stripe.net/Services/Billing/CreditGrants/CreditGrantAmountMonetaryOptions.cs +++ b/src/Stripe.net/Services/Billing/CreditGrants/CreditGrantAmountMonetaryOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Billing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CreditGrantAmountMonetaryOptions : INestedOptions { @@ -10,12 +13,18 @@ public class CreditGrantAmountMonetaryOptions : INestedOptions /// of the value parameter. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// /// A positive integer representing the amount of the credit grant. /// [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public long? Value { get; set; } } } diff --git a/src/Stripe.net/Services/Billing/CreditGrants/CreditGrantAmountOptions.cs b/src/Stripe.net/Services/Billing/CreditGrants/CreditGrantAmountOptions.cs index 0b3f629f7d..a62e0603cd 100644 --- a/src/Stripe.net/Services/Billing/CreditGrants/CreditGrantAmountOptions.cs +++ b/src/Stripe.net/Services/Billing/CreditGrants/CreditGrantAmountOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Billing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CreditGrantAmountOptions : INestedOptions { @@ -9,6 +12,9 @@ public class CreditGrantAmountOptions : INestedOptions /// The monetary amount. /// [JsonProperty("monetary")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("monetary")] +#endif public CreditGrantAmountMonetaryOptions Monetary { get; set; } /// @@ -16,6 +22,9 @@ public class CreditGrantAmountOptions : INestedOptions /// credits. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Billing/CreditGrants/CreditGrantApplicabilityConfigOptions.cs b/src/Stripe.net/Services/Billing/CreditGrants/CreditGrantApplicabilityConfigOptions.cs index 687d3ec6d9..7b0b5150f0 100644 --- a/src/Stripe.net/Services/Billing/CreditGrants/CreditGrantApplicabilityConfigOptions.cs +++ b/src/Stripe.net/Services/Billing/CreditGrants/CreditGrantApplicabilityConfigOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Billing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CreditGrantApplicabilityConfigOptions : INestedOptions { @@ -9,6 +12,9 @@ public class CreditGrantApplicabilityConfigOptions : INestedOptions /// Specify the scope of this applicability config. /// [JsonProperty("scope")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("scope")] +#endif public CreditGrantApplicabilityConfigScopeOptions Scope { get; set; } } } diff --git a/src/Stripe.net/Services/Billing/CreditGrants/CreditGrantApplicabilityConfigScopeOptions.cs b/src/Stripe.net/Services/Billing/CreditGrants/CreditGrantApplicabilityConfigScopeOptions.cs index 68d0cfe080..d71b729153 100644 --- a/src/Stripe.net/Services/Billing/CreditGrants/CreditGrantApplicabilityConfigScopeOptions.cs +++ b/src/Stripe.net/Services/Billing/CreditGrants/CreditGrantApplicabilityConfigScopeOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Billing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CreditGrantApplicabilityConfigScopeOptions : INestedOptions { @@ -10,6 +13,9 @@ public class CreditGrantApplicabilityConfigScopeOptions : INestedOptions /// metered price type. /// [JsonProperty("price_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("price_type")] +#endif public string PriceType { get; set; } } } diff --git a/src/Stripe.net/Services/Billing/CreditGrants/CreditGrantCreateOptions.cs b/src/Stripe.net/Services/Billing/CreditGrants/CreditGrantCreateOptions.cs index de7b1ef117..a483376e9b 100644 --- a/src/Stripe.net/Services/Billing/CreditGrants/CreditGrantCreateOptions.cs +++ b/src/Stripe.net/Services/Billing/CreditGrants/CreditGrantCreateOptions.cs @@ -5,6 +5,9 @@ namespace Stripe.Billing using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CreditGrantCreateOptions : BaseOptions, IHasMetadata { @@ -12,12 +15,18 @@ public class CreditGrantCreateOptions : BaseOptions, IHasMetadata /// Amount of this credit grant. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public CreditGrantAmountOptions Amount { get; set; } /// /// Configuration specifying what this credit grant applies to. /// [JsonProperty("applicability_config")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("applicability_config")] +#endif public CreditGrantApplicabilityConfigOptions ApplicabilityConfig { get; set; } /// @@ -25,12 +34,18 @@ public class CreditGrantCreateOptions : BaseOptions, IHasMetadata /// One of: paid, or promotional. /// [JsonProperty("category")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("category")] +#endif public string Category { get; set; } /// /// ID of the customer to receive the billing credits. /// [JsonProperty("customer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] +#endif public string Customer { get; set; } /// @@ -39,6 +54,10 @@ public class CreditGrantCreateOptions : BaseOptions, IHasMetadata /// [JsonProperty("effective_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("effective_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? EffectiveAt { get; set; } /// @@ -47,6 +66,10 @@ public class CreditGrantCreateOptions : BaseOptions, IHasMetadata /// [JsonProperty("expires_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("expires_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? ExpiresAt { get; set; } /// @@ -55,12 +78,18 @@ public class CreditGrantCreateOptions : BaseOptions, IHasMetadata /// format. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// A descriptive name shown in the Dashboard. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } } } diff --git a/src/Stripe.net/Services/Billing/CreditGrants/CreditGrantListOptions.cs b/src/Stripe.net/Services/Billing/CreditGrants/CreditGrantListOptions.cs index b487b27ebf..99babbe03d 100644 --- a/src/Stripe.net/Services/Billing/CreditGrants/CreditGrantListOptions.cs +++ b/src/Stripe.net/Services/Billing/CreditGrants/CreditGrantListOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Billing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CreditGrantListOptions : ListOptions { @@ -9,6 +12,9 @@ public class CreditGrantListOptions : ListOptions /// Only return credit grants for this customer. /// [JsonProperty("customer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] +#endif public string Customer { get; set; } } } diff --git a/src/Stripe.net/Services/Billing/CreditGrants/CreditGrantUpdateOptions.cs b/src/Stripe.net/Services/Billing/CreditGrants/CreditGrantUpdateOptions.cs index 988ed67333..c1f77b64c1 100644 --- a/src/Stripe.net/Services/Billing/CreditGrants/CreditGrantUpdateOptions.cs +++ b/src/Stripe.net/Services/Billing/CreditGrants/CreditGrantUpdateOptions.cs @@ -5,6 +5,9 @@ namespace Stripe.Billing using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CreditGrantUpdateOptions : BaseOptions, IHasMetadata { @@ -14,6 +17,10 @@ public class CreditGrantUpdateOptions : BaseOptions, IHasMetadata /// [JsonProperty("expires_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("expires_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? ExpiresAt { get; set; } /// @@ -22,6 +29,9 @@ public class CreditGrantUpdateOptions : BaseOptions, IHasMetadata /// format. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } } } diff --git a/src/Stripe.net/Services/Billing/MeterEventAdjustments/MeterEventAdjustmentCancelOptions.cs b/src/Stripe.net/Services/Billing/MeterEventAdjustments/MeterEventAdjustmentCancelOptions.cs index 2553ef0a2c..1423f1478f 100644 --- a/src/Stripe.net/Services/Billing/MeterEventAdjustments/MeterEventAdjustmentCancelOptions.cs +++ b/src/Stripe.net/Services/Billing/MeterEventAdjustments/MeterEventAdjustmentCancelOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Billing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class MeterEventAdjustmentCancelOptions : INestedOptions { @@ -10,6 +13,9 @@ public class MeterEventAdjustmentCancelOptions : INestedOptions /// receiving them. /// [JsonProperty("identifier")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("identifier")] +#endif public string Identifier { get; set; } } } diff --git a/src/Stripe.net/Services/Billing/MeterEventAdjustments/MeterEventAdjustmentCreateOptions.cs b/src/Stripe.net/Services/Billing/MeterEventAdjustments/MeterEventAdjustmentCreateOptions.cs index b72677dcf9..a3fd11299e 100644 --- a/src/Stripe.net/Services/Billing/MeterEventAdjustments/MeterEventAdjustmentCreateOptions.cs +++ b/src/Stripe.net/Services/Billing/MeterEventAdjustments/MeterEventAdjustmentCreateOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Billing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class MeterEventAdjustmentCreateOptions : BaseOptions { @@ -9,12 +12,18 @@ public class MeterEventAdjustmentCreateOptions : BaseOptions /// Specifies which event to cancel. /// [JsonProperty("cancel")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cancel")] +#endif public MeterEventAdjustmentCancelOptions Cancel { get; set; } /// /// The name of the meter event. Corresponds with the event_name field on a meter. /// [JsonProperty("event_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("event_name")] +#endif public string EventName { get; set; } /// @@ -22,6 +31,9 @@ public class MeterEventAdjustmentCreateOptions : BaseOptions /// period cancellation is not supported yet. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Billing/MeterEventSummaries/MeterEventSummaryListOptions.cs b/src/Stripe.net/Services/Billing/MeterEventSummaries/MeterEventSummaryListOptions.cs index bc1abd82a4..74033df34d 100644 --- a/src/Stripe.net/Services/Billing/MeterEventSummaries/MeterEventSummaryListOptions.cs +++ b/src/Stripe.net/Services/Billing/MeterEventSummaries/MeterEventSummaryListOptions.cs @@ -4,6 +4,9 @@ namespace Stripe.Billing using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class MeterEventSummaryListOptions : ListOptions { @@ -11,6 +14,9 @@ public class MeterEventSummaryListOptions : ListOptions /// The customer for which to fetch event summaries. /// [JsonProperty("customer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] +#endif public string Customer { get; set; } /// @@ -19,6 +25,10 @@ public class MeterEventSummaryListOptions : ListOptions /// [JsonProperty("end_time")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("end_time")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? EndTime { get; set; } /// @@ -27,6 +37,10 @@ public class MeterEventSummaryListOptions : ListOptions /// [JsonProperty("start_time")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("start_time")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? StartTime { get; set; } /// @@ -38,6 +52,9 @@ public class MeterEventSummaryListOptions : ListOptions /// One of: day, or hour. /// [JsonProperty("value_grouping_window")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value_grouping_window")] +#endif public string ValueGroupingWindow { get; set; } } } diff --git a/src/Stripe.net/Services/Billing/MeterEvents/MeterEventCreateOptions.cs b/src/Stripe.net/Services/Billing/MeterEvents/MeterEventCreateOptions.cs index 62ea158d0f..f547a2f453 100644 --- a/src/Stripe.net/Services/Billing/MeterEvents/MeterEventCreateOptions.cs +++ b/src/Stripe.net/Services/Billing/MeterEvents/MeterEventCreateOptions.cs @@ -5,6 +5,9 @@ namespace Stripe.Billing using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class MeterEventCreateOptions : BaseOptions { @@ -12,6 +15,9 @@ public class MeterEventCreateOptions : BaseOptions /// The name of the meter event. Corresponds with the event_name field on a meter. /// [JsonProperty("event_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("event_name")] +#endif public string EventName { get; set; } /// @@ -23,6 +29,9 @@ public class MeterEventCreateOptions : BaseOptions /// high-frequency operations. /// [JsonProperty("identifier")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("identifier")] +#endif public string Identifier { get; set; } /// @@ -33,6 +42,9 @@ public class MeterEventCreateOptions : BaseOptions /// href="https://docs.stripe.com/billing/subscriptions/usage-based/recording-usage#payload-key-overrides">payload. /// [JsonProperty("payload")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payload")] +#endif public Dictionary Payload { get; set; } /// @@ -42,6 +54,10 @@ public class MeterEventCreateOptions : BaseOptions /// [JsonProperty("timestamp")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("timestamp")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? Timestamp { get; set; } } } diff --git a/src/Stripe.net/Services/Billing/Meters/MeterCreateOptions.cs b/src/Stripe.net/Services/Billing/Meters/MeterCreateOptions.cs index 1f0503a396..f7d67da426 100644 --- a/src/Stripe.net/Services/Billing/Meters/MeterCreateOptions.cs +++ b/src/Stripe.net/Services/Billing/Meters/MeterCreateOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Billing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class MeterCreateOptions : BaseOptions { @@ -9,18 +12,27 @@ public class MeterCreateOptions : BaseOptions /// Fields that specify how to map a meter event to a customer. /// [JsonProperty("customer_mapping")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_mapping")] +#endif public MeterCustomerMappingOptions CustomerMapping { get; set; } /// /// The default settings to aggregate a meter's events with. /// [JsonProperty("default_aggregation")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("default_aggregation")] +#endif public MeterDefaultAggregationOptions DefaultAggregation { get; set; } /// /// The meter's name. /// [JsonProperty("display_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_name")] +#endif public string DisplayName { get; set; } /// @@ -28,6 +40,9 @@ public class MeterCreateOptions : BaseOptions /// field on meter events. /// [JsonProperty("event_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("event_name")] +#endif public string EventName { get; set; } /// @@ -35,12 +50,18 @@ public class MeterCreateOptions : BaseOptions /// One of: day, or hour. /// [JsonProperty("event_time_window")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("event_time_window")] +#endif public string EventTimeWindow { get; set; } /// /// Fields that specify how to calculate a meter event's value. /// [JsonProperty("value_settings")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value_settings")] +#endif public MeterValueSettingsOptions ValueSettings { get; set; } } } diff --git a/src/Stripe.net/Services/Billing/Meters/MeterCustomerMappingOptions.cs b/src/Stripe.net/Services/Billing/Meters/MeterCustomerMappingOptions.cs index 7af7720cef..1a5c0e7e26 100644 --- a/src/Stripe.net/Services/Billing/Meters/MeterCustomerMappingOptions.cs +++ b/src/Stripe.net/Services/Billing/Meters/MeterCustomerMappingOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Billing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class MeterCustomerMappingOptions : INestedOptions { @@ -9,12 +12,18 @@ public class MeterCustomerMappingOptions : INestedOptions /// The key in the usage event payload to use for mapping the event to a customer. /// [JsonProperty("event_payload_key")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("event_payload_key")] +#endif public string EventPayloadKey { get; set; } /// /// The method for mapping a meter event to a customer. Must be by_id. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Billing/Meters/MeterDefaultAggregationOptions.cs b/src/Stripe.net/Services/Billing/Meters/MeterDefaultAggregationOptions.cs index 97a8e81ca9..7c7de951ba 100644 --- a/src/Stripe.net/Services/Billing/Meters/MeterDefaultAggregationOptions.cs +++ b/src/Stripe.net/Services/Billing/Meters/MeterDefaultAggregationOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Billing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class MeterDefaultAggregationOptions : INestedOptions { @@ -11,6 +14,9 @@ public class MeterDefaultAggregationOptions : INestedOptions /// One of: count, or sum. /// [JsonProperty("formula")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("formula")] +#endif public string Formula { get; set; } } } diff --git a/src/Stripe.net/Services/Billing/Meters/MeterListOptions.cs b/src/Stripe.net/Services/Billing/Meters/MeterListOptions.cs index 318617da7e..b194934cd9 100644 --- a/src/Stripe.net/Services/Billing/Meters/MeterListOptions.cs +++ b/src/Stripe.net/Services/Billing/Meters/MeterListOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Billing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class MeterListOptions : ListOptions { @@ -10,6 +13,9 @@ public class MeterListOptions : ListOptions /// One of: active, or inactive. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } } } diff --git a/src/Stripe.net/Services/Billing/Meters/MeterUpdateOptions.cs b/src/Stripe.net/Services/Billing/Meters/MeterUpdateOptions.cs index 320ffcddf5..c71de2995b 100644 --- a/src/Stripe.net/Services/Billing/Meters/MeterUpdateOptions.cs +++ b/src/Stripe.net/Services/Billing/Meters/MeterUpdateOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Billing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class MeterUpdateOptions : BaseOptions { @@ -9,6 +12,9 @@ public class MeterUpdateOptions : BaseOptions /// The meter's name. /// [JsonProperty("display_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_name")] +#endif public string DisplayName { get; set; } } } diff --git a/src/Stripe.net/Services/Billing/Meters/MeterValueSettingsOptions.cs b/src/Stripe.net/Services/Billing/Meters/MeterValueSettingsOptions.cs index 35935784bd..0de06e1a88 100644 --- a/src/Stripe.net/Services/Billing/Meters/MeterValueSettingsOptions.cs +++ b/src/Stripe.net/Services/Billing/Meters/MeterValueSettingsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Billing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class MeterValueSettingsOptions : INestedOptions { @@ -11,6 +14,9 @@ public class MeterValueSettingsOptions : INestedOptions /// event_payload_key to "bytes_used". /// [JsonProperty("event_payload_key")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("event_payload_key")] +#endif public string EventPayloadKey { get; set; } } } diff --git a/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationBusinessProfileOptions.cs b/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationBusinessProfileOptions.cs index 821ddf3cb9..2c6ce155bf 100644 --- a/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationBusinessProfileOptions.cs +++ b/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationBusinessProfileOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.BillingPortal { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfigurationBusinessProfileOptions : INestedOptions { @@ -9,18 +12,27 @@ public class ConfigurationBusinessProfileOptions : INestedOptions /// The messaging shown to customers in the portal. /// [JsonProperty("headline")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("headline")] +#endif public string Headline { get; set; } /// /// A link to the business’s publicly available privacy policy. /// [JsonProperty("privacy_policy_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("privacy_policy_url")] +#endif public string PrivacyPolicyUrl { get; set; } /// /// A link to the business’s publicly available terms of service. /// [JsonProperty("terms_of_service_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("terms_of_service_url")] +#endif public string TermsOfServiceUrl { get; set; } } } diff --git a/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationCreateOptions.cs b/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationCreateOptions.cs index 0a3a4e9abf..fdfaafd2bf 100644 --- a/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationCreateOptions.cs +++ b/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationCreateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.BillingPortal { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfigurationCreateOptions : BaseOptions, IHasMetadata { @@ -10,6 +13,9 @@ public class ConfigurationCreateOptions : BaseOptions, IHasMetadata /// The business information shown to customers in the portal. /// [JsonProperty("business_profile")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("business_profile")] +#endif public ConfigurationBusinessProfileOptions BusinessProfile { get; set; } /// @@ -19,12 +25,18 @@ public class ConfigurationCreateOptions : BaseOptions, IHasMetadata /// when creating the session. /// [JsonProperty("default_return_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("default_return_url")] +#endif public string DefaultReturnUrl { get; set; } /// /// Information about the features available in the portal. /// [JsonProperty("features")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("features")] +#endif public ConfigurationFeaturesOptions Features { get; set; } /// @@ -34,6 +46,9 @@ public class ConfigurationCreateOptions : BaseOptions, IHasMetadata /// docs. /// [JsonProperty("login_page")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("login_page")] +#endif public ConfigurationLoginPageOptions LoginPage { get; set; } /// @@ -43,6 +58,9 @@ public class ConfigurationCreateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } } } diff --git a/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationFeaturesCustomerUpdateOptions.cs b/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationFeaturesCustomerUpdateOptions.cs index 5d9cbffcb8..82b883607a 100644 --- a/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationFeaturesCustomerUpdateOptions.cs +++ b/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationFeaturesCustomerUpdateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.BillingPortal { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfigurationFeaturesCustomerUpdateOptions : INestedOptions { @@ -13,12 +16,18 @@ public class ConfigurationFeaturesCustomerUpdateOptions : INestedOptions /// tax_id. /// [JsonProperty("allowed_updates")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("allowed_updates")] +#endif public List AllowedUpdates { get; set; } /// /// Whether the feature is enabled. /// [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool? Enabled { get; set; } } } diff --git a/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationFeaturesInvoiceHistoryOptions.cs b/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationFeaturesInvoiceHistoryOptions.cs index 7c76d5841a..fc23910860 100644 --- a/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationFeaturesInvoiceHistoryOptions.cs +++ b/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationFeaturesInvoiceHistoryOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.BillingPortal { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfigurationFeaturesInvoiceHistoryOptions : INestedOptions { @@ -9,6 +12,9 @@ public class ConfigurationFeaturesInvoiceHistoryOptions : INestedOptions /// Whether the feature is enabled. /// [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool? Enabled { get; set; } } } diff --git a/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationFeaturesOptions.cs b/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationFeaturesOptions.cs index 532e12501f..19143fe2ae 100644 --- a/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationFeaturesOptions.cs +++ b/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationFeaturesOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.BillingPortal { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfigurationFeaturesOptions : INestedOptions { @@ -9,30 +12,45 @@ public class ConfigurationFeaturesOptions : INestedOptions /// Information about updating the customer details in the portal. /// [JsonProperty("customer_update")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_update")] +#endif public ConfigurationFeaturesCustomerUpdateOptions CustomerUpdate { get; set; } /// /// Information about showing the billing history in the portal. /// [JsonProperty("invoice_history")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("invoice_history")] +#endif public ConfigurationFeaturesInvoiceHistoryOptions InvoiceHistory { get; set; } /// /// Information about updating payment methods in the portal. /// [JsonProperty("payment_method_update")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_update")] +#endif public ConfigurationFeaturesPaymentMethodUpdateOptions PaymentMethodUpdate { get; set; } /// /// Information about canceling subscriptions in the portal. /// [JsonProperty("subscription_cancel")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("subscription_cancel")] +#endif public ConfigurationFeaturesSubscriptionCancelOptions SubscriptionCancel { get; set; } /// /// Information about updating subscriptions in the portal. /// [JsonProperty("subscription_update")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("subscription_update")] +#endif public ConfigurationFeaturesSubscriptionUpdateOptions SubscriptionUpdate { get; set; } } } diff --git a/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationFeaturesPaymentMethodUpdateOptions.cs b/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationFeaturesPaymentMethodUpdateOptions.cs index a62ce7dc5a..3e3b0b0172 100644 --- a/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationFeaturesPaymentMethodUpdateOptions.cs +++ b/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationFeaturesPaymentMethodUpdateOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.BillingPortal { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfigurationFeaturesPaymentMethodUpdateOptions : INestedOptions { @@ -9,6 +12,9 @@ public class ConfigurationFeaturesPaymentMethodUpdateOptions : INestedOptions /// Whether the feature is enabled. /// [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool? Enabled { get; set; } } } diff --git a/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationFeaturesSubscriptionCancelCancellationReasonOptions.cs b/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationFeaturesSubscriptionCancelCancellationReasonOptions.cs index c005e31e03..3f86244975 100644 --- a/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationFeaturesSubscriptionCancelCancellationReasonOptions.cs +++ b/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationFeaturesSubscriptionCancelCancellationReasonOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.BillingPortal { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfigurationFeaturesSubscriptionCancelCancellationReasonOptions : INestedOptions { @@ -10,6 +13,9 @@ public class ConfigurationFeaturesSubscriptionCancelCancellationReasonOptions : /// Whether the feature is enabled. /// [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool? Enabled { get; set; } /// @@ -19,6 +25,9 @@ public class ConfigurationFeaturesSubscriptionCancelCancellationReasonOptions : /// unused. /// [JsonProperty("options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("options")] +#endif public List Options { get; set; } } } diff --git a/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationFeaturesSubscriptionCancelOptions.cs b/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationFeaturesSubscriptionCancelOptions.cs index 02ba841eb0..b2276919d6 100644 --- a/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationFeaturesSubscriptionCancelOptions.cs +++ b/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationFeaturesSubscriptionCancelOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.BillingPortal { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfigurationFeaturesSubscriptionCancelOptions : INestedOptions { @@ -10,12 +13,18 @@ public class ConfigurationFeaturesSubscriptionCancelOptions : INestedOptions /// exposed to the customer. /// [JsonProperty("cancellation_reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cancellation_reason")] +#endif public ConfigurationFeaturesSubscriptionCancelCancellationReasonOptions CancellationReason { get; set; } /// /// Whether the feature is enabled. /// [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool? Enabled { get; set; } /// @@ -23,6 +32,9 @@ public class ConfigurationFeaturesSubscriptionCancelOptions : INestedOptions /// One of: at_period_end, or immediately. /// [JsonProperty("mode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mode")] +#endif public string Mode { get; set; } /// @@ -33,6 +45,9 @@ public class ConfigurationFeaturesSubscriptionCancelOptions : INestedOptions /// One of: always_invoice, create_prorations, or none. /// [JsonProperty("proration_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("proration_behavior")] +#endif public string ProrationBehavior { get; set; } } } diff --git a/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationFeaturesSubscriptionUpdateOptions.cs b/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationFeaturesSubscriptionUpdateOptions.cs index a74438634a..a15500cb8c 100644 --- a/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationFeaturesSubscriptionUpdateOptions.cs +++ b/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationFeaturesSubscriptionUpdateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.BillingPortal { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfigurationFeaturesSubscriptionUpdateOptions : INestedOptions { @@ -12,18 +15,27 @@ public class ConfigurationFeaturesSubscriptionUpdateOptions : INestedOptions /// One of: price, promotion_code, or quantity. /// [JsonProperty("default_allowed_updates")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("default_allowed_updates")] +#endif public List DefaultAllowedUpdates { get; set; } /// /// Whether the feature is enabled. /// [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool? Enabled { get; set; } /// /// The list of up to 10 products that support subscription updates. /// [JsonProperty("products")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("products")] +#endif public List Products { get; set; } /// @@ -32,6 +44,9 @@ public class ConfigurationFeaturesSubscriptionUpdateOptions : INestedOptions /// One of: always_invoice, create_prorations, or none. /// [JsonProperty("proration_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("proration_behavior")] +#endif public string ProrationBehavior { get; set; } /// @@ -39,6 +54,9 @@ public class ConfigurationFeaturesSubscriptionUpdateOptions : INestedOptions /// of applying immediately. /// [JsonProperty("schedule_at_period_end")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("schedule_at_period_end")] +#endif public ConfigurationFeaturesSubscriptionUpdateScheduleAtPeriodEndOptions ScheduleAtPeriodEnd { get; set; } } } diff --git a/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationFeaturesSubscriptionUpdateProductOptions.cs b/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationFeaturesSubscriptionUpdateProductOptions.cs index f43655453b..32db8197c9 100644 --- a/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationFeaturesSubscriptionUpdateProductOptions.cs +++ b/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationFeaturesSubscriptionUpdateProductOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.BillingPortal { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfigurationFeaturesSubscriptionUpdateProductOptions : INestedOptions { @@ -10,12 +13,18 @@ public class ConfigurationFeaturesSubscriptionUpdateProductOptions : INestedOpti /// The list of price IDs for the product that a subscription can be updated to. /// [JsonProperty("prices")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("prices")] +#endif public List Prices { get; set; } /// /// The product id. /// [JsonProperty("product")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("product")] +#endif public string Product { get; set; } } } diff --git a/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationFeaturesSubscriptionUpdateScheduleAtPeriodEndConditionOptions.cs b/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationFeaturesSubscriptionUpdateScheduleAtPeriodEndConditionOptions.cs index fe8b0b13a6..53d2800b4e 100644 --- a/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationFeaturesSubscriptionUpdateScheduleAtPeriodEndConditionOptions.cs +++ b/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationFeaturesSubscriptionUpdateScheduleAtPeriodEndConditionOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.BillingPortal { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfigurationFeaturesSubscriptionUpdateScheduleAtPeriodEndConditionOptions : INestedOptions { @@ -10,6 +13,9 @@ public class ConfigurationFeaturesSubscriptionUpdateScheduleAtPeriodEndCondition /// One of: decreasing_item_amount, or shortening_interval. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationFeaturesSubscriptionUpdateScheduleAtPeriodEndOptions.cs b/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationFeaturesSubscriptionUpdateScheduleAtPeriodEndOptions.cs index 1e05d554c5..ff88a27a64 100644 --- a/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationFeaturesSubscriptionUpdateScheduleAtPeriodEndOptions.cs +++ b/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationFeaturesSubscriptionUpdateScheduleAtPeriodEndOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.BillingPortal { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfigurationFeaturesSubscriptionUpdateScheduleAtPeriodEndOptions : INestedOptions { @@ -11,6 +14,9 @@ public class ConfigurationFeaturesSubscriptionUpdateScheduleAtPeriodEndOptions : /// of the current period. /// [JsonProperty("conditions")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("conditions")] +#endif public List Conditions { get; set; } } } diff --git a/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationListOptions.cs b/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationListOptions.cs index 6991062123..9046b19b88 100644 --- a/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationListOptions.cs +++ b/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationListOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.BillingPortal { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfigurationListOptions : ListOptions { @@ -10,6 +13,9 @@ public class ConfigurationListOptions : ListOptions /// list active configurations). /// [JsonProperty("active")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("active")] +#endif public bool? Active { get; set; } /// @@ -17,6 +23,9 @@ public class ConfigurationListOptions : ListOptions /// list the default configuration). /// [JsonProperty("is_default")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("is_default")] +#endif public bool? IsDefault { get; set; } } } diff --git a/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationLoginPageOptions.cs b/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationLoginPageOptions.cs index 4db3eff9da..a8665a9159 100644 --- a/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationLoginPageOptions.cs +++ b/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationLoginPageOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.BillingPortal { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfigurationLoginPageOptions : INestedOptions { @@ -13,6 +16,9 @@ public class ConfigurationLoginPageOptions : INestedOptions /// Set to false to deactivate the login_page.url. /// [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool? Enabled { get; set; } } } diff --git a/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationUpdateOptions.cs b/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationUpdateOptions.cs index 545039751d..052f396b30 100644 --- a/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationUpdateOptions.cs +++ b/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationUpdateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.BillingPortal { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfigurationUpdateOptions : BaseOptions, IHasMetadata { @@ -10,12 +13,18 @@ public class ConfigurationUpdateOptions : BaseOptions, IHasMetadata /// Whether the configuration is active and can be used to create portal sessions. /// [JsonProperty("active")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("active")] +#endif public bool? Active { get; set; } /// /// The business information shown to customers in the portal. /// [JsonProperty("business_profile")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("business_profile")] +#endif public ConfigurationBusinessProfileOptions BusinessProfile { get; set; } /// @@ -25,12 +34,18 @@ public class ConfigurationUpdateOptions : BaseOptions, IHasMetadata /// when creating the session. /// [JsonProperty("default_return_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("default_return_url")] +#endif public string DefaultReturnUrl { get; set; } /// /// Information about the features available in the portal. /// [JsonProperty("features")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("features")] +#endif public ConfigurationFeaturesOptions Features { get; set; } /// @@ -40,6 +55,9 @@ public class ConfigurationUpdateOptions : BaseOptions, IHasMetadata /// docs. /// [JsonProperty("login_page")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("login_page")] +#endif public ConfigurationLoginPageOptions LoginPage { get; set; } /// @@ -49,6 +67,9 @@ public class ConfigurationUpdateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } } } diff --git a/src/Stripe.net/Services/BillingPortal/Sessions/SessionCreateOptions.cs b/src/Stripe.net/Services/BillingPortal/Sessions/SessionCreateOptions.cs index 37fe74e124..18fe2083ce 100644 --- a/src/Stripe.net/Services/BillingPortal/Sessions/SessionCreateOptions.cs +++ b/src/Stripe.net/Services/BillingPortal/Sessions/SessionCreateOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.BillingPortal { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionCreateOptions : BaseOptions { @@ -12,12 +15,18 @@ public class SessionCreateOptions : BaseOptions /// session uses the default configuration. /// [JsonProperty("configuration")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("configuration")] +#endif public string Configuration { get; set; } /// /// The ID of an existing customer. /// [JsonProperty("customer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] +#endif public string Customer { get; set; } /// @@ -26,6 +35,9 @@ public class SessionCreateOptions : BaseOptions /// more about using customer portal deep links and flows. /// [JsonProperty("flow_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("flow_data")] +#endif public SessionFlowDataOptions FlowData { get; set; } /// @@ -40,6 +52,9 @@ public class SessionCreateOptions : BaseOptions /// tr, vi, zh, zh-HK, or zh-TW. /// [JsonProperty("locale")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("locale")] +#endif public string Locale { get; set; } /// @@ -53,6 +68,9 @@ public class SessionCreateOptions : BaseOptions /// displays. /// [JsonProperty("on_behalf_of")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("on_behalf_of")] +#endif public string OnBehalfOf { get; set; } /// @@ -60,6 +78,9 @@ public class SessionCreateOptions : BaseOptions /// to your website. /// [JsonProperty("return_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("return_url")] +#endif public string ReturnUrl { get; set; } } } diff --git a/src/Stripe.net/Services/BillingPortal/Sessions/SessionFlowDataAfterCompletionHostedConfirmationOptions.cs b/src/Stripe.net/Services/BillingPortal/Sessions/SessionFlowDataAfterCompletionHostedConfirmationOptions.cs index 3ccd442481..5890b3f5a0 100644 --- a/src/Stripe.net/Services/BillingPortal/Sessions/SessionFlowDataAfterCompletionHostedConfirmationOptions.cs +++ b/src/Stripe.net/Services/BillingPortal/Sessions/SessionFlowDataAfterCompletionHostedConfirmationOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.BillingPortal { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionFlowDataAfterCompletionHostedConfirmationOptions : INestedOptions { @@ -9,6 +12,9 @@ public class SessionFlowDataAfterCompletionHostedConfirmationOptions : INestedOp /// A custom message to display to the customer after the flow is completed. /// [JsonProperty("custom_message")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("custom_message")] +#endif public string CustomMessage { get; set; } } } diff --git a/src/Stripe.net/Services/BillingPortal/Sessions/SessionFlowDataAfterCompletionOptions.cs b/src/Stripe.net/Services/BillingPortal/Sessions/SessionFlowDataAfterCompletionOptions.cs index a1ee6972c7..5361ef4a57 100644 --- a/src/Stripe.net/Services/BillingPortal/Sessions/SessionFlowDataAfterCompletionOptions.cs +++ b/src/Stripe.net/Services/BillingPortal/Sessions/SessionFlowDataAfterCompletionOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.BillingPortal { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionFlowDataAfterCompletionOptions : INestedOptions { @@ -9,12 +12,18 @@ public class SessionFlowDataAfterCompletionOptions : INestedOptions /// Configuration when after_completion.type=hosted_confirmation. /// [JsonProperty("hosted_confirmation")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("hosted_confirmation")] +#endif public SessionFlowDataAfterCompletionHostedConfirmationOptions HostedConfirmation { get; set; } /// /// Configuration when after_completion.type=redirect. /// [JsonProperty("redirect")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("redirect")] +#endif public SessionFlowDataAfterCompletionRedirectOptions Redirect { get; set; } /// @@ -22,6 +31,9 @@ public class SessionFlowDataAfterCompletionOptions : INestedOptions /// One of: hosted_confirmation, portal_homepage, or redirect. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/BillingPortal/Sessions/SessionFlowDataAfterCompletionRedirectOptions.cs b/src/Stripe.net/Services/BillingPortal/Sessions/SessionFlowDataAfterCompletionRedirectOptions.cs index 2ea4cae1ad..ccb3e9e800 100644 --- a/src/Stripe.net/Services/BillingPortal/Sessions/SessionFlowDataAfterCompletionRedirectOptions.cs +++ b/src/Stripe.net/Services/BillingPortal/Sessions/SessionFlowDataAfterCompletionRedirectOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.BillingPortal { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionFlowDataAfterCompletionRedirectOptions : INestedOptions { @@ -9,6 +12,9 @@ public class SessionFlowDataAfterCompletionRedirectOptions : INestedOptions /// The URL the customer will be redirected to after the flow is completed. /// [JsonProperty("return_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("return_url")] +#endif public string ReturnUrl { get; set; } } } diff --git a/src/Stripe.net/Services/BillingPortal/Sessions/SessionFlowDataOptions.cs b/src/Stripe.net/Services/BillingPortal/Sessions/SessionFlowDataOptions.cs index c40d90b2e2..421feb191b 100644 --- a/src/Stripe.net/Services/BillingPortal/Sessions/SessionFlowDataOptions.cs +++ b/src/Stripe.net/Services/BillingPortal/Sessions/SessionFlowDataOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.BillingPortal { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionFlowDataOptions : INestedOptions { @@ -9,24 +12,36 @@ public class SessionFlowDataOptions : INestedOptions /// Behavior after the flow is completed. /// [JsonProperty("after_completion")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("after_completion")] +#endif public SessionFlowDataAfterCompletionOptions AfterCompletion { get; set; } /// /// Configuration when flow_data.type=subscription_cancel. /// [JsonProperty("subscription_cancel")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("subscription_cancel")] +#endif public SessionFlowDataSubscriptionCancelOptions SubscriptionCancel { get; set; } /// /// Configuration when flow_data.type=subscription_update. /// [JsonProperty("subscription_update")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("subscription_update")] +#endif public SessionFlowDataSubscriptionUpdateOptions SubscriptionUpdate { get; set; } /// /// Configuration when flow_data.type=subscription_update_confirm. /// [JsonProperty("subscription_update_confirm")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("subscription_update_confirm")] +#endif public SessionFlowDataSubscriptionUpdateConfirmOptions SubscriptionUpdateConfirm { get; set; } /// @@ -35,6 +50,9 @@ public class SessionFlowDataOptions : INestedOptions /// subscription_update, or subscription_update_confirm. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/BillingPortal/Sessions/SessionFlowDataSubscriptionCancelOptions.cs b/src/Stripe.net/Services/BillingPortal/Sessions/SessionFlowDataSubscriptionCancelOptions.cs index 6921969b95..cf2de52a5e 100644 --- a/src/Stripe.net/Services/BillingPortal/Sessions/SessionFlowDataSubscriptionCancelOptions.cs +++ b/src/Stripe.net/Services/BillingPortal/Sessions/SessionFlowDataSubscriptionCancelOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.BillingPortal { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionFlowDataSubscriptionCancelOptions : INestedOptions { @@ -9,12 +12,18 @@ public class SessionFlowDataSubscriptionCancelOptions : INestedOptions /// Specify a retention strategy to be used in the cancellation flow. /// [JsonProperty("retention")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("retention")] +#endif public SessionFlowDataSubscriptionCancelRetentionOptions Retention { get; set; } /// /// The ID of the subscription to be canceled. /// [JsonProperty("subscription")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("subscription")] +#endif public string Subscription { get; set; } } } diff --git a/src/Stripe.net/Services/BillingPortal/Sessions/SessionFlowDataSubscriptionCancelRetentionCouponOfferOptions.cs b/src/Stripe.net/Services/BillingPortal/Sessions/SessionFlowDataSubscriptionCancelRetentionCouponOfferOptions.cs index aae7c75e40..cba7c838d4 100644 --- a/src/Stripe.net/Services/BillingPortal/Sessions/SessionFlowDataSubscriptionCancelRetentionCouponOfferOptions.cs +++ b/src/Stripe.net/Services/BillingPortal/Sessions/SessionFlowDataSubscriptionCancelRetentionCouponOfferOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.BillingPortal { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionFlowDataSubscriptionCancelRetentionCouponOfferOptions : INestedOptions { @@ -9,6 +12,9 @@ public class SessionFlowDataSubscriptionCancelRetentionCouponOfferOptions : INes /// The ID of the coupon to be offered. /// [JsonProperty("coupon")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("coupon")] +#endif public string Coupon { get; set; } } } diff --git a/src/Stripe.net/Services/BillingPortal/Sessions/SessionFlowDataSubscriptionCancelRetentionOptions.cs b/src/Stripe.net/Services/BillingPortal/Sessions/SessionFlowDataSubscriptionCancelRetentionOptions.cs index 4cb8a5cf7c..9ebd26ba8d 100644 --- a/src/Stripe.net/Services/BillingPortal/Sessions/SessionFlowDataSubscriptionCancelRetentionOptions.cs +++ b/src/Stripe.net/Services/BillingPortal/Sessions/SessionFlowDataSubscriptionCancelRetentionOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.BillingPortal { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionFlowDataSubscriptionCancelRetentionOptions : INestedOptions { @@ -9,12 +12,18 @@ public class SessionFlowDataSubscriptionCancelRetentionOptions : INestedOptions /// Configuration when retention.type=coupon_offer. /// [JsonProperty("coupon_offer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("coupon_offer")] +#endif public SessionFlowDataSubscriptionCancelRetentionCouponOfferOptions CouponOffer { get; set; } /// /// Type of retention strategy to use with the customer. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/BillingPortal/Sessions/SessionFlowDataSubscriptionUpdateConfirmDiscountOptions.cs b/src/Stripe.net/Services/BillingPortal/Sessions/SessionFlowDataSubscriptionUpdateConfirmDiscountOptions.cs index 8eef46c0cc..08f9dd540b 100644 --- a/src/Stripe.net/Services/BillingPortal/Sessions/SessionFlowDataSubscriptionUpdateConfirmDiscountOptions.cs +++ b/src/Stripe.net/Services/BillingPortal/Sessions/SessionFlowDataSubscriptionUpdateConfirmDiscountOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.BillingPortal { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionFlowDataSubscriptionUpdateConfirmDiscountOptions : INestedOptions { @@ -9,12 +12,18 @@ public class SessionFlowDataSubscriptionUpdateConfirmDiscountOptions : INestedOp /// The ID of the coupon to apply to this subscription update. /// [JsonProperty("coupon")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("coupon")] +#endif public string Coupon { get; set; } /// /// The ID of a promotion code to apply to this subscription update. /// [JsonProperty("promotion_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("promotion_code")] +#endif public string PromotionCode { get; set; } } } diff --git a/src/Stripe.net/Services/BillingPortal/Sessions/SessionFlowDataSubscriptionUpdateConfirmItemOptions.cs b/src/Stripe.net/Services/BillingPortal/Sessions/SessionFlowDataSubscriptionUpdateConfirmItemOptions.cs index dd979ea742..3274e2d588 100644 --- a/src/Stripe.net/Services/BillingPortal/Sessions/SessionFlowDataSubscriptionUpdateConfirmItemOptions.cs +++ b/src/Stripe.net/Services/BillingPortal/Sessions/SessionFlowDataSubscriptionUpdateConfirmItemOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.BillingPortal { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionFlowDataSubscriptionUpdateConfirmItemOptions : INestedOptions, IHasId { @@ -11,6 +14,9 @@ public class SessionFlowDataSubscriptionUpdateConfirmItemOptions : INestedOption /// item to be updated. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// @@ -19,6 +25,9 @@ public class SessionFlowDataSubscriptionUpdateConfirmItemOptions : INestedOption /// href="https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-features-subscription_update-products">features.subscription_update.products. /// [JsonProperty("price")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("price")] +#endif public string Price { get; set; } /// @@ -26,6 +35,9 @@ public class SessionFlowDataSubscriptionUpdateConfirmItemOptions : INestedOption /// that the customer should subscribe to through this flow. /// [JsonProperty("quantity")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("quantity")] +#endif public long? Quantity { get; set; } } } diff --git a/src/Stripe.net/Services/BillingPortal/Sessions/SessionFlowDataSubscriptionUpdateConfirmOptions.cs b/src/Stripe.net/Services/BillingPortal/Sessions/SessionFlowDataSubscriptionUpdateConfirmOptions.cs index 6d766a7eff..a76f794c49 100644 --- a/src/Stripe.net/Services/BillingPortal/Sessions/SessionFlowDataSubscriptionUpdateConfirmOptions.cs +++ b/src/Stripe.net/Services/BillingPortal/Sessions/SessionFlowDataSubscriptionUpdateConfirmOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.BillingPortal { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionFlowDataSubscriptionUpdateConfirmOptions : INestedOptions { @@ -11,6 +14,9 @@ public class SessionFlowDataSubscriptionUpdateConfirmOptions : INestedOptions /// one may be specified. /// [JsonProperty("discounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discounts")] +#endif public List Discounts { get; set; } /// @@ -19,12 +25,18 @@ public class SessionFlowDataSubscriptionUpdateConfirmOptions : INestedOptions /// with multiple items are not updatable. /// [JsonProperty("items")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("items")] +#endif public List Items { get; set; } /// /// The ID of the subscription to be updated. /// [JsonProperty("subscription")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("subscription")] +#endif public string Subscription { get; set; } } } diff --git a/src/Stripe.net/Services/BillingPortal/Sessions/SessionFlowDataSubscriptionUpdateOptions.cs b/src/Stripe.net/Services/BillingPortal/Sessions/SessionFlowDataSubscriptionUpdateOptions.cs index 9a1b9439bd..4fece253ce 100644 --- a/src/Stripe.net/Services/BillingPortal/Sessions/SessionFlowDataSubscriptionUpdateOptions.cs +++ b/src/Stripe.net/Services/BillingPortal/Sessions/SessionFlowDataSubscriptionUpdateOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.BillingPortal { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionFlowDataSubscriptionUpdateOptions : INestedOptions { @@ -9,6 +12,9 @@ public class SessionFlowDataSubscriptionUpdateOptions : INestedOptions /// The ID of the subscription to be updated. /// [JsonProperty("subscription")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("subscription")] +#endif public string Subscription { get; set; } } } diff --git a/src/Stripe.net/Services/Cards/CardDocumentsBankAccountOwnershipVerificationOptions.cs b/src/Stripe.net/Services/Cards/CardDocumentsBankAccountOwnershipVerificationOptions.cs index a58fb47ed8..4fc48b5c2d 100644 --- a/src/Stripe.net/Services/Cards/CardDocumentsBankAccountOwnershipVerificationOptions.cs +++ b/src/Stripe.net/Services/Cards/CardDocumentsBankAccountOwnershipVerificationOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CardDocumentsBankAccountOwnershipVerificationOptions : INestedOptions { @@ -12,6 +15,9 @@ public class CardDocumentsBankAccountOwnershipVerificationOptions : INestedOptio /// value of account_requirement. /// [JsonProperty("files")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("files")] +#endif public List Files { get; set; } } } diff --git a/src/Stripe.net/Services/Cards/CardDocumentsOptions.cs b/src/Stripe.net/Services/Cards/CardDocumentsOptions.cs index 4142de7c8b..eb78df0bec 100644 --- a/src/Stripe.net/Services/Cards/CardDocumentsOptions.cs +++ b/src/Stripe.net/Services/Cards/CardDocumentsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CardDocumentsOptions : INestedOptions { @@ -13,6 +16,9 @@ public class CardDocumentsOptions : INestedOptions /// or a check. /// [JsonProperty("bank_account_ownership_verification")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_account_ownership_verification")] +#endif public CardDocumentsBankAccountOwnershipVerificationOptions BankAccountOwnershipVerification { get; set; } } } diff --git a/src/Stripe.net/Services/Cards/CardUpdateOptions.cs b/src/Stripe.net/Services/Cards/CardUpdateOptions.cs index f1ff562d00..a009aa279c 100644 --- a/src/Stripe.net/Services/Cards/CardUpdateOptions.cs +++ b/src/Stripe.net/Services/Cards/CardUpdateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CardUpdateOptions : BaseOptions, IHasMetadata { @@ -12,60 +15,90 @@ public class CardUpdateOptions : BaseOptions, IHasMetadata /// One of: checking, futsu, savings, or toza. /// [JsonProperty("account_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_type")] +#endif public string AccountType { get; set; } /// /// City/District/Suburb/Town/Village. /// [JsonProperty("address_city")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_city")] +#endif public string AddressCity { get; set; } /// /// Billing address country, if provided when creating card. /// [JsonProperty("address_country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_country")] +#endif public string AddressCountry { get; set; } /// /// Address line 1 (Street address/PO Box/Company name). /// [JsonProperty("address_line1")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_line1")] +#endif public string AddressLine1 { get; set; } /// /// Address line 2 (Apartment/Suite/Unit/Building). /// [JsonProperty("address_line2")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_line2")] +#endif public string AddressLine2 { get; set; } /// /// State/County/Province/Region. /// [JsonProperty("address_state")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_state")] +#endif public string AddressState { get; set; } /// /// ZIP or postal code. /// [JsonProperty("address_zip")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_zip")] +#endif public string AddressZip { get; set; } /// /// Documents that may be submitted to satisfy various informational requests. /// [JsonProperty("documents")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("documents")] +#endif public CardDocumentsOptions Documents { get; set; } /// /// Two digit number representing the card’s expiration month. /// [JsonProperty("exp_month")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("exp_month")] +#endif public long? ExpMonth { get; set; } /// /// Four digit number representing the card’s expiration year. /// [JsonProperty("exp_year")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("exp_year")] +#endif public long? ExpYear { get; set; } /// @@ -75,15 +108,24 @@ public class CardUpdateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// Cardholder name. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } [JsonProperty("validate")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("validate")] +#endif public bool? Validate { get; set; } } } diff --git a/src/Stripe.net/Services/Charges/CardCreateNestedOptions.cs b/src/Stripe.net/Services/Charges/CardCreateNestedOptions.cs index 756bd4d31e..4626a124ef 100644 --- a/src/Stripe.net/Services/Charges/CardCreateNestedOptions.cs +++ b/src/Stripe.net/Services/Charges/CardCreateNestedOptions.cs @@ -3,37 +3,70 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CardCreateNestedOptions : INestedOptions, IHasMetadata, IHasObject { [JsonProperty("address_city")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_city")] +#endif public string AddressCity { get; set; } [JsonProperty("address_country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_country")] +#endif public string AddressCountry { get; set; } [JsonProperty("address_line1")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_line1")] +#endif public string AddressLine1 { get; set; } [JsonProperty("address_line2")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_line2")] +#endif public string AddressLine2 { get; set; } [JsonProperty("address_state")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_state")] +#endif public string AddressState { get; set; } [JsonProperty("address_zip")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_zip")] +#endif public string AddressZip { get; set; } [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } [JsonProperty("cvc")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cvc")] +#endif public string Cvc { get; set; } [JsonProperty("exp_month")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("exp_month")] +#endif public long? ExpMonth { get; set; } [JsonProperty("exp_year")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("exp_year")] +#endif public long? ExpYear { get; set; } /// @@ -42,15 +75,27 @@ public class CardCreateNestedOptions : INestedOptions, IHasMetadata, IHasObject /// object in a structured format. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } [JsonProperty("number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("number")] +#endif public string Number { get; set; } [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } = "card"; } } diff --git a/src/Stripe.net/Services/Charges/ChargeCaptureOptions.cs b/src/Stripe.net/Services/Charges/ChargeCaptureOptions.cs index c3d6745163..96adcdb53a 100644 --- a/src/Stripe.net/Services/Charges/ChargeCaptureOptions.cs +++ b/src/Stripe.net/Services/Charges/ChargeCaptureOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ChargeCaptureOptions : BaseOptions { @@ -10,12 +13,18 @@ public class ChargeCaptureOptions : BaseOptions /// additional amount will be automatically refunded. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long? Amount { get; set; } /// /// An application fee to add on to this charge. /// [JsonProperty("application_fee")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("application_fee")] +#endif public long? ApplicationFee { get; set; } /// @@ -23,9 +32,15 @@ public class ChargeCaptureOptions : BaseOptions /// the original amount. /// [JsonProperty("application_fee_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("application_fee_amount")] +#endif public long? ApplicationFeeAmount { get; set; } [JsonProperty("exchange_rate")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("exchange_rate")] +#endif public decimal? ExchangeRate { get; set; } /// @@ -34,6 +49,9 @@ public class ChargeCaptureOptions : BaseOptions /// sent in test mode. /// [JsonProperty("receipt_email")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("receipt_email")] +#endif public string ReceiptEmail { get; set; } /// @@ -47,6 +65,9 @@ public class ChargeCaptureOptions : BaseOptions /// statement_descriptor_suffix, in which case this value is used as the suffix. /// [JsonProperty("statement_descriptor")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("statement_descriptor")] +#endif public string StatementDescriptor { get; set; } /// @@ -57,6 +78,9 @@ public class ChargeCaptureOptions : BaseOptions /// the account's statement descriptor. /// [JsonProperty("statement_descriptor_suffix")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("statement_descriptor_suffix")] +#endif public string StatementDescriptorSuffix { get; set; } /// @@ -65,6 +89,9 @@ public class ChargeCaptureOptions : BaseOptions /// the Connect documentation for details. /// [JsonProperty("transfer_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transfer_data")] +#endif public ChargeTransferDataOptions TransferData { get; set; } /// @@ -74,6 +101,9 @@ public class ChargeCaptureOptions : BaseOptions /// documentation for details. /// [JsonProperty("transfer_group")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transfer_group")] +#endif public string TransferGroup { get; set; } } } diff --git a/src/Stripe.net/Services/Charges/ChargeCreateOptions.cs b/src/Stripe.net/Services/Charges/ChargeCreateOptions.cs index 90ceb68f6a..9811574aa8 100644 --- a/src/Stripe.net/Services/Charges/ChargeCreateOptions.cs +++ b/src/Stripe.net/Services/Charges/ChargeCreateOptions.cs @@ -4,6 +4,9 @@ namespace Stripe using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ChargeCreateOptions : BaseOptions, IHasMetadata { @@ -17,6 +20,9 @@ public class ChargeCreateOptions : BaseOptions, IHasMetadata /// 99999999 for a USD charge of $999,999.99). /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long? Amount { get; set; } /// @@ -27,6 +33,9 @@ public class ChargeCreateOptions : BaseOptions, IHasMetadata /// href="https://stripe.com/docs/connect/direct-charges#collect-fees">documentation. /// [JsonProperty("application_fee_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("application_fee_amount")] +#endif public long? ApplicationFeeAmount { get; set; } /// @@ -38,6 +47,9 @@ public class ChargeCreateOptions : BaseOptions, IHasMetadata /// later documentation. /// [JsonProperty("capture")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("capture")] +#endif public bool? Capture { get; set; } /// @@ -46,12 +58,18 @@ public class ChargeCreateOptions : BaseOptions, IHasMetadata /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// /// The ID of an existing customer that will be charged in this request. /// [JsonProperty("customer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] +#endif public string Customer { get; set; } /// @@ -61,15 +79,27 @@ public class ChargeCreateOptions : BaseOptions, IHasMetadata /// description of the charge(s) that they are describing. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } [JsonProperty("destination")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("destination")] +#endif public ChargeDestinationOptions Destination { get; set; } [JsonProperty("exchange_rate")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("exchange_rate")] +#endif public decimal? ExchangeRate { get; set; } [JsonProperty("level3")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("level3")] +#endif public ChargeLevel3Options Level3 { get; set; } /// @@ -79,6 +109,9 @@ public class ChargeCreateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -88,6 +121,9 @@ public class ChargeCreateOptions : BaseOptions, IHasMetadata /// Separate Charges and Transfers. /// [JsonProperty("on_behalf_of")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("on_behalf_of")] +#endif public string OnBehalfOf { get; set; } /// @@ -96,6 +132,9 @@ public class ChargeCreateOptions : BaseOptions, IHasMetadata /// information. /// [JsonProperty("radar_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("radar_options")] +#endif public ChargeRadarOptionsOptions RadarOptions { get; set; } /// @@ -109,12 +148,18 @@ public class ChargeCreateOptions : BaseOptions, IHasMetadata /// href="https://dashboard.stripe.com/account/emails">email settings. /// [JsonProperty("receipt_email")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("receipt_email")] +#endif public string ReceiptEmail { get; set; } /// /// Shipping information for the charge. Helps prevent fraud on charges for physical goods. /// [JsonProperty("shipping")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping")] +#endif public ChargeShippingOptions Shipping { get; set; } /// @@ -132,6 +177,10 @@ public class ChargeCreateOptions : BaseOptions, IHasMetadata /// [JsonProperty("source")] [JsonConverter(typeof(AnyOfConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("source")] + [STJS.JsonConverter(typeof(STJAnyOfConverter))] +#endif public AnyOf Source { get; set; } /// @@ -145,6 +194,9 @@ public class ChargeCreateOptions : BaseOptions, IHasMetadata /// statement_descriptor_suffix, in which case this value is used as the suffix. /// [JsonProperty("statement_descriptor")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("statement_descriptor")] +#endif public string StatementDescriptor { get; set; } /// @@ -155,6 +207,9 @@ public class ChargeCreateOptions : BaseOptions, IHasMetadata /// the account's statement descriptor. /// [JsonProperty("statement_descriptor_suffix")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("statement_descriptor_suffix")] +#endif public string StatementDescriptorSuffix { get; set; } /// @@ -163,6 +218,9 @@ public class ChargeCreateOptions : BaseOptions, IHasMetadata /// the Connect documentation for details. /// [JsonProperty("transfer_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transfer_data")] +#endif public ChargeTransferDataOptions TransferData { get; set; } /// @@ -171,6 +229,9 @@ public class ChargeCreateOptions : BaseOptions, IHasMetadata /// transactions. /// [JsonProperty("transfer_group")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transfer_group")] +#endif public string TransferGroup { get; set; } } } diff --git a/src/Stripe.net/Services/Charges/ChargeDestinationOptions.cs b/src/Stripe.net/Services/Charges/ChargeDestinationOptions.cs index 4700d1f4f4..ad3b39891c 100644 --- a/src/Stripe.net/Services/Charges/ChargeDestinationOptions.cs +++ b/src/Stripe.net/Services/Charges/ChargeDestinationOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ChargeDestinationOptions : INestedOptions { @@ -9,6 +12,9 @@ public class ChargeDestinationOptions : INestedOptions /// ID of an existing, connected Stripe account. /// [JsonProperty("account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account")] +#endif public string Account { get; set; } /// @@ -17,6 +23,9 @@ public class ChargeDestinationOptions : INestedOptions /// less than or equal to the charge amount. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long? Amount { get; set; } } } diff --git a/src/Stripe.net/Services/Charges/ChargeFraudDetailsOptions.cs b/src/Stripe.net/Services/Charges/ChargeFraudDetailsOptions.cs index 4ea564ff6c..4802d37301 100644 --- a/src/Stripe.net/Services/Charges/ChargeFraudDetailsOptions.cs +++ b/src/Stripe.net/Services/Charges/ChargeFraudDetailsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ChargeFraudDetailsOptions : INestedOptions { @@ -10,6 +13,9 @@ public class ChargeFraudDetailsOptions : INestedOptions /// One of: fraudulent, or safe. /// [JsonProperty("user_report")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("user_report")] +#endif public string UserReport { get; set; } } } diff --git a/src/Stripe.net/Services/Charges/ChargeLevel3LineItemOptions.cs b/src/Stripe.net/Services/Charges/ChargeLevel3LineItemOptions.cs index e3422944a0..7525abf87e 100644 --- a/src/Stripe.net/Services/Charges/ChargeLevel3LineItemOptions.cs +++ b/src/Stripe.net/Services/Charges/ChargeLevel3LineItemOptions.cs @@ -2,25 +2,46 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ChargeLevel3LineItemOptions : INestedOptions { [JsonProperty("discount_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discount_amount")] +#endif public long? DiscountAmount { get; set; } [JsonProperty("product_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("product_code")] +#endif public string ProductCode { get; set; } [JsonProperty("product_description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("product_description")] +#endif public string ProductDescription { get; set; } [JsonProperty("quantity")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("quantity")] +#endif public long? Quantity { get; set; } [JsonProperty("tax_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_amount")] +#endif public long? TaxAmount { get; set; } [JsonProperty("unit_cost")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_cost")] +#endif public long? UnitCost { get; set; } } } diff --git a/src/Stripe.net/Services/Charges/ChargeLevel3Options.cs b/src/Stripe.net/Services/Charges/ChargeLevel3Options.cs index f16ec38994..2bfc433b50 100644 --- a/src/Stripe.net/Services/Charges/ChargeLevel3Options.cs +++ b/src/Stripe.net/Services/Charges/ChargeLevel3Options.cs @@ -3,25 +3,46 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ChargeLevel3Options : INestedOptions { [JsonProperty("customer_reference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_reference")] +#endif public string CustomerReference { get; set; } [JsonProperty("line_items")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("line_items")] +#endif public List LineItems { get; set; } [JsonProperty("merchant_reference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("merchant_reference")] +#endif public string MerchantReference { get; set; } [JsonProperty("shipping_address_zip")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping_address_zip")] +#endif public string ShippingAddressZip { get; set; } [JsonProperty("shipping_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping_amount")] +#endif public long? ShippingAmount { get; set; } [JsonProperty("shipping_from_zip")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping_from_zip")] +#endif public string ShippingFromZip { get; set; } } } diff --git a/src/Stripe.net/Services/Charges/ChargeListOptions.cs b/src/Stripe.net/Services/Charges/ChargeListOptions.cs index b29c866700..ddf807d2fd 100644 --- a/src/Stripe.net/Services/Charges/ChargeListOptions.cs +++ b/src/Stripe.net/Services/Charges/ChargeListOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ChargeListOptions : ListOptionsWithCreated { @@ -9,6 +12,9 @@ public class ChargeListOptions : ListOptionsWithCreated /// Only return charges for the customer specified by this customer ID. /// [JsonProperty("customer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] +#endif public string Customer { get; set; } /// @@ -16,12 +22,18 @@ public class ChargeListOptions : ListOptionsWithCreated /// PaymentIntent ID. /// [JsonProperty("payment_intent")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_intent")] +#endif public string PaymentIntent { get; set; } /// /// Only return charges for this transfer group, limited to 100. /// [JsonProperty("transfer_group")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transfer_group")] +#endif public string TransferGroup { get; set; } } } diff --git a/src/Stripe.net/Services/Charges/ChargeRadarOptionsOptions.cs b/src/Stripe.net/Services/Charges/ChargeRadarOptionsOptions.cs index b2a41d3c42..e59c86dc95 100644 --- a/src/Stripe.net/Services/Charges/ChargeRadarOptionsOptions.cs +++ b/src/Stripe.net/Services/Charges/ChargeRadarOptionsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ChargeRadarOptionsOptions : INestedOptions { @@ -11,6 +14,9 @@ public class ChargeRadarOptionsOptions : INestedOptions /// predictions on your payments. /// [JsonProperty("session")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("session")] +#endif public string Session { get; set; } } } diff --git a/src/Stripe.net/Services/Charges/ChargeShippingOptions.cs b/src/Stripe.net/Services/Charges/ChargeShippingOptions.cs index 2f6cf827f7..3162a55149 100644 --- a/src/Stripe.net/Services/Charges/ChargeShippingOptions.cs +++ b/src/Stripe.net/Services/Charges/ChargeShippingOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ChargeShippingOptions : INestedOptions { @@ -9,24 +12,36 @@ public class ChargeShippingOptions : INestedOptions /// Shipping address. /// [JsonProperty("address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address")] +#endif public AddressOptions Address { get; set; } /// /// The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. /// [JsonProperty("carrier")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("carrier")] +#endif public string Carrier { get; set; } /// /// Recipient name. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } /// /// Recipient phone (including extension). /// [JsonProperty("phone")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("phone")] +#endif public string Phone { get; set; } /// @@ -35,6 +50,9 @@ public class ChargeShippingOptions : INestedOptions /// commas. /// [JsonProperty("tracking_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tracking_number")] +#endif public string TrackingNumber { get; set; } } } diff --git a/src/Stripe.net/Services/Charges/ChargeTransferDataOptions.cs b/src/Stripe.net/Services/Charges/ChargeTransferDataOptions.cs index ad9d3510fa..a8d87665cf 100644 --- a/src/Stripe.net/Services/Charges/ChargeTransferDataOptions.cs +++ b/src/Stripe.net/Services/Charges/ChargeTransferDataOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ChargeTransferDataOptions : INestedOptions { @@ -10,12 +13,18 @@ public class ChargeTransferDataOptions : INestedOptions /// charge amount is transferred to the destination account. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long? Amount { get; set; } /// /// ID of an existing, connected Stripe account. /// [JsonProperty("destination")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("destination")] +#endif public string Destination { get; set; } } } diff --git a/src/Stripe.net/Services/Charges/ChargeUpdateOptions.cs b/src/Stripe.net/Services/Charges/ChargeUpdateOptions.cs index efa9ecfadd..09c9024f68 100644 --- a/src/Stripe.net/Services/Charges/ChargeUpdateOptions.cs +++ b/src/Stripe.net/Services/Charges/ChargeUpdateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ChargeUpdateOptions : BaseOptions, IHasMetadata { @@ -11,6 +14,9 @@ public class ChargeUpdateOptions : BaseOptions, IHasMetadata /// only be updated if there is no existing associated customer with this charge. /// [JsonProperty("customer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] +#endif public string Customer { get; set; } /// @@ -20,9 +26,15 @@ public class ChargeUpdateOptions : BaseOptions, IHasMetadata /// the charge(s) that they are describing. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } [JsonProperty("exchange_rate")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("exchange_rate")] +#endif public decimal? ExchangeRate { get; set; } /// @@ -33,6 +45,9 @@ public class ChargeUpdateOptions : BaseOptions, IHasMetadata /// send to improve our fraud detection algorithms. /// [JsonProperty("fraud_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fraud_details")] +#endif public ChargeFraudDetailsOptions FraudDetails { get; set; } /// @@ -42,6 +57,9 @@ public class ChargeUpdateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -49,12 +67,18 @@ public class ChargeUpdateOptions : BaseOptions, IHasMetadata /// field is updated, then a new email receipt will be sent to the updated address. /// [JsonProperty("receipt_email")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("receipt_email")] +#endif public string ReceiptEmail { get; set; } /// /// Shipping information for the charge. Helps prevent fraud on charges for physical goods. /// [JsonProperty("shipping")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping")] +#endif public ChargeShippingOptions Shipping { get; set; } /// @@ -64,6 +88,9 @@ public class ChargeUpdateOptions : BaseOptions, IHasMetadata /// documentation for details. /// [JsonProperty("transfer_group")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transfer_group")] +#endif public string TransferGroup { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionAdaptivePricingOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionAdaptivePricingOptions.cs index b0ac89f0ac..bc5c78999b 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionAdaptivePricingOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionAdaptivePricingOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionAdaptivePricingOptions : INestedOptions { @@ -12,6 +15,9 @@ public class SessionAdaptivePricingOptions : INestedOptions /// href="https://dashboard.stripe.com/settings/adaptive-pricing">dashboard setting. /// [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool? Enabled { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionAfterExpirationOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionAfterExpirationOptions.cs index 653944c60d..64373c4441 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionAfterExpirationOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionAfterExpirationOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionAfterExpirationOptions : INestedOptions { @@ -9,6 +12,9 @@ public class SessionAfterExpirationOptions : INestedOptions /// Configure a Checkout Session that can be used to recover an expired session. /// [JsonProperty("recovery")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("recovery")] +#endif public SessionAfterExpirationRecoveryOptions Recovery { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionAfterExpirationRecoveryOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionAfterExpirationRecoveryOptions.cs index 6017c60927..de58997a13 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionAfterExpirationRecoveryOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionAfterExpirationRecoveryOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionAfterExpirationRecoveryOptions : INestedOptions { @@ -10,6 +13,9 @@ public class SessionAfterExpirationRecoveryOptions : INestedOptions /// false. /// [JsonProperty("allow_promotion_codes")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("allow_promotion_codes")] +#endif public bool? AllowPromotionCodes { get; set; } /// @@ -18,6 +24,9 @@ public class SessionAfterExpirationRecoveryOptions : INestedOptions /// Checkout Session object upon expiration. /// [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool? Enabled { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionAutomaticTaxLiabilityOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionAutomaticTaxLiabilityOptions.cs index ff0ef9edd1..fd5376f8c0 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionAutomaticTaxLiabilityOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionAutomaticTaxLiabilityOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionAutomaticTaxLiabilityOptions : INestedOptions { @@ -9,6 +12,9 @@ public class SessionAutomaticTaxLiabilityOptions : INestedOptions /// The connected account being referenced when type is account. /// [JsonProperty("account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account")] +#endif public string Account { get; set; } /// @@ -16,6 +22,9 @@ public class SessionAutomaticTaxLiabilityOptions : INestedOptions /// One of: account, or self. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionAutomaticTaxOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionAutomaticTaxOptions.cs index 5ce3974693..2f4cd2e3d3 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionAutomaticTaxOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionAutomaticTaxOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionAutomaticTaxOptions : INestedOptions { @@ -9,6 +12,9 @@ public class SessionAutomaticTaxOptions : INestedOptions /// Set to true to enable automatic taxes. /// [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool? Enabled { get; set; } /// @@ -17,6 +23,9 @@ public class SessionAutomaticTaxOptions : INestedOptions /// transaction is returned in the report of the connected account. /// [JsonProperty("liability")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("liability")] +#endif public SessionAutomaticTaxLiabilityOptions Liability { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionConsentCollectionOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionConsentCollectionOptions.cs index 9fa5752693..a4cf45832a 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionConsentCollectionOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionConsentCollectionOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionConsentCollectionOptions : INestedOptions { @@ -10,6 +13,9 @@ public class SessionConsentCollectionOptions : INestedOptions /// hidden, it will hide legal text related to the reuse of a payment method. /// [JsonProperty("payment_method_reuse_agreement")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_reuse_agreement")] +#endif public SessionConsentCollectionPaymentMethodReuseAgreementOptions PaymentMethodReuseAgreement { get; set; } /// @@ -20,6 +26,9 @@ public class SessionConsentCollectionOptions : INestedOptions /// One of: auto, or none. /// [JsonProperty("promotions")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("promotions")] +#endif public string Promotions { get; set; } /// @@ -29,6 +38,9 @@ public class SessionConsentCollectionOptions : INestedOptions /// One of: none, or required. /// [JsonProperty("terms_of_service")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("terms_of_service")] +#endif public string TermsOfService { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionConsentCollectionPaymentMethodReuseAgreementOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionConsentCollectionPaymentMethodReuseAgreementOptions.cs index 6909c597f5..c9e9589a05 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionConsentCollectionPaymentMethodReuseAgreementOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionConsentCollectionPaymentMethodReuseAgreementOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionConsentCollectionPaymentMethodReuseAgreementOptions : INestedOptions { @@ -12,6 +15,9 @@ public class SessionConsentCollectionPaymentMethodReuseAgreementOptions : INeste /// One of: auto, or hidden. /// [JsonProperty("position")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("position")] +#endif public string Position { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionCreateOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionCreateOptions.cs index f5f9bad7ee..99b2855614 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionCreateOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionCreateOptions.cs @@ -5,6 +5,9 @@ namespace Stripe.Checkout using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionCreateOptions : BaseOptions, IHasMetadata { @@ -13,18 +16,27 @@ public class SessionCreateOptions : BaseOptions, IHasMetadata /// href="https://docs.stripe.com/payments/checkout/adaptive-pricing">Adaptive Pricing. /// [JsonProperty("adaptive_pricing")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("adaptive_pricing")] +#endif public SessionAdaptivePricingOptions AdaptivePricing { get; set; } /// /// Configure actions after a Checkout Session has expired. /// [JsonProperty("after_expiration")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("after_expiration")] +#endif public SessionAfterExpirationOptions AfterExpiration { get; set; } /// /// Enables user redeemable promotion codes. /// [JsonProperty("allow_promotion_codes")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("allow_promotion_codes")] +#endif public bool? AllowPromotionCodes { get; set; } /// @@ -32,6 +44,9 @@ public class SessionCreateOptions : BaseOptions, IHasMetadata /// subscriptions. /// [JsonProperty("automatic_tax")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("automatic_tax")] +#endif public SessionAutomaticTaxOptions AutomaticTax { get; set; } /// @@ -40,6 +55,9 @@ public class SessionCreateOptions : BaseOptions, IHasMetadata /// One of: auto, or required. /// [JsonProperty("billing_address_collection")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_address_collection")] +#endif public string BillingAddressCollection { get; set; } /// @@ -48,6 +66,9 @@ public class SessionCreateOptions : BaseOptions, IHasMetadata /// if ui_mode is embedded. /// [JsonProperty("cancel_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cancel_url")] +#endif public string CancelUrl { get; set; } /// @@ -55,12 +76,18 @@ public class SessionCreateOptions : BaseOptions, IHasMetadata /// or similar, and can be used to reconcile the session with your internal systems. /// [JsonProperty("client_reference_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("client_reference_id")] +#endif public string ClientReferenceId { get; set; } /// /// Configure fields for the Checkout Session to gather active consent from customers. /// [JsonProperty("consent_collection")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("consent_collection")] +#endif public SessionConsentCollectionOptions ConsentCollection { get; set; } /// @@ -69,6 +96,9 @@ public class SessionCreateOptions : BaseOptions, IHasMetadata /// currency. Required in setup mode when payment_method_types is not set. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// @@ -76,12 +106,18 @@ public class SessionCreateOptions : BaseOptions, IHasMetadata /// are supported. /// [JsonProperty("custom_fields")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("custom_fields")] +#endif public List CustomFields { get; set; } /// /// Display additional text for your customers using custom text. /// [JsonProperty("custom_text")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("custom_text")] +#endif public SessionCustomTextOptions CustomText { get; set; } /// @@ -110,6 +146,9 @@ public class SessionCreateOptions : BaseOptions, IHasMetadata /// future reuse. /// [JsonProperty("customer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] +#endif public string Customer { get; set; } /// @@ -129,6 +168,9 @@ public class SessionCreateOptions : BaseOptions, IHasMetadata /// One of: always, or if_required. /// [JsonProperty("customer_creation")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_creation")] +#endif public string CustomerCreation { get; set; } /// @@ -138,6 +180,9 @@ public class SessionCreateOptions : BaseOptions, IHasMetadata /// the customer once a session is complete, use the customer field. /// [JsonProperty("customer_email")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_email")] +#endif public string CustomerEmail { get; set; } /// @@ -145,6 +190,9 @@ public class SessionCreateOptions : BaseOptions, IHasMetadata /// provided when customer is provided. /// [JsonProperty("customer_update")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_update")] +#endif public SessionCustomerUpdateOptions CustomerUpdate { get; set; } /// @@ -152,6 +200,9 @@ public class SessionCreateOptions : BaseOptions, IHasMetadata /// specified. /// [JsonProperty("discounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discounts")] +#endif public List Discounts { get; set; } /// @@ -161,12 +212,19 @@ public class SessionCreateOptions : BaseOptions, IHasMetadata /// [JsonProperty("expires_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("expires_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? ExpiresAt { get; set; } /// /// Generate a post-purchase Invoice for one-time payments. /// [JsonProperty("invoice_creation")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("invoice_creation")] +#endif public SessionInvoiceCreationOptions InvoiceCreation { get; set; } /// @@ -181,6 +239,9 @@ public class SessionCreateOptions : BaseOptions, IHasMetadata /// initial invoice only. /// [JsonProperty("line_items")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("line_items")] +#endif public List LineItems { get; set; } /// @@ -194,6 +255,9 @@ public class SessionCreateOptions : BaseOptions, IHasMetadata /// tr, vi, zh, zh-HK, or zh-TW. /// [JsonProperty("locale")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("locale")] +#endif public string Locale { get; set; } /// @@ -203,6 +267,9 @@ public class SessionCreateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -211,6 +278,9 @@ public class SessionCreateOptions : BaseOptions, IHasMetadata /// One of: payment, setup, or subscription. /// [JsonProperty("mode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mode")] +#endif public string Mode { get; set; } /// @@ -218,6 +288,9 @@ public class SessionCreateOptions : BaseOptions, IHasMetadata /// payment mode. /// [JsonProperty("payment_intent_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_intent_data")] +#endif public SessionPaymentIntentDataOptions PaymentIntentData { get; set; } /// @@ -235,12 +308,18 @@ public class SessionCreateOptions : BaseOptions, IHasMetadata /// One of: always, or if_required. /// [JsonProperty("payment_method_collection")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_collection")] +#endif public string PaymentMethodCollection { get; set; } /// /// The ID of the payment method configuration to use with this Checkout session. /// [JsonProperty("payment_method_configuration")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_configuration")] +#endif public string PaymentMethodConfiguration { get; set; } /// @@ -248,12 +327,18 @@ public class SessionCreateOptions : BaseOptions, IHasMetadata /// Checkout session. /// [JsonProperty("payment_method_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_data")] +#endif public SessionPaymentMethodDataOptions PaymentMethodData { get; set; } /// /// Payment-method-specific configuration. /// [JsonProperty("payment_method_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_options")] +#endif public SessionPaymentMethodOptionsOptions PaymentMethodOptions { get; set; } /// @@ -284,6 +369,9 @@ public class SessionCreateOptions : BaseOptions, IHasMetadata /// twint, us_bank_account, wechat_pay, or zip. /// [JsonProperty("payment_method_types")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_types")] +#endif public List PaymentMethodTypes { get; set; } /// @@ -295,6 +383,9 @@ public class SessionCreateOptions : BaseOptions, IHasMetadata /// with Checkout. /// [JsonProperty("phone_number_collection")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("phone_number_collection")] +#endif public SessionPhoneNumberCollectionOptions PhoneNumberCollection { get; set; } /// @@ -304,6 +395,9 @@ public class SessionCreateOptions : BaseOptions, IHasMetadata /// One of: always, if_required, or never. /// [JsonProperty("redirect_on_completion")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("redirect_on_completion")] +#endif public string RedirectOnCompletion { get; set; } /// @@ -312,6 +406,9 @@ public class SessionCreateOptions : BaseOptions, IHasMetadata /// embedded and redirect-based payment methods are enabled on the session. /// [JsonProperty("return_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("return_url")] +#endif public string ReturnUrl { get; set; } /// @@ -319,6 +416,9 @@ public class SessionCreateOptions : BaseOptions, IHasMetadata /// and subscription mode. /// [JsonProperty("saved_payment_method_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("saved_payment_method_options")] +#endif public SessionSavedPaymentMethodOptionsOptions SavedPaymentMethodOptions { get; set; } /// @@ -326,6 +426,9 @@ public class SessionCreateOptions : BaseOptions, IHasMetadata /// setup mode. /// [JsonProperty("setup_intent_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_intent_data")] +#endif public SessionSetupIntentDataOptions SetupIntentData { get; set; } /// @@ -333,12 +436,18 @@ public class SessionCreateOptions : BaseOptions, IHasMetadata /// customer. /// [JsonProperty("shipping_address_collection")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping_address_collection")] +#endif public SessionShippingAddressCollectionOptions ShippingAddressCollection { get; set; } /// /// The shipping rate options to apply to this Session. Up to a maximum of 5. /// [JsonProperty("shipping_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping_options")] +#endif public List ShippingOptions { get; set; } /// @@ -349,6 +458,9 @@ public class SessionCreateOptions : BaseOptions, IHasMetadata /// One of: auto, book, donate, pay, or subscribe. /// [JsonProperty("submit_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("submit_type")] +#endif public string SubmitType { get; set; } /// @@ -356,6 +468,9 @@ public class SessionCreateOptions : BaseOptions, IHasMetadata /// subscription mode. /// [JsonProperty("subscription_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("subscription_data")] +#endif public SessionSubscriptionDataOptions SubscriptionData { get; set; } /// @@ -366,12 +481,18 @@ public class SessionCreateOptions : BaseOptions, IHasMetadata /// success page. /// [JsonProperty("success_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("success_url")] +#endif public string SuccessUrl { get; set; } /// /// Controls tax ID collection during checkout. /// [JsonProperty("tax_id_collection")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_id_collection")] +#endif public SessionTaxIdCollectionOptions TaxIdCollection { get; set; } /// @@ -379,6 +500,9 @@ public class SessionCreateOptions : BaseOptions, IHasMetadata /// One of: embedded, or hosted. /// [JsonProperty("ui_mode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ui_mode")] +#endif public string UiMode { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionCustomFieldDropdownOptionOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionCustomFieldDropdownOptionOptions.cs index f0348e405f..4fc9f4f9b0 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionCustomFieldDropdownOptionOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionCustomFieldDropdownOptionOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionCustomFieldDropdownOptionOptions : INestedOptions { @@ -9,6 +12,9 @@ public class SessionCustomFieldDropdownOptionOptions : INestedOptions /// The label for the option, displayed to the customer. Up to 100 characters. /// [JsonProperty("label")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("label")] +#endif public string Label { get; set; } /// @@ -17,6 +23,9 @@ public class SessionCustomFieldDropdownOptionOptions : INestedOptions /// alphanumeric, and up to 100 characters. /// [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public string Value { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionCustomFieldDropdownOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionCustomFieldDropdownOptions.cs index 5b3b8b0b46..c3cc7e8282 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionCustomFieldDropdownOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionCustomFieldDropdownOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.Checkout { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionCustomFieldDropdownOptions : INestedOptions { @@ -11,12 +14,18 @@ public class SessionCustomFieldDropdownOptions : INestedOptions /// the options array. /// [JsonProperty("default_value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("default_value")] +#endif public string DefaultValue { get; set; } /// /// The options available for the customer to select. Up to 200 options allowed. /// [JsonProperty("options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("options")] +#endif public List Options { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionCustomFieldLabelOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionCustomFieldLabelOptions.cs index d60608e7c0..f99f388ad7 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionCustomFieldLabelOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionCustomFieldLabelOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionCustomFieldLabelOptions : INestedOptions { @@ -9,12 +12,18 @@ public class SessionCustomFieldLabelOptions : INestedOptions /// Custom text for the label, displayed to the customer. Up to 50 characters. /// [JsonProperty("custom")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("custom")] +#endif public string Custom { get; set; } /// /// The type of the label. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionCustomFieldNumericOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionCustomFieldNumericOptions.cs index 51b8b01595..339f5982b2 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionCustomFieldNumericOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionCustomFieldNumericOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionCustomFieldNumericOptions : INestedOptions { @@ -9,18 +12,27 @@ public class SessionCustomFieldNumericOptions : INestedOptions /// The value that will pre-fill the field on the payment page. /// [JsonProperty("default_value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("default_value")] +#endif public string DefaultValue { get; set; } /// /// The maximum character length constraint for the customer's input. /// [JsonProperty("maximum_length")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("maximum_length")] +#endif public long? MaximumLength { get; set; } /// /// The minimum character length requirement for the customer's input. /// [JsonProperty("minimum_length")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("minimum_length")] +#endif public long? MinimumLength { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionCustomFieldOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionCustomFieldOptions.cs index 32c0be7420..4cfb722e06 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionCustomFieldOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionCustomFieldOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionCustomFieldOptions : INestedOptions { @@ -9,6 +12,9 @@ public class SessionCustomFieldOptions : INestedOptions /// Configuration for type=dropdown fields. /// [JsonProperty("dropdown")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("dropdown")] +#endif public SessionCustomFieldDropdownOptions Dropdown { get; set; } /// @@ -16,18 +22,27 @@ public class SessionCustomFieldOptions : INestedOptions /// unique to this field, alphanumeric, and up to 200 characters. /// [JsonProperty("key")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("key")] +#endif public string Key { get; set; } /// /// The label for the field, displayed to the customer. /// [JsonProperty("label")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("label")] +#endif public SessionCustomFieldLabelOptions Label { get; set; } /// /// Configuration for type=numeric fields. /// [JsonProperty("numeric")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("numeric")] +#endif public SessionCustomFieldNumericOptions Numeric { get; set; } /// @@ -35,12 +50,18 @@ public class SessionCustomFieldOptions : INestedOptions /// Session. Defaults to false. /// [JsonProperty("optional")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("optional")] +#endif public bool? Optional { get; set; } /// /// Configuration for type=text fields. /// [JsonProperty("text")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("text")] +#endif public SessionCustomFieldTextOptions Text { get; set; } /// @@ -48,6 +69,9 @@ public class SessionCustomFieldOptions : INestedOptions /// One of: dropdown, numeric, or text. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionCustomFieldTextOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionCustomFieldTextOptions.cs index 760ed9be8e..9bc477c0de 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionCustomFieldTextOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionCustomFieldTextOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionCustomFieldTextOptions : INestedOptions { @@ -9,18 +12,27 @@ public class SessionCustomFieldTextOptions : INestedOptions /// The value that will pre-fill the field on the payment page. /// [JsonProperty("default_value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("default_value")] +#endif public string DefaultValue { get; set; } /// /// The maximum character length constraint for the customer's input. /// [JsonProperty("maximum_length")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("maximum_length")] +#endif public long? MaximumLength { get; set; } /// /// The minimum character length requirement for the customer's input. /// [JsonProperty("minimum_length")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("minimum_length")] +#endif public long? MinimumLength { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionCustomTextAfterSubmitOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionCustomTextAfterSubmitOptions.cs index 64b5ff75ef..c803f9e155 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionCustomTextAfterSubmitOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionCustomTextAfterSubmitOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionCustomTextAfterSubmitOptions : INestedOptions { @@ -9,6 +12,9 @@ public class SessionCustomTextAfterSubmitOptions : INestedOptions /// Text may be up to 1200 characters in length. /// [JsonProperty("message")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("message")] +#endif public string Message { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionCustomTextOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionCustomTextOptions.cs index 25fbef606f..3e78b48b5b 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionCustomTextOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionCustomTextOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionCustomTextOptions : INestedOptions { @@ -9,18 +12,27 @@ public class SessionCustomTextOptions : INestedOptions /// Custom text that should be displayed after the payment confirmation button. /// [JsonProperty("after_submit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("after_submit")] +#endif public SessionCustomTextAfterSubmitOptions AfterSubmit { get; set; } /// /// Custom text that should be displayed alongside shipping address collection. /// [JsonProperty("shipping_address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping_address")] +#endif public SessionCustomTextShippingAddressOptions ShippingAddress { get; set; } /// /// Custom text that should be displayed alongside the payment confirmation button. /// [JsonProperty("submit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("submit")] +#endif public SessionCustomTextSubmitOptions Submit { get; set; } /// @@ -28,6 +40,9 @@ public class SessionCustomTextOptions : INestedOptions /// text. /// [JsonProperty("terms_of_service_acceptance")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("terms_of_service_acceptance")] +#endif public SessionCustomTextTermsOfServiceAcceptanceOptions TermsOfServiceAcceptance { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionCustomTextShippingAddressOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionCustomTextShippingAddressOptions.cs index 00bd79bda4..44676934e7 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionCustomTextShippingAddressOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionCustomTextShippingAddressOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionCustomTextShippingAddressOptions : INestedOptions { @@ -9,6 +12,9 @@ public class SessionCustomTextShippingAddressOptions : INestedOptions /// Text may be up to 1200 characters in length. /// [JsonProperty("message")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("message")] +#endif public string Message { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionCustomTextSubmitOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionCustomTextSubmitOptions.cs index d4dd7fa9eb..f9a7c09811 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionCustomTextSubmitOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionCustomTextSubmitOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionCustomTextSubmitOptions : INestedOptions { @@ -9,6 +12,9 @@ public class SessionCustomTextSubmitOptions : INestedOptions /// Text may be up to 1200 characters in length. /// [JsonProperty("message")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("message")] +#endif public string Message { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionCustomTextTermsOfServiceAcceptanceOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionCustomTextTermsOfServiceAcceptanceOptions.cs index d5a1c55d09..dcdde77fc9 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionCustomTextTermsOfServiceAcceptanceOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionCustomTextTermsOfServiceAcceptanceOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionCustomTextTermsOfServiceAcceptanceOptions : INestedOptions { @@ -9,6 +12,9 @@ public class SessionCustomTextTermsOfServiceAcceptanceOptions : INestedOptions /// Text may be up to 1200 characters in length. /// [JsonProperty("message")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("message")] +#endif public string Message { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionCustomerDetailsOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionCustomerDetailsOptions.cs index eda28fe6c0..f012f9cead 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionCustomerDetailsOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionCustomerDetailsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionCustomerDetailsOptions : INestedOptions { @@ -9,6 +12,9 @@ public class SessionCustomerDetailsOptions : INestedOptions /// Customer's email address. /// [JsonProperty("email")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("email")] +#endif public string Email { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionCustomerUpdateOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionCustomerUpdateOptions.cs index 2145f32182..3c54c37f68 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionCustomerUpdateOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionCustomerUpdateOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionCustomerUpdateOptions : INestedOptions { @@ -12,6 +15,9 @@ public class SessionCustomerUpdateOptions : INestedOptions /// One of: auto, or never. /// [JsonProperty("address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address")] +#endif public string Address { get; set; } /// @@ -20,6 +26,9 @@ public class SessionCustomerUpdateOptions : INestedOptions /// One of: auto, or never. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } /// @@ -29,6 +38,9 @@ public class SessionCustomerUpdateOptions : INestedOptions /// One of: auto, or never. /// [JsonProperty("shipping")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping")] +#endif public string Shipping { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionDiscountOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionDiscountOptions.cs index 54601a46a7..94c8b8b9e5 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionDiscountOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionDiscountOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionDiscountOptions : INestedOptions { @@ -9,12 +12,18 @@ public class SessionDiscountOptions : INestedOptions /// The ID of the coupon to apply to this Session. /// [JsonProperty("coupon")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("coupon")] +#endif public string Coupon { get; set; } /// /// The ID of a promotion code to apply to this Session. /// [JsonProperty("promotion_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("promotion_code")] +#endif public string PromotionCode { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionInvoiceCreationInvoiceDataCustomFieldOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionInvoiceCreationInvoiceDataCustomFieldOptions.cs index bc144d9b97..bbf5d04eef 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionInvoiceCreationInvoiceDataCustomFieldOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionInvoiceCreationInvoiceDataCustomFieldOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionInvoiceCreationInvoiceDataCustomFieldOptions : INestedOptions { @@ -9,12 +12,18 @@ public class SessionInvoiceCreationInvoiceDataCustomFieldOptions : INestedOption /// The name of the custom field. This may be up to 40 characters. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } /// /// The value of the custom field. This may be up to 140 characters. /// [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public string Value { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionInvoiceCreationInvoiceDataIssuerOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionInvoiceCreationInvoiceDataIssuerOptions.cs index d1bd4e3e22..4db17ef3da 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionInvoiceCreationInvoiceDataIssuerOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionInvoiceCreationInvoiceDataIssuerOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionInvoiceCreationInvoiceDataIssuerOptions : INestedOptions { @@ -9,6 +12,9 @@ public class SessionInvoiceCreationInvoiceDataIssuerOptions : INestedOptions /// The connected account being referenced when type is account. /// [JsonProperty("account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account")] +#endif public string Account { get; set; } /// @@ -16,6 +22,9 @@ public class SessionInvoiceCreationInvoiceDataIssuerOptions : INestedOptions /// One of: account, or self. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionInvoiceCreationInvoiceDataOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionInvoiceCreationInvoiceDataOptions.cs index 004ae56978..a54b2a2b29 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionInvoiceCreationInvoiceDataOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionInvoiceCreationInvoiceDataOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.Checkout { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionInvoiceCreationInvoiceDataOptions : INestedOptions, IHasMetadata { @@ -10,24 +13,36 @@ public class SessionInvoiceCreationInvoiceDataOptions : INestedOptions, IHasMeta /// The account tax IDs associated with the invoice. /// [JsonProperty("account_tax_ids")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_tax_ids")] +#endif public List AccountTaxIds { get; set; } /// /// Default custom fields to be displayed on invoices for this customer. /// [JsonProperty("custom_fields")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("custom_fields")] +#endif public List CustomFields { get; set; } /// /// An arbitrary string attached to the object. Often useful for displaying to users. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// /// Default footer to be displayed on invoices for this customer. /// [JsonProperty("footer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("footer")] +#endif public string Footer { get; set; } /// @@ -35,6 +50,9 @@ public class SessionInvoiceCreationInvoiceDataOptions : INestedOptions, IHasMeta /// branding and support information of the specified account. /// [JsonProperty("issuer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("issuer")] +#endif public SessionInvoiceCreationInvoiceDataIssuerOptions Issuer { get; set; } /// @@ -44,12 +62,18 @@ public class SessionInvoiceCreationInvoiceDataOptions : INestedOptions, IHasMeta /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// Default options for invoice PDF rendering for this customer. /// [JsonProperty("rendering_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("rendering_options")] +#endif public SessionInvoiceCreationInvoiceDataRenderingOptionsOptions RenderingOptions { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionInvoiceCreationInvoiceDataRenderingOptionsOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionInvoiceCreationInvoiceDataRenderingOptionsOptions.cs index 75714724a7..fb921655aa 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionInvoiceCreationInvoiceDataRenderingOptionsOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionInvoiceCreationInvoiceDataRenderingOptionsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionInvoiceCreationInvoiceDataRenderingOptionsOptions : INestedOptions { @@ -14,6 +17,9 @@ public class SessionInvoiceCreationInvoiceDataRenderingOptionsOptions : INestedO /// One of: exclude_tax, or include_inclusive_tax. /// [JsonProperty("amount_tax_display")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_tax_display")] +#endif public string AmountTaxDisplay { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionInvoiceCreationOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionInvoiceCreationOptions.cs index 1bcb8db3a0..ed77c9528a 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionInvoiceCreationOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionInvoiceCreationOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionInvoiceCreationOptions : INestedOptions { @@ -9,12 +12,18 @@ public class SessionInvoiceCreationOptions : INestedOptions /// Set to true to enable invoice creation. /// [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool? Enabled { get; set; } /// /// Parameters passed when creating invoices for payment-mode Checkout Sessions. /// [JsonProperty("invoice_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("invoice_data")] +#endif public SessionInvoiceCreationInvoiceDataOptions InvoiceData { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionLineItemAdjustableQuantityOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionLineItemAdjustableQuantityOptions.cs index 91ee753b30..75c51df28e 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionLineItemAdjustableQuantityOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionLineItemAdjustableQuantityOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionLineItemAdjustableQuantityOptions : INestedOptions { @@ -9,6 +12,9 @@ public class SessionLineItemAdjustableQuantityOptions : INestedOptions /// Set to true if the quantity can be adjusted to any non-negative integer. /// [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool? Enabled { get; set; } /// @@ -16,6 +22,9 @@ public class SessionLineItemAdjustableQuantityOptions : INestedOptions /// value is 99. You can specify a value up to 999999. /// [JsonProperty("maximum")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("maximum")] +#endif public long? Maximum { get; set; } /// @@ -23,6 +32,9 @@ public class SessionLineItemAdjustableQuantityOptions : INestedOptions /// this value is 0. /// [JsonProperty("minimum")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("minimum")] +#endif public long? Minimum { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionLineItemOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionLineItemOptions.cs index fc14c3f0aa..efdeb896d5 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionLineItemOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionLineItemOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.Checkout { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionLineItemOptions : INestedOptions { @@ -11,6 +14,9 @@ public class SessionLineItemOptions : INestedOptions /// during Checkout. /// [JsonProperty("adjustable_quantity")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("adjustable_quantity")] +#endif public SessionLineItemAdjustableQuantityOptions AdjustableQuantity { get; set; } /// @@ -19,6 +25,9 @@ public class SessionLineItemOptions : INestedOptions /// support the following countries: US, GB, AU, and all countries in the EU. /// [JsonProperty("dynamic_tax_rates")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("dynamic_tax_rates")] +#endif public List DynamicTaxRates { get; set; } /// @@ -27,6 +36,9 @@ public class SessionLineItemOptions : INestedOptions /// price_data is required. /// [JsonProperty("price")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("price")] +#endif public string Price { get; set; } /// @@ -34,6 +46,9 @@ public class SessionLineItemOptions : INestedOptions /// object inline. One of price or price_data is required. /// [JsonProperty("price_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("price_data")] +#endif public SessionLineItemPriceDataOptions PriceData { get; set; } /// @@ -41,6 +56,9 @@ public class SessionLineItemOptions : INestedOptions /// recurring.usage_type=metered. /// [JsonProperty("quantity")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("quantity")] +#endif public long? Quantity { get; set; } /// @@ -48,6 +66,9 @@ public class SessionLineItemOptions : INestedOptions /// line item. /// [JsonProperty("tax_rates")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_rates")] +#endif public List TaxRates { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionLineItemPriceDataOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionLineItemPriceDataOptions.cs index 980a337ced..b3eae49af9 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionLineItemPriceDataOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionLineItemPriceDataOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionLineItemPriceDataOptions : INestedOptions { @@ -11,6 +14,9 @@ public class SessionLineItemPriceDataOptions : INestedOptions /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// @@ -18,6 +24,9 @@ public class SessionLineItemPriceDataOptions : INestedOptions /// product_data is required. /// [JsonProperty("product")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("product")] +#endif public string Product { get; set; } /// @@ -25,12 +34,18 @@ public class SessionLineItemPriceDataOptions : INestedOptions /// product_data is required. /// [JsonProperty("product_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("product_data")] +#endif public SessionLineItemPriceDataProductDataOptions ProductData { get; set; } /// /// The recurring components of a price such as interval and interval_count. /// [JsonProperty("recurring")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("recurring")] +#endif public SessionLineItemPriceDataRecurringOptions Recurring { get; set; } /// @@ -43,6 +58,9 @@ public class SessionLineItemPriceDataOptions : INestedOptions /// One of: exclusive, inclusive, or unspecified. /// [JsonProperty("tax_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_behavior")] +#endif public string TaxBehavior { get; set; } /// @@ -50,6 +68,9 @@ public class SessionLineItemPriceDataOptions : INestedOptions /// One of unit_amount or unit_amount_decimal is required. /// [JsonProperty("unit_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_amount")] +#endif public long? UnitAmount { get; set; } /// @@ -58,6 +79,9 @@ public class SessionLineItemPriceDataOptions : INestedOptions /// unit_amount_decimal can be set. /// [JsonProperty("unit_amount_decimal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_amount_decimal")] +#endif public decimal? UnitAmountDecimal { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionLineItemPriceDataProductDataOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionLineItemPriceDataProductDataOptions.cs index cc96f9695d..b0345ceca0 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionLineItemPriceDataProductDataOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionLineItemPriceDataProductDataOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.Checkout { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionLineItemPriceDataProductDataOptions : INestedOptions, IHasMetadata { @@ -12,6 +15,9 @@ public class SessionLineItemPriceDataProductDataOptions : INestedOptions, IHasMe /// rendering purposes. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// @@ -19,6 +25,9 @@ public class SessionLineItemPriceDataProductDataOptions : INestedOptions, IHasMe /// customer. /// [JsonProperty("images")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("images")] +#endif public List Images { get; set; } /// @@ -28,18 +37,27 @@ public class SessionLineItemPriceDataProductDataOptions : INestedOptions, IHasMe /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// The product's name, meant to be displayable to the customer. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } /// /// A tax code ID. /// [JsonProperty("tax_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_code")] +#endif public string TaxCode { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionLineItemPriceDataRecurringOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionLineItemPriceDataRecurringOptions.cs index 7e4a086762..c39ad884de 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionLineItemPriceDataRecurringOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionLineItemPriceDataRecurringOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionLineItemPriceDataRecurringOptions : INestedOptions { @@ -11,6 +14,9 @@ public class SessionLineItemPriceDataRecurringOptions : INestedOptions /// One of: day, month, week, or year. /// [JsonProperty("interval")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interval")] +#endif public string Interval { get; set; } /// @@ -19,6 +25,9 @@ public class SessionLineItemPriceDataRecurringOptions : INestedOptions /// years interval allowed (3 years, 36 months, or 156 weeks). /// [JsonProperty("interval_count")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interval_count")] +#endif public long? IntervalCount { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionListOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionListOptions.cs index c242456d67..353ca7b79d 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionListOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionListOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionListOptions : ListOptionsWithCreated { @@ -9,24 +12,36 @@ public class SessionListOptions : ListOptionsWithCreated /// Only return the Checkout Sessions for the Customer specified. /// [JsonProperty("customer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] +#endif public string Customer { get; set; } /// /// Only return the Checkout Sessions for the Customer details specified. /// [JsonProperty("customer_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_details")] +#endif public SessionCustomerDetailsOptions CustomerDetails { get; set; } /// /// Only return the Checkout Session for the PaymentIntent specified. /// [JsonProperty("payment_intent")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_intent")] +#endif public string PaymentIntent { get; set; } /// /// Only return the Checkout Sessions for the Payment Link specified. /// [JsonProperty("payment_link")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_link")] +#endif public string PaymentLink { get; set; } /// @@ -34,12 +49,18 @@ public class SessionListOptions : ListOptionsWithCreated /// One of: complete, expired, or open. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } /// /// Only return the Checkout Session for the subscription specified. /// [JsonProperty("subscription")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("subscription")] +#endif public string Subscription { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentIntentDataOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentIntentDataOptions.cs index 266c3c1b04..e4a651b845 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentIntentDataOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentIntentDataOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.Checkout { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentIntentDataOptions : INestedOptions, IHasMetadata { @@ -15,6 +18,9 @@ public class SessionPaymentIntentDataOptions : INestedOptions, IHasMetadata /// accounts. /// [JsonProperty("application_fee_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("application_fee_amount")] +#endif public long? ApplicationFeeAmount { get; set; } /// @@ -22,12 +28,18 @@ public class SessionPaymentIntentDataOptions : INestedOptions, IHasMetadata /// One of: automatic, automatic_async, or manual. /// [JsonProperty("capture_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("capture_method")] +#endif public string CaptureMethod { get; set; } /// /// An arbitrary string attached to the object. Often useful for displaying to users. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// @@ -37,6 +49,9 @@ public class SessionPaymentIntentDataOptions : INestedOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -45,6 +60,9 @@ public class SessionPaymentIntentDataOptions : INestedOptions, IHasMetadata /// for connected accounts. /// [JsonProperty("on_behalf_of")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("on_behalf_of")] +#endif public string OnBehalfOf { get; set; } /// @@ -54,6 +72,9 @@ public class SessionPaymentIntentDataOptions : INestedOptions, IHasMetadata /// settings. /// [JsonProperty("receipt_email")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("receipt_email")] +#endif public string ReceiptEmail { get; set; } /// @@ -80,12 +101,18 @@ public class SessionPaymentIntentDataOptions : INestedOptions, IHasMetadata /// One of: off_session, or on_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } /// /// Shipping information for this payment. /// [JsonProperty("shipping")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping")] +#endif public ChargeShippingOptions Shipping { get; set; } /// @@ -100,6 +127,9 @@ public class SessionPaymentIntentDataOptions : INestedOptions, IHasMetadata /// instead. /// [JsonProperty("statement_descriptor")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("statement_descriptor")] +#endif public string StatementDescriptor { get; set; } /// @@ -109,6 +139,9 @@ public class SessionPaymentIntentDataOptions : INestedOptions, IHasMetadata /// customer's statement. /// [JsonProperty("statement_descriptor_suffix")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("statement_descriptor_suffix")] +#endif public string StatementDescriptorSuffix { get; set; } /// @@ -118,6 +151,9 @@ public class SessionPaymentIntentDataOptions : INestedOptions, IHasMetadata /// accounts. /// [JsonProperty("transfer_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transfer_data")] +#endif public SessionPaymentIntentDataTransferDataOptions TransferData { get; set; } /// @@ -127,6 +163,9 @@ public class SessionPaymentIntentDataOptions : INestedOptions, IHasMetadata /// connected accounts for details. /// [JsonProperty("transfer_group")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transfer_group")] +#endif public string TransferGroup { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentIntentDataTransferDataOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentIntentDataTransferDataOptions.cs index bd4cc0d66e..9beb78e00b 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentIntentDataTransferDataOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentIntentDataTransferDataOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentIntentDataTransferDataOptions : INestedOptions { @@ -9,6 +12,9 @@ public class SessionPaymentIntentDataTransferDataOptions : INestedOptions /// The amount that will be transferred automatically when a charge succeeds. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long? Amount { get; set; } /// @@ -18,6 +24,9 @@ public class SessionPaymentIntentDataTransferDataOptions : INestedOptions /// transfer field. /// [JsonProperty("destination")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("destination")] +#endif public string Destination { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodDataOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodDataOptions.cs index b2e023e017..889f14a230 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodDataOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodDataOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodDataOptions : INestedOptions { @@ -12,6 +15,9 @@ public class SessionPaymentMethodDataOptions : INestedOptions /// One of: always, limited, or unspecified. /// [JsonProperty("allow_redisplay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("allow_redisplay")] +#endif public string AllowRedisplay { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsAcssDebitMandateOptionsOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsAcssDebitMandateOptionsOptions.cs index 87a5bb3248..25080c02d7 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsAcssDebitMandateOptionsOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsAcssDebitMandateOptionsOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.Checkout { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsAcssDebitMandateOptionsOptions : INestedOptions { @@ -14,6 +17,9 @@ public class SessionPaymentMethodOptionsAcssDebitMandateOptionsOptions : INested /// Intent. /// [JsonProperty("custom_mandate_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("custom_mandate_url")] +#endif public string CustomMandateUrl { get; set; } /// @@ -22,6 +28,9 @@ public class SessionPaymentMethodOptionsAcssDebitMandateOptionsOptions : INested /// One of: invoice, or subscription. /// [JsonProperty("default_for")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("default_for")] +#endif public List DefaultFor { get; set; } /// @@ -29,6 +38,9 @@ public class SessionPaymentMethodOptionsAcssDebitMandateOptionsOptions : INested /// 'interval' or 'combined'. /// [JsonProperty("interval_description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interval_description")] +#endif public string IntervalDescription { get; set; } /// @@ -36,6 +48,9 @@ public class SessionPaymentMethodOptionsAcssDebitMandateOptionsOptions : INested /// One of: combined, interval, or sporadic. /// [JsonProperty("payment_schedule")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_schedule")] +#endif public string PaymentSchedule { get; set; } /// @@ -43,6 +58,9 @@ public class SessionPaymentMethodOptionsAcssDebitMandateOptionsOptions : INested /// One of: business, or personal. /// [JsonProperty("transaction_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transaction_type")] +#endif public string TransactionType { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsAcssDebitOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsAcssDebitOptions.cs index eba64f226c..c6cbc10570 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsAcssDebitOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsAcssDebitOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsAcssDebitOptions : INestedOptions { @@ -12,12 +15,18 @@ public class SessionPaymentMethodOptionsAcssDebitOptions : INestedOptions /// One of: cad, or usd. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// /// Additional fields for Mandate creation. /// [JsonProperty("mandate_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mandate_options")] +#endif public SessionPaymentMethodOptionsAcssDebitMandateOptionsOptions MandateOptions { get; set; } /// @@ -42,6 +51,9 @@ public class SessionPaymentMethodOptionsAcssDebitOptions : INestedOptions /// One of: none, off_session, or on_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } /// @@ -49,6 +61,9 @@ public class SessionPaymentMethodOptionsAcssDebitOptions : INestedOptions /// One of: automatic, instant, or microdeposits. /// [JsonProperty("verification_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("verification_method")] +#endif public string VerificationMethod { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsAffirmOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsAffirmOptions.cs index 886e2795f5..171f79ddfb 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsAffirmOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsAffirmOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsAffirmOptions : INestedOptions { @@ -26,6 +29,9 @@ public class SessionPaymentMethodOptionsAffirmOptions : INestedOptions /// href="https://stripe.com/strong-customer-authentication">SCA. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsAfterpayClearpayOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsAfterpayClearpayOptions.cs index aeb9b7b351..b6f57a4a62 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsAfterpayClearpayOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsAfterpayClearpayOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsAfterpayClearpayOptions : INestedOptions { @@ -26,6 +29,9 @@ public class SessionPaymentMethodOptionsAfterpayClearpayOptions : INestedOptions /// href="https://stripe.com/strong-customer-authentication">SCA. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsAlipayOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsAlipayOptions.cs index 18d2466180..bdb20b1ac0 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsAlipayOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsAlipayOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsAlipayOptions : INestedOptions { @@ -26,6 +29,9 @@ public class SessionPaymentMethodOptionsAlipayOptions : INestedOptions /// href="https://stripe.com/strong-customer-authentication">SCA. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsAmazonPayOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsAmazonPayOptions.cs index 9e51348170..b059be4765 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsAmazonPayOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsAmazonPayOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsAmazonPayOptions : INestedOptions { @@ -27,6 +30,9 @@ public class SessionPaymentMethodOptionsAmazonPayOptions : INestedOptions /// One of: none, or off_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsAuBecsDebitOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsAuBecsDebitOptions.cs index 6bcf133c29..a6089718d6 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsAuBecsDebitOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsAuBecsDebitOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsAuBecsDebitOptions : INestedOptions { @@ -26,6 +29,9 @@ public class SessionPaymentMethodOptionsAuBecsDebitOptions : INestedOptions /// href="https://stripe.com/strong-customer-authentication">SCA. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsBacsDebitOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsBacsDebitOptions.cs index 39632f5c30..4dc1f9bb5e 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsBacsDebitOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsBacsDebitOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsBacsDebitOptions : INestedOptions { @@ -9,6 +12,9 @@ public class SessionPaymentMethodOptionsBacsDebitOptions : INestedOptions /// Additional fields for Mandate creation. /// [JsonProperty("mandate_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mandate_options")] +#endif public SessionPaymentMethodOptionsBacsDebitMandateOptionsOptions MandateOptions { get; set; } /// @@ -33,6 +39,9 @@ public class SessionPaymentMethodOptionsBacsDebitOptions : INestedOptions /// One of: none, off_session, or on_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsBancontactOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsBancontactOptions.cs index 63aae6e36e..ab27f548e4 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsBancontactOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsBancontactOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsBancontactOptions : INestedOptions { @@ -26,6 +29,9 @@ public class SessionPaymentMethodOptionsBancontactOptions : INestedOptions /// href="https://stripe.com/strong-customer-authentication">SCA. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsBoletoOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsBoletoOptions.cs index 097d7fe3d6..b0241fe7ee 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsBoletoOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsBoletoOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsBoletoOptions : INestedOptions { @@ -11,6 +14,9 @@ public class SessionPaymentMethodOptionsBoletoOptions : INestedOptions /// expire on Wednesday at 23:59 America/Sao_Paulo time. /// [JsonProperty("expires_after_days")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("expires_after_days")] +#endif public long? ExpiresAfterDays { get; set; } /// @@ -35,6 +41,9 @@ public class SessionPaymentMethodOptionsBoletoOptions : INestedOptions /// One of: none, off_session, or on_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsCardInstallmentsOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsCardInstallmentsOptions.cs index f9aed6548b..5ef080b710 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsCardInstallmentsOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsCardInstallmentsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsCardInstallmentsOptions : INestedOptions { @@ -10,6 +13,9 @@ public class SessionPaymentMethodOptionsCardInstallmentsOptions : INestedOptions /// prevent any installment plan from applying to a payment. /// [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool? Enabled { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsCardOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsCardOptions.cs index cd74966784..51cc4efe78 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsCardOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsCardOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsCardOptions : INestedOptions { @@ -9,6 +12,9 @@ public class SessionPaymentMethodOptionsCardOptions : INestedOptions /// Installment options for card payments. /// [JsonProperty("installments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("installments")] +#endif public SessionPaymentMethodOptionsCardInstallmentsOptions Installments { get; set; } /// @@ -17,6 +23,9 @@ public class SessionPaymentMethodOptionsCardOptions : INestedOptions /// One of: if_available, or never. /// [JsonProperty("request_extended_authorization")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("request_extended_authorization")] +#endif public string RequestExtendedAuthorization { get; set; } /// @@ -26,6 +35,9 @@ public class SessionPaymentMethodOptionsCardOptions : INestedOptions /// One of: if_available, or never. /// [JsonProperty("request_incremental_authorization")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("request_incremental_authorization")] +#endif public string RequestIncrementalAuthorization { get; set; } /// @@ -34,6 +46,9 @@ public class SessionPaymentMethodOptionsCardOptions : INestedOptions /// One of: if_available, or never. /// [JsonProperty("request_multicapture")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("request_multicapture")] +#endif public string RequestMulticapture { get; set; } /// @@ -42,6 +57,9 @@ public class SessionPaymentMethodOptionsCardOptions : INestedOptions /// One of: if_available, or never. /// [JsonProperty("request_overcapture")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("request_overcapture")] +#endif public string RequestOvercapture { get; set; } /// @@ -57,6 +75,9 @@ public class SessionPaymentMethodOptionsCardOptions : INestedOptions /// One of: any, automatic, or challenge. /// [JsonProperty("request_three_d_secure")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("request_three_d_secure")] +#endif public string RequestThreeDSecure { get; set; } /// @@ -81,6 +102,9 @@ public class SessionPaymentMethodOptionsCardOptions : INestedOptions /// One of: off_session, or on_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } /// @@ -91,6 +115,9 @@ public class SessionPaymentMethodOptionsCardOptions : INestedOptions /// (including separators) will appear truncated to 22 characters. /// [JsonProperty("statement_descriptor_suffix_kana")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("statement_descriptor_suffix_kana")] +#endif public string StatementDescriptorSuffixKana { get; set; } /// @@ -101,6 +128,9 @@ public class SessionPaymentMethodOptionsCardOptions : INestedOptions /// (including separators) will appear truncated to 17 characters. /// [JsonProperty("statement_descriptor_suffix_kanji")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("statement_descriptor_suffix_kanji")] +#endif public string StatementDescriptorSuffixKanji { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsCashappOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsCashappOptions.cs index 1899c1e58e..59bcd4305c 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsCashappOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsCashappOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsCashappOptions : INestedOptions { @@ -27,6 +30,9 @@ public class SessionPaymentMethodOptionsCashappOptions : INestedOptions /// One of: none, off_session, or on_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransferOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransferOptions.cs index 1a01e54ae7..53bef818d1 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransferOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransferOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransferOptions : INestedOptions { @@ -10,6 +13,9 @@ public class SessionPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfe /// BE, DE, ES, FR, IE, or NL. /// [JsonProperty("country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country")] +#endif public string Country { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsCustomerBalanceBankTransferOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsCustomerBalanceBankTransferOptions.cs index 1d3aba71ea..e6ee50335a 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsCustomerBalanceBankTransferOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsCustomerBalanceBankTransferOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.Checkout { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsCustomerBalanceBankTransferOptions : INestedOptions { @@ -10,6 +13,9 @@ public class SessionPaymentMethodOptionsCustomerBalanceBankTransferOptions : INe /// Configuration for eu_bank_transfer funding type. /// [JsonProperty("eu_bank_transfer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("eu_bank_transfer")] +#endif public SessionPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransferOptions EuBankTransfer { get; set; } /// @@ -21,6 +27,9 @@ public class SessionPaymentMethodOptionsCustomerBalanceBankTransferOptions : INe /// swift, or zengin. /// [JsonProperty("requested_address_types")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested_address_types")] +#endif public List RequestedAddressTypes { get; set; } /// @@ -29,6 +38,9 @@ public class SessionPaymentMethodOptionsCustomerBalanceBankTransferOptions : INe /// mx_bank_transfer, or us_bank_transfer. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsCustomerBalanceOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsCustomerBalanceOptions.cs index b02213e282..7b665c1389 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsCustomerBalanceOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsCustomerBalanceOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsCustomerBalanceOptions : INestedOptions { @@ -10,6 +13,9 @@ public class SessionPaymentMethodOptionsCustomerBalanceOptions : INestedOptions /// bank_transfer. /// [JsonProperty("bank_transfer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_transfer")] +#endif public SessionPaymentMethodOptionsCustomerBalanceBankTransferOptions BankTransfer { get; set; } /// @@ -17,6 +23,9 @@ public class SessionPaymentMethodOptionsCustomerBalanceOptions : INestedOptions /// balance. Permitted values include: bank_transfer. /// [JsonProperty("funding_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("funding_type")] +#endif public string FundingType { get; set; } /// @@ -40,6 +49,9 @@ public class SessionPaymentMethodOptionsCustomerBalanceOptions : INestedOptions /// href="https://stripe.com/strong-customer-authentication">SCA. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsEpsOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsEpsOptions.cs index e6bf2b51b6..0a04994e48 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsEpsOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsEpsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsEpsOptions : INestedOptions { @@ -26,6 +29,9 @@ public class SessionPaymentMethodOptionsEpsOptions : INestedOptions /// href="https://stripe.com/strong-customer-authentication">SCA. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsFpxOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsFpxOptions.cs index 0acde9c10f..c9a94e02b6 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsFpxOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsFpxOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsFpxOptions : INestedOptions { @@ -26,6 +29,9 @@ public class SessionPaymentMethodOptionsFpxOptions : INestedOptions /// href="https://stripe.com/strong-customer-authentication">SCA. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsGiropayOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsGiropayOptions.cs index f1f32e608d..7008c7fe4f 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsGiropayOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsGiropayOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsGiropayOptions : INestedOptions { @@ -26,6 +29,9 @@ public class SessionPaymentMethodOptionsGiropayOptions : INestedOptions /// href="https://stripe.com/strong-customer-authentication">SCA. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsGrabpayOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsGrabpayOptions.cs index f98e442209..0aea4b2a13 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsGrabpayOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsGrabpayOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsGrabpayOptions : INestedOptions { @@ -26,6 +29,9 @@ public class SessionPaymentMethodOptionsGrabpayOptions : INestedOptions /// href="https://stripe.com/strong-customer-authentication">SCA. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsIdealOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsIdealOptions.cs index 92d3be1df4..cf381c8dad 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsIdealOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsIdealOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsIdealOptions : INestedOptions { @@ -26,6 +29,9 @@ public class SessionPaymentMethodOptionsIdealOptions : INestedOptions /// href="https://stripe.com/strong-customer-authentication">SCA. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsKakaoPayOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsKakaoPayOptions.cs index c4fc94aed6..597af6c782 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsKakaoPayOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsKakaoPayOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsKakaoPayOptions : INestedOptions { @@ -9,6 +12,9 @@ public class SessionPaymentMethodOptionsKakaoPayOptions : INestedOptions /// Controls when the funds will be captured from the customer's account. /// [JsonProperty("capture_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("capture_method")] +#endif public string CaptureMethod { get; set; } /// @@ -33,6 +39,9 @@ public class SessionPaymentMethodOptionsKakaoPayOptions : INestedOptions /// One of: none, or off_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsKlarnaOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsKlarnaOptions.cs index c248f0f058..746998ca22 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsKlarnaOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsKlarnaOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsKlarnaOptions : INestedOptions { @@ -26,6 +29,9 @@ public class SessionPaymentMethodOptionsKlarnaOptions : INestedOptions /// href="https://stripe.com/strong-customer-authentication">SCA. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsKonbiniOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsKonbiniOptions.cs index 29a8622944..a7083b84bf 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsKonbiniOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsKonbiniOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsKonbiniOptions : INestedOptions { @@ -12,6 +15,9 @@ public class SessionPaymentMethodOptionsKonbiniOptions : INestedOptions /// Wednesday 23:59:59 JST. Defaults to 3 days. /// [JsonProperty("expires_after_days")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("expires_after_days")] +#endif public long? ExpiresAfterDays { get; set; } /// @@ -35,6 +41,9 @@ public class SessionPaymentMethodOptionsKonbiniOptions : INestedOptions /// href="https://stripe.com/strong-customer-authentication">SCA. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsKrCardOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsKrCardOptions.cs index e14c0e24dd..925cfb8a76 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsKrCardOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsKrCardOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsKrCardOptions : INestedOptions { @@ -9,6 +12,9 @@ public class SessionPaymentMethodOptionsKrCardOptions : INestedOptions /// Controls when the funds will be captured from the customer's account. /// [JsonProperty("capture_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("capture_method")] +#endif public string CaptureMethod { get; set; } /// @@ -33,6 +39,9 @@ public class SessionPaymentMethodOptionsKrCardOptions : INestedOptions /// One of: none, or off_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsLinkOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsLinkOptions.cs index f1d097fcbb..2d12f8fc60 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsLinkOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsLinkOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsLinkOptions : INestedOptions { @@ -27,6 +30,9 @@ public class SessionPaymentMethodOptionsLinkOptions : INestedOptions /// One of: none, or off_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsMobilepayOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsMobilepayOptions.cs index 74212b5efe..576a4e02b4 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsMobilepayOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsMobilepayOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsMobilepayOptions : INestedOptions { @@ -26,6 +29,9 @@ public class SessionPaymentMethodOptionsMobilepayOptions : INestedOptions /// href="https://stripe.com/strong-customer-authentication">SCA. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsMultibancoOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsMultibancoOptions.cs index 9ce87d8dde..206d49ed87 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsMultibancoOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsMultibancoOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsMultibancoOptions : INestedOptions { @@ -26,6 +29,9 @@ public class SessionPaymentMethodOptionsMultibancoOptions : INestedOptions /// href="https://stripe.com/strong-customer-authentication">SCA. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsNaverPayOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsNaverPayOptions.cs index a9548835c2..0e37ab5cf7 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsNaverPayOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsNaverPayOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsNaverPayOptions : INestedOptions { @@ -9,6 +12,9 @@ public class SessionPaymentMethodOptionsNaverPayOptions : INestedOptions /// Controls when the funds will be captured from the customer's account. /// [JsonProperty("capture_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("capture_method")] +#endif public string CaptureMethod { get; set; } /// @@ -33,6 +39,9 @@ public class SessionPaymentMethodOptionsNaverPayOptions : INestedOptions /// One of: none, or off_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsOptions.cs index dca421f322..740653130f 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsOptions : INestedOptions { @@ -9,228 +12,342 @@ public class SessionPaymentMethodOptionsOptions : INestedOptions /// contains details about the ACSS Debit payment method options. /// [JsonProperty("acss_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("acss_debit")] +#endif public SessionPaymentMethodOptionsAcssDebitOptions AcssDebit { get; set; } /// /// contains details about the Affirm payment method options. /// [JsonProperty("affirm")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("affirm")] +#endif public SessionPaymentMethodOptionsAffirmOptions Affirm { get; set; } /// /// contains details about the Afterpay Clearpay payment method options. /// [JsonProperty("afterpay_clearpay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("afterpay_clearpay")] +#endif public SessionPaymentMethodOptionsAfterpayClearpayOptions AfterpayClearpay { get; set; } /// /// contains details about the Alipay payment method options. /// [JsonProperty("alipay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("alipay")] +#endif public SessionPaymentMethodOptionsAlipayOptions Alipay { get; set; } /// /// contains details about the AmazonPay payment method options. /// [JsonProperty("amazon_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amazon_pay")] +#endif public SessionPaymentMethodOptionsAmazonPayOptions AmazonPay { get; set; } /// /// contains details about the AU Becs Debit payment method options. /// [JsonProperty("au_becs_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("au_becs_debit")] +#endif public SessionPaymentMethodOptionsAuBecsDebitOptions AuBecsDebit { get; set; } /// /// contains details about the Bacs Debit payment method options. /// [JsonProperty("bacs_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bacs_debit")] +#endif public SessionPaymentMethodOptionsBacsDebitOptions BacsDebit { get; set; } /// /// contains details about the Bancontact payment method options. /// [JsonProperty("bancontact")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bancontact")] +#endif public SessionPaymentMethodOptionsBancontactOptions Bancontact { get; set; } /// /// contains details about the Boleto payment method options. /// [JsonProperty("boleto")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("boleto")] +#endif public SessionPaymentMethodOptionsBoletoOptions Boleto { get; set; } /// /// contains details about the Card payment method options. /// [JsonProperty("card")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card")] +#endif public SessionPaymentMethodOptionsCardOptions Card { get; set; } /// /// contains details about the Cashapp Pay payment method options. /// [JsonProperty("cashapp")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cashapp")] +#endif public SessionPaymentMethodOptionsCashappOptions Cashapp { get; set; } /// /// contains details about the Customer Balance payment method options. /// [JsonProperty("customer_balance")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_balance")] +#endif public SessionPaymentMethodOptionsCustomerBalanceOptions CustomerBalance { get; set; } /// /// contains details about the EPS payment method options. /// [JsonProperty("eps")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("eps")] +#endif public SessionPaymentMethodOptionsEpsOptions Eps { get; set; } /// /// contains details about the FPX payment method options. /// [JsonProperty("fpx")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fpx")] +#endif public SessionPaymentMethodOptionsFpxOptions Fpx { get; set; } /// /// contains details about the Giropay payment method options. /// [JsonProperty("giropay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("giropay")] +#endif public SessionPaymentMethodOptionsGiropayOptions Giropay { get; set; } /// /// contains details about the Grabpay payment method options. /// [JsonProperty("grabpay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("grabpay")] +#endif public SessionPaymentMethodOptionsGrabpayOptions Grabpay { get; set; } /// /// contains details about the Ideal payment method options. /// [JsonProperty("ideal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ideal")] +#endif public SessionPaymentMethodOptionsIdealOptions Ideal { get; set; } /// /// contains details about the Kakao Pay payment method options. /// [JsonProperty("kakao_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("kakao_pay")] +#endif public SessionPaymentMethodOptionsKakaoPayOptions KakaoPay { get; set; } /// /// contains details about the Klarna payment method options. /// [JsonProperty("klarna")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("klarna")] +#endif public SessionPaymentMethodOptionsKlarnaOptions Klarna { get; set; } /// /// contains details about the Konbini payment method options. /// [JsonProperty("konbini")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("konbini")] +#endif public SessionPaymentMethodOptionsKonbiniOptions Konbini { get; set; } /// /// contains details about the Korean card payment method options. /// [JsonProperty("kr_card")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("kr_card")] +#endif public SessionPaymentMethodOptionsKrCardOptions KrCard { get; set; } /// /// contains details about the Link payment method options. /// [JsonProperty("link")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("link")] +#endif public SessionPaymentMethodOptionsLinkOptions Link { get; set; } /// /// contains details about the Mobilepay payment method options. /// [JsonProperty("mobilepay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mobilepay")] +#endif public SessionPaymentMethodOptionsMobilepayOptions Mobilepay { get; set; } /// /// contains details about the Multibanco payment method options. /// [JsonProperty("multibanco")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("multibanco")] +#endif public SessionPaymentMethodOptionsMultibancoOptions Multibanco { get; set; } /// /// contains details about the Naver Pay payment method options. /// [JsonProperty("naver_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("naver_pay")] +#endif public SessionPaymentMethodOptionsNaverPayOptions NaverPay { get; set; } /// /// contains details about the OXXO payment method options. /// [JsonProperty("oxxo")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("oxxo")] +#endif public SessionPaymentMethodOptionsOxxoOptions Oxxo { get; set; } /// /// contains details about the P24 payment method options. /// [JsonProperty("p24")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("p24")] +#endif public SessionPaymentMethodOptionsP24Options P24 { get; set; } /// /// contains details about the PAYCO payment method options. /// [JsonProperty("payco")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payco")] +#endif public SessionPaymentMethodOptionsPaycoOptions Payco { get; set; } /// /// contains details about the PayNow payment method options. /// [JsonProperty("paynow")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("paynow")] +#endif public SessionPaymentMethodOptionsPaynowOptions Paynow { get; set; } /// /// contains details about the PayPal payment method options. /// [JsonProperty("paypal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("paypal")] +#endif public SessionPaymentMethodOptionsPaypalOptions Paypal { get; set; } /// /// contains details about the Pix payment method options. /// [JsonProperty("pix")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("pix")] +#endif public SessionPaymentMethodOptionsPixOptions Pix { get; set; } /// /// contains details about the RevolutPay payment method options. /// [JsonProperty("revolut_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("revolut_pay")] +#endif public SessionPaymentMethodOptionsRevolutPayOptions RevolutPay { get; set; } /// /// contains details about the Samsung Pay payment method options. /// [JsonProperty("samsung_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("samsung_pay")] +#endif public SessionPaymentMethodOptionsSamsungPayOptions SamsungPay { get; set; } /// /// contains details about the Sepa Debit payment method options. /// [JsonProperty("sepa_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sepa_debit")] +#endif public SessionPaymentMethodOptionsSepaDebitOptions SepaDebit { get; set; } /// /// contains details about the Sofort payment method options. /// [JsonProperty("sofort")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sofort")] +#endif public SessionPaymentMethodOptionsSofortOptions Sofort { get; set; } /// /// contains details about the Swish payment method options. /// [JsonProperty("swish")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("swish")] +#endif public SessionPaymentMethodOptionsSwishOptions Swish { get; set; } /// /// contains details about the Us Bank Account payment method options. /// [JsonProperty("us_bank_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("us_bank_account")] +#endif public SessionPaymentMethodOptionsUsBankAccountOptions UsBankAccount { get; set; } /// /// contains details about the WeChat Pay payment method options. /// [JsonProperty("wechat_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("wechat_pay")] +#endif public SessionPaymentMethodOptionsWechatPayOptions WechatPay { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsOxxoOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsOxxoOptions.cs index 3419f420ee..0a037842ce 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsOxxoOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsOxxoOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsOxxoOptions : INestedOptions { @@ -11,6 +14,9 @@ public class SessionPaymentMethodOptionsOxxoOptions : INestedOptions /// expire on Wednesday at 23:59 America/Mexico_City time. /// [JsonProperty("expires_after_days")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("expires_after_days")] +#endif public long? ExpiresAfterDays { get; set; } /// @@ -34,6 +40,9 @@ public class SessionPaymentMethodOptionsOxxoOptions : INestedOptions /// href="https://stripe.com/strong-customer-authentication">SCA. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsP24Options.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsP24Options.cs index fc06213909..685386bcd0 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsP24Options.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsP24Options.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsP24Options : INestedOptions { @@ -26,12 +29,18 @@ public class SessionPaymentMethodOptionsP24Options : INestedOptions /// href="https://stripe.com/strong-customer-authentication">SCA. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } /// /// Confirm that the payer has accepted the P24 terms and conditions. /// [JsonProperty("tos_shown_and_accepted")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tos_shown_and_accepted")] +#endif public bool? TosShownAndAccepted { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsPaycoOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsPaycoOptions.cs index 5164581d71..5f31bc1c8d 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsPaycoOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsPaycoOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsPaycoOptions : INestedOptions { @@ -9,6 +12,9 @@ public class SessionPaymentMethodOptionsPaycoOptions : INestedOptions /// Controls when the funds will be captured from the customer's account. /// [JsonProperty("capture_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("capture_method")] +#endif public string CaptureMethod { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsPaynowOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsPaynowOptions.cs index 0d2afd5760..14ca9f0d89 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsPaynowOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsPaynowOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsPaynowOptions : INestedOptions { @@ -26,6 +29,9 @@ public class SessionPaymentMethodOptionsPaynowOptions : INestedOptions /// href="https://stripe.com/strong-customer-authentication">SCA. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsPaypalOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsPaypalOptions.cs index 637b613d75..bc250e0302 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsPaypalOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsPaypalOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsPaypalOptions : INestedOptions { @@ -9,6 +12,9 @@ public class SessionPaymentMethodOptionsPaypalOptions : INestedOptions /// Controls when the funds will be captured from the customer's account. /// [JsonProperty("capture_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("capture_method")] +#endif public string CaptureMethod { get; set; } /// @@ -20,6 +26,9 @@ public class SessionPaymentMethodOptionsPaypalOptions : INestedOptions /// pl-PL, pt-PT, sk-SK, or sv-SE. /// [JsonProperty("preferred_locale")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preferred_locale")] +#endif public string PreferredLocale { get; set; } /// @@ -28,12 +37,18 @@ public class SessionPaymentMethodOptionsPaypalOptions : INestedOptions /// settings to block multiple payments per invoice ID. /// [JsonProperty("reference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reference")] +#endif public string Reference { get; set; } /// /// The risk correlation ID for an on-session payment using a saved PayPal payment method. /// [JsonProperty("risk_correlation_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("risk_correlation_id")] +#endif public string RiskCorrelationId { get; set; } /// @@ -62,6 +77,9 @@ public class SessionPaymentMethodOptionsPaypalOptions : INestedOptions /// One of: none, or off_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsPixOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsPixOptions.cs index 2e6b0f87fc..cd27203643 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsPixOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsPixOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsPixOptions : INestedOptions { @@ -10,6 +13,9 @@ public class SessionPaymentMethodOptionsPixOptions : INestedOptions /// Defaults to 86400 seconds. /// [JsonProperty("expires_after_seconds")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("expires_after_seconds")] +#endif public long? ExpiresAfterSeconds { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsRevolutPayOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsRevolutPayOptions.cs index eaa7a0b855..44d21d3db6 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsRevolutPayOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsRevolutPayOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsRevolutPayOptions : INestedOptions { @@ -27,6 +30,9 @@ public class SessionPaymentMethodOptionsRevolutPayOptions : INestedOptions /// One of: none, or off_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsSamsungPayOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsSamsungPayOptions.cs index 64ed560ac4..dfa9eff745 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsSamsungPayOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsSamsungPayOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsSamsungPayOptions : INestedOptions { @@ -9,6 +12,9 @@ public class SessionPaymentMethodOptionsSamsungPayOptions : INestedOptions /// Controls when the funds will be captured from the customer's account. /// [JsonProperty("capture_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("capture_method")] +#endif public string CaptureMethod { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsSepaDebitOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsSepaDebitOptions.cs index dd7c837df4..5bdda86d3e 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsSepaDebitOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsSepaDebitOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsSepaDebitOptions : INestedOptions { @@ -9,6 +12,9 @@ public class SessionPaymentMethodOptionsSepaDebitOptions : INestedOptions /// Additional fields for Mandate creation. /// [JsonProperty("mandate_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mandate_options")] +#endif public SessionPaymentMethodOptionsSepaDebitMandateOptionsOptions MandateOptions { get; set; } /// @@ -33,6 +39,9 @@ public class SessionPaymentMethodOptionsSepaDebitOptions : INestedOptions /// One of: none, off_session, or on_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsSofortOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsSofortOptions.cs index f2b40b756b..366e17ed9f 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsSofortOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsSofortOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsSofortOptions : INestedOptions { @@ -26,6 +29,9 @@ public class SessionPaymentMethodOptionsSofortOptions : INestedOptions /// href="https://stripe.com/strong-customer-authentication">SCA. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsSwishOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsSwishOptions.cs index 3051a0621a..d7a26c85d7 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsSwishOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsSwishOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsSwishOptions : INestedOptions { @@ -10,6 +13,9 @@ public class SessionPaymentMethodOptionsSwishOptions : INestedOptions /// Defaults to the id of the Payment Intent. /// [JsonProperty("reference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reference")] +#endif public string Reference { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsUsBankAccountFinancialConnectionsOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsUsBankAccountFinancialConnectionsOptions.cs index ec240147c8..8a4669f35b 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsUsBankAccountFinancialConnectionsOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsUsBankAccountFinancialConnectionsOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.Checkout { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsUsBankAccountFinancialConnectionsOptions : INestedOptions { @@ -14,6 +17,9 @@ public class SessionPaymentMethodOptionsUsBankAccountFinancialConnectionsOptions /// transactions. /// [JsonProperty("permissions")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("permissions")] +#endif public List Permissions { get; set; } /// @@ -21,6 +27,9 @@ public class SessionPaymentMethodOptionsUsBankAccountFinancialConnectionsOptions /// One of: balances, ownership, or transactions. /// [JsonProperty("prefetch")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("prefetch")] +#endif public List Prefetch { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsUsBankAccountOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsUsBankAccountOptions.cs index 6ee4dedd77..2623b2fd39 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsUsBankAccountOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsUsBankAccountOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsUsBankAccountOptions : INestedOptions { @@ -9,6 +12,9 @@ public class SessionPaymentMethodOptionsUsBankAccountOptions : INestedOptions /// Additional fields for Financial Connections Session creation. /// [JsonProperty("financial_connections")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("financial_connections")] +#endif public SessionPaymentMethodOptionsUsBankAccountFinancialConnectionsOptions FinancialConnections { get; set; } /// @@ -33,6 +39,9 @@ public class SessionPaymentMethodOptionsUsBankAccountOptions : INestedOptions /// One of: none, off_session, or on_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } /// @@ -40,6 +49,9 @@ public class SessionPaymentMethodOptionsUsBankAccountOptions : INestedOptions /// One of: automatic, or instant. /// [JsonProperty("verification_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("verification_method")] +#endif public string VerificationMethod { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsWechatPayOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsWechatPayOptions.cs index cd368191f1..633fced469 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsWechatPayOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsWechatPayOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPaymentMethodOptionsWechatPayOptions : INestedOptions { @@ -9,6 +12,9 @@ public class SessionPaymentMethodOptionsWechatPayOptions : INestedOptions /// The app ID registered with WeChat Pay. Only required when client is ios or android. /// [JsonProperty("app_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("app_id")] +#endif public string AppId { get; set; } /// @@ -16,6 +22,9 @@ public class SessionPaymentMethodOptionsWechatPayOptions : INestedOptions /// One of: android, ios, or web. /// [JsonProperty("client")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("client")] +#endif public string Client { get; set; } /// @@ -39,6 +48,9 @@ public class SessionPaymentMethodOptionsWechatPayOptions : INestedOptions /// href="https://stripe.com/strong-customer-authentication">SCA. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionPhoneNumberCollectionOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionPhoneNumberCollectionOptions.cs index ecdbcdafb4..e1ea84a2e6 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionPhoneNumberCollectionOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionPhoneNumberCollectionOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionPhoneNumberCollectionOptions : INestedOptions { @@ -9,6 +12,9 @@ public class SessionPhoneNumberCollectionOptions : INestedOptions /// Set to true to enable phone number collection. /// [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool? Enabled { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionSavedPaymentMethodOptionsOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionSavedPaymentMethodOptionsOptions.cs index faeaabb1ad..95689a4760 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionSavedPaymentMethodOptionsOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionSavedPaymentMethodOptionsOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.Checkout { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionSavedPaymentMethodOptionsOptions : INestedOptions { @@ -13,6 +16,9 @@ public class SessionSavedPaymentMethodOptionsOptions : INestedOptions /// One of: always, limited, or unspecified. /// [JsonProperty("allow_redisplay_filters")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("allow_redisplay_filters")] +#endif public List AllowRedisplayFilters { get; set; } /// @@ -21,6 +27,9 @@ public class SessionSavedPaymentMethodOptionsOptions : INestedOptions /// One of: disabled, or enabled. /// [JsonProperty("payment_method_save")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_save")] +#endif public string PaymentMethodSave { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionSetupIntentDataOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionSetupIntentDataOptions.cs index bc5767ccb4..c75fd508d3 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionSetupIntentDataOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionSetupIntentDataOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.Checkout { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionSetupIntentDataOptions : INestedOptions, IHasMetadata { @@ -10,6 +13,9 @@ public class SessionSetupIntentDataOptions : INestedOptions, IHasMetadata /// An arbitrary string attached to the object. Often useful for displaying to users. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// @@ -19,12 +25,18 @@ public class SessionSetupIntentDataOptions : INestedOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// The Stripe account for which the setup is intended. /// [JsonProperty("on_behalf_of")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("on_behalf_of")] +#endif public string OnBehalfOf { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionShippingAddressCollectionOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionShippingAddressCollectionOptions.cs index dbd95a0daa..0922df50cb 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionShippingAddressCollectionOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionShippingAddressCollectionOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.Checkout { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionShippingAddressCollectionOptions : INestedOptions { @@ -41,6 +44,9 @@ public class SessionShippingAddressCollectionOptions : INestedOptions /// YE, YT, ZA, ZM, ZW, or ZZ. /// [JsonProperty("allowed_countries")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("allowed_countries")] +#endif public List AllowedCountries { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionShippingOptionOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionShippingOptionOptions.cs index 55aa569ec0..5b61091091 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionShippingOptionOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionShippingOptionOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionShippingOptionOptions : INestedOptions { @@ -9,12 +12,18 @@ public class SessionShippingOptionOptions : INestedOptions /// The ID of the Shipping Rate to use for this shipping option. /// [JsonProperty("shipping_rate")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping_rate")] +#endif public string ShippingRate { get; set; } /// /// Parameters to be passed to Shipping Rate creation for this shipping option. /// [JsonProperty("shipping_rate_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping_rate_data")] +#endif public SessionShippingOptionShippingRateDataOptions ShippingRateData { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionShippingOptionShippingRateDataDeliveryEstimateMaximumOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionShippingOptionShippingRateDataDeliveryEstimateMaximumOptions.cs index c901ebf8b0..0d26e73681 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionShippingOptionShippingRateDataDeliveryEstimateMaximumOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionShippingOptionShippingRateDataDeliveryEstimateMaximumOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionShippingOptionShippingRateDataDeliveryEstimateMaximumOptions : INestedOptions { @@ -10,12 +13,18 @@ public class SessionShippingOptionShippingRateDataDeliveryEstimateMaximumOptions /// One of: business_day, day, hour, month, or week. /// [JsonProperty("unit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit")] +#endif public string Unit { get; set; } /// /// Must be greater than 0. /// [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public long? Value { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionShippingOptionShippingRateDataDeliveryEstimateMinimumOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionShippingOptionShippingRateDataDeliveryEstimateMinimumOptions.cs index f11f50b332..d2fe972e6e 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionShippingOptionShippingRateDataDeliveryEstimateMinimumOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionShippingOptionShippingRateDataDeliveryEstimateMinimumOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionShippingOptionShippingRateDataDeliveryEstimateMinimumOptions : INestedOptions { @@ -10,12 +13,18 @@ public class SessionShippingOptionShippingRateDataDeliveryEstimateMinimumOptions /// One of: business_day, day, hour, month, or week. /// [JsonProperty("unit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit")] +#endif public string Unit { get; set; } /// /// Must be greater than 0. /// [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public long? Value { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionShippingOptionShippingRateDataDeliveryEstimateOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionShippingOptionShippingRateDataDeliveryEstimateOptions.cs index 174a365eee..977a165a32 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionShippingOptionShippingRateDataDeliveryEstimateOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionShippingOptionShippingRateDataDeliveryEstimateOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionShippingOptionShippingRateDataDeliveryEstimateOptions : INestedOptions { @@ -10,12 +13,18 @@ public class SessionShippingOptionShippingRateDataDeliveryEstimateOptions : INes /// infinite. /// [JsonProperty("maximum")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("maximum")] +#endif public SessionShippingOptionShippingRateDataDeliveryEstimateMaximumOptions Maximum { get; set; } /// /// The lower bound of the estimated range. If empty, represents no lower bound. /// [JsonProperty("minimum")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("minimum")] +#endif public SessionShippingOptionShippingRateDataDeliveryEstimateMinimumOptions Minimum { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionShippingOptionShippingRateDataFixedAmountCurrencyOptionsOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionShippingOptionShippingRateDataFixedAmountCurrencyOptionsOptions.cs index bb0f2d9264..aeba5d0562 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionShippingOptionShippingRateDataFixedAmountCurrencyOptionsOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionShippingOptionShippingRateDataFixedAmountCurrencyOptionsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionShippingOptionShippingRateDataFixedAmountCurrencyOptionsOptions : INestedOptions { @@ -9,6 +12,9 @@ public class SessionShippingOptionShippingRateDataFixedAmountCurrencyOptionsOpti /// A non-negative integer in cents representing how much to charge. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long? Amount { get; set; } /// @@ -17,6 +23,9 @@ public class SessionShippingOptionShippingRateDataFixedAmountCurrencyOptionsOpti /// One of: exclusive, inclusive, or unspecified. /// [JsonProperty("tax_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_behavior")] +#endif public string TaxBehavior { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionShippingOptionShippingRateDataFixedAmountOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionShippingOptionShippingRateDataFixedAmountOptions.cs index 8b90cf0bc6..ad9797fcdc 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionShippingOptionShippingRateDataFixedAmountOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionShippingOptionShippingRateDataFixedAmountOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.Checkout { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionShippingOptionShippingRateDataFixedAmountOptions : INestedOptions { @@ -10,6 +13,9 @@ public class SessionShippingOptionShippingRateDataFixedAmountOptions : INestedOp /// A non-negative integer in cents representing how much to charge. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long? Amount { get; set; } /// @@ -18,6 +24,9 @@ public class SessionShippingOptionShippingRateDataFixedAmountOptions : INestedOp /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// @@ -26,6 +35,9 @@ public class SessionShippingOptionShippingRateDataFixedAmountOptions : INestedOp /// code and a supported currency. /// [JsonProperty("currency_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency_options")] +#endif public Dictionary CurrencyOptions { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionShippingOptionShippingRateDataOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionShippingOptionShippingRateDataOptions.cs index 8f2e6a133a..2087600ea1 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionShippingOptionShippingRateDataOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionShippingOptionShippingRateDataOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.Checkout { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionShippingOptionShippingRateDataOptions : INestedOptions, IHasMetadata { @@ -11,6 +14,9 @@ public class SessionShippingOptionShippingRateDataOptions : INestedOptions, IHas /// customer. This will appear on CheckoutSessions. /// [JsonProperty("delivery_estimate")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("delivery_estimate")] +#endif public SessionShippingOptionShippingRateDataDeliveryEstimateOptions DeliveryEstimate { get; set; } /// @@ -18,6 +24,9 @@ public class SessionShippingOptionShippingRateDataOptions : INestedOptions, IHas /// on CheckoutSessions. /// [JsonProperty("display_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_name")] +#endif public string DisplayName { get; set; } /// @@ -25,6 +34,9 @@ public class SessionShippingOptionShippingRateDataOptions : INestedOptions, IHas /// fixed_amount. /// [JsonProperty("fixed_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fixed_amount")] +#endif public SessionShippingOptionShippingRateDataFixedAmountOptions FixedAmount { get; set; } /// @@ -34,6 +46,9 @@ public class SessionShippingOptionShippingRateDataOptions : INestedOptions, IHas /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -42,6 +57,9 @@ public class SessionShippingOptionShippingRateDataOptions : INestedOptions, IHas /// One of: exclusive, inclusive, or unspecified. /// [JsonProperty("tax_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_behavior")] +#endif public string TaxBehavior { get; set; } /// @@ -49,12 +67,18 @@ public class SessionShippingOptionShippingRateDataOptions : INestedOptions, IHas /// code is txcd_92010001. /// [JsonProperty("tax_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_code")] +#endif public string TaxCode { get; set; } /// /// The type of calculation to use on the shipping rate. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionSubscriptionDataInvoiceSettingsIssuerOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionSubscriptionDataInvoiceSettingsIssuerOptions.cs index 35afdb0729..abd7f84016 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionSubscriptionDataInvoiceSettingsIssuerOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionSubscriptionDataInvoiceSettingsIssuerOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionSubscriptionDataInvoiceSettingsIssuerOptions : INestedOptions { @@ -9,6 +12,9 @@ public class SessionSubscriptionDataInvoiceSettingsIssuerOptions : INestedOption /// The connected account being referenced when type is account. /// [JsonProperty("account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account")] +#endif public string Account { get; set; } /// @@ -16,6 +22,9 @@ public class SessionSubscriptionDataInvoiceSettingsIssuerOptions : INestedOption /// One of: account, or self. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionSubscriptionDataInvoiceSettingsOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionSubscriptionDataInvoiceSettingsOptions.cs index 7e9c8c7b0d..3235f91da3 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionSubscriptionDataInvoiceSettingsOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionSubscriptionDataInvoiceSettingsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionSubscriptionDataInvoiceSettingsOptions : INestedOptions { @@ -10,6 +13,9 @@ public class SessionSubscriptionDataInvoiceSettingsOptions : INestedOptions /// branding and support information of the specified account. /// [JsonProperty("issuer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("issuer")] +#endif public SessionSubscriptionDataInvoiceSettingsIssuerOptions Issuer { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionSubscriptionDataOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionSubscriptionDataOptions.cs index a32bebec3f..1a440f826c 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionSubscriptionDataOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionSubscriptionDataOptions.cs @@ -5,6 +5,9 @@ namespace Stripe.Checkout using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionSubscriptionDataOptions : INestedOptions, IHasMetadata { @@ -17,6 +20,9 @@ public class SessionSubscriptionDataOptions : INestedOptions, IHasMetadata /// href="https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions">documentation. /// [JsonProperty("application_fee_percent")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("application_fee_percent")] +#endif public decimal? ApplicationFeePercent { get; set; } /// @@ -24,6 +30,10 @@ public class SessionSubscriptionDataOptions : INestedOptions, IHasMetadata /// [JsonProperty("billing_cycle_anchor")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_cycle_anchor")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? BillingCycleAnchor { get; set; } /// @@ -32,6 +42,9 @@ public class SessionSubscriptionDataOptions : INestedOptions, IHasMetadata /// populated from the subscription. /// [JsonProperty("default_tax_rates")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("default_tax_rates")] +#endif public List DefaultTaxRates { get; set; } /// @@ -40,12 +53,18 @@ public class SessionSubscriptionDataOptions : INestedOptions, IHasMetadata /// href="https://stripe.com/docs/customer-management">customer portal. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// /// All invoices will be billed using the specified settings. /// [JsonProperty("invoice_settings")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("invoice_settings")] +#endif public SessionSubscriptionDataInvoiceSettingsOptions InvoiceSettings { get; set; } /// @@ -55,12 +74,18 @@ public class SessionSubscriptionDataOptions : INestedOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// The account on behalf of which to charge, for each of the subscription's invoices. /// [JsonProperty("on_behalf_of")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("on_behalf_of")] +#endif public string OnBehalfOf { get; set; } /// @@ -69,6 +94,9 @@ public class SessionSubscriptionDataOptions : INestedOptions, IHasMetadata /// One of: create_prorations, or none. /// [JsonProperty("proration_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("proration_behavior")] +#endif public string ProrationBehavior { get; set; } /// @@ -77,6 +105,9 @@ public class SessionSubscriptionDataOptions : INestedOptions, IHasMetadata /// charges. /// [JsonProperty("transfer_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transfer_data")] +#endif public SessionSubscriptionDataTransferDataOptions TransferData { get; set; } /// @@ -85,6 +116,10 @@ public class SessionSubscriptionDataOptions : INestedOptions, IHasMetadata /// [JsonProperty("trial_end")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("trial_end")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? TrialEnd { get; set; } /// @@ -92,12 +127,18 @@ public class SessionSubscriptionDataOptions : INestedOptions, IHasMetadata /// the first time. Has to be at least 1. /// [JsonProperty("trial_period_days")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("trial_period_days")] +#endif public long? TrialPeriodDays { get; set; } /// /// Settings related to subscription trials. /// [JsonProperty("trial_settings")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("trial_settings")] +#endif public SessionSubscriptionDataTrialSettingsOptions TrialSettings { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionSubscriptionDataTransferDataOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionSubscriptionDataTransferDataOptions.cs index f495c90533..df6274aeb3 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionSubscriptionDataTransferDataOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionSubscriptionDataTransferDataOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionSubscriptionDataTransferDataOptions : INestedOptions { @@ -12,12 +15,18 @@ public class SessionSubscriptionDataTransferDataOptions : INestedOptions /// destination. /// [JsonProperty("amount_percent")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_percent")] +#endif public decimal? AmountPercent { get; set; } /// /// ID of an existing, connected Stripe account. /// [JsonProperty("destination")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("destination")] +#endif public string Destination { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionSubscriptionDataTrialSettingsEndBehaviorOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionSubscriptionDataTrialSettingsEndBehaviorOptions.cs index 94687d607b..0f0bffa9d0 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionSubscriptionDataTrialSettingsEndBehaviorOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionSubscriptionDataTrialSettingsEndBehaviorOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionSubscriptionDataTrialSettingsEndBehaviorOptions : INestedOptions { @@ -11,6 +14,9 @@ public class SessionSubscriptionDataTrialSettingsEndBehaviorOptions : INestedOpt /// One of: cancel, create_invoice, or pause. /// [JsonProperty("missing_payment_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("missing_payment_method")] +#endif public string MissingPaymentMethod { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionSubscriptionDataTrialSettingsOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionSubscriptionDataTrialSettingsOptions.cs index f69b336b5d..bdd63d49ec 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionSubscriptionDataTrialSettingsOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionSubscriptionDataTrialSettingsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionSubscriptionDataTrialSettingsOptions : INestedOptions { @@ -9,6 +12,9 @@ public class SessionSubscriptionDataTrialSettingsOptions : INestedOptions /// Defines how the subscription should behave when the user's free trial ends. /// [JsonProperty("end_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("end_behavior")] +#endif public SessionSubscriptionDataTrialSettingsEndBehaviorOptions EndBehavior { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionTaxIdCollectionOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionTaxIdCollectionOptions.cs index 73a037694e..ef27e41a4e 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionTaxIdCollectionOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionTaxIdCollectionOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Checkout { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionTaxIdCollectionOptions : INestedOptions { @@ -9,6 +12,9 @@ public class SessionTaxIdCollectionOptions : INestedOptions /// Enable tax ID collection during checkout. Defaults to false. /// [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool? Enabled { get; set; } /// @@ -16,6 +22,9 @@ public class SessionTaxIdCollectionOptions : INestedOptions /// One of: if_supported, or never. /// [JsonProperty("required")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("required")] +#endif public string Required { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionUpdateOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionUpdateOptions.cs index e8e48990fd..e4b263c5c9 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionUpdateOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionUpdateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.Checkout { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionUpdateOptions : BaseOptions, IHasMetadata { @@ -13,6 +16,9 @@ public class SessionUpdateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } } } diff --git a/src/Stripe.net/Services/Climate/Orders/OrderBeneficiaryOptions.cs b/src/Stripe.net/Services/Climate/Orders/OrderBeneficiaryOptions.cs index 078dbd985d..9ca0b93ff5 100644 --- a/src/Stripe.net/Services/Climate/Orders/OrderBeneficiaryOptions.cs +++ b/src/Stripe.net/Services/Climate/Orders/OrderBeneficiaryOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Climate { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class OrderBeneficiaryOptions : INestedOptions { @@ -9,6 +12,9 @@ public class OrderBeneficiaryOptions : INestedOptions /// Publicly displayable name for the end beneficiary of carbon removal. /// [JsonProperty("public_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("public_name")] +#endif public string PublicName { get; set; } } } diff --git a/src/Stripe.net/Services/Climate/Orders/OrderCreateOptions.cs b/src/Stripe.net/Services/Climate/Orders/OrderCreateOptions.cs index a02faa61c6..cf1c4e0b72 100644 --- a/src/Stripe.net/Services/Climate/Orders/OrderCreateOptions.cs +++ b/src/Stripe.net/Services/Climate/Orders/OrderCreateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.Climate { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class OrderCreateOptions : BaseOptions, IHasMetadata { @@ -11,6 +14,9 @@ public class OrderCreateOptions : BaseOptions, IHasMetadata /// specified. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long? Amount { get; set; } /// @@ -18,6 +24,9 @@ public class OrderCreateOptions : BaseOptions, IHasMetadata /// Stripe account if not set. /// [JsonProperty("beneficiary")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("beneficiary")] +#endif public OrderBeneficiaryOptions Beneficiary { get; set; } /// @@ -27,6 +36,9 @@ public class OrderCreateOptions : BaseOptions, IHasMetadata /// currency for your account. If omitted, the account's default currency will be used. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// @@ -36,18 +48,27 @@ public class OrderCreateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// Requested number of tons for the order. Either this or amount must be specified. /// [JsonProperty("metric_tons")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metric_tons")] +#endif public decimal? MetricTons { get; set; } /// /// Unique identifier of the Climate product. /// [JsonProperty("product")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("product")] +#endif public string Product { get; set; } } } diff --git a/src/Stripe.net/Services/Climate/Orders/OrderUpdateOptions.cs b/src/Stripe.net/Services/Climate/Orders/OrderUpdateOptions.cs index 118fcedcb0..9635747f4f 100644 --- a/src/Stripe.net/Services/Climate/Orders/OrderUpdateOptions.cs +++ b/src/Stripe.net/Services/Climate/Orders/OrderUpdateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.Climate { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class OrderUpdateOptions : BaseOptions, IHasMetadata { @@ -11,6 +14,9 @@ public class OrderUpdateOptions : BaseOptions, IHasMetadata /// Stripe account if not set. /// [JsonProperty("beneficiary")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("beneficiary")] +#endif public OrderBeneficiaryOptions Beneficiary { get; set; } /// @@ -20,6 +26,9 @@ public class OrderUpdateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } } } diff --git a/src/Stripe.net/Services/Coupons/CouponAppliesToOptions.cs b/src/Stripe.net/Services/Coupons/CouponAppliesToOptions.cs index 1d5a200a4c..bde013ea6a 100644 --- a/src/Stripe.net/Services/Coupons/CouponAppliesToOptions.cs +++ b/src/Stripe.net/Services/Coupons/CouponAppliesToOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CouponAppliesToOptions : INestedOptions { @@ -10,6 +13,9 @@ public class CouponAppliesToOptions : INestedOptions /// An array of Product IDs that this Coupon will apply to. /// [JsonProperty("products")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("products")] +#endif public List Products { get; set; } } } diff --git a/src/Stripe.net/Services/Coupons/CouponCreateOptions.cs b/src/Stripe.net/Services/Coupons/CouponCreateOptions.cs index ae552b6d63..6f7e042ecb 100644 --- a/src/Stripe.net/Services/Coupons/CouponCreateOptions.cs +++ b/src/Stripe.net/Services/Coupons/CouponCreateOptions.cs @@ -5,6 +5,9 @@ namespace Stripe using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CouponCreateOptions : BaseOptions, IHasId, IHasMetadata { @@ -13,12 +16,18 @@ public class CouponCreateOptions : BaseOptions, IHasId, IHasMetadata /// if percent_off is not passed). /// [JsonProperty("amount_off")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_off")] +#endif public long? AmountOff { get; set; } /// /// A hash containing directions for what this Coupon will apply discounts to. /// [JsonProperty("applies_to")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("applies_to")] +#endif public CouponAppliesToOptions AppliesTo { get; set; } /// @@ -26,6 +35,9 @@ public class CouponCreateOptions : BaseOptions, IHasId, IHasMetadata /// of the amount_off parameter (required if amount_off is passed). /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// @@ -35,6 +47,9 @@ public class CouponCreateOptions : BaseOptions, IHasId, IHasMetadata /// href="https://stripe.com/docs/currencies">supported currency. /// [JsonProperty("currency_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency_options")] +#endif public Dictionary CurrencyOptions { get; set; } /// @@ -43,6 +58,9 @@ public class CouponCreateOptions : BaseOptions, IHasId, IHasMetadata /// One of: forever, once, or repeating. /// [JsonProperty("duration")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("duration")] +#endif public string Duration { get; set; } /// @@ -50,6 +68,9 @@ public class CouponCreateOptions : BaseOptions, IHasId, IHasMetadata /// positive integer that specifies the number of months the discount will be in effect. /// [JsonProperty("duration_in_months")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("duration_in_months")] +#endif public long? DurationInMonths { get; set; } /// @@ -58,6 +79,9 @@ public class CouponCreateOptions : BaseOptions, IHasId, IHasMetadata /// blank and we'll generate a random code for you. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// @@ -66,6 +90,9 @@ public class CouponCreateOptions : BaseOptions, IHasId, IHasMetadata /// of your blog can use. /// [JsonProperty("max_redemptions")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("max_redemptions")] +#endif public long? MaxRedemptions { get; set; } /// @@ -75,6 +102,9 @@ public class CouponCreateOptions : BaseOptions, IHasId, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -82,6 +112,9 @@ public class CouponCreateOptions : BaseOptions, IHasId, IHasMetadata /// default the id is shown if name is not set. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } /// @@ -89,6 +122,9 @@ public class CouponCreateOptions : BaseOptions, IHasId, IHasMetadata /// discount the coupon will apply (required if amount_off is not passed). /// [JsonProperty("percent_off")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("percent_off")] +#endif public decimal? PercentOff { get; set; } /// @@ -97,6 +133,10 @@ public class CouponCreateOptions : BaseOptions, IHasId, IHasMetadata /// [JsonProperty("redeem_by")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("redeem_by")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? RedeemBy { get; set; } } } diff --git a/src/Stripe.net/Services/Coupons/CouponCurrencyOptionsOptions.cs b/src/Stripe.net/Services/Coupons/CouponCurrencyOptionsOptions.cs index 78ac53a2e7..c83dd57218 100644 --- a/src/Stripe.net/Services/Coupons/CouponCurrencyOptionsOptions.cs +++ b/src/Stripe.net/Services/Coupons/CouponCurrencyOptionsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CouponCurrencyOptionsOptions : INestedOptions { @@ -9,6 +12,9 @@ public class CouponCurrencyOptionsOptions : INestedOptions /// A positive integer representing the amount to subtract from an invoice total. /// [JsonProperty("amount_off")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_off")] +#endif public long? AmountOff { get; set; } } } diff --git a/src/Stripe.net/Services/Coupons/CouponUpdateOptions.cs b/src/Stripe.net/Services/Coupons/CouponUpdateOptions.cs index 972c14a205..8b1105a80c 100644 --- a/src/Stripe.net/Services/Coupons/CouponUpdateOptions.cs +++ b/src/Stripe.net/Services/Coupons/CouponUpdateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CouponUpdateOptions : BaseOptions, IHasMetadata { @@ -13,6 +16,9 @@ public class CouponUpdateOptions : BaseOptions, IHasMetadata /// href="https://stripe.com/docs/currencies">supported currency. /// [JsonProperty("currency_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency_options")] +#endif public Dictionary CurrencyOptions { get; set; } /// @@ -22,6 +28,9 @@ public class CouponUpdateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -29,6 +38,9 @@ public class CouponUpdateOptions : BaseOptions, IHasMetadata /// default the id is shown if name is not set. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } } } diff --git a/src/Stripe.net/Services/CreditNotePreviewLines/CreditNotePreviewLinesLineOptions.cs b/src/Stripe.net/Services/CreditNotePreviewLines/CreditNotePreviewLinesLineOptions.cs index cfcaa31067..06e59f7cdc 100644 --- a/src/Stripe.net/Services/CreditNotePreviewLines/CreditNotePreviewLinesLineOptions.cs +++ b/src/Stripe.net/Services/CreditNotePreviewLines/CreditNotePreviewLinesLineOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CreditNotePreviewLinesLineOptions : INestedOptions { @@ -12,6 +15,9 @@ public class CreditNotePreviewLinesLineOptions : INestedOptions /// exclusive. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long? Amount { get; set; } /// @@ -19,6 +25,9 @@ public class CreditNotePreviewLinesLineOptions : INestedOptions /// custom_line_item. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// @@ -26,12 +35,18 @@ public class CreditNotePreviewLinesLineOptions : INestedOptions /// invoice_line_item. /// [JsonProperty("invoice_line_item")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("invoice_line_item")] +#endif public string InvoiceLineItem { get; set; } /// /// The line item quantity to credit. /// [JsonProperty("quantity")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("quantity")] +#endif public long? Quantity { get; set; } /// @@ -39,6 +54,9 @@ public class CreditNotePreviewLinesLineOptions : INestedOptions /// tax_rates. /// [JsonProperty("tax_amounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_amounts")] +#endif public List TaxAmounts { get; set; } /// @@ -46,6 +64,9 @@ public class CreditNotePreviewLinesLineOptions : INestedOptions /// is custom_line_item and cannot be mixed with tax_amounts. /// [JsonProperty("tax_rates")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_rates")] +#endif public List TaxRates { get; set; } /// @@ -54,6 +75,9 @@ public class CreditNotePreviewLinesLineOptions : INestedOptions /// One of: custom_line_item, or invoice_line_item. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } /// @@ -62,6 +86,9 @@ public class CreditNotePreviewLinesLineOptions : INestedOptions /// credit for this line item. Only valid when type is custom_line_item. /// [JsonProperty("unit_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_amount")] +#endif public long? UnitAmount { get; set; } /// @@ -70,6 +97,9 @@ public class CreditNotePreviewLinesLineOptions : INestedOptions /// unit_amount_decimal can be set. /// [JsonProperty("unit_amount_decimal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_amount_decimal")] +#endif public decimal? UnitAmountDecimal { get; set; } } } diff --git a/src/Stripe.net/Services/CreditNotePreviewLines/CreditNotePreviewLinesLineTaxAmountOptions.cs b/src/Stripe.net/Services/CreditNotePreviewLines/CreditNotePreviewLinesLineTaxAmountOptions.cs index 16f5395f9c..478d9f747c 100644 --- a/src/Stripe.net/Services/CreditNotePreviewLines/CreditNotePreviewLinesLineTaxAmountOptions.cs +++ b/src/Stripe.net/Services/CreditNotePreviewLines/CreditNotePreviewLinesLineTaxAmountOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CreditNotePreviewLinesLineTaxAmountOptions : INestedOptions { @@ -9,6 +12,9 @@ public class CreditNotePreviewLinesLineTaxAmountOptions : INestedOptions /// The amount, in cents (or local equivalent), of the tax. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long? Amount { get; set; } /// @@ -16,12 +22,18 @@ public class CreditNotePreviewLinesLineTaxAmountOptions : INestedOptions /// created by Stripe. /// [JsonProperty("tax_rate")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_rate")] +#endif public string TaxRate { get; set; } /// /// The amount on which tax is calculated, in cents (or local equivalent). /// [JsonProperty("taxable_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("taxable_amount")] +#endif public long? TaxableAmount { get; set; } } } diff --git a/src/Stripe.net/Services/CreditNotePreviewLines/CreditNotePreviewLinesListOptions.cs b/src/Stripe.net/Services/CreditNotePreviewLines/CreditNotePreviewLinesListOptions.cs index 088c838ef2..e789882a57 100644 --- a/src/Stripe.net/Services/CreditNotePreviewLines/CreditNotePreviewLinesListOptions.cs +++ b/src/Stripe.net/Services/CreditNotePreviewLines/CreditNotePreviewLinesListOptions.cs @@ -5,6 +5,9 @@ namespace Stripe using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CreditNotePreviewLinesListOptions : ListOptions, IHasMetadata { @@ -13,6 +16,9 @@ public class CreditNotePreviewLinesListOptions : ListOptions, IHasMetadata /// credit note. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long? Amount { get; set; } /// @@ -20,6 +26,9 @@ public class CreditNotePreviewLinesListOptions : ListOptions, IHasMetadata /// customer's balance, which will be automatically applied to their next invoice. /// [JsonProperty("credit_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("credit_amount")] +#endif public long? CreditAmount { get; set; } /// @@ -29,6 +38,10 @@ public class CreditNotePreviewLinesListOptions : ListOptions, IHasMetadata /// [JsonProperty("effective_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("effective_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? EffectiveAt { get; set; } /// @@ -37,24 +50,36 @@ public class CreditNotePreviewLinesListOptions : ListOptions, IHasMetadata /// One of: credit_note, or none. /// [JsonProperty("email_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("email_type")] +#endif public string EmailType { get; set; } /// /// ID of the invoice. /// [JsonProperty("invoice")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("invoice")] +#endif public string Invoice { get; set; } /// /// Line items that make up the credit note. /// [JsonProperty("lines")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("lines")] +#endif public List Lines { get; set; } /// /// The credit note's memo appears on the credit note PDF. /// [JsonProperty("memo")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("memo")] +#endif public string Memo { get; set; } /// @@ -64,6 +89,9 @@ public class CreditNotePreviewLinesListOptions : ListOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -71,6 +99,9 @@ public class CreditNotePreviewLinesListOptions : ListOptions, IHasMetadata /// credited outside of Stripe. /// [JsonProperty("out_of_band_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("out_of_band_amount")] +#endif public long? OutOfBandAmount { get; set; } /// @@ -80,12 +111,18 @@ public class CreditNotePreviewLinesListOptions : ListOptions, IHasMetadata /// product_unsatisfactory. /// [JsonProperty("reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reason")] +#endif public string Reason { get; set; } /// /// ID of an existing refund to link this credit note to. /// [JsonProperty("refund")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("refund")] +#endif public string Refund { get; set; } /// @@ -93,6 +130,9 @@ public class CreditNotePreviewLinesListOptions : ListOptions, IHasMetadata /// set, a refund will be created for the charge associated with the invoice. /// [JsonProperty("refund_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("refund_amount")] +#endif public long? RefundAmount { get; set; } /// @@ -100,6 +140,9 @@ public class CreditNotePreviewLinesListOptions : ListOptions, IHasMetadata /// included in the credit note. /// [JsonProperty("shipping_cost")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping_cost")] +#endif public CreditNotePreviewLinesShippingCostOptions ShippingCost { get; set; } } } diff --git a/src/Stripe.net/Services/CreditNotePreviewLines/CreditNotePreviewLinesShippingCostOptions.cs b/src/Stripe.net/Services/CreditNotePreviewLines/CreditNotePreviewLinesShippingCostOptions.cs index 29b24d1dfd..26dc927be7 100644 --- a/src/Stripe.net/Services/CreditNotePreviewLines/CreditNotePreviewLinesShippingCostOptions.cs +++ b/src/Stripe.net/Services/CreditNotePreviewLines/CreditNotePreviewLinesShippingCostOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CreditNotePreviewLinesShippingCostOptions : INestedOptions { @@ -9,6 +12,9 @@ public class CreditNotePreviewLinesShippingCostOptions : INestedOptions /// The ID of the shipping rate to use for this order. /// [JsonProperty("shipping_rate")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping_rate")] +#endif public string ShippingRate { get; set; } } } diff --git a/src/Stripe.net/Services/CreditNotes/CreditNoteCreateOptions.cs b/src/Stripe.net/Services/CreditNotes/CreditNoteCreateOptions.cs index 1cf46d060f..4f1145bfea 100644 --- a/src/Stripe.net/Services/CreditNotes/CreditNoteCreateOptions.cs +++ b/src/Stripe.net/Services/CreditNotes/CreditNoteCreateOptions.cs @@ -5,6 +5,9 @@ namespace Stripe using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CreditNoteCreateOptions : BaseOptions, IHasMetadata { @@ -13,6 +16,9 @@ public class CreditNoteCreateOptions : BaseOptions, IHasMetadata /// credit note. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long? Amount { get; set; } /// @@ -20,6 +26,9 @@ public class CreditNoteCreateOptions : BaseOptions, IHasMetadata /// customer's balance, which will be automatically applied to their next invoice. /// [JsonProperty("credit_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("credit_amount")] +#endif public long? CreditAmount { get; set; } /// @@ -29,6 +38,10 @@ public class CreditNoteCreateOptions : BaseOptions, IHasMetadata /// [JsonProperty("effective_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("effective_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? EffectiveAt { get; set; } /// @@ -37,24 +50,36 @@ public class CreditNoteCreateOptions : BaseOptions, IHasMetadata /// One of: credit_note, or none. /// [JsonProperty("email_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("email_type")] +#endif public string EmailType { get; set; } /// /// ID of the invoice. /// [JsonProperty("invoice")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("invoice")] +#endif public string Invoice { get; set; } /// /// Line items that make up the credit note. /// [JsonProperty("lines")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("lines")] +#endif public List Lines { get; set; } /// /// The credit note's memo appears on the credit note PDF. /// [JsonProperty("memo")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("memo")] +#endif public string Memo { get; set; } /// @@ -64,6 +89,9 @@ public class CreditNoteCreateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -71,6 +99,9 @@ public class CreditNoteCreateOptions : BaseOptions, IHasMetadata /// credited outside of Stripe. /// [JsonProperty("out_of_band_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("out_of_band_amount")] +#endif public long? OutOfBandAmount { get; set; } /// @@ -80,12 +111,18 @@ public class CreditNoteCreateOptions : BaseOptions, IHasMetadata /// product_unsatisfactory. /// [JsonProperty("reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reason")] +#endif public string Reason { get; set; } /// /// ID of an existing refund to link this credit note to. /// [JsonProperty("refund")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("refund")] +#endif public string Refund { get; set; } /// @@ -93,6 +130,9 @@ public class CreditNoteCreateOptions : BaseOptions, IHasMetadata /// set, a refund will be created for the charge associated with the invoice. /// [JsonProperty("refund_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("refund_amount")] +#endif public long? RefundAmount { get; set; } /// @@ -100,6 +140,9 @@ public class CreditNoteCreateOptions : BaseOptions, IHasMetadata /// included in the credit note. /// [JsonProperty("shipping_cost")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping_cost")] +#endif public CreditNoteShippingCostOptions ShippingCost { get; set; } } } diff --git a/src/Stripe.net/Services/CreditNotes/CreditNoteLineOptions.cs b/src/Stripe.net/Services/CreditNotes/CreditNoteLineOptions.cs index 280d105a04..8c7c6d3d98 100644 --- a/src/Stripe.net/Services/CreditNotes/CreditNoteLineOptions.cs +++ b/src/Stripe.net/Services/CreditNotes/CreditNoteLineOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CreditNoteLineOptions : INestedOptions { @@ -12,6 +15,9 @@ public class CreditNoteLineOptions : INestedOptions /// exclusive. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long? Amount { get; set; } /// @@ -19,6 +25,9 @@ public class CreditNoteLineOptions : INestedOptions /// custom_line_item. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// @@ -26,12 +35,18 @@ public class CreditNoteLineOptions : INestedOptions /// invoice_line_item. /// [JsonProperty("invoice_line_item")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("invoice_line_item")] +#endif public string InvoiceLineItem { get; set; } /// /// The line item quantity to credit. /// [JsonProperty("quantity")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("quantity")] +#endif public long? Quantity { get; set; } /// @@ -39,6 +54,9 @@ public class CreditNoteLineOptions : INestedOptions /// tax_rates. /// [JsonProperty("tax_amounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_amounts")] +#endif public List TaxAmounts { get; set; } /// @@ -46,6 +64,9 @@ public class CreditNoteLineOptions : INestedOptions /// is custom_line_item and cannot be mixed with tax_amounts. /// [JsonProperty("tax_rates")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_rates")] +#endif public List TaxRates { get; set; } /// @@ -54,6 +75,9 @@ public class CreditNoteLineOptions : INestedOptions /// One of: custom_line_item, or invoice_line_item. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } /// @@ -62,6 +86,9 @@ public class CreditNoteLineOptions : INestedOptions /// credit for this line item. Only valid when type is custom_line_item. /// [JsonProperty("unit_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_amount")] +#endif public long? UnitAmount { get; set; } /// @@ -70,6 +97,9 @@ public class CreditNoteLineOptions : INestedOptions /// unit_amount_decimal can be set. /// [JsonProperty("unit_amount_decimal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_amount_decimal")] +#endif public decimal? UnitAmountDecimal { get; set; } } } diff --git a/src/Stripe.net/Services/CreditNotes/CreditNoteLineTaxAmountOptions.cs b/src/Stripe.net/Services/CreditNotes/CreditNoteLineTaxAmountOptions.cs index 3cef18cde0..0d9d3e45a3 100644 --- a/src/Stripe.net/Services/CreditNotes/CreditNoteLineTaxAmountOptions.cs +++ b/src/Stripe.net/Services/CreditNotes/CreditNoteLineTaxAmountOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CreditNoteLineTaxAmountOptions : INestedOptions { @@ -9,6 +12,9 @@ public class CreditNoteLineTaxAmountOptions : INestedOptions /// The amount, in cents (or local equivalent), of the tax. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long? Amount { get; set; } /// @@ -16,12 +22,18 @@ public class CreditNoteLineTaxAmountOptions : INestedOptions /// created by Stripe. /// [JsonProperty("tax_rate")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_rate")] +#endif public string TaxRate { get; set; } /// /// The amount on which tax is calculated, in cents (or local equivalent). /// [JsonProperty("taxable_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("taxable_amount")] +#endif public long? TaxableAmount { get; set; } } } diff --git a/src/Stripe.net/Services/CreditNotes/CreditNoteListOptions.cs b/src/Stripe.net/Services/CreditNotes/CreditNoteListOptions.cs index e294cdbce6..aa337ca70a 100644 --- a/src/Stripe.net/Services/CreditNotes/CreditNoteListOptions.cs +++ b/src/Stripe.net/Services/CreditNotes/CreditNoteListOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CreditNoteListOptions : ListOptionsWithCreated { @@ -9,12 +12,18 @@ public class CreditNoteListOptions : ListOptionsWithCreated /// Only return credit notes for the customer specified by this customer ID. /// [JsonProperty("customer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] +#endif public string Customer { get; set; } /// /// Only return credit notes for the invoice specified by this invoice ID. /// [JsonProperty("invoice")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("invoice")] +#endif public string Invoice { get; set; } } } diff --git a/src/Stripe.net/Services/CreditNotes/CreditNotePreviewOptions.cs b/src/Stripe.net/Services/CreditNotes/CreditNotePreviewOptions.cs index f9f79aaf51..39e6732e24 100644 --- a/src/Stripe.net/Services/CreditNotes/CreditNotePreviewOptions.cs +++ b/src/Stripe.net/Services/CreditNotes/CreditNotePreviewOptions.cs @@ -5,6 +5,9 @@ namespace Stripe using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CreditNotePreviewOptions : BaseOptions, IHasMetadata { @@ -13,6 +16,9 @@ public class CreditNotePreviewOptions : BaseOptions, IHasMetadata /// credit note. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long? Amount { get; set; } /// @@ -20,6 +26,9 @@ public class CreditNotePreviewOptions : BaseOptions, IHasMetadata /// customer's balance, which will be automatically applied to their next invoice. /// [JsonProperty("credit_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("credit_amount")] +#endif public long? CreditAmount { get; set; } /// @@ -29,6 +38,10 @@ public class CreditNotePreviewOptions : BaseOptions, IHasMetadata /// [JsonProperty("effective_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("effective_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? EffectiveAt { get; set; } /// @@ -37,24 +50,36 @@ public class CreditNotePreviewOptions : BaseOptions, IHasMetadata /// One of: credit_note, or none. /// [JsonProperty("email_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("email_type")] +#endif public string EmailType { get; set; } /// /// ID of the invoice. /// [JsonProperty("invoice")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("invoice")] +#endif public string Invoice { get; set; } /// /// Line items that make up the credit note. /// [JsonProperty("lines")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("lines")] +#endif public List Lines { get; set; } /// /// The credit note's memo appears on the credit note PDF. /// [JsonProperty("memo")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("memo")] +#endif public string Memo { get; set; } /// @@ -64,6 +89,9 @@ public class CreditNotePreviewOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -71,6 +99,9 @@ public class CreditNotePreviewOptions : BaseOptions, IHasMetadata /// credited outside of Stripe. /// [JsonProperty("out_of_band_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("out_of_band_amount")] +#endif public long? OutOfBandAmount { get; set; } /// @@ -80,12 +111,18 @@ public class CreditNotePreviewOptions : BaseOptions, IHasMetadata /// product_unsatisfactory. /// [JsonProperty("reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reason")] +#endif public string Reason { get; set; } /// /// ID of an existing refund to link this credit note to. /// [JsonProperty("refund")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("refund")] +#endif public string Refund { get; set; } /// @@ -93,6 +130,9 @@ public class CreditNotePreviewOptions : BaseOptions, IHasMetadata /// set, a refund will be created for the charge associated with the invoice. /// [JsonProperty("refund_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("refund_amount")] +#endif public long? RefundAmount { get; set; } /// @@ -100,6 +140,9 @@ public class CreditNotePreviewOptions : BaseOptions, IHasMetadata /// included in the credit note. /// [JsonProperty("shipping_cost")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping_cost")] +#endif public CreditNoteShippingCostOptions ShippingCost { get; set; } } } diff --git a/src/Stripe.net/Services/CreditNotes/CreditNoteShippingCostOptions.cs b/src/Stripe.net/Services/CreditNotes/CreditNoteShippingCostOptions.cs index c43fd8612f..5861cfffed 100644 --- a/src/Stripe.net/Services/CreditNotes/CreditNoteShippingCostOptions.cs +++ b/src/Stripe.net/Services/CreditNotes/CreditNoteShippingCostOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CreditNoteShippingCostOptions : INestedOptions { @@ -9,6 +12,9 @@ public class CreditNoteShippingCostOptions : INestedOptions /// The ID of the shipping rate to use for this order. /// [JsonProperty("shipping_rate")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping_rate")] +#endif public string ShippingRate { get; set; } } } diff --git a/src/Stripe.net/Services/CreditNotes/CreditNoteUpdateOptions.cs b/src/Stripe.net/Services/CreditNotes/CreditNoteUpdateOptions.cs index 72e782e3b9..24caabd151 100644 --- a/src/Stripe.net/Services/CreditNotes/CreditNoteUpdateOptions.cs +++ b/src/Stripe.net/Services/CreditNotes/CreditNoteUpdateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CreditNoteUpdateOptions : BaseOptions, IHasMetadata { @@ -10,6 +13,9 @@ public class CreditNoteUpdateOptions : BaseOptions, IHasMetadata /// Credit note memo. /// [JsonProperty("memo")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("memo")] +#endif public string Memo { get; set; } /// @@ -19,6 +25,9 @@ public class CreditNoteUpdateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } } } diff --git a/src/Stripe.net/Services/CustomerBalanceTransactions/CustomerBalanceTransactionCreateOptions.cs b/src/Stripe.net/Services/CustomerBalanceTransactions/CustomerBalanceTransactionCreateOptions.cs index 4c43ebf25e..0980b65f80 100644 --- a/src/Stripe.net/Services/CustomerBalanceTransactions/CustomerBalanceTransactionCreateOptions.cs +++ b/src/Stripe.net/Services/CustomerBalanceTransactions/CustomerBalanceTransactionCreateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CustomerBalanceTransactionCreateOptions : BaseOptions, IHasMetadata { @@ -11,6 +14,9 @@ public class CustomerBalanceTransactionCreateOptions : BaseOptions, IHasMetadata /// customer's credit balance. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long? Amount { get; set; } /// @@ -22,12 +28,18 @@ public class CustomerBalanceTransactionCreateOptions : BaseOptions, IHasMetadata /// will be updated to this value. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// /// An arbitrary string attached to the object. Often useful for displaying to users. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// @@ -37,6 +49,9 @@ public class CustomerBalanceTransactionCreateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } } } diff --git a/src/Stripe.net/Services/CustomerBalanceTransactions/CustomerBalanceTransactionUpdateOptions.cs b/src/Stripe.net/Services/CustomerBalanceTransactions/CustomerBalanceTransactionUpdateOptions.cs index f90f8adee3..fbc5e7f5ed 100644 --- a/src/Stripe.net/Services/CustomerBalanceTransactions/CustomerBalanceTransactionUpdateOptions.cs +++ b/src/Stripe.net/Services/CustomerBalanceTransactions/CustomerBalanceTransactionUpdateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CustomerBalanceTransactionUpdateOptions : BaseOptions, IHasMetadata { @@ -10,6 +13,9 @@ public class CustomerBalanceTransactionUpdateOptions : BaseOptions, IHasMetadata /// An arbitrary string attached to the object. Often useful for displaying to users. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// @@ -19,6 +25,9 @@ public class CustomerBalanceTransactionUpdateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } } } diff --git a/src/Stripe.net/Services/CustomerCashBalances/CustomerCashBalanceUpdateOptions.cs b/src/Stripe.net/Services/CustomerCashBalances/CustomerCashBalanceUpdateOptions.cs index ce5141b8cf..412a2be07d 100644 --- a/src/Stripe.net/Services/CustomerCashBalances/CustomerCashBalanceUpdateOptions.cs +++ b/src/Stripe.net/Services/CustomerCashBalances/CustomerCashBalanceUpdateOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CustomerCashBalanceUpdateOptions : BaseOptions { @@ -9,6 +12,9 @@ public class CustomerCashBalanceUpdateOptions : BaseOptions /// A hash of settings for this cash balance. /// [JsonProperty("settings")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("settings")] +#endif public CustomerCashBalanceSettingsOptions Settings { get; set; } } } diff --git a/src/Stripe.net/Services/CustomerFundingInstructions/CustomerFundingInstructionsBankTransferEuBankTransferOptions.cs b/src/Stripe.net/Services/CustomerFundingInstructions/CustomerFundingInstructionsBankTransferEuBankTransferOptions.cs index 9358d30452..58e957056a 100644 --- a/src/Stripe.net/Services/CustomerFundingInstructions/CustomerFundingInstructionsBankTransferEuBankTransferOptions.cs +++ b/src/Stripe.net/Services/CustomerFundingInstructions/CustomerFundingInstructionsBankTransferEuBankTransferOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CustomerFundingInstructionsBankTransferEuBankTransferOptions : INestedOptions { @@ -10,6 +13,9 @@ public class CustomerFundingInstructionsBankTransferEuBankTransferOptions : INes /// BE, DE, ES, FR, IE, or NL. /// [JsonProperty("country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country")] +#endif public string Country { get; set; } } } diff --git a/src/Stripe.net/Services/CustomerFundingInstructions/CustomerFundingInstructionsBankTransferOptions.cs b/src/Stripe.net/Services/CustomerFundingInstructions/CustomerFundingInstructionsBankTransferOptions.cs index 9475805e3e..1dc7a8c9b6 100644 --- a/src/Stripe.net/Services/CustomerFundingInstructions/CustomerFundingInstructionsBankTransferOptions.cs +++ b/src/Stripe.net/Services/CustomerFundingInstructions/CustomerFundingInstructionsBankTransferOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CustomerFundingInstructionsBankTransferOptions : INestedOptions { @@ -10,6 +13,9 @@ public class CustomerFundingInstructionsBankTransferOptions : INestedOptions /// Configuration for eu_bank_transfer funding type. /// [JsonProperty("eu_bank_transfer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("eu_bank_transfer")] +#endif public CustomerFundingInstructionsBankTransferEuBankTransferOptions EuBankTransfer { get; set; } /// @@ -20,6 +26,9 @@ public class CustomerFundingInstructionsBankTransferOptions : INestedOptions /// One of: iban, sort_code, spei, or zengin. /// [JsonProperty("requested_address_types")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested_address_types")] +#endif public List RequestedAddressTypes { get; set; } /// @@ -28,6 +37,9 @@ public class CustomerFundingInstructionsBankTransferOptions : INestedOptions /// mx_bank_transfer, or us_bank_transfer. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/CustomerFundingInstructions/CustomerFundingInstructionsCreateOptions.cs b/src/Stripe.net/Services/CustomerFundingInstructions/CustomerFundingInstructionsCreateOptions.cs index 14f577fa5a..eceac44512 100644 --- a/src/Stripe.net/Services/CustomerFundingInstructions/CustomerFundingInstructionsCreateOptions.cs +++ b/src/Stripe.net/Services/CustomerFundingInstructions/CustomerFundingInstructionsCreateOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CustomerFundingInstructionsCreateOptions : BaseOptions { @@ -9,6 +12,9 @@ public class CustomerFundingInstructionsCreateOptions : BaseOptions /// Additional parameters for bank_transfer funding types. /// [JsonProperty("bank_transfer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_transfer")] +#endif public CustomerFundingInstructionsBankTransferOptions BankTransfer { get; set; } /// @@ -17,12 +23,18 @@ public class CustomerFundingInstructionsCreateOptions : BaseOptions /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// /// The funding_type to get the instructions for. /// [JsonProperty("funding_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("funding_type")] +#endif public string FundingType { get; set; } } } diff --git a/src/Stripe.net/Services/CustomerPaymentMethods/CustomerPaymentMethodListOptions.cs b/src/Stripe.net/Services/CustomerPaymentMethods/CustomerPaymentMethodListOptions.cs index 502e821c90..48f3416e41 100644 --- a/src/Stripe.net/Services/CustomerPaymentMethods/CustomerPaymentMethodListOptions.cs +++ b/src/Stripe.net/Services/CustomerPaymentMethods/CustomerPaymentMethodListOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CustomerPaymentMethodListOptions : ListOptions { @@ -13,6 +16,9 @@ public class CustomerPaymentMethodListOptions : ListOptions /// One of: always, limited, or unspecified. /// [JsonProperty("allow_redisplay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("allow_redisplay")] +#endif public string AllowRedisplay { get; set; } /// @@ -31,6 +37,9 @@ public class CustomerPaymentMethodListOptions : ListOptions /// twint, us_bank_account, wechat_pay, or zip. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/CustomerPaymentSources/CustomerPaymentSourceCreateOptions.cs b/src/Stripe.net/Services/CustomerPaymentSources/CustomerPaymentSourceCreateOptions.cs index 408f1291f7..5db96273c2 100644 --- a/src/Stripe.net/Services/CustomerPaymentSources/CustomerPaymentSourceCreateOptions.cs +++ b/src/Stripe.net/Services/CustomerPaymentSources/CustomerPaymentSourceCreateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CustomerPaymentSourceCreateOptions : BaseOptions, IHasMetadata { @@ -13,15 +16,24 @@ public class CustomerPaymentSourceCreateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// Please refer to full documentation instead. /// [JsonProperty("source")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("source")] +#endif public string Source { get; set; } [JsonProperty("validate")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("validate")] +#endif public bool? Validate { get; set; } } } diff --git a/src/Stripe.net/Services/CustomerPaymentSources/CustomerPaymentSourceListOptions.cs b/src/Stripe.net/Services/CustomerPaymentSources/CustomerPaymentSourceListOptions.cs index c6d455dc88..1f806779a5 100644 --- a/src/Stripe.net/Services/CustomerPaymentSources/CustomerPaymentSourceListOptions.cs +++ b/src/Stripe.net/Services/CustomerPaymentSources/CustomerPaymentSourceListOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CustomerPaymentSourceListOptions : ListOptions, IHasObject { @@ -9,6 +12,9 @@ public class CustomerPaymentSourceListOptions : ListOptions, IHasObject /// Filter sources according to a particular object type. /// [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif public string Object { get; set; } } } diff --git a/src/Stripe.net/Services/CustomerPaymentSources/CustomerPaymentSourceOwnerOptions.cs b/src/Stripe.net/Services/CustomerPaymentSources/CustomerPaymentSourceOwnerOptions.cs index 51c6042963..b07e953bd2 100644 --- a/src/Stripe.net/Services/CustomerPaymentSources/CustomerPaymentSourceOwnerOptions.cs +++ b/src/Stripe.net/Services/CustomerPaymentSources/CustomerPaymentSourceOwnerOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CustomerPaymentSourceOwnerOptions : INestedOptions { @@ -9,24 +12,36 @@ public class CustomerPaymentSourceOwnerOptions : INestedOptions /// Owner's address. /// [JsonProperty("address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address")] +#endif public AddressOptions Address { get; set; } /// /// Owner's email address. /// [JsonProperty("email")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("email")] +#endif public string Email { get; set; } /// /// Owner's full name. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } /// /// Owner's phone number. /// [JsonProperty("phone")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("phone")] +#endif public string Phone { get; set; } } } diff --git a/src/Stripe.net/Services/CustomerPaymentSources/CustomerPaymentSourceUpdateOptions.cs b/src/Stripe.net/Services/CustomerPaymentSources/CustomerPaymentSourceUpdateOptions.cs index 639c5878d9..509a8b93f4 100644 --- a/src/Stripe.net/Services/CustomerPaymentSources/CustomerPaymentSourceUpdateOptions.cs +++ b/src/Stripe.net/Services/CustomerPaymentSources/CustomerPaymentSourceUpdateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CustomerPaymentSourceUpdateOptions : BaseOptions, IHasMetadata { @@ -10,6 +13,9 @@ public class CustomerPaymentSourceUpdateOptions : BaseOptions, IHasMetadata /// The name of the person or business that owns the bank account. /// [JsonProperty("account_holder_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_holder_name")] +#endif public string AccountHolderName { get; set; } /// @@ -18,54 +24,81 @@ public class CustomerPaymentSourceUpdateOptions : BaseOptions, IHasMetadata /// One of: company, or individual. /// [JsonProperty("account_holder_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_holder_type")] +#endif public string AccountHolderType { get; set; } /// /// City/District/Suburb/Town/Village. /// [JsonProperty("address_city")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_city")] +#endif public string AddressCity { get; set; } /// /// Billing address country, if provided when creating card. /// [JsonProperty("address_country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_country")] +#endif public string AddressCountry { get; set; } /// /// Address line 1 (Street address/PO Box/Company name). /// [JsonProperty("address_line1")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_line1")] +#endif public string AddressLine1 { get; set; } /// /// Address line 2 (Apartment/Suite/Unit/Building). /// [JsonProperty("address_line2")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_line2")] +#endif public string AddressLine2 { get; set; } /// /// State/County/Province/Region. /// [JsonProperty("address_state")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_state")] +#endif public string AddressState { get; set; } /// /// ZIP or postal code. /// [JsonProperty("address_zip")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_zip")] +#endif public string AddressZip { get; set; } /// /// Two digit number representing the card’s expiration month. /// [JsonProperty("exp_month")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("exp_month")] +#endif public string ExpMonth { get; set; } /// /// Four digit number representing the card’s expiration year. /// [JsonProperty("exp_year")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("exp_year")] +#endif public string ExpYear { get; set; } /// @@ -75,15 +108,24 @@ public class CustomerPaymentSourceUpdateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// Cardholder name. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } [JsonProperty("owner")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("owner")] +#endif public CustomerPaymentSourceOwnerOptions Owner { get; set; } } } diff --git a/src/Stripe.net/Services/CustomerPaymentSources/CustomerPaymentSourceVerifyOptions.cs b/src/Stripe.net/Services/CustomerPaymentSources/CustomerPaymentSourceVerifyOptions.cs index c28aa62556..014e1edfe5 100644 --- a/src/Stripe.net/Services/CustomerPaymentSources/CustomerPaymentSourceVerifyOptions.cs +++ b/src/Stripe.net/Services/CustomerPaymentSources/CustomerPaymentSourceVerifyOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CustomerPaymentSourceVerifyOptions : BaseOptions { @@ -11,6 +14,9 @@ public class CustomerPaymentSourceVerifyOptions : BaseOptions /// to the bank account. /// [JsonProperty("amounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amounts")] +#endif public List Amounts { get; set; } } } diff --git a/src/Stripe.net/Services/CustomerSessions/CustomerSessionComponentsBuyButtonOptions.cs b/src/Stripe.net/Services/CustomerSessions/CustomerSessionComponentsBuyButtonOptions.cs index 3a95a27804..8d74b07e1e 100644 --- a/src/Stripe.net/Services/CustomerSessions/CustomerSessionComponentsBuyButtonOptions.cs +++ b/src/Stripe.net/Services/CustomerSessions/CustomerSessionComponentsBuyButtonOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CustomerSessionComponentsBuyButtonOptions : INestedOptions { @@ -9,6 +12,9 @@ public class CustomerSessionComponentsBuyButtonOptions : INestedOptions /// Whether the buy button is enabled. /// [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool? Enabled { get; set; } } } diff --git a/src/Stripe.net/Services/CustomerSessions/CustomerSessionComponentsOptions.cs b/src/Stripe.net/Services/CustomerSessions/CustomerSessionComponentsOptions.cs index ca1d3ab807..0d63536302 100644 --- a/src/Stripe.net/Services/CustomerSessions/CustomerSessionComponentsOptions.cs +++ b/src/Stripe.net/Services/CustomerSessions/CustomerSessionComponentsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CustomerSessionComponentsOptions : INestedOptions { @@ -9,18 +12,27 @@ public class CustomerSessionComponentsOptions : INestedOptions /// Configuration for buy button. /// [JsonProperty("buy_button")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("buy_button")] +#endif public CustomerSessionComponentsBuyButtonOptions BuyButton { get; set; } /// /// Configuration for the Payment Element. /// [JsonProperty("payment_element")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_element")] +#endif public CustomerSessionComponentsPaymentElementOptions PaymentElement { get; set; } /// /// Configuration for the pricing table. /// [JsonProperty("pricing_table")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("pricing_table")] +#endif public CustomerSessionComponentsPricingTableOptions PricingTable { get; set; } } } diff --git a/src/Stripe.net/Services/CustomerSessions/CustomerSessionComponentsPaymentElementFeaturesOptions.cs b/src/Stripe.net/Services/CustomerSessions/CustomerSessionComponentsPaymentElementFeaturesOptions.cs index d4364d00de..0b1978d321 100644 --- a/src/Stripe.net/Services/CustomerSessions/CustomerSessionComponentsPaymentElementFeaturesOptions.cs +++ b/src/Stripe.net/Services/CustomerSessions/CustomerSessionComponentsPaymentElementFeaturesOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CustomerSessionComponentsPaymentElementFeaturesOptions : INestedOptions { @@ -18,6 +21,9 @@ public class CustomerSessionComponentsPaymentElementFeaturesOptions : INestedOpt /// One of: always, limited, or unspecified. /// [JsonProperty("payment_method_allow_redisplay_filters")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_allow_redisplay_filters")] +#endif public List PaymentMethodAllowRedisplayFilters { get; set; } /// @@ -26,6 +32,9 @@ public class CustomerSessionComponentsPaymentElementFeaturesOptions : INestedOpt /// One of: disabled, or enabled. /// [JsonProperty("payment_method_redisplay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_redisplay")] +#endif public string PaymentMethodRedisplay { get; set; } /// @@ -33,6 +42,9 @@ public class CustomerSessionComponentsPaymentElementFeaturesOptions : INestedOpt /// This parameter defaults to 3. /// [JsonProperty("payment_method_redisplay_limit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_redisplay_limit")] +#endif public long? PaymentMethodRedisplayLimit { get; set; } /// @@ -47,6 +59,9 @@ public class CustomerSessionComponentsPaymentElementFeaturesOptions : INestedOpt /// One of: disabled, or enabled. /// [JsonProperty("payment_method_remove")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_remove")] +#endif public string PaymentMethodRemove { get; set; } /// @@ -62,6 +77,9 @@ public class CustomerSessionComponentsPaymentElementFeaturesOptions : INestedOpt /// One of: disabled, or enabled. /// [JsonProperty("payment_method_save")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_save")] +#endif public string PaymentMethodSave { get; set; } /// @@ -76,6 +94,9 @@ public class CustomerSessionComponentsPaymentElementFeaturesOptions : INestedOpt /// One of: off_session, or on_session. /// [JsonProperty("payment_method_save_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_save_usage")] +#endif public string PaymentMethodSaveUsage { get; set; } } } diff --git a/src/Stripe.net/Services/CustomerSessions/CustomerSessionComponentsPaymentElementOptions.cs b/src/Stripe.net/Services/CustomerSessions/CustomerSessionComponentsPaymentElementOptions.cs index a9a5a7ed13..ed6619680a 100644 --- a/src/Stripe.net/Services/CustomerSessions/CustomerSessionComponentsPaymentElementOptions.cs +++ b/src/Stripe.net/Services/CustomerSessions/CustomerSessionComponentsPaymentElementOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CustomerSessionComponentsPaymentElementOptions : INestedOptions { @@ -9,12 +12,18 @@ public class CustomerSessionComponentsPaymentElementOptions : INestedOptions /// Whether the Payment Element is enabled. /// [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool? Enabled { get; set; } /// /// This hash defines whether the Payment Element supports certain features. /// [JsonProperty("features")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("features")] +#endif public CustomerSessionComponentsPaymentElementFeaturesOptions Features { get; set; } } } diff --git a/src/Stripe.net/Services/CustomerSessions/CustomerSessionComponentsPricingTableOptions.cs b/src/Stripe.net/Services/CustomerSessions/CustomerSessionComponentsPricingTableOptions.cs index 184c0f86c9..0994a56cb2 100644 --- a/src/Stripe.net/Services/CustomerSessions/CustomerSessionComponentsPricingTableOptions.cs +++ b/src/Stripe.net/Services/CustomerSessions/CustomerSessionComponentsPricingTableOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CustomerSessionComponentsPricingTableOptions : INestedOptions { @@ -9,6 +12,9 @@ public class CustomerSessionComponentsPricingTableOptions : INestedOptions /// Whether the pricing table is enabled. /// [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool? Enabled { get; set; } } } diff --git a/src/Stripe.net/Services/CustomerSessions/CustomerSessionCreateOptions.cs b/src/Stripe.net/Services/CustomerSessions/CustomerSessionCreateOptions.cs index d6be9b7e76..e69cebd9e6 100644 --- a/src/Stripe.net/Services/CustomerSessions/CustomerSessionCreateOptions.cs +++ b/src/Stripe.net/Services/CustomerSessions/CustomerSessionCreateOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CustomerSessionCreateOptions : BaseOptions { @@ -9,12 +12,18 @@ public class CustomerSessionCreateOptions : BaseOptions /// Configuration for each component. Exactly 1 component must be enabled. /// [JsonProperty("components")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("components")] +#endif public CustomerSessionComponentsOptions Components { get; set; } /// /// The ID of an existing customer for which to create the Customer Session. /// [JsonProperty("customer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] +#endif public string Customer { get; set; } } } diff --git a/src/Stripe.net/Services/CustomerTaxIds/CustomerTaxIdCreateOptions.cs b/src/Stripe.net/Services/CustomerTaxIds/CustomerTaxIdCreateOptions.cs index 4739fadccf..ffe1da9671 100644 --- a/src/Stripe.net/Services/CustomerTaxIds/CustomerTaxIdCreateOptions.cs +++ b/src/Stripe.net/Services/CustomerTaxIds/CustomerTaxIdCreateOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CustomerTaxIdCreateOptions : BaseOptions { @@ -40,12 +43,18 @@ public class CustomerTaxIdCreateOptions : BaseOptions /// uz_tin, uz_vat, ve_rif, vn_tin, or za_vat. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } /// /// Value of the tax ID. /// [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public string Value { get; set; } } } diff --git a/src/Stripe.net/Services/Customers/CustomerCashBalanceOptions.cs b/src/Stripe.net/Services/Customers/CustomerCashBalanceOptions.cs index b7ffefde0a..c806aed531 100644 --- a/src/Stripe.net/Services/Customers/CustomerCashBalanceOptions.cs +++ b/src/Stripe.net/Services/Customers/CustomerCashBalanceOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CustomerCashBalanceOptions : INestedOptions { @@ -10,6 +13,9 @@ public class CustomerCashBalanceOptions : INestedOptions /// of funds received. /// [JsonProperty("settings")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("settings")] +#endif public CustomerCashBalanceSettingsOptions Settings { get; set; } } } diff --git a/src/Stripe.net/Services/Customers/CustomerCashBalanceSettingsOptions.cs b/src/Stripe.net/Services/Customers/CustomerCashBalanceSettingsOptions.cs index 4ce95e7dd6..4508d099bf 100644 --- a/src/Stripe.net/Services/Customers/CustomerCashBalanceSettingsOptions.cs +++ b/src/Stripe.net/Services/Customers/CustomerCashBalanceSettingsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CustomerCashBalanceSettingsOptions : INestedOptions { @@ -13,6 +16,9 @@ public class CustomerCashBalanceSettingsOptions : INestedOptions /// One of: automatic, manual, or merchant_default. /// [JsonProperty("reconciliation_mode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reconciliation_mode")] +#endif public string ReconciliationMode { get; set; } } } diff --git a/src/Stripe.net/Services/Customers/CustomerCreateOptions.cs b/src/Stripe.net/Services/Customers/CustomerCreateOptions.cs index 799ac05ab8..ef46b7e414 100644 --- a/src/Stripe.net/Services/Customers/CustomerCreateOptions.cs +++ b/src/Stripe.net/Services/Customers/CustomerCreateOptions.cs @@ -4,6 +4,9 @@ namespace Stripe using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CustomerCreateOptions : BaseOptions, IHasMetadata { @@ -11,6 +14,9 @@ public class CustomerCreateOptions : BaseOptions, IHasMetadata /// The customer's address. /// [JsonProperty("address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address")] +#endif public AddressOptions Address { get; set; } /// @@ -20,15 +26,24 @@ public class CustomerCreateOptions : BaseOptions, IHasMetadata /// amount due on an invoice. /// [JsonProperty("balance")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("balance")] +#endif public long? Balance { get; set; } /// /// Balance information and default balance settings for this customer. /// [JsonProperty("cash_balance")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cash_balance")] +#endif public CustomerCashBalanceOptions CashBalance { get; set; } [JsonProperty("coupon")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("coupon")] +#endif public string Coupon { get; set; } /// @@ -36,6 +51,9 @@ public class CustomerCreateOptions : BaseOptions, IHasMetadata /// the customer in the dashboard. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// @@ -43,6 +61,9 @@ public class CustomerCreateOptions : BaseOptions, IHasMetadata /// can be useful for searching and tracking. This may be up to 512 characters. /// [JsonProperty("email")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("email")] +#endif public string Email { get; set; } /// @@ -50,12 +71,18 @@ public class CustomerCreateOptions : BaseOptions, IHasMetadata /// uppercase letters or numbers. /// [JsonProperty("invoice_prefix")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("invoice_prefix")] +#endif public string InvoicePrefix { get; set; } /// /// Default invoice settings for this customer. /// [JsonProperty("invoice_settings")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("invoice_settings")] +#endif public CustomerInvoiceSettingsOptions InvoiceSettings { get; set; } /// @@ -65,36 +92,57 @@ public class CustomerCreateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// The customer's full name or business name. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } /// /// The sequence to be used on the customer's next invoice. Defaults to 1. /// [JsonProperty("next_invoice_sequence")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("next_invoice_sequence")] +#endif public long? NextInvoiceSequence { get; set; } [JsonProperty("payment_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method")] +#endif public string PaymentMethod { get; set; } /// /// The customer's phone number. /// [JsonProperty("phone")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("phone")] +#endif public string Phone { get; set; } [JsonProperty("plan")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("plan")] +#endif public string Plan { get; set; } /// /// Customer's preferred languages, ordered by preference. /// [JsonProperty("preferred_locales")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preferred_locales")] +#endif public List PreferredLocales { get; set; } /// @@ -103,22 +151,35 @@ public class CustomerCreateOptions : BaseOptions, IHasMetadata /// discount. /// [JsonProperty("promotion_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("promotion_code")] +#endif public string PromotionCode { get; set; } /// /// The customer's shipping information. Appears on invoices emailed to this customer. /// [JsonProperty("shipping")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping")] +#endif public ShippingOptions Shipping { get; set; } [JsonProperty("source")] [JsonConverter(typeof(AnyOfConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("source")] + [STJS.JsonConverter(typeof(STJAnyOfConverter))] +#endif public AnyOf Source { get; set; } /// /// Tax details about the customer. /// [JsonProperty("tax")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax")] +#endif public CustomerTaxOptions Tax { get; set; } /// @@ -126,21 +187,33 @@ public class CustomerCreateOptions : BaseOptions, IHasMetadata /// One of: exempt, none, or reverse. /// [JsonProperty("tax_exempt")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_exempt")] +#endif public string TaxExempt { get; set; } /// /// The customer's tax IDs. /// [JsonProperty("tax_id_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_id_data")] +#endif public List TaxIdData { get; set; } /// /// ID of the test clock to attach to the customer. /// [JsonProperty("test_clock")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("test_clock")] +#endif public string TestClock { get; set; } [JsonProperty("validate")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("validate")] +#endif public bool? Validate { get; set; } } } diff --git a/src/Stripe.net/Services/Customers/CustomerInvoiceSettingsCustomFieldOptions.cs b/src/Stripe.net/Services/Customers/CustomerInvoiceSettingsCustomFieldOptions.cs index 4f88e06a27..676a8bcdec 100644 --- a/src/Stripe.net/Services/Customers/CustomerInvoiceSettingsCustomFieldOptions.cs +++ b/src/Stripe.net/Services/Customers/CustomerInvoiceSettingsCustomFieldOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CustomerInvoiceSettingsCustomFieldOptions : INestedOptions { @@ -9,12 +12,18 @@ public class CustomerInvoiceSettingsCustomFieldOptions : INestedOptions /// The name of the custom field. This may be up to 40 characters. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } /// /// The value of the custom field. This may be up to 140 characters. /// [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public string Value { get; set; } } } diff --git a/src/Stripe.net/Services/Customers/CustomerInvoiceSettingsOptions.cs b/src/Stripe.net/Services/Customers/CustomerInvoiceSettingsOptions.cs index 1936bfc232..fe219ee2f9 100644 --- a/src/Stripe.net/Services/Customers/CustomerInvoiceSettingsOptions.cs +++ b/src/Stripe.net/Services/Customers/CustomerInvoiceSettingsOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CustomerInvoiceSettingsOptions : INestedOptions { @@ -11,6 +14,9 @@ public class CustomerInvoiceSettingsOptions : INestedOptions /// When updating, pass an empty string to remove previously-defined fields. /// [JsonProperty("custom_fields")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("custom_fields")] +#endif public List CustomFields { get; set; } /// @@ -18,18 +24,27 @@ public class CustomerInvoiceSettingsOptions : INestedOptions /// default payment method for subscriptions and invoices. /// [JsonProperty("default_payment_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("default_payment_method")] +#endif public string DefaultPaymentMethod { get; set; } /// /// Default footer to be displayed on invoices for this customer. /// [JsonProperty("footer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("footer")] +#endif public string Footer { get; set; } /// /// Default options for invoice PDF rendering for this customer. /// [JsonProperty("rendering_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("rendering_options")] +#endif public CustomerInvoiceSettingsRenderingOptionsOptions RenderingOptions { get; set; } } } diff --git a/src/Stripe.net/Services/Customers/CustomerInvoiceSettingsRenderingOptionsOptions.cs b/src/Stripe.net/Services/Customers/CustomerInvoiceSettingsRenderingOptionsOptions.cs index af37cb2fff..8af0d1faf1 100644 --- a/src/Stripe.net/Services/Customers/CustomerInvoiceSettingsRenderingOptionsOptions.cs +++ b/src/Stripe.net/Services/Customers/CustomerInvoiceSettingsRenderingOptionsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CustomerInvoiceSettingsRenderingOptionsOptions : INestedOptions { @@ -14,12 +17,18 @@ public class CustomerInvoiceSettingsRenderingOptionsOptions : INestedOptions /// One of: exclude_tax, or include_inclusive_tax. /// [JsonProperty("amount_tax_display")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_tax_display")] +#endif public string AmountTaxDisplay { get; set; } /// /// ID of the invoice rendering template to use for future invoices. /// [JsonProperty("template")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("template")] +#endif public string Template { get; set; } } } diff --git a/src/Stripe.net/Services/Customers/CustomerListOptions.cs b/src/Stripe.net/Services/Customers/CustomerListOptions.cs index 7b1ce3f455..7d781ea7e9 100644 --- a/src/Stripe.net/Services/Customers/CustomerListOptions.cs +++ b/src/Stripe.net/Services/Customers/CustomerListOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CustomerListOptions : ListOptionsWithCreated { @@ -10,6 +13,9 @@ public class CustomerListOptions : ListOptionsWithCreated /// value must be a string. /// [JsonProperty("email")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("email")] +#endif public string Email { get; set; } /// @@ -17,6 +23,9 @@ public class CustomerListOptions : ListOptionsWithCreated /// response will not include customers with test clocks if this parameter is not set. /// [JsonProperty("test_clock")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("test_clock")] +#endif public string TestClock { get; set; } } } diff --git a/src/Stripe.net/Services/Customers/CustomerTaxIdDataOptions.cs b/src/Stripe.net/Services/Customers/CustomerTaxIdDataOptions.cs index 3db5ff15b6..8010a73ea7 100644 --- a/src/Stripe.net/Services/Customers/CustomerTaxIdDataOptions.cs +++ b/src/Stripe.net/Services/Customers/CustomerTaxIdDataOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CustomerTaxIdDataOptions : INestedOptions { @@ -40,12 +43,18 @@ public class CustomerTaxIdDataOptions : INestedOptions /// uz_tin, uz_vat, ve_rif, vn_tin, or za_vat. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } /// /// Value of the tax ID. /// [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public string Value { get; set; } } } diff --git a/src/Stripe.net/Services/Customers/CustomerTaxOptions.cs b/src/Stripe.net/Services/Customers/CustomerTaxOptions.cs index c965cd7dcd..a543c52d4a 100644 --- a/src/Stripe.net/Services/Customers/CustomerTaxOptions.cs +++ b/src/Stripe.net/Services/Customers/CustomerTaxOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CustomerTaxOptions : INestedOptions { @@ -12,6 +15,9 @@ public class CustomerTaxOptions : INestedOptions /// frequently since it could result in unexpected tax location/reporting outcomes. /// [JsonProperty("ip_address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ip_address")] +#endif public string IpAddress { get; set; } /// @@ -20,6 +26,9 @@ public class CustomerTaxOptions : INestedOptions /// One of: auto, deferred, or immediately. /// [JsonProperty("validate_location")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("validate_location")] +#endif public string ValidateLocation { get; set; } } } diff --git a/src/Stripe.net/Services/Customers/CustomerUpdateOptions.cs b/src/Stripe.net/Services/Customers/CustomerUpdateOptions.cs index c302361dd0..2e8f2518b6 100644 --- a/src/Stripe.net/Services/Customers/CustomerUpdateOptions.cs +++ b/src/Stripe.net/Services/Customers/CustomerUpdateOptions.cs @@ -4,6 +4,9 @@ namespace Stripe using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CustomerUpdateOptions : BaseOptions, IHasMetadata { @@ -11,6 +14,9 @@ public class CustomerUpdateOptions : BaseOptions, IHasMetadata /// The customer's address. /// [JsonProperty("address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address")] +#endif public AddressOptions Address { get; set; } /// @@ -20,15 +26,24 @@ public class CustomerUpdateOptions : BaseOptions, IHasMetadata /// amount due on an invoice. /// [JsonProperty("balance")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("balance")] +#endif public long? Balance { get; set; } /// /// Balance information and default balance settings for this customer. /// [JsonProperty("cash_balance")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cash_balance")] +#endif public CustomerCashBalanceOptions CashBalance { get; set; } [JsonProperty("coupon")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("coupon")] +#endif public string Coupon { get; set; } /// @@ -44,6 +59,9 @@ public class CustomerUpdateOptions : BaseOptions, IHasMetadata /// property. /// [JsonProperty("default_source")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("default_source")] +#endif public string DefaultSource { get; set; } /// @@ -51,6 +69,9 @@ public class CustomerUpdateOptions : BaseOptions, IHasMetadata /// the customer in the dashboard. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// @@ -58,6 +79,9 @@ public class CustomerUpdateOptions : BaseOptions, IHasMetadata /// can be useful for searching and tracking. This may be up to 512 characters. /// [JsonProperty("email")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("email")] +#endif public string Email { get; set; } /// @@ -65,12 +89,18 @@ public class CustomerUpdateOptions : BaseOptions, IHasMetadata /// uppercase letters or numbers. /// [JsonProperty("invoice_prefix")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("invoice_prefix")] +#endif public string InvoicePrefix { get; set; } /// /// Default invoice settings for this customer. /// [JsonProperty("invoice_settings")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("invoice_settings")] +#endif public CustomerInvoiceSettingsOptions InvoiceSettings { get; set; } /// @@ -80,30 +110,45 @@ public class CustomerUpdateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// The customer's full name or business name. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } /// /// The sequence to be used on the customer's next invoice. Defaults to 1. /// [JsonProperty("next_invoice_sequence")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("next_invoice_sequence")] +#endif public long? NextInvoiceSequence { get; set; } /// /// The customer's phone number. /// [JsonProperty("phone")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("phone")] +#endif public string Phone { get; set; } /// /// Customer's preferred languages, ordered by preference. /// [JsonProperty("preferred_locales")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preferred_locales")] +#endif public List PreferredLocales { get; set; } /// @@ -112,22 +157,35 @@ public class CustomerUpdateOptions : BaseOptions, IHasMetadata /// discount. /// [JsonProperty("promotion_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("promotion_code")] +#endif public string PromotionCode { get; set; } /// /// The customer's shipping information. Appears on invoices emailed to this customer. /// [JsonProperty("shipping")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping")] +#endif public ShippingOptions Shipping { get; set; } [JsonProperty("source")] [JsonConverter(typeof(AnyOfConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("source")] + [STJS.JsonConverter(typeof(STJAnyOfConverter))] +#endif public AnyOf Source { get; set; } /// /// Tax details about the customer. /// [JsonProperty("tax")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax")] +#endif public CustomerTaxOptions Tax { get; set; } /// @@ -135,9 +193,15 @@ public class CustomerUpdateOptions : BaseOptions, IHasMetadata /// One of: exempt, none, or reverse. /// [JsonProperty("tax_exempt")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_exempt")] +#endif public string TaxExempt { get; set; } [JsonProperty("validate")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("validate")] +#endif public bool? Validate { get; set; } } } diff --git a/src/Stripe.net/Services/Customers/ShippingOptions.cs b/src/Stripe.net/Services/Customers/ShippingOptions.cs index 0689843327..864647184c 100644 --- a/src/Stripe.net/Services/Customers/ShippingOptions.cs +++ b/src/Stripe.net/Services/Customers/ShippingOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ShippingOptions : INestedOptions { @@ -9,18 +12,27 @@ public class ShippingOptions : INestedOptions /// Customer shipping address. /// [JsonProperty("address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address")] +#endif public AddressOptions Address { get; set; } /// /// Customer name. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } /// /// Customer phone (including extension). /// [JsonProperty("phone")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("phone")] +#endif public string Phone { get; set; } } } diff --git a/src/Stripe.net/Services/Disputes/DisputeEvidenceEnhancedEvidenceOptions.cs b/src/Stripe.net/Services/Disputes/DisputeEvidenceEnhancedEvidenceOptions.cs index 62b1a16bbf..51a875c7c4 100644 --- a/src/Stripe.net/Services/Disputes/DisputeEvidenceEnhancedEvidenceOptions.cs +++ b/src/Stripe.net/Services/Disputes/DisputeEvidenceEnhancedEvidenceOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class DisputeEvidenceEnhancedEvidenceOptions : INestedOptions { @@ -9,6 +12,9 @@ public class DisputeEvidenceEnhancedEvidenceOptions : INestedOptions /// Evidence provided for Visa Compelling Evidence 3.0 evidence submission. /// [JsonProperty("visa_compelling_evidence_3")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("visa_compelling_evidence_3")] +#endif public DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3Options VisaCompellingEvidence3 { get; set; } } } diff --git a/src/Stripe.net/Services/Disputes/DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransactionOptions.cs b/src/Stripe.net/Services/Disputes/DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransactionOptions.cs index 520b2369e5..b432900cdc 100644 --- a/src/Stripe.net/Services/Disputes/DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransactionOptions.cs +++ b/src/Stripe.net/Services/Disputes/DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransactionOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransactionOptions : INestedOptions { @@ -9,6 +12,9 @@ public class DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTrans /// User Account ID used to log into business platform. Must be recognizable by the user. /// [JsonProperty("customer_account_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_account_id")] +#endif public string CustomerAccountId { get; set; } /// @@ -16,6 +22,9 @@ public class DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTrans /// hardware and software attributes. Must be at least 20 characters. /// [JsonProperty("customer_device_fingerprint")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_device_fingerprint")] +#endif public string CustomerDeviceFingerprint { get; set; } /// @@ -23,18 +32,27 @@ public class DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTrans /// International Mobile Equipment Identity [IMEI]). Must be at least 15 characters. /// [JsonProperty("customer_device_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_device_id")] +#endif public string CustomerDeviceId { get; set; } /// /// The email address of the customer. /// [JsonProperty("customer_email_address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_email_address")] +#endif public string CustomerEmailAddress { get; set; } /// /// The IP address that the customer used when making the purchase. /// [JsonProperty("customer_purchase_ip")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_purchase_ip")] +#endif public string CustomerPurchaseIp { get; set; } /// @@ -42,12 +60,18 @@ public class DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTrans /// One of: merchandise, or services. /// [JsonProperty("merchandise_or_services")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("merchandise_or_services")] +#endif public string MerchandiseOrServices { get; set; } /// /// A description of the product or service that was sold. /// [JsonProperty("product_description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("product_description")] +#endif public string ProductDescription { get; set; } /// @@ -55,6 +79,9 @@ public class DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTrans /// Compelling Evidence 3.0 evidence submission. /// [JsonProperty("shipping_address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping_address")] +#endif public AddressOptions ShippingAddress { get; set; } } } diff --git a/src/Stripe.net/Services/Disputes/DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3Options.cs b/src/Stripe.net/Services/Disputes/DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3Options.cs index 062e1b6d14..b39ce69ac7 100644 --- a/src/Stripe.net/Services/Disputes/DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3Options.cs +++ b/src/Stripe.net/Services/Disputes/DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3Options.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3Options : INestedOptions { @@ -10,6 +13,9 @@ public class DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3Options : INe /// Disputed transaction details for Visa Compelling Evidence 3.0 evidence submission. /// [JsonProperty("disputed_transaction")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("disputed_transaction")] +#endif public DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransactionOptions DisputedTransaction { get; set; } /// @@ -17,6 +23,9 @@ public class DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3Options : INe /// 3.0 evidence submission. /// [JsonProperty("prior_undisputed_transactions")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("prior_undisputed_transactions")] +#endif public List PriorUndisputedTransactions { get; set; } } } diff --git a/src/Stripe.net/Services/Disputes/DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3PriorUndisputedTransactionOptions.cs b/src/Stripe.net/Services/Disputes/DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3PriorUndisputedTransactionOptions.cs index 63213c3962..f6f93c857e 100644 --- a/src/Stripe.net/Services/Disputes/DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3PriorUndisputedTransactionOptions.cs +++ b/src/Stripe.net/Services/Disputes/DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3PriorUndisputedTransactionOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3PriorUndisputedTransactionOptions : INestedOptions { @@ -9,12 +12,18 @@ public class DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3PriorUndisput /// Stripe charge ID for the Visa Compelling Evidence 3.0 eligible prior charge. /// [JsonProperty("charge")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("charge")] +#endif public string Charge { get; set; } /// /// User Account ID used to log into business platform. Must be recognizable by the user. /// [JsonProperty("customer_account_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_account_id")] +#endif public string CustomerAccountId { get; set; } /// @@ -22,6 +31,9 @@ public class DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3PriorUndisput /// hardware and software attributes. Must be at least 20 characters. /// [JsonProperty("customer_device_fingerprint")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_device_fingerprint")] +#endif public string CustomerDeviceFingerprint { get; set; } /// @@ -29,24 +41,36 @@ public class DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3PriorUndisput /// International Mobile Equipment Identity [IMEI]). Must be at least 15 characters. /// [JsonProperty("customer_device_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_device_id")] +#endif public string CustomerDeviceId { get; set; } /// /// The email address of the customer. /// [JsonProperty("customer_email_address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_email_address")] +#endif public string CustomerEmailAddress { get; set; } /// /// The IP address that the customer used when making the purchase. /// [JsonProperty("customer_purchase_ip")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_purchase_ip")] +#endif public string CustomerPurchaseIp { get; set; } /// /// A description of the product or service that was sold. /// [JsonProperty("product_description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("product_description")] +#endif public string ProductDescription { get; set; } /// @@ -54,6 +78,9 @@ public class DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3PriorUndisput /// Compelling Evidence 3.0 evidence submission. /// [JsonProperty("shipping_address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping_address")] +#endif public AddressOptions ShippingAddress { get; set; } } } diff --git a/src/Stripe.net/Services/Disputes/DisputeEvidenceOptions.cs b/src/Stripe.net/Services/Disputes/DisputeEvidenceOptions.cs index ec558503c9..c1cb6f10d6 100644 --- a/src/Stripe.net/Services/Disputes/DisputeEvidenceOptions.cs +++ b/src/Stripe.net/Services/Disputes/DisputeEvidenceOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class DisputeEvidenceOptions : INestedOptions { @@ -11,12 +14,18 @@ public class DisputeEvidenceOptions : INestedOptions /// timestamps, and any detailed recorded activity. Has a maximum character count of 20,000. /// [JsonProperty("access_activity_log")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("access_activity_log")] +#endif public string AccessActivityLog { get; set; } /// /// The billing address provided by the customer. /// [JsonProperty("billing_address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_address")] +#endif public string BillingAddress { get; set; } /// @@ -24,6 +33,9 @@ public class DisputeEvidenceOptions : INestedOptions /// subscription cancellation policy, as shown to the customer. /// [JsonProperty("cancellation_policy")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cancellation_policy")] +#endif public string CancellationPolicy { get; set; } /// @@ -31,6 +43,9 @@ public class DisputeEvidenceOptions : INestedOptions /// purchase. Has a maximum character count of 20,000. /// [JsonProperty("cancellation_policy_disclosure")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cancellation_policy_disclosure")] +#endif public string CancellationPolicyDisclosure { get; set; } /// @@ -38,6 +53,9 @@ public class DisputeEvidenceOptions : INestedOptions /// character count of 20,000. /// [JsonProperty("cancellation_rebuttal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cancellation_rebuttal")] +#endif public string CancellationRebuttal { get; set; } /// @@ -47,24 +65,36 @@ public class DisputeEvidenceOptions : INestedOptions /// use of or satisfaction with the product or service. /// [JsonProperty("customer_communication")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_communication")] +#endif public string CustomerCommunication { get; set; } /// /// The email address of the customer. /// [JsonProperty("customer_email_address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_email_address")] +#endif public string CustomerEmailAddress { get; set; } /// /// The name of the customer. /// [JsonProperty("customer_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_name")] +#endif public string CustomerName { get; set; } /// /// The IP address that the customer used when making the purchase. /// [JsonProperty("customer_purchase_ip")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_purchase_ip")] +#endif public string CustomerPurchaseIp { get; set; } /// @@ -72,6 +102,9 @@ public class DisputeEvidenceOptions : INestedOptions /// relevant document or contract showing the customer's signature. /// [JsonProperty("customer_signature")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_signature")] +#endif public string CustomerSignature { get; set; } /// @@ -81,6 +114,9 @@ public class DisputeEvidenceOptions : INestedOptions /// document from the disputed payment that proves the two payments are separate. /// [JsonProperty("duplicate_charge_documentation")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("duplicate_charge_documentation")] +#endif public string DuplicateChargeDocumentation { get; set; } /// @@ -88,6 +124,9 @@ public class DisputeEvidenceOptions : INestedOptions /// that appears to be a duplicate. Has a maximum character count of 20,000. /// [JsonProperty("duplicate_charge_explanation")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("duplicate_charge_explanation")] +#endif public string DuplicateChargeExplanation { get; set; } /// @@ -95,12 +134,18 @@ public class DisputeEvidenceOptions : INestedOptions /// charge. /// [JsonProperty("duplicate_charge_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("duplicate_charge_id")] +#endif public string DuplicateChargeId { get; set; } /// /// Additional evidence for qualifying evidence programs. /// [JsonProperty("enhanced_evidence")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enhanced_evidence")] +#endif public DisputeEvidenceEnhancedEvidenceOptions EnhancedEvidence { get; set; } /// @@ -108,6 +153,9 @@ public class DisputeEvidenceOptions : INestedOptions /// 20,000. /// [JsonProperty("product_description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("product_description")] +#endif public string ProductDescription { get; set; } /// @@ -115,6 +163,9 @@ public class DisputeEvidenceOptions : INestedOptions /// receipt or message sent to the customer notifying them of the charge. /// [JsonProperty("receipt")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("receipt")] +#endif public string Receipt { get; set; } /// @@ -122,6 +173,9 @@ public class DisputeEvidenceOptions : INestedOptions /// refund policy, as shown to the customer. /// [JsonProperty("refund_policy")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("refund_policy")] +#endif public string RefundPolicy { get; set; } /// @@ -129,6 +183,9 @@ public class DisputeEvidenceOptions : INestedOptions /// purchase. Has a maximum character count of 20,000. /// [JsonProperty("refund_policy_disclosure")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("refund_policy_disclosure")] +#endif public string RefundPolicyDisclosure { get; set; } /// @@ -136,6 +193,9 @@ public class DisputeEvidenceOptions : INestedOptions /// character count of 20,000. /// [JsonProperty("refund_refusal_explanation")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("refund_refusal_explanation")] +#endif public string RefundRefusalExplanation { get; set; } /// @@ -143,6 +203,9 @@ public class DisputeEvidenceOptions : INestedOptions /// clear human-readable format. /// [JsonProperty("service_date")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("service_date")] +#endif public string ServiceDate { get; set; } /// @@ -151,6 +214,9 @@ public class DisputeEvidenceOptions : INestedOptions /// include a copy of a signed contract, work order, or other form of written agreement. /// [JsonProperty("service_documentation")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("service_documentation")] +#endif public string ServiceDocumentation { get; set; } /// @@ -158,6 +224,9 @@ public class DisputeEvidenceOptions : INestedOptions /// complete address information as possible. /// [JsonProperty("shipping_address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping_address")] +#endif public string ShippingAddress { get; set; } /// @@ -165,6 +234,9 @@ public class DisputeEvidenceOptions : INestedOptions /// multiple carriers were used for this purchase, please separate them with commas. /// [JsonProperty("shipping_carrier")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping_carrier")] +#endif public string ShippingCarrier { get; set; } /// @@ -172,6 +244,9 @@ public class DisputeEvidenceOptions : INestedOptions /// human-readable format. /// [JsonProperty("shipping_date")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping_date")] +#endif public string ShippingDate { get; set; } /// @@ -181,6 +256,9 @@ public class DisputeEvidenceOptions : INestedOptions /// shipping label, etc. It should show the customer's full shipping address, if possible. /// [JsonProperty("shipping_documentation")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping_documentation")] +#endif public string ShippingDocumentation { get; set; } /// @@ -189,6 +267,9 @@ public class DisputeEvidenceOptions : INestedOptions /// commas. /// [JsonProperty("shipping_tracking_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping_tracking_number")] +#endif public string ShippingTrackingNumber { get; set; } /// @@ -196,12 +277,18 @@ public class DisputeEvidenceOptions : INestedOptions /// additional evidence or statements. /// [JsonProperty("uncategorized_file")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("uncategorized_file")] +#endif public string UncategorizedFile { get; set; } /// /// Any additional evidence or statements. Has a maximum character count of 20,000. /// [JsonProperty("uncategorized_text")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("uncategorized_text")] +#endif public string UncategorizedText { get; set; } } } diff --git a/src/Stripe.net/Services/Disputes/DisputeListOptions.cs b/src/Stripe.net/Services/Disputes/DisputeListOptions.cs index 51c406efd5..2a21f1fad9 100644 --- a/src/Stripe.net/Services/Disputes/DisputeListOptions.cs +++ b/src/Stripe.net/Services/Disputes/DisputeListOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class DisputeListOptions : ListOptionsWithCreated { @@ -9,12 +12,18 @@ public class DisputeListOptions : ListOptionsWithCreated /// Only return disputes associated to the charge specified by this charge ID. /// [JsonProperty("charge")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("charge")] +#endif public string Charge { get; set; } /// /// Only return disputes associated to the PaymentIntent specified by this PaymentIntent ID. /// [JsonProperty("payment_intent")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_intent")] +#endif public string PaymentIntent { get; set; } } } diff --git a/src/Stripe.net/Services/Disputes/DisputeUpdateOptions.cs b/src/Stripe.net/Services/Disputes/DisputeUpdateOptions.cs index d03e609bd0..d7054b7938 100644 --- a/src/Stripe.net/Services/Disputes/DisputeUpdateOptions.cs +++ b/src/Stripe.net/Services/Disputes/DisputeUpdateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class DisputeUpdateOptions : BaseOptions, IHasMetadata { @@ -12,6 +15,9 @@ public class DisputeUpdateOptions : BaseOptions, IHasMetadata /// to 150,000. /// [JsonProperty("evidence")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("evidence")] +#endif public DisputeEvidenceOptions Evidence { get; set; } /// @@ -21,6 +27,9 @@ public class DisputeUpdateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -30,6 +39,9 @@ public class DisputeUpdateOptions : BaseOptions, IHasMetadata /// (the default). /// [JsonProperty("submit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("submit")] +#endif public bool? Submit { get; set; } } } diff --git a/src/Stripe.net/Services/Entitlements/ActiveEntitlements/ActiveEntitlementListOptions.cs b/src/Stripe.net/Services/Entitlements/ActiveEntitlements/ActiveEntitlementListOptions.cs index 45d6373db9..93f4804a71 100644 --- a/src/Stripe.net/Services/Entitlements/ActiveEntitlements/ActiveEntitlementListOptions.cs +++ b/src/Stripe.net/Services/Entitlements/ActiveEntitlements/ActiveEntitlementListOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Entitlements { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ActiveEntitlementListOptions : ListOptions { @@ -9,6 +12,9 @@ public class ActiveEntitlementListOptions : ListOptions /// The ID of the customer. /// [JsonProperty("customer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] +#endif public string Customer { get; set; } } } diff --git a/src/Stripe.net/Services/Entitlements/Features/FeatureCreateOptions.cs b/src/Stripe.net/Services/Entitlements/Features/FeatureCreateOptions.cs index c433eb1f4e..e5adb3a785 100644 --- a/src/Stripe.net/Services/Entitlements/Features/FeatureCreateOptions.cs +++ b/src/Stripe.net/Services/Entitlements/Features/FeatureCreateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.Entitlements { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class FeatureCreateOptions : BaseOptions, IHasMetadata { @@ -10,6 +13,9 @@ public class FeatureCreateOptions : BaseOptions, IHasMetadata /// A unique key you provide as your own system identifier. This may be up to 80 characters. /// [JsonProperty("lookup_key")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("lookup_key")] +#endif public string LookupKey { get; set; } /// @@ -17,12 +23,18 @@ public class FeatureCreateOptions : BaseOptions, IHasMetadata /// additional information about the object in a structured format. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// The feature's name, for your own purpose, not meant to be displayable to the customer. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } } } diff --git a/src/Stripe.net/Services/Entitlements/Features/FeatureListOptions.cs b/src/Stripe.net/Services/Entitlements/Features/FeatureListOptions.cs index 16196aebc9..dbb39280e2 100644 --- a/src/Stripe.net/Services/Entitlements/Features/FeatureListOptions.cs +++ b/src/Stripe.net/Services/Entitlements/Features/FeatureListOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Entitlements { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class FeatureListOptions : ListOptions { @@ -9,12 +12,18 @@ public class FeatureListOptions : ListOptions /// If set, filter results to only include features with the given archive status. /// [JsonProperty("archived")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("archived")] +#endif public bool? Archived { get; set; } /// /// If set, filter results to only include features with the given lookup_key. /// [JsonProperty("lookup_key")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("lookup_key")] +#endif public string LookupKey { get; set; } } } diff --git a/src/Stripe.net/Services/Entitlements/Features/FeatureUpdateOptions.cs b/src/Stripe.net/Services/Entitlements/Features/FeatureUpdateOptions.cs index b8f09b0ca7..1bbc46dc98 100644 --- a/src/Stripe.net/Services/Entitlements/Features/FeatureUpdateOptions.cs +++ b/src/Stripe.net/Services/Entitlements/Features/FeatureUpdateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.Entitlements { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class FeatureUpdateOptions : BaseOptions, IHasMetadata { @@ -11,6 +14,9 @@ public class FeatureUpdateOptions : BaseOptions, IHasMetadata /// features list endpoint. /// [JsonProperty("active")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("active")] +#endif public bool? Active { get; set; } /// @@ -18,12 +24,18 @@ public class FeatureUpdateOptions : BaseOptions, IHasMetadata /// additional information about the object in a structured format. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// The feature's name, for your own purpose, not meant to be displayable to the customer. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } } } diff --git a/src/Stripe.net/Services/EphemeralKeys/EphemeralKeyCreateOptions.cs b/src/Stripe.net/Services/EphemeralKeys/EphemeralKeyCreateOptions.cs index f9d861a5ac..d298ece32c 100644 --- a/src/Stripe.net/Services/EphemeralKeys/EphemeralKeyCreateOptions.cs +++ b/src/Stripe.net/Services/EphemeralKeys/EphemeralKeyCreateOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class EphemeralKeyCreateOptions : BaseOptions { @@ -9,12 +12,18 @@ public class EphemeralKeyCreateOptions : BaseOptions /// The ID of the Customer you'd like to modify using the resulting ephemeral key. /// [JsonProperty("customer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] +#endif public string Customer { get; set; } /// /// The ID of the Issuing Card you'd like to access using the resulting ephemeral key. /// [JsonProperty("issuing_card")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("issuing_card")] +#endif public string IssuingCard { get; set; } /// @@ -22,9 +31,15 @@ public class EphemeralKeyCreateOptions : BaseOptions /// Cards without exchanging sensitive information. /// [JsonProperty("nonce")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("nonce")] +#endif public string Nonce { get; set; } [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif public string StripeVersion { get; set; } /// @@ -32,6 +47,9 @@ public class EphemeralKeyCreateOptions : BaseOptions /// ephemeral key. /// [JsonProperty("verification_session")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("verification_session")] +#endif public string VerificationSession { get; set; } } } diff --git a/src/Stripe.net/Services/Events/EventListOptions.cs b/src/Stripe.net/Services/Events/EventListOptions.cs index 1b14c98501..4760de5684 100644 --- a/src/Stripe.net/Services/Events/EventListOptions.cs +++ b/src/Stripe.net/Services/Events/EventListOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class EventListOptions : ListOptionsWithCreated { @@ -12,6 +15,9 @@ public class EventListOptions : ListOptionsWithCreated /// be returned. /// [JsonProperty("delivery_success")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("delivery_success")] +#endif public bool? DeliverySuccess { get; set; } /// @@ -19,6 +25,9 @@ public class EventListOptions : ListOptionsWithCreated /// list will be filtered to include only events with a matching event property. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } /// @@ -27,6 +36,9 @@ public class EventListOptions : ListOptionsWithCreated /// or types, but not both. /// [JsonProperty("types")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("types")] +#endif public List Types { get; set; } } } diff --git a/src/Stripe.net/Services/FileLinks/FileLinkCreateOptions.cs b/src/Stripe.net/Services/FileLinks/FileLinkCreateOptions.cs index d43782dfec..ba83b471ef 100644 --- a/src/Stripe.net/Services/FileLinks/FileLinkCreateOptions.cs +++ b/src/Stripe.net/Services/FileLinks/FileLinkCreateOptions.cs @@ -5,6 +5,9 @@ namespace Stripe using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class FileLinkCreateOptions : BaseOptions, IHasMetadata { @@ -13,6 +16,10 @@ public class FileLinkCreateOptions : BaseOptions, IHasMetadata /// [JsonProperty("expires_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("expires_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? ExpiresAt { get; set; } /// @@ -24,6 +31,9 @@ public class FileLinkCreateOptions : BaseOptions, IHasMetadata /// tax_document_user_upload, or terminal_reader_splashscreen. /// [JsonProperty("file")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("file")] +#endif public string File { get; set; } /// @@ -33,6 +43,9 @@ public class FileLinkCreateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } } } diff --git a/src/Stripe.net/Services/FileLinks/FileLinkListOptions.cs b/src/Stripe.net/Services/FileLinks/FileLinkListOptions.cs index eef4a07003..621b75db44 100644 --- a/src/Stripe.net/Services/FileLinks/FileLinkListOptions.cs +++ b/src/Stripe.net/Services/FileLinks/FileLinkListOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class FileLinkListOptions : ListOptionsWithCreated { @@ -9,12 +12,18 @@ public class FileLinkListOptions : ListOptionsWithCreated /// Filter links by their expiration status. By default, Stripe returns all links. /// [JsonProperty("expired")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("expired")] +#endif public bool? Expired { get; set; } /// /// Only return links for the given file. /// [JsonProperty("file")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("file")] +#endif public string File { get; set; } } } diff --git a/src/Stripe.net/Services/FileLinks/FileLinkUpdateOptions.cs b/src/Stripe.net/Services/FileLinks/FileLinkUpdateOptions.cs index 639c1f8ce3..f830e191af 100644 --- a/src/Stripe.net/Services/FileLinks/FileLinkUpdateOptions.cs +++ b/src/Stripe.net/Services/FileLinks/FileLinkUpdateOptions.cs @@ -5,6 +5,9 @@ namespace Stripe using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class FileLinkUpdateOptions : BaseOptions, IHasMetadata { @@ -14,6 +17,10 @@ public class FileLinkUpdateOptions : BaseOptions, IHasMetadata /// [JsonProperty("expires_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("expires_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? ExpiresAt { get; set; } /// @@ -23,6 +30,9 @@ public class FileLinkUpdateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } } } diff --git a/src/Stripe.net/Services/Files/FileCreateOptions.cs b/src/Stripe.net/Services/Files/FileCreateOptions.cs index 5e5c862c33..10444aba4b 100644 --- a/src/Stripe.net/Services/Files/FileCreateOptions.cs +++ b/src/Stripe.net/Services/Files/FileCreateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.IO; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class FileCreateOptions : BaseOptions { @@ -11,6 +14,9 @@ public class FileCreateOptions : BaseOptions /// transfers for the multipart/form-data protocol. /// [JsonProperty("file")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("file")] +#endif public Stream File { get; set; } /// @@ -18,6 +24,9 @@ public class FileCreateOptions : BaseOptions /// href="https://stripe.com/docs/api#file_links">file link for the newly created file. /// [JsonProperty("file_link_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("file_link_data")] +#endif public FileFileLinkDataOptions FileLinkData { get; set; } /// @@ -30,6 +39,9 @@ public class FileCreateOptions : BaseOptions /// terminal_reader_splashscreen. /// [JsonProperty("purpose")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("purpose")] +#endif public string Purpose { get; set; } } } diff --git a/src/Stripe.net/Services/Files/FileFileLinkDataOptions.cs b/src/Stripe.net/Services/Files/FileFileLinkDataOptions.cs index 5e0457fd05..154425007e 100644 --- a/src/Stripe.net/Services/Files/FileFileLinkDataOptions.cs +++ b/src/Stripe.net/Services/Files/FileFileLinkDataOptions.cs @@ -5,6 +5,9 @@ namespace Stripe using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class FileFileLinkDataOptions : INestedOptions, IHasMetadata { @@ -16,6 +19,9 @@ public class FileFileLinkDataOptions : INestedOptions, IHasMetadata /// tax_document_user_upload, or terminal_reader_splashscreen. /// [JsonProperty("create")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("create")] +#endif public bool? Create { get; set; } /// @@ -23,6 +29,10 @@ public class FileFileLinkDataOptions : INestedOptions, IHasMetadata /// [JsonProperty("expires_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("expires_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? ExpiresAt { get; set; } /// @@ -32,6 +42,9 @@ public class FileFileLinkDataOptions : INestedOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } } } diff --git a/src/Stripe.net/Services/Files/FileListOptions.cs b/src/Stripe.net/Services/Files/FileListOptions.cs index c0b844bce4..882edd97dd 100644 --- a/src/Stripe.net/Services/Files/FileListOptions.cs +++ b/src/Stripe.net/Services/Files/FileListOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class FileListOptions : ListOptionsWithCreated { @@ -17,6 +20,9 @@ public class FileListOptions : ListOptionsWithCreated /// tax_document_user_upload, or terminal_reader_splashscreen. /// [JsonProperty("purpose")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("purpose")] +#endif public string Purpose { get; set; } } } diff --git a/src/Stripe.net/Services/FinancialConnections/AccountOwners/AccountOwnerListOptions.cs b/src/Stripe.net/Services/FinancialConnections/AccountOwners/AccountOwnerListOptions.cs index 989c06a341..2921ba5a2a 100644 --- a/src/Stripe.net/Services/FinancialConnections/AccountOwners/AccountOwnerListOptions.cs +++ b/src/Stripe.net/Services/FinancialConnections/AccountOwners/AccountOwnerListOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.FinancialConnections { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountOwnerListOptions : ListOptions { @@ -9,6 +12,9 @@ public class AccountOwnerListOptions : ListOptions /// The ID of the ownership object to fetch owners from. /// [JsonProperty("ownership")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ownership")] +#endif public string Ownership { get; set; } } } diff --git a/src/Stripe.net/Services/FinancialConnections/Accounts/AccountAccountHolderOptions.cs b/src/Stripe.net/Services/FinancialConnections/Accounts/AccountAccountHolderOptions.cs index 15961bd0f6..2ab372fa4e 100644 --- a/src/Stripe.net/Services/FinancialConnections/Accounts/AccountAccountHolderOptions.cs +++ b/src/Stripe.net/Services/FinancialConnections/Accounts/AccountAccountHolderOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.FinancialConnections { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountAccountHolderOptions : INestedOptions { @@ -9,12 +12,18 @@ public class AccountAccountHolderOptions : INestedOptions /// The ID of the Stripe account whose accounts will be retrieved. /// [JsonProperty("account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account")] +#endif public string Account { get; set; } /// /// The ID of the Stripe customer whose accounts will be retrieved. /// [JsonProperty("customer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] +#endif public string Customer { get; set; } } } diff --git a/src/Stripe.net/Services/FinancialConnections/Accounts/AccountListOptions.cs b/src/Stripe.net/Services/FinancialConnections/Accounts/AccountListOptions.cs index 4c00de9a31..c03f417a83 100644 --- a/src/Stripe.net/Services/FinancialConnections/Accounts/AccountListOptions.cs +++ b/src/Stripe.net/Services/FinancialConnections/Accounts/AccountListOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.FinancialConnections { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountListOptions : ListOptions { @@ -11,12 +14,18 @@ public class AccountListOptions : ListOptions /// exclusive. /// [JsonProperty("account_holder")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_holder")] +#endif public AccountAccountHolderOptions AccountHolder { get; set; } /// /// If present, only return accounts that were collected as part of the given session. /// [JsonProperty("session")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("session")] +#endif public string Session { get; set; } } } diff --git a/src/Stripe.net/Services/FinancialConnections/Accounts/AccountRefreshOptions.cs b/src/Stripe.net/Services/FinancialConnections/Accounts/AccountRefreshOptions.cs index 56c0211fd2..3c965638d7 100644 --- a/src/Stripe.net/Services/FinancialConnections/Accounts/AccountRefreshOptions.cs +++ b/src/Stripe.net/Services/FinancialConnections/Accounts/AccountRefreshOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.FinancialConnections { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountRefreshOptions : BaseOptions { @@ -11,6 +14,9 @@ public class AccountRefreshOptions : BaseOptions /// One of: balance, ownership, or transactions. /// [JsonProperty("features")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("features")] +#endif public List Features { get; set; } } } diff --git a/src/Stripe.net/Services/FinancialConnections/Accounts/AccountSubscribeOptions.cs b/src/Stripe.net/Services/FinancialConnections/Accounts/AccountSubscribeOptions.cs index d6742f31b1..d88b554791 100644 --- a/src/Stripe.net/Services/FinancialConnections/Accounts/AccountSubscribeOptions.cs +++ b/src/Stripe.net/Services/FinancialConnections/Accounts/AccountSubscribeOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.FinancialConnections { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountSubscribeOptions : BaseOptions { @@ -10,6 +13,9 @@ public class AccountSubscribeOptions : BaseOptions /// The list of account features to which you would like to subscribe. /// [JsonProperty("features")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("features")] +#endif public List Features { get; set; } } } diff --git a/src/Stripe.net/Services/FinancialConnections/Accounts/AccountUnsubscribeOptions.cs b/src/Stripe.net/Services/FinancialConnections/Accounts/AccountUnsubscribeOptions.cs index cf6be4a41c..f180094348 100644 --- a/src/Stripe.net/Services/FinancialConnections/Accounts/AccountUnsubscribeOptions.cs +++ b/src/Stripe.net/Services/FinancialConnections/Accounts/AccountUnsubscribeOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.FinancialConnections { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AccountUnsubscribeOptions : BaseOptions { @@ -10,6 +13,9 @@ public class AccountUnsubscribeOptions : BaseOptions /// The list of account features from which you would like to unsubscribe. /// [JsonProperty("features")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("features")] +#endif public List Features { get; set; } } } diff --git a/src/Stripe.net/Services/FinancialConnections/Sessions/SessionAccountHolderOptions.cs b/src/Stripe.net/Services/FinancialConnections/Sessions/SessionAccountHolderOptions.cs index 6626bed201..dad23c3bd5 100644 --- a/src/Stripe.net/Services/FinancialConnections/Sessions/SessionAccountHolderOptions.cs +++ b/src/Stripe.net/Services/FinancialConnections/Sessions/SessionAccountHolderOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.FinancialConnections { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionAccountHolderOptions : INestedOptions { @@ -10,6 +13,9 @@ public class SessionAccountHolderOptions : INestedOptions /// type is account. /// [JsonProperty("account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account")] +#endif public string Account { get; set; } /// @@ -17,6 +23,9 @@ public class SessionAccountHolderOptions : INestedOptions /// if type is customer. /// [JsonProperty("customer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] +#endif public string Customer { get; set; } /// @@ -24,6 +33,9 @@ public class SessionAccountHolderOptions : INestedOptions /// One of: account, or customer. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/FinancialConnections/Sessions/SessionCreateOptions.cs b/src/Stripe.net/Services/FinancialConnections/Sessions/SessionCreateOptions.cs index 812d9b598f..add8eb8a85 100644 --- a/src/Stripe.net/Services/FinancialConnections/Sessions/SessionCreateOptions.cs +++ b/src/Stripe.net/Services/FinancialConnections/Sessions/SessionCreateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.FinancialConnections { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionCreateOptions : BaseOptions { @@ -10,12 +13,18 @@ public class SessionCreateOptions : BaseOptions /// The account holder to link accounts for. /// [JsonProperty("account_holder")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_holder")] +#endif public SessionAccountHolderOptions AccountHolder { get; set; } /// /// Filters to restrict the kinds of accounts to collect. /// [JsonProperty("filters")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("filters")] +#endif public SessionFiltersOptions Filters { get; set; } /// @@ -27,6 +36,9 @@ public class SessionCreateOptions : BaseOptions /// transactions. /// [JsonProperty("permissions")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("permissions")] +#endif public List Permissions { get; set; } /// @@ -34,6 +46,9 @@ public class SessionCreateOptions : BaseOptions /// One of: balances, ownership, or transactions. /// [JsonProperty("prefetch")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("prefetch")] +#endif public List Prefetch { get; set; } /// @@ -41,6 +56,9 @@ public class SessionCreateOptions : BaseOptions /// user will be redirected to this URL to return to your app. /// [JsonProperty("return_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("return_url")] +#endif public string ReturnUrl { get; set; } } } diff --git a/src/Stripe.net/Services/FinancialConnections/Sessions/SessionFiltersOptions.cs b/src/Stripe.net/Services/FinancialConnections/Sessions/SessionFiltersOptions.cs index 23c5d9d8c1..fb91729f93 100644 --- a/src/Stripe.net/Services/FinancialConnections/Sessions/SessionFiltersOptions.cs +++ b/src/Stripe.net/Services/FinancialConnections/Sessions/SessionFiltersOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.FinancialConnections { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SessionFiltersOptions : INestedOptions { @@ -14,12 +17,18 @@ public class SessionFiltersOptions : INestedOptions /// savings. /// [JsonProperty("account_subcategories")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_subcategories")] +#endif public List AccountSubcategories { get; set; } /// /// List of countries from which to collect accounts. /// [JsonProperty("countries")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("countries")] +#endif public List Countries { get; set; } } } diff --git a/src/Stripe.net/Services/FinancialConnections/Transactions/TransactionListOptions.cs b/src/Stripe.net/Services/FinancialConnections/Transactions/TransactionListOptions.cs index 3a55e233b4..b97eb0c21c 100644 --- a/src/Stripe.net/Services/FinancialConnections/Transactions/TransactionListOptions.cs +++ b/src/Stripe.net/Services/FinancialConnections/Transactions/TransactionListOptions.cs @@ -4,6 +4,9 @@ namespace Stripe.FinancialConnections using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TransactionListOptions : ListOptions { @@ -11,6 +14,9 @@ public class TransactionListOptions : ListOptions /// The ID of the Stripe account whose transactions will be retrieved. /// [JsonProperty("account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account")] +#endif public string Account { get; set; } /// @@ -20,6 +26,10 @@ public class TransactionListOptions : ListOptions /// [JsonProperty("transacted_at")] [JsonConverter(typeof(AnyOfConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transacted_at")] + [STJS.JsonConverter(typeof(STJAnyOfConverter))] +#endif public AnyOf TransactedAt { get; set; } /// @@ -27,6 +37,9 @@ public class TransactionListOptions : ListOptions /// be a dictionary with the following options:. /// [JsonProperty("transaction_refresh")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transaction_refresh")] +#endif public TransactionTransactionRefreshOptions TransactionRefresh { get; set; } } } diff --git a/src/Stripe.net/Services/FinancialConnections/Transactions/TransactionTransactionRefreshOptions.cs b/src/Stripe.net/Services/FinancialConnections/Transactions/TransactionTransactionRefreshOptions.cs index 6d61ee542c..32ee1cad36 100644 --- a/src/Stripe.net/Services/FinancialConnections/Transactions/TransactionTransactionRefreshOptions.cs +++ b/src/Stripe.net/Services/FinancialConnections/Transactions/TransactionTransactionRefreshOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.FinancialConnections { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TransactionTransactionRefreshOptions : INestedOptions { @@ -10,6 +13,9 @@ public class TransactionTransactionRefreshOptions : INestedOptions /// place after this refresh (non-inclusive). /// [JsonProperty("after")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("after")] +#endif public string After { get; set; } } } diff --git a/src/Stripe.net/Services/Forwarding/Requests/RequestCreateOptions.cs b/src/Stripe.net/Services/Forwarding/Requests/RequestCreateOptions.cs index 40b70f79c8..8b36250a71 100644 --- a/src/Stripe.net/Services/Forwarding/Requests/RequestCreateOptions.cs +++ b/src/Stripe.net/Services/Forwarding/Requests/RequestCreateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.Forwarding { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RequestCreateOptions : BaseOptions, IHasMetadata { @@ -13,6 +16,9 @@ public class RequestCreateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -20,6 +26,9 @@ public class RequestCreateOptions : BaseOptions, IHasMetadata /// PaymentMethods is allowed. /// [JsonProperty("payment_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method")] +#endif public string PaymentMethod { get; set; } /// @@ -28,18 +37,27 @@ public class RequestCreateOptions : BaseOptions, IHasMetadata /// cardholder_name. /// [JsonProperty("replacements")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("replacements")] +#endif public List Replacements { get; set; } /// /// The request body and headers to be sent to the destination endpoint. /// [JsonProperty("request")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("request")] +#endif public RequestRequestOptions Request { get; set; } /// /// The destination URL for the forwarded request. Must be supported by the config. /// [JsonProperty("url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("url")] +#endif public string Url { get; set; } } } diff --git a/src/Stripe.net/Services/Forwarding/Requests/RequestRequestHeaderOptions.cs b/src/Stripe.net/Services/Forwarding/Requests/RequestRequestHeaderOptions.cs index 73a42a8f07..bcbace435b 100644 --- a/src/Stripe.net/Services/Forwarding/Requests/RequestRequestHeaderOptions.cs +++ b/src/Stripe.net/Services/Forwarding/Requests/RequestRequestHeaderOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Forwarding { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RequestRequestHeaderOptions : INestedOptions { @@ -9,12 +12,18 @@ public class RequestRequestHeaderOptions : INestedOptions /// The header name. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } /// /// The header value. /// [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public string Value { get; set; } } } diff --git a/src/Stripe.net/Services/Forwarding/Requests/RequestRequestOptions.cs b/src/Stripe.net/Services/Forwarding/Requests/RequestRequestOptions.cs index 65a7a4b5fb..ed5b39ee17 100644 --- a/src/Stripe.net/Services/Forwarding/Requests/RequestRequestOptions.cs +++ b/src/Stripe.net/Services/Forwarding/Requests/RequestRequestOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.Forwarding { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RequestRequestOptions : INestedOptions { @@ -10,6 +13,9 @@ public class RequestRequestOptions : INestedOptions /// The body payload to send to the destination endpoint. /// [JsonProperty("body")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("body")] +#endif public string Body { get; set; } /// @@ -17,6 +23,9 @@ public class RequestRequestOptions : INestedOptions /// (excluding Stripe-generated ones such as the Content-Type header) should be included. /// [JsonProperty("headers")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("headers")] +#endif public List Headers { get; set; } } } diff --git a/src/Stripe.net/Services/Identity/VerificationReports/VerificationReportListOptions.cs b/src/Stripe.net/Services/Identity/VerificationReports/VerificationReportListOptions.cs index 32e8cee70d..43de94792b 100644 --- a/src/Stripe.net/Services/Identity/VerificationReports/VerificationReportListOptions.cs +++ b/src/Stripe.net/Services/Identity/VerificationReports/VerificationReportListOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Identity { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class VerificationReportListOptions : ListOptionsWithCreated { @@ -10,6 +13,9 @@ public class VerificationReportListOptions : ListOptionsWithCreated /// and can be used to reconcile this verification with your internal systems. /// [JsonProperty("client_reference_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("client_reference_id")] +#endif public string ClientReferenceId { get; set; } /// @@ -17,6 +23,9 @@ public class VerificationReportListOptions : ListOptionsWithCreated /// One of: document, or id_number. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } /// @@ -24,6 +33,9 @@ public class VerificationReportListOptions : ListOptionsWithCreated /// provide a VerificationIntent ID. /// [JsonProperty("verification_session")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("verification_session")] +#endif public string VerificationSession { get; set; } } } diff --git a/src/Stripe.net/Services/Identity/VerificationSessions/VerificationSessionCreateOptions.cs b/src/Stripe.net/Services/Identity/VerificationSessions/VerificationSessionCreateOptions.cs index 0d2e04ba1b..8cf5cea8fa 100644 --- a/src/Stripe.net/Services/Identity/VerificationSessions/VerificationSessionCreateOptions.cs +++ b/src/Stripe.net/Services/Identity/VerificationSessions/VerificationSessionCreateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.Identity { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class VerificationSessionCreateOptions : BaseOptions, IHasMetadata { @@ -11,6 +14,9 @@ public class VerificationSessionCreateOptions : BaseOptions, IHasMetadata /// and can be used to reconcile this verification with your internal systems. /// [JsonProperty("client_reference_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("client_reference_id")] +#endif public string ClientReferenceId { get; set; } /// @@ -20,30 +26,45 @@ public class VerificationSessionCreateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// A set of options for the session’s verification checks. /// [JsonProperty("options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("options")] +#endif public VerificationSessionOptionsOptions Options { get; set; } /// /// Details provided about the user being verified. These details may be shown to the user. /// [JsonProperty("provided_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("provided_details")] +#endif public VerificationSessionProvidedDetailsOptions ProvidedDetails { get; set; } /// /// Token referencing a Customer resource. /// [JsonProperty("related_customer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_customer")] +#endif public string RelatedCustomer { get; set; } /// /// The URL that the user will be redirected to upon completing the verification flow. /// [JsonProperty("return_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("return_url")] +#endif public string ReturnUrl { get; set; } /// @@ -53,6 +74,9 @@ public class VerificationSessionCreateOptions : BaseOptions, IHasMetadata /// One of: document, or id_number. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } /// @@ -60,6 +84,9 @@ public class VerificationSessionCreateOptions : BaseOptions, IHasMetadata /// https://docs.stripe.com/identity/verification-flows. /// [JsonProperty("verification_flow")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("verification_flow")] +#endif public string VerificationFlow { get; set; } } } diff --git a/src/Stripe.net/Services/Identity/VerificationSessions/VerificationSessionListOptions.cs b/src/Stripe.net/Services/Identity/VerificationSessions/VerificationSessionListOptions.cs index db1236a310..267fc2e6a8 100644 --- a/src/Stripe.net/Services/Identity/VerificationSessions/VerificationSessionListOptions.cs +++ b/src/Stripe.net/Services/Identity/VerificationSessions/VerificationSessionListOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Identity { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class VerificationSessionListOptions : ListOptionsWithCreated { @@ -10,9 +13,15 @@ public class VerificationSessionListOptions : ListOptionsWithCreated /// and can be used to reconcile this verification with your internal systems. /// [JsonProperty("client_reference_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("client_reference_id")] +#endif public string ClientReferenceId { get; set; } [JsonProperty("related_customer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_customer")] +#endif public string RelatedCustomer { get; set; } /// @@ -22,6 +31,9 @@ public class VerificationSessionListOptions : ListOptionsWithCreated /// One of: canceled, processing, requires_input, or verified. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } } } diff --git a/src/Stripe.net/Services/Identity/VerificationSessions/VerificationSessionOptionsDocumentOptions.cs b/src/Stripe.net/Services/Identity/VerificationSessions/VerificationSessionOptionsDocumentOptions.cs index d6075f1a6f..a1ad94f4eb 100644 --- a/src/Stripe.net/Services/Identity/VerificationSessions/VerificationSessionOptionsDocumentOptions.cs +++ b/src/Stripe.net/Services/Identity/VerificationSessions/VerificationSessionOptionsDocumentOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.Identity { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class VerificationSessionOptionsDocumentOptions : INestedOptions { @@ -13,6 +16,9 @@ public class VerificationSessionOptionsDocumentOptions : INestedOptions /// One of: driving_license, id_card, or passport. /// [JsonProperty("allowed_types")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("allowed_types")] +#endif public List AllowedTypes { get; set; } /// @@ -21,6 +27,9 @@ public class VerificationSessionOptionsDocumentOptions : INestedOptions /// check with the document’s extracted name and date of birth. /// [JsonProperty("require_id_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("require_id_number")] +#endif public bool? RequireIdNumber { get; set; } /// @@ -28,6 +37,9 @@ public class VerificationSessionOptionsDocumentOptions : INestedOptions /// camera. /// [JsonProperty("require_live_capture")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("require_live_capture")] +#endif public bool? RequireLiveCapture { get; set; } /// @@ -37,6 +49,9 @@ public class VerificationSessionOptionsDocumentOptions : INestedOptions /// href="https://stripe.com/docs/identity/selfie">Learn more. /// [JsonProperty("require_matching_selfie")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("require_matching_selfie")] +#endif public bool? RequireMatchingSelfie { get; set; } } } diff --git a/src/Stripe.net/Services/Identity/VerificationSessions/VerificationSessionOptionsOptions.cs b/src/Stripe.net/Services/Identity/VerificationSessions/VerificationSessionOptionsOptions.cs index 65faa548c0..f6d7f02da0 100644 --- a/src/Stripe.net/Services/Identity/VerificationSessions/VerificationSessionOptionsOptions.cs +++ b/src/Stripe.net/Services/Identity/VerificationSessions/VerificationSessionOptionsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Identity { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class VerificationSessionOptionsOptions : INestedOptions { @@ -11,6 +14,9 @@ public class VerificationSessionOptionsOptions : INestedOptions /// check. /// [JsonProperty("document")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("document")] +#endif public VerificationSessionOptionsDocumentOptions Document { get; set; } } } diff --git a/src/Stripe.net/Services/Identity/VerificationSessions/VerificationSessionProvidedDetailsOptions.cs b/src/Stripe.net/Services/Identity/VerificationSessions/VerificationSessionProvidedDetailsOptions.cs index eb4423118c..766361f966 100644 --- a/src/Stripe.net/Services/Identity/VerificationSessions/VerificationSessionProvidedDetailsOptions.cs +++ b/src/Stripe.net/Services/Identity/VerificationSessions/VerificationSessionProvidedDetailsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Identity { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class VerificationSessionProvidedDetailsOptions : INestedOptions { @@ -9,12 +12,18 @@ public class VerificationSessionProvidedDetailsOptions : INestedOptions /// Email of user being verified. /// [JsonProperty("email")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("email")] +#endif public string Email { get; set; } /// /// Phone number of user being verified. /// [JsonProperty("phone")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("phone")] +#endif public string Phone { get; set; } } } diff --git a/src/Stripe.net/Services/Identity/VerificationSessions/VerificationSessionUpdateOptions.cs b/src/Stripe.net/Services/Identity/VerificationSessions/VerificationSessionUpdateOptions.cs index 7e4d2d7c38..209dc1751b 100644 --- a/src/Stripe.net/Services/Identity/VerificationSessions/VerificationSessionUpdateOptions.cs +++ b/src/Stripe.net/Services/Identity/VerificationSessions/VerificationSessionUpdateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.Identity { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class VerificationSessionUpdateOptions : BaseOptions, IHasMetadata { @@ -13,18 +16,27 @@ public class VerificationSessionUpdateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// A set of options for the session’s verification checks. /// [JsonProperty("options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("options")] +#endif public VerificationSessionOptionsOptions Options { get; set; } /// /// Details provided about the user being verified. These details may be shown to the user. /// [JsonProperty("provided_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("provided_details")] +#endif public VerificationSessionProvidedDetailsOptions ProvidedDetails { get; set; } /// @@ -33,6 +45,9 @@ public class VerificationSessionUpdateOptions : BaseOptions, IHasMetadata /// One of: document, or id_number. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/InvoiceItems/InvoiceItemCreateOptions.cs b/src/Stripe.net/Services/InvoiceItems/InvoiceItemCreateOptions.cs index cfd69eda63..b4cac85130 100644 --- a/src/Stripe.net/Services/InvoiceItems/InvoiceItemCreateOptions.cs +++ b/src/Stripe.net/Services/InvoiceItems/InvoiceItemCreateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceItemCreateOptions : BaseOptions, IHasMetadata { @@ -12,6 +15,9 @@ public class InvoiceItemCreateOptions : BaseOptions, IHasMetadata /// on the invoice. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long? Amount { get; set; } /// @@ -20,12 +26,18 @@ public class InvoiceItemCreateOptions : BaseOptions, IHasMetadata /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// /// The ID of the customer who will be billed when this invoice item is billed. /// [JsonProperty("customer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] +#endif public string Customer { get; set; } /// @@ -33,6 +45,9 @@ public class InvoiceItemCreateOptions : BaseOptions, IHasMetadata /// displayed in the invoice for easy tracking. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// @@ -40,6 +55,9 @@ public class InvoiceItemCreateOptions : BaseOptions, IHasMetadata /// or negative invoice items, and true for all other invoice items. /// [JsonProperty("discountable")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discountable")] +#endif public bool? Discountable { get; set; } /// @@ -47,6 +65,9 @@ public class InvoiceItemCreateOptions : BaseOptions, IHasMetadata /// line item. /// [JsonProperty("discounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discounts")] +#endif public List Discounts { get; set; } /// @@ -56,6 +77,9 @@ public class InvoiceItemCreateOptions : BaseOptions, IHasMetadata /// to draft invoices and there is a maximum of 250 items per invoice. /// [JsonProperty("invoice")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("invoice")] +#endif public string Invoice { get; set; } /// @@ -65,6 +89,9 @@ public class InvoiceItemCreateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -76,12 +103,18 @@ public class InvoiceItemCreateOptions : BaseOptions, IHasMetadata /// Recognition documentation for details. /// [JsonProperty("period")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("period")] +#endif public InvoiceItemPeriodOptions Period { get; set; } /// /// The ID of the price object. One of price or price_data is required. /// [JsonProperty("price")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("price")] +#endif public string Price { get; set; } /// @@ -89,12 +122,18 @@ public class InvoiceItemCreateOptions : BaseOptions, IHasMetadata /// object inline. One of price or price_data is required. /// [JsonProperty("price_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("price_data")] +#endif public InvoiceItemPriceDataOptions PriceData { get; set; } /// /// Non-negative integer. The quantity of units for the invoice item. /// [JsonProperty("quantity")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("quantity")] +#endif public long? Quantity { get; set; } /// @@ -105,6 +144,9 @@ public class InvoiceItemCreateOptions : BaseOptions, IHasMetadata /// of a particular subscription. /// [JsonProperty("subscription")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("subscription")] +#endif public string Subscription { get; set; } /// @@ -117,12 +159,18 @@ public class InvoiceItemCreateOptions : BaseOptions, IHasMetadata /// One of: exclusive, inclusive, or unspecified. /// [JsonProperty("tax_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_behavior")] +#endif public string TaxBehavior { get; set; } /// /// A tax code ID. /// [JsonProperty("tax_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_code")] +#endif public string TaxCode { get; set; } /// @@ -130,6 +178,9 @@ public class InvoiceItemCreateOptions : BaseOptions, IHasMetadata /// the invoice do not apply to this invoice item. /// [JsonProperty("tax_rates")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_rates")] +#endif public List TaxRates { get; set; } /// @@ -139,6 +190,9 @@ public class InvoiceItemCreateOptions : BaseOptions, IHasMetadata /// amount_due on the invoice. /// [JsonProperty("unit_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_amount")] +#endif public long? UnitAmount { get; set; } /// @@ -147,6 +201,9 @@ public class InvoiceItemCreateOptions : BaseOptions, IHasMetadata /// unit_amount_decimal can be set. /// [JsonProperty("unit_amount_decimal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_amount_decimal")] +#endif public decimal? UnitAmountDecimal { get; set; } } } diff --git a/src/Stripe.net/Services/InvoiceItems/InvoiceItemDiscountOptions.cs b/src/Stripe.net/Services/InvoiceItems/InvoiceItemDiscountOptions.cs index 8e404fd572..3eff636e2a 100644 --- a/src/Stripe.net/Services/InvoiceItems/InvoiceItemDiscountOptions.cs +++ b/src/Stripe.net/Services/InvoiceItems/InvoiceItemDiscountOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceItemDiscountOptions : INestedOptions { @@ -9,18 +12,27 @@ public class InvoiceItemDiscountOptions : INestedOptions /// ID of the coupon to create a new discount for. /// [JsonProperty("coupon")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("coupon")] +#endif public string Coupon { get; set; } /// /// ID of an existing discount on the object (or one of its ancestors) to reuse. /// [JsonProperty("discount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discount")] +#endif public string Discount { get; set; } /// /// ID of the promotion code to create a new discount for. /// [JsonProperty("promotion_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("promotion_code")] +#endif public string PromotionCode { get; set; } } } diff --git a/src/Stripe.net/Services/InvoiceItems/InvoiceItemListOptions.cs b/src/Stripe.net/Services/InvoiceItems/InvoiceItemListOptions.cs index 9bffbf1df2..369620fa40 100644 --- a/src/Stripe.net/Services/InvoiceItems/InvoiceItemListOptions.cs +++ b/src/Stripe.net/Services/InvoiceItems/InvoiceItemListOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceItemListOptions : ListOptionsWithCreated { @@ -10,6 +13,9 @@ public class InvoiceItemListOptions : ListOptionsWithCreated /// invoice items will be returned. /// [JsonProperty("customer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] +#endif public string Customer { get; set; } /// @@ -17,6 +23,9 @@ public class InvoiceItemListOptions : ListOptionsWithCreated /// items will be returned. If specifying an invoice, no customer identifier is needed. /// [JsonProperty("invoice")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("invoice")] +#endif public string Invoice { get; set; } /// @@ -25,6 +34,9 @@ public class InvoiceItemListOptions : ListOptionsWithCreated /// If unspecified, no filter is applied. /// [JsonProperty("pending")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("pending")] +#endif public bool? Pending { get; set; } } } diff --git a/src/Stripe.net/Services/InvoiceItems/InvoiceItemPeriodOptions.cs b/src/Stripe.net/Services/InvoiceItems/InvoiceItemPeriodOptions.cs index 4226e753d3..8911852463 100644 --- a/src/Stripe.net/Services/InvoiceItems/InvoiceItemPeriodOptions.cs +++ b/src/Stripe.net/Services/InvoiceItems/InvoiceItemPeriodOptions.cs @@ -4,6 +4,9 @@ namespace Stripe using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceItemPeriodOptions : INestedOptions { @@ -13,6 +16,10 @@ public class InvoiceItemPeriodOptions : INestedOptions /// [JsonProperty("end")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("end")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? End { get; set; } /// @@ -20,6 +27,10 @@ public class InvoiceItemPeriodOptions : INestedOptions /// [JsonProperty("start")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("start")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? Start { get; set; } } } diff --git a/src/Stripe.net/Services/InvoiceItems/InvoiceItemPriceDataOptions.cs b/src/Stripe.net/Services/InvoiceItems/InvoiceItemPriceDataOptions.cs index 9ea0d3f3ed..d6ff6cb3a6 100644 --- a/src/Stripe.net/Services/InvoiceItems/InvoiceItemPriceDataOptions.cs +++ b/src/Stripe.net/Services/InvoiceItems/InvoiceItemPriceDataOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceItemPriceDataOptions : INestedOptions { @@ -11,12 +14,18 @@ public class InvoiceItemPriceDataOptions : INestedOptions /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// /// The ID of the product that this price will belong to. /// [JsonProperty("product")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("product")] +#endif public string Product { get; set; } /// @@ -29,6 +38,9 @@ public class InvoiceItemPriceDataOptions : INestedOptions /// One of: exclusive, inclusive, or unspecified. /// [JsonProperty("tax_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_behavior")] +#endif public string TaxBehavior { get; set; } /// @@ -36,6 +48,9 @@ public class InvoiceItemPriceDataOptions : INestedOptions /// how much to charge. /// [JsonProperty("unit_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_amount")] +#endif public long? UnitAmount { get; set; } /// @@ -44,6 +59,9 @@ public class InvoiceItemPriceDataOptions : INestedOptions /// unit_amount_decimal can be set. /// [JsonProperty("unit_amount_decimal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_amount_decimal")] +#endif public decimal? UnitAmountDecimal { get; set; } } } diff --git a/src/Stripe.net/Services/InvoiceItems/InvoiceItemUpdateOptions.cs b/src/Stripe.net/Services/InvoiceItems/InvoiceItemUpdateOptions.cs index 888e219e82..a8e171ed7f 100644 --- a/src/Stripe.net/Services/InvoiceItems/InvoiceItemUpdateOptions.cs +++ b/src/Stripe.net/Services/InvoiceItems/InvoiceItemUpdateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceItemUpdateOptions : BaseOptions, IHasMetadata { @@ -12,6 +15,9 @@ public class InvoiceItemUpdateOptions : BaseOptions, IHasMetadata /// negative amount. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long? Amount { get; set; } /// @@ -19,6 +25,9 @@ public class InvoiceItemUpdateOptions : BaseOptions, IHasMetadata /// displayed in the invoice for easy tracking. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// @@ -27,6 +36,9 @@ public class InvoiceItemUpdateOptions : BaseOptions, IHasMetadata /// for prorations. /// [JsonProperty("discountable")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discountable")] +#endif public bool? Discountable { get; set; } /// @@ -35,6 +47,9 @@ public class InvoiceItemUpdateOptions : BaseOptions, IHasMetadata /// string to remove previously-defined discounts. /// [JsonProperty("discounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discounts")] +#endif public List Discounts { get; set; } /// @@ -44,6 +59,9 @@ public class InvoiceItemUpdateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -55,12 +73,18 @@ public class InvoiceItemUpdateOptions : BaseOptions, IHasMetadata /// Recognition documentation for details. /// [JsonProperty("period")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("period")] +#endif public InvoiceItemPeriodOptions Period { get; set; } /// /// The ID of the price object. One of price or price_data is required. /// [JsonProperty("price")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("price")] +#endif public string Price { get; set; } /// @@ -68,12 +92,18 @@ public class InvoiceItemUpdateOptions : BaseOptions, IHasMetadata /// object inline. One of price or price_data is required. /// [JsonProperty("price_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("price_data")] +#endif public InvoiceItemPriceDataOptions PriceData { get; set; } /// /// Non-negative integer. The quantity of units for the invoice item. /// [JsonProperty("quantity")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("quantity")] +#endif public long? Quantity { get; set; } /// @@ -86,12 +116,18 @@ public class InvoiceItemUpdateOptions : BaseOptions, IHasMetadata /// One of: exclusive, inclusive, or unspecified. /// [JsonProperty("tax_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_behavior")] +#endif public string TaxBehavior { get; set; } /// /// A tax code ID. /// [JsonProperty("tax_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_code")] +#endif public string TaxCode { get; set; } /// @@ -100,6 +136,9 @@ public class InvoiceItemUpdateOptions : BaseOptions, IHasMetadata /// previously-defined tax rates. /// [JsonProperty("tax_rates")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_rates")] +#endif public List TaxRates { get; set; } /// @@ -109,6 +148,9 @@ public class InvoiceItemUpdateOptions : BaseOptions, IHasMetadata /// unit_amount. /// [JsonProperty("unit_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_amount")] +#endif public long? UnitAmount { get; set; } /// @@ -117,6 +159,9 @@ public class InvoiceItemUpdateOptions : BaseOptions, IHasMetadata /// unit_amount_decimal can be set. /// [JsonProperty("unit_amount_decimal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_amount_decimal")] +#endif public decimal? UnitAmountDecimal { get; set; } } } diff --git a/src/Stripe.net/Services/InvoiceLineItems/InvoiceLineItemDiscountOptions.cs b/src/Stripe.net/Services/InvoiceLineItems/InvoiceLineItemDiscountOptions.cs index fabd6e5a3b..111122dfbf 100644 --- a/src/Stripe.net/Services/InvoiceLineItems/InvoiceLineItemDiscountOptions.cs +++ b/src/Stripe.net/Services/InvoiceLineItems/InvoiceLineItemDiscountOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceLineItemDiscountOptions : INestedOptions { @@ -9,18 +12,27 @@ public class InvoiceLineItemDiscountOptions : INestedOptions /// ID of the coupon to create a new discount for. /// [JsonProperty("coupon")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("coupon")] +#endif public string Coupon { get; set; } /// /// ID of an existing discount on the object (or one of its ancestors) to reuse. /// [JsonProperty("discount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discount")] +#endif public string Discount { get; set; } /// /// ID of the promotion code to create a new discount for. /// [JsonProperty("promotion_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("promotion_code")] +#endif public string PromotionCode { get; set; } } } diff --git a/src/Stripe.net/Services/InvoiceLineItems/InvoiceLineItemPeriodOptions.cs b/src/Stripe.net/Services/InvoiceLineItems/InvoiceLineItemPeriodOptions.cs index baaf13e180..98238fc450 100644 --- a/src/Stripe.net/Services/InvoiceLineItems/InvoiceLineItemPeriodOptions.cs +++ b/src/Stripe.net/Services/InvoiceLineItems/InvoiceLineItemPeriodOptions.cs @@ -4,6 +4,9 @@ namespace Stripe using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceLineItemPeriodOptions : INestedOptions { @@ -13,6 +16,10 @@ public class InvoiceLineItemPeriodOptions : INestedOptions /// [JsonProperty("end")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("end")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? End { get; set; } /// @@ -20,6 +27,10 @@ public class InvoiceLineItemPeriodOptions : INestedOptions /// [JsonProperty("start")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("start")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? Start { get; set; } } } diff --git a/src/Stripe.net/Services/InvoiceLineItems/InvoiceLineItemPriceDataOptions.cs b/src/Stripe.net/Services/InvoiceLineItems/InvoiceLineItemPriceDataOptions.cs index bb00d8ea85..53872b4991 100644 --- a/src/Stripe.net/Services/InvoiceLineItems/InvoiceLineItemPriceDataOptions.cs +++ b/src/Stripe.net/Services/InvoiceLineItems/InvoiceLineItemPriceDataOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceLineItemPriceDataOptions : INestedOptions { @@ -11,6 +14,9 @@ public class InvoiceLineItemPriceDataOptions : INestedOptions /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// @@ -18,6 +24,9 @@ public class InvoiceLineItemPriceDataOptions : INestedOptions /// product_data is required. /// [JsonProperty("product")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("product")] +#endif public string Product { get; set; } /// @@ -25,6 +34,9 @@ public class InvoiceLineItemPriceDataOptions : INestedOptions /// product_data is required. /// [JsonProperty("product_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("product_data")] +#endif public InvoiceLineItemPriceDataProductDataOptions ProductData { get; set; } /// @@ -37,6 +49,9 @@ public class InvoiceLineItemPriceDataOptions : INestedOptions /// One of: exclusive, inclusive, or unspecified. /// [JsonProperty("tax_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_behavior")] +#endif public string TaxBehavior { get; set; } /// @@ -44,6 +59,9 @@ public class InvoiceLineItemPriceDataOptions : INestedOptions /// One of unit_amount or unit_amount_decimal is required. /// [JsonProperty("unit_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_amount")] +#endif public long? UnitAmount { get; set; } /// @@ -52,6 +70,9 @@ public class InvoiceLineItemPriceDataOptions : INestedOptions /// unit_amount_decimal can be set. /// [JsonProperty("unit_amount_decimal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_amount_decimal")] +#endif public decimal? UnitAmountDecimal { get; set; } } } diff --git a/src/Stripe.net/Services/InvoiceLineItems/InvoiceLineItemPriceDataProductDataOptions.cs b/src/Stripe.net/Services/InvoiceLineItems/InvoiceLineItemPriceDataProductDataOptions.cs index 950dfd0e6e..87a917559d 100644 --- a/src/Stripe.net/Services/InvoiceLineItems/InvoiceLineItemPriceDataProductDataOptions.cs +++ b/src/Stripe.net/Services/InvoiceLineItems/InvoiceLineItemPriceDataProductDataOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceLineItemPriceDataProductDataOptions : INestedOptions, IHasMetadata { @@ -12,6 +15,9 @@ public class InvoiceLineItemPriceDataProductDataOptions : INestedOptions, IHasMe /// rendering purposes. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// @@ -19,6 +25,9 @@ public class InvoiceLineItemPriceDataProductDataOptions : INestedOptions, IHasMe /// customer. /// [JsonProperty("images")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("images")] +#endif public List Images { get; set; } /// @@ -28,18 +37,27 @@ public class InvoiceLineItemPriceDataProductDataOptions : INestedOptions, IHasMe /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// The product's name, meant to be displayable to the customer. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } /// /// A tax code ID. /// [JsonProperty("tax_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_code")] +#endif public string TaxCode { get; set; } } } diff --git a/src/Stripe.net/Services/InvoiceLineItems/InvoiceLineItemTaxAmountOptions.cs b/src/Stripe.net/Services/InvoiceLineItems/InvoiceLineItemTaxAmountOptions.cs index a554ad8632..7d668a5ec6 100644 --- a/src/Stripe.net/Services/InvoiceLineItems/InvoiceLineItemTaxAmountOptions.cs +++ b/src/Stripe.net/Services/InvoiceLineItems/InvoiceLineItemTaxAmountOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceLineItemTaxAmountOptions : INestedOptions { @@ -9,6 +12,9 @@ public class InvoiceLineItemTaxAmountOptions : INestedOptions /// The amount, in cents (or local equivalent), of the tax. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long? Amount { get; set; } /// @@ -21,12 +27,18 @@ public class InvoiceLineItemTaxAmountOptions : INestedOptions /// payments, or line items. /// [JsonProperty("tax_rate_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_rate_data")] +#endif public InvoiceLineItemTaxAmountTaxRateDataOptions TaxRateData { get; set; } /// /// The amount on which tax is calculated, in cents (or local equivalent). /// [JsonProperty("taxable_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("taxable_amount")] +#endif public long? TaxableAmount { get; set; } } } diff --git a/src/Stripe.net/Services/InvoiceLineItems/InvoiceLineItemTaxAmountTaxRateDataOptions.cs b/src/Stripe.net/Services/InvoiceLineItems/InvoiceLineItemTaxAmountTaxRateDataOptions.cs index 8ed28474d6..8ac630e2a7 100644 --- a/src/Stripe.net/Services/InvoiceLineItems/InvoiceLineItemTaxAmountTaxRateDataOptions.cs +++ b/src/Stripe.net/Services/InvoiceLineItems/InvoiceLineItemTaxAmountTaxRateDataOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceLineItemTaxAmountTaxRateDataOptions : INestedOptions { @@ -10,6 +13,9 @@ public class InvoiceLineItemTaxAmountTaxRateDataOptions : INestedOptions /// 3166-1 alpha-2). /// [JsonProperty("country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country")] +#endif public string Country { get; set; } /// @@ -17,18 +23,27 @@ public class InvoiceLineItemTaxAmountTaxRateDataOptions : INestedOptions /// visible to your customers. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// /// The display name of the tax rate, which will be shown to users. /// [JsonProperty("display_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_name")] +#endif public string DisplayName { get; set; } /// /// This specifies if the tax rate is inclusive or exclusive. /// [JsonProperty("inclusive")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("inclusive")] +#endif public bool? Inclusive { get; set; } /// @@ -36,6 +51,9 @@ public class InvoiceLineItemTaxAmountTaxRateDataOptions : INestedOptions /// purposes. It also appears on your customer’s invoice. /// [JsonProperty("jurisdiction")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("jurisdiction")] +#endif public string Jurisdiction { get; set; } /// @@ -45,6 +63,9 @@ public class InvoiceLineItemTaxAmountTaxRateDataOptions : INestedOptions /// amount of the tax is also zero. /// [JsonProperty("percentage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("percentage")] +#endif public decimal? Percentage { get; set; } /// @@ -52,6 +73,9 @@ public class InvoiceLineItemTaxAmountTaxRateDataOptions : INestedOptions /// without country prefix. For example, "NY" for New York, United States. /// [JsonProperty("state")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("state")] +#endif public string State { get; set; } /// @@ -62,6 +86,9 @@ public class InvoiceLineItemTaxAmountTaxRateDataOptions : INestedOptions /// vat. /// [JsonProperty("tax_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_type")] +#endif public string TaxType { get; set; } } } diff --git a/src/Stripe.net/Services/InvoiceLineItems/InvoiceLineItemUpdateOptions.cs b/src/Stripe.net/Services/InvoiceLineItems/InvoiceLineItemUpdateOptions.cs index 3d65b0cd2f..546175b79a 100644 --- a/src/Stripe.net/Services/InvoiceLineItems/InvoiceLineItemUpdateOptions.cs +++ b/src/Stripe.net/Services/InvoiceLineItems/InvoiceLineItemUpdateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceLineItemUpdateOptions : BaseOptions, IHasMetadata { @@ -12,6 +15,9 @@ public class InvoiceLineItemUpdateOptions : BaseOptions, IHasMetadata /// negative amount. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long? Amount { get; set; } /// @@ -19,6 +25,9 @@ public class InvoiceLineItemUpdateOptions : BaseOptions, IHasMetadata /// displayed in the invoice for easy tracking. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// @@ -27,6 +36,9 @@ public class InvoiceLineItemUpdateOptions : BaseOptions, IHasMetadata /// prorations. /// [JsonProperty("discountable")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discountable")] +#endif public bool? Discountable { get; set; } /// @@ -35,6 +47,9 @@ public class InvoiceLineItemUpdateOptions : BaseOptions, IHasMetadata /// previously-defined discounts. /// [JsonProperty("discounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discounts")] +#endif public List Discounts { get; set; } /// @@ -49,6 +64,9 @@ public class InvoiceLineItemUpdateOptions : BaseOptions, IHasMetadata /// items, where any existing metadata on the invoice line is merged with the incoming data. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -60,12 +78,18 @@ public class InvoiceLineItemUpdateOptions : BaseOptions, IHasMetadata /// Recognition documentation for details. /// [JsonProperty("period")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("period")] +#endif public InvoiceLineItemPeriodOptions Period { get; set; } /// /// The ID of the price object. One of price or price_data is required. /// [JsonProperty("price")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("price")] +#endif public string Price { get; set; } /// @@ -73,12 +97,18 @@ public class InvoiceLineItemUpdateOptions : BaseOptions, IHasMetadata /// object inline. One of price or price_data is required. /// [JsonProperty("price_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("price_data")] +#endif public InvoiceLineItemPriceDataOptions PriceData { get; set; } /// /// Non-negative integer. The quantity of units for the line item. /// [JsonProperty("quantity")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("quantity")] +#endif public long? Quantity { get; set; } /// @@ -92,6 +122,9 @@ public class InvoiceLineItemUpdateOptions : BaseOptions, IHasMetadata /// string to remove previously defined tax amounts. /// [JsonProperty("tax_amounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_amounts")] +#endif public List TaxAmounts { get; set; } /// @@ -100,6 +133,9 @@ public class InvoiceLineItemUpdateOptions : BaseOptions, IHasMetadata /// previously-defined tax rates. /// [JsonProperty("tax_rates")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_rates")] +#endif public List TaxRates { get; set; } } } diff --git a/src/Stripe.net/Services/InvoiceRenderingTemplates/InvoiceRenderingTemplateGetOptions.cs b/src/Stripe.net/Services/InvoiceRenderingTemplates/InvoiceRenderingTemplateGetOptions.cs index 6ca4eeb979..275792e89f 100644 --- a/src/Stripe.net/Services/InvoiceRenderingTemplates/InvoiceRenderingTemplateGetOptions.cs +++ b/src/Stripe.net/Services/InvoiceRenderingTemplates/InvoiceRenderingTemplateGetOptions.cs @@ -2,10 +2,16 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceRenderingTemplateGetOptions : BaseOptions { [JsonProperty("version")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("version")] +#endif public long? Version { get; set; } } } diff --git a/src/Stripe.net/Services/InvoiceRenderingTemplates/InvoiceRenderingTemplateListOptions.cs b/src/Stripe.net/Services/InvoiceRenderingTemplates/InvoiceRenderingTemplateListOptions.cs index d304d6a3e6..527f392862 100644 --- a/src/Stripe.net/Services/InvoiceRenderingTemplates/InvoiceRenderingTemplateListOptions.cs +++ b/src/Stripe.net/Services/InvoiceRenderingTemplates/InvoiceRenderingTemplateListOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceRenderingTemplateListOptions : ListOptions { @@ -9,6 +12,9 @@ public class InvoiceRenderingTemplateListOptions : ListOptions /// One of: active, or archived. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } } } diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesAutomaticTaxLiabilityOptions.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesAutomaticTaxLiabilityOptions.cs index 55105cd4b4..d28c6d06fa 100644 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesAutomaticTaxLiabilityOptions.cs +++ b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesAutomaticTaxLiabilityOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceUpcomingLinesAutomaticTaxLiabilityOptions : INestedOptions { @@ -9,6 +12,9 @@ public class InvoiceUpcomingLinesAutomaticTaxLiabilityOptions : INestedOptions /// The connected account being referenced when type is account. /// [JsonProperty("account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account")] +#endif public string Account { get; set; } /// @@ -16,6 +22,9 @@ public class InvoiceUpcomingLinesAutomaticTaxLiabilityOptions : INestedOptions /// One of: account, or self. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesAutomaticTaxOptions.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesAutomaticTaxOptions.cs index 7484bcb972..d43907f35b 100644 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesAutomaticTaxOptions.cs +++ b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesAutomaticTaxOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceUpcomingLinesAutomaticTaxOptions : INestedOptions { @@ -12,6 +15,9 @@ public class InvoiceUpcomingLinesAutomaticTaxOptions : INestedOptions /// tax_behavior=unspecified) cannot be added to automatic tax invoices. /// [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool? Enabled { get; set; } /// @@ -20,6 +26,9 @@ public class InvoiceUpcomingLinesAutomaticTaxOptions : INestedOptions /// transaction is returned in the report of the connected account. /// [JsonProperty("liability")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("liability")] +#endif public InvoiceUpcomingLinesAutomaticTaxLiabilityOptions Liability { get; set; } } } diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesCustomerDetailsOptions.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesCustomerDetailsOptions.cs index 55c7c38733..1a357f3426 100644 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesCustomerDetailsOptions.cs +++ b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesCustomerDetailsOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceUpcomingLinesCustomerDetailsOptions : INestedOptions { @@ -10,18 +13,27 @@ public class InvoiceUpcomingLinesCustomerDetailsOptions : INestedOptions /// The customer's address. /// [JsonProperty("address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address")] +#endif public AddressOptions Address { get; set; } /// /// The customer's shipping information. Appears on invoices emailed to this customer. /// [JsonProperty("shipping")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping")] +#endif public InvoiceUpcomingLinesCustomerDetailsShippingOptions Shipping { get; set; } /// /// Tax details about the customer. /// [JsonProperty("tax")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax")] +#endif public InvoiceUpcomingLinesCustomerDetailsTaxOptions Tax { get; set; } /// @@ -29,12 +41,18 @@ public class InvoiceUpcomingLinesCustomerDetailsOptions : INestedOptions /// One of: exempt, none, or reverse. /// [JsonProperty("tax_exempt")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_exempt")] +#endif public string TaxExempt { get; set; } /// /// The customer's tax IDs. /// [JsonProperty("tax_ids")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_ids")] +#endif public List TaxIds { get; set; } } } diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesCustomerDetailsShippingOptions.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesCustomerDetailsShippingOptions.cs index 1652cb0039..b450a3d69f 100644 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesCustomerDetailsShippingOptions.cs +++ b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesCustomerDetailsShippingOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceUpcomingLinesCustomerDetailsShippingOptions : INestedOptions { @@ -9,18 +12,27 @@ public class InvoiceUpcomingLinesCustomerDetailsShippingOptions : INestedOptions /// Customer shipping address. /// [JsonProperty("address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address")] +#endif public AddressOptions Address { get; set; } /// /// Customer name. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } /// /// Customer phone (including extension). /// [JsonProperty("phone")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("phone")] +#endif public string Phone { get; set; } } } diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesCustomerDetailsTaxIdOptions.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesCustomerDetailsTaxIdOptions.cs index 191cb4b15c..fbca89fa3f 100644 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesCustomerDetailsTaxIdOptions.cs +++ b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesCustomerDetailsTaxIdOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceUpcomingLinesCustomerDetailsTaxIdOptions : INestedOptions { @@ -40,12 +43,18 @@ public class InvoiceUpcomingLinesCustomerDetailsTaxIdOptions : INestedOptions /// uz_tin, uz_vat, ve_rif, vn_tin, or za_vat. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } /// /// Value of the tax ID. /// [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public string Value { get; set; } } } diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesCustomerDetailsTaxOptions.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesCustomerDetailsTaxOptions.cs index afa7183184..10f5e61fb6 100644 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesCustomerDetailsTaxOptions.cs +++ b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesCustomerDetailsTaxOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceUpcomingLinesCustomerDetailsTaxOptions : INestedOptions { @@ -12,6 +15,9 @@ public class InvoiceUpcomingLinesCustomerDetailsTaxOptions : INestedOptions /// frequently since it could result in unexpected tax location/reporting outcomes. /// [JsonProperty("ip_address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ip_address")] +#endif public string IpAddress { get; set; } } } diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesDiscountOptions.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesDiscountOptions.cs index 2d9e80955b..0fe9a9c276 100644 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesDiscountOptions.cs +++ b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesDiscountOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceUpcomingLinesDiscountOptions : INestedOptions { @@ -9,18 +12,27 @@ public class InvoiceUpcomingLinesDiscountOptions : INestedOptions /// ID of the coupon to create a new discount for. /// [JsonProperty("coupon")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("coupon")] +#endif public string Coupon { get; set; } /// /// ID of an existing discount on the object (or one of its ancestors) to reuse. /// [JsonProperty("discount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discount")] +#endif public string Discount { get; set; } /// /// ID of the promotion code to create a new discount for. /// [JsonProperty("promotion_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("promotion_code")] +#endif public string PromotionCode { get; set; } } } diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesInvoiceItemDiscountOptions.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesInvoiceItemDiscountOptions.cs index 7443e622c3..6ea61e7cf6 100644 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesInvoiceItemDiscountOptions.cs +++ b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesInvoiceItemDiscountOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceUpcomingLinesInvoiceItemDiscountOptions : INestedOptions { @@ -9,18 +12,27 @@ public class InvoiceUpcomingLinesInvoiceItemDiscountOptions : INestedOptions /// ID of the coupon to create a new discount for. /// [JsonProperty("coupon")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("coupon")] +#endif public string Coupon { get; set; } /// /// ID of an existing discount on the object (or one of its ancestors) to reuse. /// [JsonProperty("discount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discount")] +#endif public string Discount { get; set; } /// /// ID of the promotion code to create a new discount for. /// [JsonProperty("promotion_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("promotion_code")] +#endif public string PromotionCode { get; set; } } } diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesInvoiceItemOptions.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesInvoiceItemOptions.cs index bc932a507e..c27eeb55ec 100644 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesInvoiceItemOptions.cs +++ b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesInvoiceItemOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceUpcomingLinesInvoiceItemOptions : INestedOptions, IHasMetadata { @@ -10,6 +13,9 @@ public class InvoiceUpcomingLinesInvoiceItemOptions : INestedOptions, IHasMetada /// The integer amount in cents (or local equivalent) of previewed invoice item. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long? Amount { get; set; } /// @@ -18,6 +24,9 @@ public class InvoiceUpcomingLinesInvoiceItemOptions : INestedOptions, IHasMetada /// currency. Only applicable to new invoice items. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// @@ -25,6 +34,9 @@ public class InvoiceUpcomingLinesInvoiceItemOptions : INestedOptions, IHasMetada /// displayed in the invoice for easy tracking. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// @@ -32,12 +44,18 @@ public class InvoiceUpcomingLinesInvoiceItemOptions : INestedOptions, IHasMetada /// except for negative invoice items. /// [JsonProperty("discountable")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discountable")] +#endif public bool? Discountable { get; set; } /// /// The coupons to redeem into discounts for the invoice item in the preview. /// [JsonProperty("discounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discounts")] +#endif public List Discounts { get; set; } /// @@ -45,6 +63,9 @@ public class InvoiceUpcomingLinesInvoiceItemOptions : INestedOptions, IHasMetada /// will be added to the preview of the upcoming invoice. /// [JsonProperty("invoiceitem")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("invoiceitem")] +#endif public string Invoiceitem { get; set; } /// @@ -54,6 +75,9 @@ public class InvoiceUpcomingLinesInvoiceItemOptions : INestedOptions, IHasMetada /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -65,12 +89,18 @@ public class InvoiceUpcomingLinesInvoiceItemOptions : INestedOptions, IHasMetada /// Recognition documentation for details. /// [JsonProperty("period")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("period")] +#endif public InvoiceUpcomingLinesInvoiceItemPeriodOptions Period { get; set; } /// /// The ID of the price object. One of price or price_data is required. /// [JsonProperty("price")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("price")] +#endif public string Price { get; set; } /// @@ -78,12 +108,18 @@ public class InvoiceUpcomingLinesInvoiceItemOptions : INestedOptions, IHasMetada /// object inline. One of price or price_data is required. /// [JsonProperty("price_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("price_data")] +#endif public InvoiceUpcomingLinesInvoiceItemPriceDataOptions PriceData { get; set; } /// /// Non-negative integer. The quantity of units for the invoice item. /// [JsonProperty("quantity")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("quantity")] +#endif public long? Quantity { get; set; } /// @@ -96,12 +132,18 @@ public class InvoiceUpcomingLinesInvoiceItemOptions : INestedOptions, IHasMetada /// One of: exclusive, inclusive, or unspecified. /// [JsonProperty("tax_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_behavior")] +#endif public string TaxBehavior { get; set; } /// /// A tax code ID. /// [JsonProperty("tax_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_code")] +#endif public string TaxCode { get; set; } /// @@ -109,6 +151,9 @@ public class InvoiceUpcomingLinesInvoiceItemOptions : INestedOptions, IHasMetada /// apply to this item. /// [JsonProperty("tax_rates")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_rates")] +#endif public List TaxRates { get; set; } /// @@ -118,6 +163,9 @@ public class InvoiceUpcomingLinesInvoiceItemOptions : INestedOptions, IHasMetada /// unit_amount. /// [JsonProperty("unit_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_amount")] +#endif public long? UnitAmount { get; set; } /// @@ -126,6 +174,9 @@ public class InvoiceUpcomingLinesInvoiceItemOptions : INestedOptions, IHasMetada /// unit_amount_decimal can be set. /// [JsonProperty("unit_amount_decimal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_amount_decimal")] +#endif public decimal? UnitAmountDecimal { get; set; } } } diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesInvoiceItemPeriodOptions.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesInvoiceItemPeriodOptions.cs index 55d0cc4bd0..532ba0b337 100644 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesInvoiceItemPeriodOptions.cs +++ b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesInvoiceItemPeriodOptions.cs @@ -4,6 +4,9 @@ namespace Stripe using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceUpcomingLinesInvoiceItemPeriodOptions : INestedOptions { @@ -13,6 +16,10 @@ public class InvoiceUpcomingLinesInvoiceItemPeriodOptions : INestedOptions /// [JsonProperty("end")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("end")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? End { get; set; } /// @@ -20,6 +27,10 @@ public class InvoiceUpcomingLinesInvoiceItemPeriodOptions : INestedOptions /// [JsonProperty("start")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("start")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? Start { get; set; } } } diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesInvoiceItemPriceDataOptions.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesInvoiceItemPriceDataOptions.cs index 07ba65fa75..757e71f353 100644 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesInvoiceItemPriceDataOptions.cs +++ b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesInvoiceItemPriceDataOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceUpcomingLinesInvoiceItemPriceDataOptions : INestedOptions { @@ -11,12 +14,18 @@ public class InvoiceUpcomingLinesInvoiceItemPriceDataOptions : INestedOptions /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// /// The ID of the product that this price will belong to. /// [JsonProperty("product")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("product")] +#endif public string Product { get; set; } /// @@ -29,6 +38,9 @@ public class InvoiceUpcomingLinesInvoiceItemPriceDataOptions : INestedOptions /// One of: exclusive, inclusive, or unspecified. /// [JsonProperty("tax_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_behavior")] +#endif public string TaxBehavior { get; set; } /// @@ -36,6 +48,9 @@ public class InvoiceUpcomingLinesInvoiceItemPriceDataOptions : INestedOptions /// how much to charge. /// [JsonProperty("unit_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_amount")] +#endif public long? UnitAmount { get; set; } /// @@ -44,6 +59,9 @@ public class InvoiceUpcomingLinesInvoiceItemPriceDataOptions : INestedOptions /// unit_amount_decimal can be set. /// [JsonProperty("unit_amount_decimal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_amount_decimal")] +#endif public decimal? UnitAmountDecimal { get; set; } } } diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesIssuerOptions.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesIssuerOptions.cs index d95ab18065..38ccea8cc4 100644 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesIssuerOptions.cs +++ b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesIssuerOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceUpcomingLinesIssuerOptions : INestedOptions { @@ -9,6 +12,9 @@ public class InvoiceUpcomingLinesIssuerOptions : INestedOptions /// The connected account being referenced when type is account. /// [JsonProperty("account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account")] +#endif public string Account { get; set; } /// @@ -16,6 +22,9 @@ public class InvoiceUpcomingLinesIssuerOptions : INestedOptions /// One of: account, or self. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesListOptions.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesListOptions.cs index 4f4a89fc8a..42c99e3d70 100644 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesListOptions.cs +++ b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesListOptions.cs @@ -5,6 +5,9 @@ namespace Stripe using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceUpcomingLinesListOptions : ListOptions { @@ -12,6 +15,9 @@ public class InvoiceUpcomingLinesListOptions : ListOptions /// Settings for automatic tax lookup for this invoice preview. /// [JsonProperty("automatic_tax")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("automatic_tax")] +#endif public InvoiceUpcomingLinesAutomaticTaxOptions AutomaticTax { get; set; } /// @@ -20,6 +26,9 @@ public class InvoiceUpcomingLinesListOptions : ListOptions /// instead. /// [JsonProperty("coupon")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("coupon")] +#endif public string Coupon { get; set; } /// @@ -27,6 +36,9 @@ public class InvoiceUpcomingLinesListOptions : ListOptions /// specified. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// @@ -35,6 +47,9 @@ public class InvoiceUpcomingLinesListOptions : ListOptions /// subscription, or schedule must be set. /// [JsonProperty("customer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] +#endif public string Customer { get; set; } /// @@ -43,6 +58,9 @@ public class InvoiceUpcomingLinesListOptions : ListOptions /// subscription, or schedule must be set. /// [JsonProperty("customer_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_details")] +#endif public InvoiceUpcomingLinesCustomerDetailsOptions CustomerDetails { get; set; } /// @@ -52,12 +70,18 @@ public class InvoiceUpcomingLinesListOptions : ListOptions /// avoid inheriting any discounts. /// [JsonProperty("discounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discounts")] +#endif public List Discounts { get; set; } /// /// List of invoice items to add or update in the upcoming invoice preview (up to 250). /// [JsonProperty("invoice_items")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("invoice_items")] +#endif public List InvoiceItems { get; set; } /// @@ -65,6 +89,9 @@ public class InvoiceUpcomingLinesListOptions : ListOptions /// branding and support information of the specified account. /// [JsonProperty("issuer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("issuer")] +#endif public InvoiceUpcomingLinesIssuerOptions Issuer { get; set; } /// @@ -74,6 +101,9 @@ public class InvoiceUpcomingLinesListOptions : ListOptions /// with Connect documentation for details. /// [JsonProperty("on_behalf_of")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("on_behalf_of")] +#endif public string OnBehalfOf { get; set; } /// @@ -82,6 +112,9 @@ public class InvoiceUpcomingLinesListOptions : ListOptions /// One of: next, or recurring. /// [JsonProperty("preview_mode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preview_mode")] +#endif public string PreviewMode { get; set; } /// @@ -89,6 +122,9 @@ public class InvoiceUpcomingLinesListOptions : ListOptions /// used with subscription or subscription fields. /// [JsonProperty("schedule")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("schedule")] +#endif public string Schedule { get; set; } /// @@ -96,6 +132,9 @@ public class InvoiceUpcomingLinesListOptions : ListOptions /// subscription or subscription_ prefixed fields. /// [JsonProperty("schedule_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("schedule_details")] +#endif public InvoiceUpcomingLinesScheduleDetailsOptions ScheduleDetails { get; set; } /// @@ -106,6 +145,9 @@ public class InvoiceUpcomingLinesListOptions : ListOptions /// invoice from among the customer's subscriptions. /// [JsonProperty("subscription")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("subscription")] +#endif public string Subscription { get; set; } /// @@ -119,6 +161,10 @@ public class InvoiceUpcomingLinesListOptions : ListOptions /// [JsonProperty("subscription_billing_cycle_anchor")] [JsonConverter(typeof(AnyOfConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("subscription_billing_cycle_anchor")] + [STJS.JsonConverter(typeof(STJAnyOfConverter))] +#endif public AnyOf SubscriptionBillingCycleAnchor { get; set; } /// @@ -130,6 +176,10 @@ public class InvoiceUpcomingLinesListOptions : ListOptions /// [JsonProperty("subscription_cancel_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("subscription_cancel_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? SubscriptionCancelAt { get; set; } /// @@ -139,6 +189,9 @@ public class InvoiceUpcomingLinesListOptions : ListOptions /// subscription_details.cancel_at_period_end instead. /// [JsonProperty("subscription_cancel_at_period_end")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("subscription_cancel_at_period_end")] +#endif public bool? SubscriptionCancelAtPeriodEnd { get; set; } /// @@ -147,6 +200,9 @@ public class InvoiceUpcomingLinesListOptions : ListOptions /// subscription_details.cancel_now instead. /// [JsonProperty("subscription_cancel_now")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("subscription_cancel_now")] +#endif public bool? SubscriptionCancelNow { get; set; } /// @@ -156,6 +212,9 @@ public class InvoiceUpcomingLinesListOptions : ListOptions /// future API version. Use subscription_details.default_tax_rates instead. /// [JsonProperty("subscription_default_tax_rates")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("subscription_default_tax_rates")] +#endif public List SubscriptionDefaultTaxRates { get; set; } /// @@ -163,6 +222,9 @@ public class InvoiceUpcomingLinesListOptions : ListOptions /// with schedule or schedule_details fields. /// [JsonProperty("subscription_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("subscription_details")] +#endif public InvoiceUpcomingLinesSubscriptionDetailsOptions SubscriptionDetails { get; set; } /// @@ -171,6 +233,9 @@ public class InvoiceUpcomingLinesListOptions : ListOptions /// subscription_details.items instead. /// [JsonProperty("subscription_items")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("subscription_items")] +#endif public List SubscriptionItems { get; set; } /// @@ -184,6 +249,9 @@ public class InvoiceUpcomingLinesListOptions : ListOptions /// One of: always_invoice, create_prorations, or none. /// [JsonProperty("subscription_proration_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("subscription_proration_behavior")] +#endif public string SubscriptionProrationBehavior { get; set; } /// @@ -199,6 +267,10 @@ public class InvoiceUpcomingLinesListOptions : ListOptions /// [JsonProperty("subscription_proration_date")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("subscription_proration_date")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? SubscriptionProrationDate { get; set; } /// @@ -208,6 +280,9 @@ public class InvoiceUpcomingLinesListOptions : ListOptions /// subscription_details.resume_at instead. /// [JsonProperty("subscription_resume_at")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("subscription_resume_at")] +#endif public string SubscriptionResumeAt { get; set; } /// @@ -217,6 +292,10 @@ public class InvoiceUpcomingLinesListOptions : ListOptions /// [JsonProperty("subscription_start_date")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("subscription_start_date")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? SubscriptionStartDate { get; set; } /// @@ -227,6 +306,10 @@ public class InvoiceUpcomingLinesListOptions : ListOptions /// [JsonProperty("subscription_trial_end")] [JsonConverter(typeof(AnyOfConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("subscription_trial_end")] + [STJS.JsonConverter(typeof(STJAnyOfConverter))] +#endif public AnyOf SubscriptionTrialEnd { get; set; } /// @@ -238,6 +321,9 @@ public class InvoiceUpcomingLinesListOptions : ListOptions /// subscriptions to learn more. /// [JsonProperty("subscription_trial_from_plan")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("subscription_trial_from_plan")] +#endif public bool? SubscriptionTrialFromPlan { get; set; } } } diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsOptions.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsOptions.cs index ac6701d6ec..a613ddefab 100644 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsOptions.cs +++ b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceUpcomingLinesScheduleDetailsOptions : INestedOptions { @@ -15,6 +18,9 @@ public class InvoiceUpcomingLinesScheduleDetailsOptions : INestedOptions /// One of: cancel, or release. /// [JsonProperty("end_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("end_behavior")] +#endif public string EndBehavior { get; set; } /// @@ -23,6 +29,9 @@ public class InvoiceUpcomingLinesScheduleDetailsOptions : INestedOptions /// end_date of one phase will always equal the start_date of the next phase. /// [JsonProperty("phases")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("phases")] +#endif public List Phases { get; set; } /// @@ -31,6 +40,9 @@ public class InvoiceUpcomingLinesScheduleDetailsOptions : INestedOptions /// One of: always_invoice, create_prorations, or none. /// [JsonProperty("proration_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("proration_behavior")] +#endif public string ProrationBehavior { get; set; } } } diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseAddInvoiceItemDiscountOptions.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseAddInvoiceItemDiscountOptions.cs index 63d136266f..e3403829ed 100644 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseAddInvoiceItemDiscountOptions.cs +++ b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseAddInvoiceItemDiscountOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceUpcomingLinesScheduleDetailsPhaseAddInvoiceItemDiscountOptions : INestedOptions { @@ -9,18 +12,27 @@ public class InvoiceUpcomingLinesScheduleDetailsPhaseAddInvoiceItemDiscountOptio /// ID of the coupon to create a new discount for. /// [JsonProperty("coupon")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("coupon")] +#endif public string Coupon { get; set; } /// /// ID of an existing discount on the object (or one of its ancestors) to reuse. /// [JsonProperty("discount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discount")] +#endif public string Discount { get; set; } /// /// ID of the promotion code to create a new discount for. /// [JsonProperty("promotion_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("promotion_code")] +#endif public string PromotionCode { get; set; } } } diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseAddInvoiceItemOptions.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseAddInvoiceItemOptions.cs index 7c31fa437a..2347d529f3 100644 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseAddInvoiceItemOptions.cs +++ b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseAddInvoiceItemOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceUpcomingLinesScheduleDetailsPhaseAddInvoiceItemOptions : INestedOptions { @@ -10,12 +13,18 @@ public class InvoiceUpcomingLinesScheduleDetailsPhaseAddInvoiceItemOptions : INe /// The coupons to redeem into discounts for the item. /// [JsonProperty("discounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discounts")] +#endif public List Discounts { get; set; } /// /// The ID of the price object. One of price or price_data is required. /// [JsonProperty("price")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("price")] +#endif public string Price { get; set; } /// @@ -23,12 +32,18 @@ public class InvoiceUpcomingLinesScheduleDetailsPhaseAddInvoiceItemOptions : INe /// object inline. One of price or price_data is required. /// [JsonProperty("price_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("price_data")] +#endif public InvoiceUpcomingLinesScheduleDetailsPhaseAddInvoiceItemPriceDataOptions PriceData { get; set; } /// /// Quantity for this item. Defaults to 1. /// [JsonProperty("quantity")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("quantity")] +#endif public long? Quantity { get; set; } /// @@ -36,6 +51,9 @@ public class InvoiceUpcomingLinesScheduleDetailsPhaseAddInvoiceItemOptions : INe /// apply to this item. /// [JsonProperty("tax_rates")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_rates")] +#endif public List TaxRates { get; set; } } } diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseAddInvoiceItemPriceDataOptions.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseAddInvoiceItemPriceDataOptions.cs index 3fed1c3cf6..5240662127 100644 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseAddInvoiceItemPriceDataOptions.cs +++ b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseAddInvoiceItemPriceDataOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceUpcomingLinesScheduleDetailsPhaseAddInvoiceItemPriceDataOptions : INestedOptions { @@ -11,12 +14,18 @@ public class InvoiceUpcomingLinesScheduleDetailsPhaseAddInvoiceItemPriceDataOpti /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// /// The ID of the product that this price will belong to. /// [JsonProperty("product")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("product")] +#endif public string Product { get; set; } /// @@ -29,6 +38,9 @@ public class InvoiceUpcomingLinesScheduleDetailsPhaseAddInvoiceItemPriceDataOpti /// One of: exclusive, inclusive, or unspecified. /// [JsonProperty("tax_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_behavior")] +#endif public string TaxBehavior { get; set; } /// @@ -37,6 +49,9 @@ public class InvoiceUpcomingLinesScheduleDetailsPhaseAddInvoiceItemPriceDataOpti /// customer. /// [JsonProperty("unit_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_amount")] +#endif public long? UnitAmount { get; set; } /// @@ -45,6 +60,9 @@ public class InvoiceUpcomingLinesScheduleDetailsPhaseAddInvoiceItemPriceDataOpti /// unit_amount_decimal can be set. /// [JsonProperty("unit_amount_decimal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_amount_decimal")] +#endif public decimal? UnitAmountDecimal { get; set; } } } diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseAutomaticTaxLiabilityOptions.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseAutomaticTaxLiabilityOptions.cs index 955bfd474e..e45ce9514f 100644 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseAutomaticTaxLiabilityOptions.cs +++ b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseAutomaticTaxLiabilityOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceUpcomingLinesScheduleDetailsPhaseAutomaticTaxLiabilityOptions : INestedOptions { @@ -9,6 +12,9 @@ public class InvoiceUpcomingLinesScheduleDetailsPhaseAutomaticTaxLiabilityOption /// The connected account being referenced when type is account. /// [JsonProperty("account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account")] +#endif public string Account { get; set; } /// @@ -16,6 +22,9 @@ public class InvoiceUpcomingLinesScheduleDetailsPhaseAutomaticTaxLiabilityOption /// One of: account, or self. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseAutomaticTaxOptions.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseAutomaticTaxOptions.cs index 52a14ae1dc..b3ef0bc799 100644 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseAutomaticTaxOptions.cs +++ b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseAutomaticTaxOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceUpcomingLinesScheduleDetailsPhaseAutomaticTaxOptions : INestedOptions { @@ -10,6 +13,9 @@ public class InvoiceUpcomingLinesScheduleDetailsPhaseAutomaticTaxOptions : INest /// invoices generated by the subscription. /// [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool? Enabled { get; set; } /// @@ -18,6 +24,9 @@ public class InvoiceUpcomingLinesScheduleDetailsPhaseAutomaticTaxOptions : INest /// transaction is returned in the report of the connected account. /// [JsonProperty("liability")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("liability")] +#endif public InvoiceUpcomingLinesScheduleDetailsPhaseAutomaticTaxLiabilityOptions Liability { get; set; } } } diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseBillingThresholdsOptions.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseBillingThresholdsOptions.cs index 6383446af6..f775084c22 100644 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseBillingThresholdsOptions.cs +++ b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseBillingThresholdsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceUpcomingLinesScheduleDetailsPhaseBillingThresholdsOptions : INestedOptions { @@ -9,6 +12,9 @@ public class InvoiceUpcomingLinesScheduleDetailsPhaseBillingThresholdsOptions : /// Monetary threshold that triggers the subscription to advance to a new billing period. /// [JsonProperty("amount_gte")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_gte")] +#endif public long? AmountGte { get; set; } /// @@ -17,6 +23,9 @@ public class InvoiceUpcomingLinesScheduleDetailsPhaseBillingThresholdsOptions : /// threshold was last reached; otherwise, the value will remain unchanged. /// [JsonProperty("reset_billing_cycle_anchor")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reset_billing_cycle_anchor")] +#endif public bool? ResetBillingCycleAnchor { get; set; } } } diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseDiscountOptions.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseDiscountOptions.cs index e993fed251..32b367467b 100644 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseDiscountOptions.cs +++ b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseDiscountOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceUpcomingLinesScheduleDetailsPhaseDiscountOptions : INestedOptions { @@ -9,18 +12,27 @@ public class InvoiceUpcomingLinesScheduleDetailsPhaseDiscountOptions : INestedOp /// ID of the coupon to create a new discount for. /// [JsonProperty("coupon")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("coupon")] +#endif public string Coupon { get; set; } /// /// ID of an existing discount on the object (or one of its ancestors) to reuse. /// [JsonProperty("discount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discount")] +#endif public string Discount { get; set; } /// /// ID of the promotion code to create a new discount for. /// [JsonProperty("promotion_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("promotion_code")] +#endif public string PromotionCode { get; set; } } } diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseInvoiceSettingsIssuerOptions.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseInvoiceSettingsIssuerOptions.cs index 975b6641fb..b7cc118b73 100644 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseInvoiceSettingsIssuerOptions.cs +++ b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseInvoiceSettingsIssuerOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceUpcomingLinesScheduleDetailsPhaseInvoiceSettingsIssuerOptions : INestedOptions { @@ -9,6 +12,9 @@ public class InvoiceUpcomingLinesScheduleDetailsPhaseInvoiceSettingsIssuerOption /// The connected account being referenced when type is account. /// [JsonProperty("account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account")] +#endif public string Account { get; set; } /// @@ -16,6 +22,9 @@ public class InvoiceUpcomingLinesScheduleDetailsPhaseInvoiceSettingsIssuerOption /// One of: account, or self. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseInvoiceSettingsOptions.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseInvoiceSettingsOptions.cs index ca21f2fd60..a446749470 100644 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseInvoiceSettingsOptions.cs +++ b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseInvoiceSettingsOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceUpcomingLinesScheduleDetailsPhaseInvoiceSettingsOptions : INestedOptions { @@ -11,6 +14,9 @@ public class InvoiceUpcomingLinesScheduleDetailsPhaseInvoiceSettingsOptions : IN /// on invoices generated by this phase of the subscription schedule. /// [JsonProperty("account_tax_ids")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_tax_ids")] +#endif public List AccountTaxIds { get; set; } /// @@ -19,6 +25,9 @@ public class InvoiceUpcomingLinesScheduleDetailsPhaseInvoiceSettingsOptions : IN /// billing=charge_automatically. /// [JsonProperty("days_until_due")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("days_until_due")] +#endif public long? DaysUntilDue { get; set; } /// @@ -26,6 +35,9 @@ public class InvoiceUpcomingLinesScheduleDetailsPhaseInvoiceSettingsOptions : IN /// branding and support information of the specified account. /// [JsonProperty("issuer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("issuer")] +#endif public InvoiceUpcomingLinesScheduleDetailsPhaseInvoiceSettingsIssuerOptions Issuer { get; set; } } } diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseItemBillingThresholdsOptions.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseItemBillingThresholdsOptions.cs index cc63834f84..24541df6b5 100644 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseItemBillingThresholdsOptions.cs +++ b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseItemBillingThresholdsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceUpcomingLinesScheduleDetailsPhaseItemBillingThresholdsOptions : INestedOptions { @@ -12,6 +15,9 @@ public class InvoiceUpcomingLinesScheduleDetailsPhaseItemBillingThresholdsOption /// threshold). /// [JsonProperty("usage_gte")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("usage_gte")] +#endif public long? UsageGte { get; set; } } } diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseItemDiscountOptions.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseItemDiscountOptions.cs index 155a669adc..8e9b3fa597 100644 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseItemDiscountOptions.cs +++ b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseItemDiscountOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceUpcomingLinesScheduleDetailsPhaseItemDiscountOptions : INestedOptions { @@ -9,18 +12,27 @@ public class InvoiceUpcomingLinesScheduleDetailsPhaseItemDiscountOptions : INest /// ID of the coupon to create a new discount for. /// [JsonProperty("coupon")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("coupon")] +#endif public string Coupon { get; set; } /// /// ID of an existing discount on the object (or one of its ancestors) to reuse. /// [JsonProperty("discount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discount")] +#endif public string Discount { get; set; } /// /// ID of the promotion code to create a new discount for. /// [JsonProperty("promotion_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("promotion_code")] +#endif public string PromotionCode { get; set; } } } diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseItemOptions.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseItemOptions.cs index 8b3d977258..da14aaa613 100644 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseItemOptions.cs +++ b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseItemOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceUpcomingLinesScheduleDetailsPhaseItemOptions : INestedOptions, IHasMetadata { @@ -12,12 +15,18 @@ public class InvoiceUpcomingLinesScheduleDetailsPhaseItemOptions : INestedOption /// thresholds. /// [JsonProperty("billing_thresholds")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_thresholds")] +#endif public InvoiceUpcomingLinesScheduleDetailsPhaseItemBillingThresholdsOptions BillingThresholds { get; set; } /// /// The coupons to redeem into discounts for the subscription item. /// [JsonProperty("discounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discounts")] +#endif public List Discounts { get; set; } /// @@ -31,6 +40,9 @@ public class InvoiceUpcomingLinesScheduleDetailsPhaseItemOptions : INestedOption /// configuration item's metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -38,12 +50,18 @@ public class InvoiceUpcomingLinesScheduleDetailsPhaseItemOptions : INestedOption /// price. /// [JsonProperty("plan")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("plan")] +#endif public string Plan { get; set; } /// /// The ID of the price object. /// [JsonProperty("price")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("price")] +#endif public string Price { get; set; } /// @@ -51,6 +69,9 @@ public class InvoiceUpcomingLinesScheduleDetailsPhaseItemOptions : INestedOption /// object inline. /// [JsonProperty("price_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("price_data")] +#endif public InvoiceUpcomingLinesScheduleDetailsPhaseItemPriceDataOptions PriceData { get; set; } /// @@ -58,6 +79,9 @@ public class InvoiceUpcomingLinesScheduleDetailsPhaseItemOptions : INestedOption /// licensed and not metered. /// [JsonProperty("quantity")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("quantity")] +#endif public long? Quantity { get; set; } /// @@ -68,6 +92,9 @@ public class InvoiceUpcomingLinesScheduleDetailsPhaseItemOptions : INestedOption /// tax rates. /// [JsonProperty("tax_rates")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_rates")] +#endif public List TaxRates { get; set; } } } diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseItemPriceDataOptions.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseItemPriceDataOptions.cs index fb2fab27e6..2aaf76ff6c 100644 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseItemPriceDataOptions.cs +++ b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseItemPriceDataOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceUpcomingLinesScheduleDetailsPhaseItemPriceDataOptions : INestedOptions { @@ -11,18 +14,27 @@ public class InvoiceUpcomingLinesScheduleDetailsPhaseItemPriceDataOptions : INes /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// /// The ID of the product that this price will belong to. /// [JsonProperty("product")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("product")] +#endif public string Product { get; set; } /// /// The recurring components of a price such as interval and interval_count. /// [JsonProperty("recurring")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("recurring")] +#endif public InvoiceUpcomingLinesScheduleDetailsPhaseItemPriceDataRecurringOptions Recurring { get; set; } /// @@ -35,6 +47,9 @@ public class InvoiceUpcomingLinesScheduleDetailsPhaseItemPriceDataOptions : INes /// One of: exclusive, inclusive, or unspecified. /// [JsonProperty("tax_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_behavior")] +#endif public string TaxBehavior { get; set; } /// @@ -42,6 +57,9 @@ public class InvoiceUpcomingLinesScheduleDetailsPhaseItemPriceDataOptions : INes /// how much to charge. /// [JsonProperty("unit_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_amount")] +#endif public long? UnitAmount { get; set; } /// @@ -50,6 +68,9 @@ public class InvoiceUpcomingLinesScheduleDetailsPhaseItemPriceDataOptions : INes /// unit_amount_decimal can be set. /// [JsonProperty("unit_amount_decimal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_amount_decimal")] +#endif public decimal? UnitAmountDecimal { get; set; } } } diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseItemPriceDataRecurringOptions.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseItemPriceDataRecurringOptions.cs index 281b6c9d8f..206f323c2b 100644 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseItemPriceDataRecurringOptions.cs +++ b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseItemPriceDataRecurringOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceUpcomingLinesScheduleDetailsPhaseItemPriceDataRecurringOptions : INestedOptions { @@ -11,6 +14,9 @@ public class InvoiceUpcomingLinesScheduleDetailsPhaseItemPriceDataRecurringOptio /// One of: day, month, week, or year. /// [JsonProperty("interval")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interval")] +#endif public string Interval { get; set; } /// @@ -19,6 +25,9 @@ public class InvoiceUpcomingLinesScheduleDetailsPhaseItemPriceDataRecurringOptio /// years interval allowed (3 years, 36 months, or 156 weeks). /// [JsonProperty("interval_count")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interval_count")] +#endif public long? IntervalCount { get; set; } } } diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseOptions.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseOptions.cs index 5ae6b5f180..4505dc9c07 100644 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseOptions.cs +++ b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseOptions.cs @@ -5,6 +5,9 @@ namespace Stripe using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceUpcomingLinesScheduleDetailsPhaseOptions : INestedOptions, IHasMetadata { @@ -13,6 +16,9 @@ public class InvoiceUpcomingLinesScheduleDetailsPhaseOptions : INestedOptions, I /// invoice for this phase. You may pass up to 20 items. /// [JsonProperty("add_invoice_items")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("add_invoice_items")] +#endif public List AddInvoiceItems { get; set; } /// @@ -24,12 +30,18 @@ public class InvoiceUpcomingLinesScheduleDetailsPhaseOptions : INestedOptions, I /// href="https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions">documentation. /// [JsonProperty("application_fee_percent")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("application_fee_percent")] +#endif public decimal? ApplicationFeePercent { get; set; } /// /// Automatic tax settings for this phase. /// [JsonProperty("automatic_tax")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("automatic_tax")] +#endif public InvoiceUpcomingLinesScheduleDetailsPhaseAutomaticTaxOptions AutomaticTax { get; set; } /// @@ -41,6 +53,9 @@ public class InvoiceUpcomingLinesScheduleDetailsPhaseOptions : INestedOptions, I /// One of: automatic, or phase_start. /// [JsonProperty("billing_cycle_anchor")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_cycle_anchor")] +#endif public string BillingCycleAnchor { get; set; } /// @@ -48,6 +63,9 @@ public class InvoiceUpcomingLinesScheduleDetailsPhaseOptions : INestedOptions, I /// new billing period. Pass an empty string to remove previously-defined thresholds. /// [JsonProperty("billing_thresholds")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_thresholds")] +#endif public InvoiceUpcomingLinesScheduleDetailsPhaseBillingThresholdsOptions BillingThresholds { get; set; } /// @@ -59,6 +77,9 @@ public class InvoiceUpcomingLinesScheduleDetailsPhaseOptions : INestedOptions, I /// One of: charge_automatically, or send_invoice. /// [JsonProperty("collection_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("collection_method")] +#endif public string CollectionMethod { get; set; } /// @@ -67,6 +88,9 @@ public class InvoiceUpcomingLinesScheduleDetailsPhaseOptions : INestedOptions, I /// instead. /// [JsonProperty("coupon")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("coupon")] +#endif public string Coupon { get; set; } /// @@ -75,6 +99,9 @@ public class InvoiceUpcomingLinesScheduleDetailsPhaseOptions : INestedOptions, I /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// @@ -83,6 +110,9 @@ public class InvoiceUpcomingLinesScheduleDetailsPhaseOptions : INestedOptions, I /// default payment method in the customer's invoice settings. /// [JsonProperty("default_payment_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("default_payment_method")] +#endif public string DefaultPaymentMethod { get; set; } /// @@ -94,6 +124,9 @@ public class InvoiceUpcomingLinesScheduleDetailsPhaseOptions : INestedOptions, I /// for any Invoices issued by the Subscription during this Phase. /// [JsonProperty("default_tax_rates")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("default_tax_rates")] +#endif public List DefaultTaxRates { get; set; } /// @@ -102,6 +135,9 @@ public class InvoiceUpcomingLinesScheduleDetailsPhaseOptions : INestedOptions, I /// certain local payment methods UIs. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// @@ -110,6 +146,9 @@ public class InvoiceUpcomingLinesScheduleDetailsPhaseOptions : INestedOptions, I /// any discounts. /// [JsonProperty("discounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discounts")] +#endif public List Discounts { get; set; } /// @@ -118,12 +157,19 @@ public class InvoiceUpcomingLinesScheduleDetailsPhaseOptions : INestedOptions, I /// [JsonProperty("end_date")] [JsonConverter(typeof(AnyOfConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("end_date")] + [STJS.JsonConverter(typeof(STJAnyOfConverter))] +#endif public AnyOf EndDate { get; set; } /// /// All invoices will be billed using the specified settings. /// [JsonProperty("invoice_settings")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("invoice_settings")] +#endif public InvoiceUpcomingLinesScheduleDetailsPhaseInvoiceSettingsOptions InvoiceSettings { get; set; } /// @@ -131,6 +177,9 @@ public class InvoiceUpcomingLinesScheduleDetailsPhaseOptions : INestedOptions, I /// the subscription schedule. /// [JsonProperty("items")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("items")] +#endif public List Items { get; set; } /// @@ -140,6 +189,9 @@ public class InvoiceUpcomingLinesScheduleDetailsPhaseOptions : INestedOptions, I /// If set, end_date must not be set. /// [JsonProperty("iterations")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("iterations")] +#endif public long? Iterations { get; set; } /// @@ -153,6 +205,9 @@ public class InvoiceUpcomingLinesScheduleDetailsPhaseOptions : INestedOptions, I /// metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -160,6 +215,9 @@ public class InvoiceUpcomingLinesScheduleDetailsPhaseOptions : INestedOptions, I /// invoices. /// [JsonProperty("on_behalf_of")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("on_behalf_of")] +#endif public string OnBehalfOf { get; set; } /// @@ -174,6 +232,9 @@ public class InvoiceUpcomingLinesScheduleDetailsPhaseOptions : INestedOptions, I /// One of: always_invoice, create_prorations, or none. /// [JsonProperty("proration_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("proration_behavior")] +#endif public string ProrationBehavior { get; set; } /// @@ -182,6 +243,10 @@ public class InvoiceUpcomingLinesScheduleDetailsPhaseOptions : INestedOptions, I /// [JsonProperty("start_date")] [JsonConverter(typeof(AnyOfConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("start_date")] + [STJS.JsonConverter(typeof(STJAnyOfConverter))] +#endif public AnyOf StartDate { get; set; } /// @@ -189,6 +254,9 @@ public class InvoiceUpcomingLinesScheduleDetailsPhaseOptions : INestedOptions, I /// subscription's invoices. /// [JsonProperty("transfer_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transfer_data")] +#endif public InvoiceUpcomingLinesScheduleDetailsPhaseTransferDataOptions TransferData { get; set; } /// @@ -196,6 +264,9 @@ public class InvoiceUpcomingLinesScheduleDetailsPhaseOptions : INestedOptions, I /// charged for any fees. /// [JsonProperty("trial")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("trial")] +#endif public bool? Trial { get; set; } /// @@ -204,6 +275,10 @@ public class InvoiceUpcomingLinesScheduleDetailsPhaseOptions : INestedOptions, I /// [JsonProperty("trial_end")] [JsonConverter(typeof(AnyOfConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("trial_end")] + [STJS.JsonConverter(typeof(STJAnyOfConverter))] +#endif public AnyOf TrialEnd { get; set; } } } diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseTransferDataOptions.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseTransferDataOptions.cs index 40171ec724..075ba74fe1 100644 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseTransferDataOptions.cs +++ b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseTransferDataOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceUpcomingLinesScheduleDetailsPhaseTransferDataOptions : INestedOptions { @@ -12,12 +15,18 @@ public class InvoiceUpcomingLinesScheduleDetailsPhaseTransferDataOptions : INest /// destination. /// [JsonProperty("amount_percent")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_percent")] +#endif public decimal? AmountPercent { get; set; } /// /// ID of an existing, connected Stripe account. /// [JsonProperty("destination")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("destination")] +#endif public string Destination { get; set; } } } diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesSubscriptionDetailsItemBillingThresholdsOptions.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesSubscriptionDetailsItemBillingThresholdsOptions.cs index 0952d08104..306aa1ad41 100644 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesSubscriptionDetailsItemBillingThresholdsOptions.cs +++ b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesSubscriptionDetailsItemBillingThresholdsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceUpcomingLinesSubscriptionDetailsItemBillingThresholdsOptions : INestedOptions { @@ -12,6 +15,9 @@ public class InvoiceUpcomingLinesSubscriptionDetailsItemBillingThresholdsOptions /// threshold). /// [JsonProperty("usage_gte")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("usage_gte")] +#endif public long? UsageGte { get; set; } } } diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesSubscriptionDetailsItemDiscountOptions.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesSubscriptionDetailsItemDiscountOptions.cs index 46dade2e0d..030d2bbed6 100644 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesSubscriptionDetailsItemDiscountOptions.cs +++ b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesSubscriptionDetailsItemDiscountOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceUpcomingLinesSubscriptionDetailsItemDiscountOptions : INestedOptions { @@ -9,18 +12,27 @@ public class InvoiceUpcomingLinesSubscriptionDetailsItemDiscountOptions : INeste /// ID of the coupon to create a new discount for. /// [JsonProperty("coupon")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("coupon")] +#endif public string Coupon { get; set; } /// /// ID of an existing discount on the object (or one of its ancestors) to reuse. /// [JsonProperty("discount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discount")] +#endif public string Discount { get; set; } /// /// ID of the promotion code to create a new discount for. /// [JsonProperty("promotion_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("promotion_code")] +#endif public string PromotionCode { get; set; } } } diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesSubscriptionDetailsItemOptions.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesSubscriptionDetailsItemOptions.cs index ea07a4cede..e650eefe6d 100644 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesSubscriptionDetailsItemOptions.cs +++ b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesSubscriptionDetailsItemOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceUpcomingLinesSubscriptionDetailsItemOptions : INestedOptions, IHasId, IHasMetadata { @@ -12,6 +15,9 @@ public class InvoiceUpcomingLinesSubscriptionDetailsItemOptions : INestedOptions /// thresholds. /// [JsonProperty("billing_thresholds")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_thresholds")] +#endif public InvoiceUpcomingLinesSubscriptionDetailsItemBillingThresholdsOptions BillingThresholds { get; set; } /// @@ -19,24 +25,36 @@ public class InvoiceUpcomingLinesSubscriptionDetailsItemOptions : INestedOptions /// to true and the current plan's usage_type is metered. /// [JsonProperty("clear_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("clear_usage")] +#endif public bool? ClearUsage { get; set; } /// /// A flag that, if set to true, will delete the specified item. /// [JsonProperty("deleted")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("deleted")] +#endif public bool? Deleted { get; set; } /// /// The coupons to redeem into discounts for the subscription item. /// [JsonProperty("discounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discounts")] +#endif public List Discounts { get; set; } /// /// Subscription item to update. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// @@ -46,12 +64,18 @@ public class InvoiceUpcomingLinesSubscriptionDetailsItemOptions : INestedOptions /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// Plan ID for this item, as a string. /// [JsonProperty("plan")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("plan")] +#endif public string Plan { get; set; } /// @@ -60,6 +84,9 @@ public class InvoiceUpcomingLinesSubscriptionDetailsItemOptions : INestedOptions /// quantity parameter is provided. /// [JsonProperty("price")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("price")] +#endif public string Price { get; set; } /// @@ -67,12 +94,18 @@ public class InvoiceUpcomingLinesSubscriptionDetailsItemOptions : INestedOptions /// object inline. One of price or price_data is required. /// [JsonProperty("price_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("price_data")] +#endif public InvoiceUpcomingLinesSubscriptionDetailsItemPriceDataOptions PriceData { get; set; } /// /// Quantity for this item. /// [JsonProperty("quantity")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("quantity")] +#endif public long? Quantity { get; set; } /// @@ -83,6 +116,9 @@ public class InvoiceUpcomingLinesSubscriptionDetailsItemOptions : INestedOptions /// tax rates. /// [JsonProperty("tax_rates")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_rates")] +#endif public List TaxRates { get; set; } } } diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesSubscriptionDetailsItemPriceDataOptions.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesSubscriptionDetailsItemPriceDataOptions.cs index e523ef7afd..8e0da53c0b 100644 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesSubscriptionDetailsItemPriceDataOptions.cs +++ b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesSubscriptionDetailsItemPriceDataOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceUpcomingLinesSubscriptionDetailsItemPriceDataOptions : INestedOptions { @@ -11,18 +14,27 @@ public class InvoiceUpcomingLinesSubscriptionDetailsItemPriceDataOptions : INest /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// /// The ID of the product that this price will belong to. /// [JsonProperty("product")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("product")] +#endif public string Product { get; set; } /// /// The recurring components of a price such as interval and interval_count. /// [JsonProperty("recurring")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("recurring")] +#endif public InvoiceUpcomingLinesSubscriptionDetailsItemPriceDataRecurringOptions Recurring { get; set; } /// @@ -35,6 +47,9 @@ public class InvoiceUpcomingLinesSubscriptionDetailsItemPriceDataOptions : INest /// One of: exclusive, inclusive, or unspecified. /// [JsonProperty("tax_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_behavior")] +#endif public string TaxBehavior { get; set; } /// @@ -42,6 +57,9 @@ public class InvoiceUpcomingLinesSubscriptionDetailsItemPriceDataOptions : INest /// how much to charge. /// [JsonProperty("unit_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_amount")] +#endif public long? UnitAmount { get; set; } /// @@ -50,6 +68,9 @@ public class InvoiceUpcomingLinesSubscriptionDetailsItemPriceDataOptions : INest /// unit_amount_decimal can be set. /// [JsonProperty("unit_amount_decimal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_amount_decimal")] +#endif public decimal? UnitAmountDecimal { get; set; } } } diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesSubscriptionDetailsItemPriceDataRecurringOptions.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesSubscriptionDetailsItemPriceDataRecurringOptions.cs index 1753cab590..431bfeb0d4 100644 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesSubscriptionDetailsItemPriceDataRecurringOptions.cs +++ b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesSubscriptionDetailsItemPriceDataRecurringOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceUpcomingLinesSubscriptionDetailsItemPriceDataRecurringOptions : INestedOptions { @@ -11,6 +14,9 @@ public class InvoiceUpcomingLinesSubscriptionDetailsItemPriceDataRecurringOption /// One of: day, month, week, or year. /// [JsonProperty("interval")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interval")] +#endif public string Interval { get; set; } /// @@ -19,6 +25,9 @@ public class InvoiceUpcomingLinesSubscriptionDetailsItemPriceDataRecurringOption /// years interval allowed (3 years, 36 months, or 156 weeks). /// [JsonProperty("interval_count")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interval_count")] +#endif public long? IntervalCount { get; set; } } } diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesSubscriptionDetailsOptions.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesSubscriptionDetailsOptions.cs index 564207becf..22c9079ffd 100644 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesSubscriptionDetailsOptions.cs +++ b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesSubscriptionDetailsOptions.cs @@ -5,6 +5,9 @@ namespace Stripe using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceUpcomingLinesSubscriptionDetailsOptions : INestedOptions { @@ -17,6 +20,10 @@ public class InvoiceUpcomingLinesSubscriptionDetailsOptions : INestedOptions /// [JsonProperty("billing_cycle_anchor")] [JsonConverter(typeof(AnyOfConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_cycle_anchor")] + [STJS.JsonConverter(typeof(STJAnyOfConverter))] +#endif public AnyOf BillingCycleAnchor { get; set; } /// @@ -27,6 +34,10 @@ public class InvoiceUpcomingLinesSubscriptionDetailsOptions : INestedOptions /// [JsonProperty("cancel_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cancel_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? CancelAt { get; set; } /// @@ -34,12 +45,18 @@ public class InvoiceUpcomingLinesSubscriptionDetailsOptions : INestedOptions /// (current_period_end). Defaults to false. /// [JsonProperty("cancel_at_period_end")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cancel_at_period_end")] +#endif public bool? CancelAtPeriodEnd { get; set; } /// /// This simulates the subscription being canceled or expired immediately. /// [JsonProperty("cancel_now")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cancel_now")] +#endif public bool? CancelNow { get; set; } /// @@ -48,12 +65,18 @@ public class InvoiceUpcomingLinesSubscriptionDetailsOptions : INestedOptions /// have tax_rates set. /// [JsonProperty("default_tax_rates")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("default_tax_rates")] +#endif public List DefaultTaxRates { get; set; } /// /// A list of up to 20 subscription items, each with an attached price. /// [JsonProperty("items")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("items")] +#endif public List Items { get; set; } /// @@ -65,6 +88,9 @@ public class InvoiceUpcomingLinesSubscriptionDetailsOptions : INestedOptions /// One of: always_invoice, create_prorations, or none. /// [JsonProperty("proration_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("proration_behavior")] +#endif public string ProrationBehavior { get; set; } /// @@ -78,6 +104,10 @@ public class InvoiceUpcomingLinesSubscriptionDetailsOptions : INestedOptions /// [JsonProperty("proration_date")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("proration_date")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? ProrationDate { get; set; } /// @@ -85,6 +115,9 @@ public class InvoiceUpcomingLinesSubscriptionDetailsOptions : INestedOptions /// will preview the invoice that will be generated if the subscription is resumed. /// [JsonProperty("resume_at")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("resume_at")] +#endif public string ResumeAt { get; set; } /// @@ -92,6 +125,10 @@ public class InvoiceUpcomingLinesSubscriptionDetailsOptions : INestedOptions /// [JsonProperty("start_date")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("start_date")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? StartDate { get; set; } /// @@ -101,6 +138,10 @@ public class InvoiceUpcomingLinesSubscriptionDetailsOptions : INestedOptions /// [JsonProperty("trial_end")] [JsonConverter(typeof(AnyOfConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("trial_end")] + [STJS.JsonConverter(typeof(STJAnyOfConverter))] +#endif public AnyOf TrialEnd { get; set; } } } diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesSubscriptionItemBillingThresholdsOptions.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesSubscriptionItemBillingThresholdsOptions.cs index 5e4f99f56c..19dd8dcd5b 100644 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesSubscriptionItemBillingThresholdsOptions.cs +++ b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesSubscriptionItemBillingThresholdsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceUpcomingLinesSubscriptionItemBillingThresholdsOptions : INestedOptions { @@ -12,6 +15,9 @@ public class InvoiceUpcomingLinesSubscriptionItemBillingThresholdsOptions : INes /// threshold). /// [JsonProperty("usage_gte")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("usage_gte")] +#endif public long? UsageGte { get; set; } } } diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesSubscriptionItemDiscountOptions.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesSubscriptionItemDiscountOptions.cs index 1a0845005d..55947747c8 100644 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesSubscriptionItemDiscountOptions.cs +++ b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesSubscriptionItemDiscountOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceUpcomingLinesSubscriptionItemDiscountOptions : INestedOptions { @@ -9,18 +12,27 @@ public class InvoiceUpcomingLinesSubscriptionItemDiscountOptions : INestedOption /// ID of the coupon to create a new discount for. /// [JsonProperty("coupon")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("coupon")] +#endif public string Coupon { get; set; } /// /// ID of an existing discount on the object (or one of its ancestors) to reuse. /// [JsonProperty("discount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discount")] +#endif public string Discount { get; set; } /// /// ID of the promotion code to create a new discount for. /// [JsonProperty("promotion_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("promotion_code")] +#endif public string PromotionCode { get; set; } } } diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesSubscriptionItemOptions.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesSubscriptionItemOptions.cs index e3f26aa86f..cb61acfcd7 100644 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesSubscriptionItemOptions.cs +++ b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesSubscriptionItemOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceUpcomingLinesSubscriptionItemOptions : INestedOptions, IHasId, IHasMetadata { @@ -12,6 +15,9 @@ public class InvoiceUpcomingLinesSubscriptionItemOptions : INestedOptions, IHasI /// thresholds. /// [JsonProperty("billing_thresholds")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_thresholds")] +#endif public InvoiceUpcomingLinesSubscriptionItemBillingThresholdsOptions BillingThresholds { get; set; } /// @@ -19,24 +25,36 @@ public class InvoiceUpcomingLinesSubscriptionItemOptions : INestedOptions, IHasI /// to true and the current plan's usage_type is metered. /// [JsonProperty("clear_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("clear_usage")] +#endif public bool? ClearUsage { get; set; } /// /// A flag that, if set to true, will delete the specified item. /// [JsonProperty("deleted")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("deleted")] +#endif public bool? Deleted { get; set; } /// /// The coupons to redeem into discounts for the subscription item. /// [JsonProperty("discounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discounts")] +#endif public List Discounts { get; set; } /// /// Subscription item to update. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// @@ -46,12 +64,18 @@ public class InvoiceUpcomingLinesSubscriptionItemOptions : INestedOptions, IHasI /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// Plan ID for this item, as a string. /// [JsonProperty("plan")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("plan")] +#endif public string Plan { get; set; } /// @@ -60,6 +84,9 @@ public class InvoiceUpcomingLinesSubscriptionItemOptions : INestedOptions, IHasI /// quantity parameter is provided. /// [JsonProperty("price")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("price")] +#endif public string Price { get; set; } /// @@ -67,12 +94,18 @@ public class InvoiceUpcomingLinesSubscriptionItemOptions : INestedOptions, IHasI /// object inline. One of price or price_data is required. /// [JsonProperty("price_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("price_data")] +#endif public InvoiceUpcomingLinesSubscriptionItemPriceDataOptions PriceData { get; set; } /// /// Quantity for this item. /// [JsonProperty("quantity")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("quantity")] +#endif public long? Quantity { get; set; } /// @@ -83,6 +116,9 @@ public class InvoiceUpcomingLinesSubscriptionItemOptions : INestedOptions, IHasI /// tax rates. /// [JsonProperty("tax_rates")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_rates")] +#endif public List TaxRates { get; set; } } } diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesSubscriptionItemPriceDataOptions.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesSubscriptionItemPriceDataOptions.cs index 07c863eded..af7f8a656b 100644 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesSubscriptionItemPriceDataOptions.cs +++ b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesSubscriptionItemPriceDataOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceUpcomingLinesSubscriptionItemPriceDataOptions : INestedOptions { @@ -11,18 +14,27 @@ public class InvoiceUpcomingLinesSubscriptionItemPriceDataOptions : INestedOptio /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// /// The ID of the product that this price will belong to. /// [JsonProperty("product")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("product")] +#endif public string Product { get; set; } /// /// The recurring components of a price such as interval and interval_count. /// [JsonProperty("recurring")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("recurring")] +#endif public InvoiceUpcomingLinesSubscriptionItemPriceDataRecurringOptions Recurring { get; set; } /// @@ -35,6 +47,9 @@ public class InvoiceUpcomingLinesSubscriptionItemPriceDataOptions : INestedOptio /// One of: exclusive, inclusive, or unspecified. /// [JsonProperty("tax_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_behavior")] +#endif public string TaxBehavior { get; set; } /// @@ -42,6 +57,9 @@ public class InvoiceUpcomingLinesSubscriptionItemPriceDataOptions : INestedOptio /// how much to charge. /// [JsonProperty("unit_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_amount")] +#endif public long? UnitAmount { get; set; } /// @@ -50,6 +68,9 @@ public class InvoiceUpcomingLinesSubscriptionItemPriceDataOptions : INestedOptio /// unit_amount_decimal can be set. /// [JsonProperty("unit_amount_decimal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_amount_decimal")] +#endif public decimal? UnitAmountDecimal { get; set; } } } diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesSubscriptionItemPriceDataRecurringOptions.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesSubscriptionItemPriceDataRecurringOptions.cs index 6809a7194f..b3650ee114 100644 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesSubscriptionItemPriceDataRecurringOptions.cs +++ b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesSubscriptionItemPriceDataRecurringOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceUpcomingLinesSubscriptionItemPriceDataRecurringOptions : INestedOptions { @@ -11,6 +14,9 @@ public class InvoiceUpcomingLinesSubscriptionItemPriceDataRecurringOptions : INe /// One of: day, month, week, or year. /// [JsonProperty("interval")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interval")] +#endif public string Interval { get; set; } /// @@ -19,6 +25,9 @@ public class InvoiceUpcomingLinesSubscriptionItemPriceDataRecurringOptions : INe /// years interval allowed (3 years, 36 months, or 156 weeks). /// [JsonProperty("interval_count")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interval_count")] +#endif public long? IntervalCount { get; set; } } } diff --git a/src/Stripe.net/Services/Invoices/InvoiceAddLinesOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceAddLinesOptions.cs index 7f72d2def5..5dcf77af81 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceAddLinesOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceAddLinesOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceAddLinesOptions : BaseOptions { @@ -13,12 +16,18 @@ public class InvoiceAddLinesOptions : BaseOptions /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("invoice_metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("invoice_metadata")] +#endif public Dictionary InvoiceMetadata { get; set; } /// /// The line items to add. /// [JsonProperty("lines")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("lines")] +#endif public List Lines { get; set; } } } diff --git a/src/Stripe.net/Services/Invoices/InvoiceAutomaticTaxLiabilityOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceAutomaticTaxLiabilityOptions.cs index f5a1099060..10feb896fb 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceAutomaticTaxLiabilityOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceAutomaticTaxLiabilityOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceAutomaticTaxLiabilityOptions : INestedOptions { @@ -9,6 +12,9 @@ public class InvoiceAutomaticTaxLiabilityOptions : INestedOptions /// The connected account being referenced when type is account. /// [JsonProperty("account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account")] +#endif public string Account { get; set; } /// @@ -16,6 +22,9 @@ public class InvoiceAutomaticTaxLiabilityOptions : INestedOptions /// One of: account, or self. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Invoices/InvoiceAutomaticTaxOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceAutomaticTaxOptions.cs index cfdf99f524..2bc7526b30 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceAutomaticTaxOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceAutomaticTaxOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceAutomaticTaxOptions : INestedOptions { @@ -12,6 +15,9 @@ public class InvoiceAutomaticTaxOptions : INestedOptions /// tax_behavior=unspecified) cannot be added to automatic tax invoices. /// [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool? Enabled { get; set; } /// @@ -20,6 +26,9 @@ public class InvoiceAutomaticTaxOptions : INestedOptions /// transaction is returned in the report of the connected account. /// [JsonProperty("liability")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("liability")] +#endif public InvoiceAutomaticTaxLiabilityOptions Liability { get; set; } } } diff --git a/src/Stripe.net/Services/Invoices/InvoiceCreateOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceCreateOptions.cs index f85aebf9c5..69e77a35ba 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceCreateOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceCreateOptions.cs @@ -5,6 +5,9 @@ namespace Stripe using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceCreateOptions : BaseOptions, IHasMetadata { @@ -13,6 +16,9 @@ public class InvoiceCreateOptions : BaseOptions, IHasMetadata /// draft. /// [JsonProperty("account_tax_ids")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_tax_ids")] +#endif public List AccountTaxIds { get; set; } /// @@ -23,6 +29,9 @@ public class InvoiceCreateOptions : BaseOptions, IHasMetadata /// href="https://stripe.com/docs/billing/invoices/connect#collecting-fees">documentation. /// [JsonProperty("application_fee_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("application_fee_amount")] +#endif public long? ApplicationFeeAmount { get; set; } /// @@ -32,12 +41,18 @@ public class InvoiceCreateOptions : BaseOptions, IHasMetadata /// automatically advance without an explicit action. /// [JsonProperty("auto_advance")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("auto_advance")] +#endif public bool? AutoAdvance { get; set; } /// /// Settings for automatic tax lookup for this invoice. /// [JsonProperty("automatic_tax")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("automatic_tax")] +#endif public InvoiceAutomaticTaxOptions AutomaticTax { get; set; } /// @@ -46,6 +61,10 @@ public class InvoiceCreateOptions : BaseOptions, IHasMetadata /// [JsonProperty("automatically_finalizes_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("automatically_finalizes_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? AutomaticallyFinalizesAt { get; set; } /// @@ -56,6 +75,9 @@ public class InvoiceCreateOptions : BaseOptions, IHasMetadata /// One of: charge_automatically, or send_invoice. /// [JsonProperty("collection_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("collection_method")] +#endif public string CollectionMethod { get; set; } /// @@ -63,18 +85,27 @@ public class InvoiceCreateOptions : BaseOptions, IHasMetadata /// specified. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// /// A list of up to 4 custom fields to be displayed on the invoice. /// [JsonProperty("custom_fields")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("custom_fields")] +#endif public List CustomFields { get; set; } /// /// The ID of the customer who will be billed. /// [JsonProperty("customer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] +#endif public string Customer { get; set; } /// @@ -82,6 +113,9 @@ public class InvoiceCreateOptions : BaseOptions, IHasMetadata /// invoices where collection_method=send_invoice. /// [JsonProperty("days_until_due")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("days_until_due")] +#endif public long? DaysUntilDue { get; set; } /// @@ -90,6 +124,9 @@ public class InvoiceCreateOptions : BaseOptions, IHasMetadata /// method, if any, or to the default payment method in the customer's invoice settings. /// [JsonProperty("default_payment_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("default_payment_method")] +#endif public string DefaultPaymentMethod { get; set; } /// @@ -98,12 +135,18 @@ public class InvoiceCreateOptions : BaseOptions, IHasMetadata /// subscription's default source, if any, or to the customer's default source. /// [JsonProperty("default_source")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("default_source")] +#endif public string DefaultSource { get; set; } /// /// The tax rates that will apply to any line item that does not have tax_rates set. /// [JsonProperty("default_tax_rates")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("default_tax_rates")] +#endif public List DefaultTaxRates { get; set; } /// @@ -111,6 +154,9 @@ public class InvoiceCreateOptions : BaseOptions, IHasMetadata /// Referenced as 'memo' in the Dashboard. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// @@ -119,6 +165,9 @@ public class InvoiceCreateOptions : BaseOptions, IHasMetadata /// avoid inheriting any discounts. /// [JsonProperty("discounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discounts")] +#endif public List Discounts { get; set; } /// @@ -127,6 +176,10 @@ public class InvoiceCreateOptions : BaseOptions, IHasMetadata /// [JsonProperty("due_date")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("due_date")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? DueDate { get; set; } /// @@ -136,12 +189,19 @@ public class InvoiceCreateOptions : BaseOptions, IHasMetadata /// [JsonProperty("effective_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("effective_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? EffectiveAt { get; set; } /// /// Footer to be displayed on the invoice. /// [JsonProperty("footer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("footer")] +#endif public string Footer { get; set; } /// @@ -150,6 +210,9 @@ public class InvoiceCreateOptions : BaseOptions, IHasMetadata /// documentation for more details. /// [JsonProperty("from_invoice")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("from_invoice")] +#endif public InvoiceFromInvoiceOptions FromInvoice { get; set; } /// @@ -157,6 +220,9 @@ public class InvoiceCreateOptions : BaseOptions, IHasMetadata /// branding and support information of the specified account. /// [JsonProperty("issuer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("issuer")] +#endif public InvoiceIssuerOptions Issuer { get; set; } /// @@ -166,6 +232,9 @@ public class InvoiceCreateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -177,6 +246,9 @@ public class InvoiceCreateOptions : BaseOptions, IHasMetadata /// invoice numbers, Stripe handles this aspect of compliance for you automatically. /// [JsonProperty("number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("number")] +#endif public string Number { get; set; } /// @@ -186,6 +258,9 @@ public class InvoiceCreateOptions : BaseOptions, IHasMetadata /// with Connect documentation for details. /// [JsonProperty("on_behalf_of")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("on_behalf_of")] +#endif public string OnBehalfOf { get; set; } /// @@ -193,6 +268,9 @@ public class InvoiceCreateOptions : BaseOptions, IHasMetadata /// finalized. /// [JsonProperty("payment_settings")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_settings")] +#endif public InvoicePaymentSettingsOptions PaymentSettings { get; set; } /// @@ -201,6 +279,9 @@ public class InvoiceCreateOptions : BaseOptions, IHasMetadata /// One of: exclude, or include. /// [JsonProperty("pending_invoice_items_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("pending_invoice_items_behavior")] +#endif public string PendingInvoiceItemsBehavior { get; set; } /// @@ -208,12 +289,18 @@ public class InvoiceCreateOptions : BaseOptions, IHasMetadata /// customer-facing surfaces such as PDF and Hosted Invoice Page. /// [JsonProperty("rendering")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("rendering")] +#endif public InvoiceRenderingOptions Rendering { get; set; } /// /// Settings for the cost of shipping for this invoice. /// [JsonProperty("shipping_cost")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping_cost")] +#endif public InvoiceShippingCostOptions ShippingCost { get; set; } /// @@ -222,6 +309,9 @@ public class InvoiceCreateOptions : BaseOptions, IHasMetadata /// customer. /// [JsonProperty("shipping_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping_details")] +#endif public InvoiceShippingDetailsOptions ShippingDetails { get; set; } /// @@ -231,6 +321,9 @@ public class InvoiceCreateOptions : BaseOptions, IHasMetadata /// subscription item's product's statement_descriptor. /// [JsonProperty("statement_descriptor")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("statement_descriptor")] +#endif public string StatementDescriptor { get; set; } /// @@ -239,6 +332,9 @@ public class InvoiceCreateOptions : BaseOptions, IHasMetadata /// and regular subscription events won't be affected. /// [JsonProperty("subscription")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("subscription")] +#endif public string Subscription { get; set; } /// @@ -246,6 +342,9 @@ public class InvoiceCreateOptions : BaseOptions, IHasMetadata /// ID of the resulting transfer will be found on the invoice's charge. /// [JsonProperty("transfer_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transfer_data")] +#endif public InvoiceTransferDataOptions TransferData { get; set; } } } diff --git a/src/Stripe.net/Services/Invoices/InvoiceCreatePreviewOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceCreatePreviewOptions.cs index ff99fe660b..5ed03820e4 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceCreatePreviewOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceCreatePreviewOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceCreatePreviewOptions : BaseOptions { @@ -10,6 +13,9 @@ public class InvoiceCreatePreviewOptions : BaseOptions /// Settings for automatic tax lookup for this invoice preview. /// [JsonProperty("automatic_tax")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("automatic_tax")] +#endif public InvoiceAutomaticTaxOptions AutomaticTax { get; set; } /// @@ -18,6 +24,9 @@ public class InvoiceCreatePreviewOptions : BaseOptions /// instead. /// [JsonProperty("coupon")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("coupon")] +#endif public string Coupon { get; set; } /// @@ -25,6 +34,9 @@ public class InvoiceCreatePreviewOptions : BaseOptions /// specified. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// @@ -33,6 +45,9 @@ public class InvoiceCreatePreviewOptions : BaseOptions /// subscription, or schedule must be set. /// [JsonProperty("customer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] +#endif public string Customer { get; set; } /// @@ -41,6 +56,9 @@ public class InvoiceCreatePreviewOptions : BaseOptions /// subscription, or schedule must be set. /// [JsonProperty("customer_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_details")] +#endif public InvoiceCustomerDetailsOptions CustomerDetails { get; set; } /// @@ -50,12 +68,18 @@ public class InvoiceCreatePreviewOptions : BaseOptions /// avoid inheriting any discounts. /// [JsonProperty("discounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discounts")] +#endif public List Discounts { get; set; } /// /// List of invoice items to add or update in the upcoming invoice preview (up to 250). /// [JsonProperty("invoice_items")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("invoice_items")] +#endif public List InvoiceItems { get; set; } /// @@ -63,6 +87,9 @@ public class InvoiceCreatePreviewOptions : BaseOptions /// branding and support information of the specified account. /// [JsonProperty("issuer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("issuer")] +#endif public InvoiceIssuerOptions Issuer { get; set; } /// @@ -72,6 +99,9 @@ public class InvoiceCreatePreviewOptions : BaseOptions /// with Connect documentation for details. /// [JsonProperty("on_behalf_of")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("on_behalf_of")] +#endif public string OnBehalfOf { get; set; } /// @@ -80,6 +110,9 @@ public class InvoiceCreatePreviewOptions : BaseOptions /// One of: next, or recurring. /// [JsonProperty("preview_mode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preview_mode")] +#endif public string PreviewMode { get; set; } /// @@ -87,6 +120,9 @@ public class InvoiceCreatePreviewOptions : BaseOptions /// used with subscription or subscription fields. /// [JsonProperty("schedule")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("schedule")] +#endif public string Schedule { get; set; } /// @@ -94,6 +130,9 @@ public class InvoiceCreatePreviewOptions : BaseOptions /// subscription or subscription_ prefixed fields. /// [JsonProperty("schedule_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("schedule_details")] +#endif public InvoiceScheduleDetailsOptions ScheduleDetails { get; set; } /// @@ -104,6 +143,9 @@ public class InvoiceCreatePreviewOptions : BaseOptions /// invoice from among the customer's subscriptions. /// [JsonProperty("subscription")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("subscription")] +#endif public string Subscription { get; set; } /// @@ -111,6 +153,9 @@ public class InvoiceCreatePreviewOptions : BaseOptions /// with schedule or schedule_details fields. /// [JsonProperty("subscription_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("subscription_details")] +#endif public InvoiceSubscriptionDetailsOptions SubscriptionDetails { get; set; } } } diff --git a/src/Stripe.net/Services/Invoices/InvoiceCustomFieldOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceCustomFieldOptions.cs index 43f76c7d2d..b15c5c7558 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceCustomFieldOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceCustomFieldOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceCustomFieldOptions : INestedOptions { @@ -9,12 +12,18 @@ public class InvoiceCustomFieldOptions : INestedOptions /// The name of the custom field. This may be up to 40 characters. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } /// /// The value of the custom field. This may be up to 140 characters. /// [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public string Value { get; set; } } } diff --git a/src/Stripe.net/Services/Invoices/InvoiceCustomerDetailsOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceCustomerDetailsOptions.cs index d300b0bdc0..96ccaf8ead 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceCustomerDetailsOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceCustomerDetailsOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceCustomerDetailsOptions : INestedOptions { @@ -10,18 +13,27 @@ public class InvoiceCustomerDetailsOptions : INestedOptions /// The customer's address. /// [JsonProperty("address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address")] +#endif public AddressOptions Address { get; set; } /// /// The customer's shipping information. Appears on invoices emailed to this customer. /// [JsonProperty("shipping")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping")] +#endif public ShippingOptions Shipping { get; set; } /// /// Tax details about the customer. /// [JsonProperty("tax")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax")] +#endif public InvoiceCustomerDetailsTaxOptions Tax { get; set; } /// @@ -29,12 +41,18 @@ public class InvoiceCustomerDetailsOptions : INestedOptions /// One of: exempt, none, or reverse. /// [JsonProperty("tax_exempt")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_exempt")] +#endif public string TaxExempt { get; set; } /// /// The customer's tax IDs. /// [JsonProperty("tax_ids")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_ids")] +#endif public List TaxIds { get; set; } } } diff --git a/src/Stripe.net/Services/Invoices/InvoiceCustomerDetailsTaxIdOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceCustomerDetailsTaxIdOptions.cs index 10a08a67a8..4e586c42aa 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceCustomerDetailsTaxIdOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceCustomerDetailsTaxIdOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceCustomerDetailsTaxIdOptions : INestedOptions { @@ -40,12 +43,18 @@ public class InvoiceCustomerDetailsTaxIdOptions : INestedOptions /// uz_tin, uz_vat, ve_rif, vn_tin, or za_vat. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } /// /// Value of the tax ID. /// [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public string Value { get; set; } } } diff --git a/src/Stripe.net/Services/Invoices/InvoiceCustomerDetailsTaxOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceCustomerDetailsTaxOptions.cs index 87f6e831a9..25aacf905a 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceCustomerDetailsTaxOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceCustomerDetailsTaxOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceCustomerDetailsTaxOptions : INestedOptions { @@ -12,6 +15,9 @@ public class InvoiceCustomerDetailsTaxOptions : INestedOptions /// frequently since it could result in unexpected tax location/reporting outcomes. /// [JsonProperty("ip_address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ip_address")] +#endif public string IpAddress { get; set; } } } diff --git a/src/Stripe.net/Services/Invoices/InvoiceDiscountOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceDiscountOptions.cs index aca19811e3..312c44bf7d 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceDiscountOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceDiscountOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceDiscountOptions : INestedOptions { @@ -9,18 +12,27 @@ public class InvoiceDiscountOptions : INestedOptions /// ID of the coupon to create a new discount for. /// [JsonProperty("coupon")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("coupon")] +#endif public string Coupon { get; set; } /// /// ID of an existing discount on the object (or one of its ancestors) to reuse. /// [JsonProperty("discount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discount")] +#endif public string Discount { get; set; } /// /// ID of the promotion code to create a new discount for. /// [JsonProperty("promotion_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("promotion_code")] +#endif public string PromotionCode { get; set; } } } diff --git a/src/Stripe.net/Services/Invoices/InvoiceFinalizeOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceFinalizeOptions.cs index 46836f815e..9dd92e1684 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceFinalizeOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceFinalizeOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceFinalizeOptions : BaseOptions { @@ -12,6 +15,9 @@ public class InvoiceFinalizeOptions : BaseOptions /// automatically advance without an explicit action. /// [JsonProperty("auto_advance")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("auto_advance")] +#endif public bool? AutoAdvance { get; set; } } } diff --git a/src/Stripe.net/Services/Invoices/InvoiceFromInvoiceOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceFromInvoiceOptions.cs index 67d5f0efb5..c4384e2bf4 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceFromInvoiceOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceFromInvoiceOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceFromInvoiceOptions : INestedOptions { @@ -10,12 +13,18 @@ public class InvoiceFromInvoiceOptions : INestedOptions /// 'revision' is permitted. /// [JsonProperty("action")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("action")] +#endif public string Action { get; set; } /// /// The id of the invoice that will be cloned. /// [JsonProperty("invoice")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("invoice")] +#endif public string Invoice { get; set; } } } diff --git a/src/Stripe.net/Services/Invoices/InvoiceIssuerOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceIssuerOptions.cs index 35d78ff58c..e2622b9006 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceIssuerOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceIssuerOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceIssuerOptions : INestedOptions { @@ -9,6 +12,9 @@ public class InvoiceIssuerOptions : INestedOptions /// The connected account being referenced when type is account. /// [JsonProperty("account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account")] +#endif public string Account { get; set; } /// @@ -16,6 +22,9 @@ public class InvoiceIssuerOptions : INestedOptions /// One of: account, or self. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Invoices/InvoiceLineDiscountOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceLineDiscountOptions.cs index daf2c6687e..84b9499a2a 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceLineDiscountOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceLineDiscountOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceLineDiscountOptions : INestedOptions { @@ -9,18 +12,27 @@ public class InvoiceLineDiscountOptions : INestedOptions /// ID of the coupon to create a new discount for. /// [JsonProperty("coupon")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("coupon")] +#endif public string Coupon { get; set; } /// /// ID of an existing discount on the object (or one of its ancestors) to reuse. /// [JsonProperty("discount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discount")] +#endif public string Discount { get; set; } /// /// ID of the promotion code to create a new discount for. /// [JsonProperty("promotion_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("promotion_code")] +#endif public string PromotionCode { get; set; } } } diff --git a/src/Stripe.net/Services/Invoices/InvoiceLineOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceLineOptions.cs index a6a5430213..e4908a3fac 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceLineOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceLineOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceLineOptions : INestedOptions, IHasMetadata, IHasId { @@ -12,6 +15,9 @@ public class InvoiceLineOptions : INestedOptions, IHasMetadata, IHasId /// negative amount. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long? Amount { get; set; } /// @@ -20,6 +26,9 @@ public class InvoiceLineOptions : INestedOptions, IHasMetadata, IHasId /// One of: delete, or unassign. /// [JsonProperty("behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("behavior")] +#endif public string Behavior { get; set; } /// @@ -27,6 +36,9 @@ public class InvoiceLineOptions : INestedOptions, IHasMetadata, IHasId /// displayed in the invoice for easy tracking. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// @@ -35,6 +47,9 @@ public class InvoiceLineOptions : INestedOptions, IHasMetadata, IHasId /// prorations. /// [JsonProperty("discountable")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discountable")] +#endif public bool? Discountable { get; set; } /// @@ -43,12 +58,18 @@ public class InvoiceLineOptions : INestedOptions, IHasMetadata, IHasId /// previously-defined discounts. /// [JsonProperty("discounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discounts")] +#endif public List Discounts { get; set; } /// /// ID of an existing line item to remove from this invoice. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// @@ -56,6 +77,9 @@ public class InvoiceLineOptions : INestedOptions, IHasMetadata, IHasId /// will be created. /// [JsonProperty("invoice_item")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("invoice_item")] +#endif public string InvoiceItem { get; set; } /// @@ -70,6 +94,9 @@ public class InvoiceLineOptions : INestedOptions, IHasMetadata, IHasId /// items, where any existing metadata on the invoice line is merged with the incoming data. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -81,12 +108,18 @@ public class InvoiceLineOptions : INestedOptions, IHasMetadata, IHasId /// Recognition documentation for details. /// [JsonProperty("period")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("period")] +#endif public InvoiceLinePeriodOptions Period { get; set; } /// /// The ID of the price object. One of price or price_data is required. /// [JsonProperty("price")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("price")] +#endif public string Price { get; set; } /// @@ -94,12 +127,18 @@ public class InvoiceLineOptions : INestedOptions, IHasMetadata, IHasId /// object inline. One of price or price_data is required. /// [JsonProperty("price_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("price_data")] +#endif public InvoiceLinePriceDataOptions PriceData { get; set; } /// /// Non-negative integer. The quantity of units for the line item. /// [JsonProperty("quantity")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("quantity")] +#endif public long? Quantity { get; set; } /// @@ -113,6 +152,9 @@ public class InvoiceLineOptions : INestedOptions, IHasMetadata, IHasId /// string to remove previously defined tax amounts. /// [JsonProperty("tax_amounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_amounts")] +#endif public List TaxAmounts { get; set; } /// @@ -121,6 +163,9 @@ public class InvoiceLineOptions : INestedOptions, IHasMetadata, IHasId /// previously-defined tax rates. /// [JsonProperty("tax_rates")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_rates")] +#endif public List TaxRates { get; set; } } } diff --git a/src/Stripe.net/Services/Invoices/InvoiceLinePeriodOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceLinePeriodOptions.cs index bacfbd8542..6eedfbe544 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceLinePeriodOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceLinePeriodOptions.cs @@ -4,6 +4,9 @@ namespace Stripe using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceLinePeriodOptions : INestedOptions { @@ -13,6 +16,10 @@ public class InvoiceLinePeriodOptions : INestedOptions /// [JsonProperty("end")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("end")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? End { get; set; } /// @@ -20,6 +27,10 @@ public class InvoiceLinePeriodOptions : INestedOptions /// [JsonProperty("start")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("start")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? Start { get; set; } } } diff --git a/src/Stripe.net/Services/Invoices/InvoiceLinePriceDataOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceLinePriceDataOptions.cs index 3c4d902241..59ffe78936 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceLinePriceDataOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceLinePriceDataOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceLinePriceDataOptions : INestedOptions { @@ -11,6 +14,9 @@ public class InvoiceLinePriceDataOptions : INestedOptions /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// @@ -18,6 +24,9 @@ public class InvoiceLinePriceDataOptions : INestedOptions /// product_data is required. /// [JsonProperty("product")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("product")] +#endif public string Product { get; set; } /// @@ -25,6 +34,9 @@ public class InvoiceLinePriceDataOptions : INestedOptions /// product_data is required. /// [JsonProperty("product_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("product_data")] +#endif public InvoiceLinePriceDataProductDataOptions ProductData { get; set; } /// @@ -37,6 +49,9 @@ public class InvoiceLinePriceDataOptions : INestedOptions /// One of: exclusive, inclusive, or unspecified. /// [JsonProperty("tax_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_behavior")] +#endif public string TaxBehavior { get; set; } /// @@ -44,6 +59,9 @@ public class InvoiceLinePriceDataOptions : INestedOptions /// One of unit_amount or unit_amount_decimal is required. /// [JsonProperty("unit_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_amount")] +#endif public long? UnitAmount { get; set; } /// @@ -52,6 +70,9 @@ public class InvoiceLinePriceDataOptions : INestedOptions /// unit_amount_decimal can be set. /// [JsonProperty("unit_amount_decimal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_amount_decimal")] +#endif public decimal? UnitAmountDecimal { get; set; } } } diff --git a/src/Stripe.net/Services/Invoices/InvoiceLinePriceDataProductDataOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceLinePriceDataProductDataOptions.cs index 627bb42f91..926fcbcba8 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceLinePriceDataProductDataOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceLinePriceDataProductDataOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceLinePriceDataProductDataOptions : INestedOptions, IHasMetadata { @@ -12,6 +15,9 @@ public class InvoiceLinePriceDataProductDataOptions : INestedOptions, IHasMetada /// rendering purposes. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// @@ -19,6 +25,9 @@ public class InvoiceLinePriceDataProductDataOptions : INestedOptions, IHasMetada /// customer. /// [JsonProperty("images")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("images")] +#endif public List Images { get; set; } /// @@ -28,18 +37,27 @@ public class InvoiceLinePriceDataProductDataOptions : INestedOptions, IHasMetada /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// The product's name, meant to be displayable to the customer. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } /// /// A tax code ID. /// [JsonProperty("tax_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_code")] +#endif public string TaxCode { get; set; } } } diff --git a/src/Stripe.net/Services/Invoices/InvoiceLineTaxAmountOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceLineTaxAmountOptions.cs index 4a2098790b..d43d4e39d3 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceLineTaxAmountOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceLineTaxAmountOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceLineTaxAmountOptions : INestedOptions { @@ -9,6 +12,9 @@ public class InvoiceLineTaxAmountOptions : INestedOptions /// The amount, in cents (or local equivalent), of the tax. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long? Amount { get; set; } /// @@ -21,12 +27,18 @@ public class InvoiceLineTaxAmountOptions : INestedOptions /// payments, or line items. /// [JsonProperty("tax_rate_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_rate_data")] +#endif public InvoiceLineTaxAmountTaxRateDataOptions TaxRateData { get; set; } /// /// The amount on which tax is calculated, in cents (or local equivalent). /// [JsonProperty("taxable_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("taxable_amount")] +#endif public long? TaxableAmount { get; set; } } } diff --git a/src/Stripe.net/Services/Invoices/InvoiceLineTaxAmountTaxRateDataOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceLineTaxAmountTaxRateDataOptions.cs index 5206bf403e..55fcef3c83 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceLineTaxAmountTaxRateDataOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceLineTaxAmountTaxRateDataOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceLineTaxAmountTaxRateDataOptions : INestedOptions { @@ -10,6 +13,9 @@ public class InvoiceLineTaxAmountTaxRateDataOptions : INestedOptions /// 3166-1 alpha-2). /// [JsonProperty("country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country")] +#endif public string Country { get; set; } /// @@ -17,18 +23,27 @@ public class InvoiceLineTaxAmountTaxRateDataOptions : INestedOptions /// visible to your customers. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// /// The display name of the tax rate, which will be shown to users. /// [JsonProperty("display_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_name")] +#endif public string DisplayName { get; set; } /// /// This specifies if the tax rate is inclusive or exclusive. /// [JsonProperty("inclusive")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("inclusive")] +#endif public bool? Inclusive { get; set; } /// @@ -36,6 +51,9 @@ public class InvoiceLineTaxAmountTaxRateDataOptions : INestedOptions /// purposes. It also appears on your customer’s invoice. /// [JsonProperty("jurisdiction")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("jurisdiction")] +#endif public string Jurisdiction { get; set; } /// @@ -45,6 +63,9 @@ public class InvoiceLineTaxAmountTaxRateDataOptions : INestedOptions /// amount of the tax is also zero. /// [JsonProperty("percentage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("percentage")] +#endif public decimal? Percentage { get; set; } /// @@ -52,6 +73,9 @@ public class InvoiceLineTaxAmountTaxRateDataOptions : INestedOptions /// without country prefix. For example, "NY" for New York, United States. /// [JsonProperty("state")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("state")] +#endif public string State { get; set; } /// @@ -62,6 +86,9 @@ public class InvoiceLineTaxAmountTaxRateDataOptions : INestedOptions /// vat. /// [JsonProperty("tax_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_type")] +#endif public string TaxType { get; set; } } } diff --git a/src/Stripe.net/Services/Invoices/InvoiceListOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceListOptions.cs index 679249c455..cf269acf6f 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceListOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceListOptions.cs @@ -4,6 +4,9 @@ namespace Stripe using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceListOptions : ListOptionsWithCreated { @@ -13,16 +16,26 @@ public class InvoiceListOptions : ListOptionsWithCreated /// One of: charge_automatically, or send_invoice. /// [JsonProperty("collection_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("collection_method")] +#endif public string CollectionMethod { get; set; } /// /// Only return invoices for the customer specified by this customer ID. /// [JsonProperty("customer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] +#endif public string Customer { get; set; } [JsonProperty("due_date")] [JsonConverter(typeof(AnyOfConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("due_date")] + [STJS.JsonConverter(typeof(STJAnyOfConverter))] +#endif public AnyOf DueDate { get; set; } /// @@ -33,12 +46,18 @@ public class InvoiceListOptions : ListOptionsWithCreated /// One of: draft, open, paid, uncollectible, or void. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } /// /// Only return invoices for the subscription specified by this subscription ID. /// [JsonProperty("subscription")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("subscription")] +#endif public string Subscription { get; set; } } } diff --git a/src/Stripe.net/Services/Invoices/InvoicePayOptions.cs b/src/Stripe.net/Services/Invoices/InvoicePayOptions.cs index b32f0f8c2e..bd5369a954 100644 --- a/src/Stripe.net/Services/Invoices/InvoicePayOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoicePayOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoicePayOptions : BaseOptions { @@ -17,6 +20,9 @@ public class InvoicePayOptions : BaseOptions /// forgive the difference. Defaults to false. /// [JsonProperty("forgive")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("forgive")] +#endif public bool? Forgive { get; set; } /// @@ -25,6 +31,9 @@ public class InvoicePayOptions : BaseOptions /// default_payment_method or default_source, if set. /// [JsonProperty("mandate")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mandate")] +#endif public string Mandate { get; set; } /// @@ -32,6 +41,9 @@ public class InvoicePayOptions : BaseOptions /// Defaults to true (off-session). /// [JsonProperty("off_session")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("off_session")] +#endif public bool? OffSession { get; set; } /// @@ -39,6 +51,9 @@ public class InvoicePayOptions : BaseOptions /// no charge being made. Defaults to false. /// [JsonProperty("paid_out_of_band")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("paid_out_of_band")] +#endif public bool? PaidOutOfBand { get; set; } /// @@ -46,6 +61,9 @@ public class InvoicePayOptions : BaseOptions /// belonging to the customer associated with the invoice being paid. /// [JsonProperty("payment_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method")] +#endif public string PaymentMethod { get; set; } /// @@ -53,6 +71,9 @@ public class InvoicePayOptions : BaseOptions /// customer associated with the invoice being paid. /// [JsonProperty("source")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("source")] +#endif public string Source { get; set; } } } diff --git a/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsOptions.cs b/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsOptions.cs index ea86b3c451..8b7c426d38 100644 --- a/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoicePaymentSettingsOptions : INestedOptions { @@ -12,12 +15,18 @@ public class InvoicePaymentSettingsOptions : INestedOptions /// default_source, if set. /// [JsonProperty("default_mandate")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("default_mandate")] +#endif public string DefaultMandate { get; set; } /// /// Payment-method-specific configuration to provide to the invoice’s PaymentIntent. /// [JsonProperty("payment_method_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_options")] +#endif public InvoicePaymentSettingsPaymentMethodOptionsOptions PaymentMethodOptions { get; set; } /// @@ -37,6 +46,9 @@ public class InvoicePaymentSettingsOptions : INestedOptions /// sofort, swish, us_bank_account, or wechat_pay. /// [JsonProperty("payment_method_types")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_types")] +#endif public List PaymentMethodTypes { get; set; } } } diff --git a/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsPaymentMethodOptionsAcssDebitMandateOptionsOptions.cs b/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsPaymentMethodOptionsAcssDebitMandateOptionsOptions.cs index 51deec74ab..c1099bc859 100644 --- a/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsPaymentMethodOptionsAcssDebitMandateOptionsOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsPaymentMethodOptionsAcssDebitMandateOptionsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoicePaymentSettingsPaymentMethodOptionsAcssDebitMandateOptionsOptions : INestedOptions { @@ -10,6 +13,9 @@ public class InvoicePaymentSettingsPaymentMethodOptionsAcssDebitMandateOptionsOp /// One of: business, or personal. /// [JsonProperty("transaction_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transaction_type")] +#endif public string TransactionType { get; set; } } } diff --git a/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsPaymentMethodOptionsAcssDebitOptions.cs b/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsPaymentMethodOptionsAcssDebitOptions.cs index 34c0fe2565..e0a8043987 100644 --- a/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsPaymentMethodOptionsAcssDebitOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsPaymentMethodOptionsAcssDebitOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoicePaymentSettingsPaymentMethodOptionsAcssDebitOptions : INestedOptions { @@ -9,6 +12,9 @@ public class InvoicePaymentSettingsPaymentMethodOptionsAcssDebitOptions : INeste /// Additional fields for Mandate creation. /// [JsonProperty("mandate_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mandate_options")] +#endif public InvoicePaymentSettingsPaymentMethodOptionsAcssDebitMandateOptionsOptions MandateOptions { get; set; } /// @@ -16,6 +22,9 @@ public class InvoicePaymentSettingsPaymentMethodOptionsAcssDebitOptions : INeste /// One of: automatic, instant, or microdeposits. /// [JsonProperty("verification_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("verification_method")] +#endif public string VerificationMethod { get; set; } } } diff --git a/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsPaymentMethodOptionsBancontactOptions.cs b/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsPaymentMethodOptionsBancontactOptions.cs index 9c8511856a..d1f96edc5e 100644 --- a/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsPaymentMethodOptionsBancontactOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsPaymentMethodOptionsBancontactOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoicePaymentSettingsPaymentMethodOptionsBancontactOptions : INestedOptions { @@ -11,6 +14,9 @@ public class InvoicePaymentSettingsPaymentMethodOptionsBancontactOptions : INest /// One of: de, en, fr, or nl. /// [JsonProperty("preferred_language")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preferred_language")] +#endif public string PreferredLanguage { get; set; } } } diff --git a/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsPaymentMethodOptionsCardInstallmentsOptions.cs b/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsPaymentMethodOptionsCardInstallmentsOptions.cs index cd6c838b6a..4c5708bbcb 100644 --- a/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsPaymentMethodOptionsCardInstallmentsOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsPaymentMethodOptionsCardInstallmentsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoicePaymentSettingsPaymentMethodOptionsCardInstallmentsOptions : INestedOptions { @@ -10,12 +13,18 @@ public class InvoicePaymentSettingsPaymentMethodOptionsCardInstallmentsOptions : /// selected plan from applying to a payment. /// [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool? Enabled { get; set; } /// /// The selected installment plan to use for this invoice. /// [JsonProperty("plan")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("plan")] +#endif public InvoicePaymentSettingsPaymentMethodOptionsCardInstallmentsPlanOptions Plan { get; set; } } } diff --git a/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsPaymentMethodOptionsCardInstallmentsPlanOptions.cs b/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsPaymentMethodOptionsCardInstallmentsPlanOptions.cs index 2163da1844..19031b807d 100644 --- a/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsPaymentMethodOptionsCardInstallmentsPlanOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsPaymentMethodOptionsCardInstallmentsPlanOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoicePaymentSettingsPaymentMethodOptionsCardInstallmentsPlanOptions : INestedOptions { @@ -10,6 +13,9 @@ public class InvoicePaymentSettingsPaymentMethodOptionsCardInstallmentsPlanOptio /// installment payments your customer will make to their credit card. /// [JsonProperty("count")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("count")] +#endif public long? Count { get; set; } /// @@ -18,12 +24,18 @@ public class InvoicePaymentSettingsPaymentMethodOptionsCardInstallmentsPlanOptio /// month. /// [JsonProperty("interval")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interval")] +#endif public string Interval { get; set; } /// /// Type of installment plan, one of fixed_count. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsPaymentMethodOptionsCardOptions.cs b/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsPaymentMethodOptionsCardOptions.cs index 5cc0120f68..19261c6610 100644 --- a/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsPaymentMethodOptionsCardOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsPaymentMethodOptionsCardOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoicePaymentSettingsPaymentMethodOptionsCardOptions : INestedOptions { @@ -12,6 +15,9 @@ public class InvoicePaymentSettingsPaymentMethodOptionsCardOptions : INestedOpti /// href="https://stripe.com/docs/payments/installments">installments integration guide. /// [JsonProperty("installments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("installments")] +#endif public InvoicePaymentSettingsPaymentMethodOptionsCardInstallmentsOptions Installments { get; set; } /// @@ -26,6 +32,9 @@ public class InvoicePaymentSettingsPaymentMethodOptionsCardOptions : INestedOpti /// One of: any, automatic, or challenge. /// [JsonProperty("request_three_d_secure")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("request_three_d_secure")] +#endif public string RequestThreeDSecure { get; set; } } } diff --git a/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransferOptions.cs b/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransferOptions.cs index 6e545f89ba..105fd1f4c6 100644 --- a/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransferOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransferOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransferOptions : INestedOptions { @@ -10,6 +13,9 @@ public class InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransf /// BE, DE, ES, FR, IE, or NL. /// [JsonProperty("country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country")] +#endif public string Country { get; set; } } } diff --git a/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferOptions.cs b/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferOptions.cs index 4a868c8dc2..b9e168ed3f 100644 --- a/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferOptions : INestedOptions { @@ -9,6 +12,9 @@ public class InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransf /// Configuration for eu_bank_transfer funding type. /// [JsonProperty("eu_bank_transfer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("eu_bank_transfer")] +#endif public InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransferOptions EuBankTransfer { get; set; } /// @@ -17,6 +23,9 @@ public class InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransf /// mx_bank_transfer, or us_bank_transfer. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceOptions.cs b/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceOptions.cs index ff5b2baa2e..a280693e53 100644 --- a/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceOptions : INestedOptions { @@ -10,6 +13,9 @@ public class InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceOptions : /// bank_transfer. /// [JsonProperty("bank_transfer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_transfer")] +#endif public InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferOptions BankTransfer { get; set; } /// @@ -17,6 +23,9 @@ public class InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceOptions : /// balance. Permitted values include: bank_transfer. /// [JsonProperty("funding_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("funding_type")] +#endif public string FundingType { get; set; } } } diff --git a/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsPaymentMethodOptionsOptions.cs b/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsPaymentMethodOptionsOptions.cs index 390618be61..fbc13846e2 100644 --- a/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsPaymentMethodOptionsOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsPaymentMethodOptionsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoicePaymentSettingsPaymentMethodOptionsOptions : INestedOptions { @@ -10,6 +13,9 @@ public class InvoicePaymentSettingsPaymentMethodOptionsOptions : INestedOptions /// pre-authorized debit payment method options to pass to the invoice’s PaymentIntent. /// [JsonProperty("acss_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("acss_debit")] +#endif public InvoicePaymentSettingsPaymentMethodOptionsAcssDebitOptions AcssDebit { get; set; } /// @@ -17,6 +23,9 @@ public class InvoicePaymentSettingsPaymentMethodOptionsOptions : INestedOptions /// payment method options to pass to the invoice’s PaymentIntent. /// [JsonProperty("bancontact")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bancontact")] +#endif public InvoicePaymentSettingsPaymentMethodOptionsBancontactOptions Bancontact { get; set; } /// @@ -24,6 +33,9 @@ public class InvoicePaymentSettingsPaymentMethodOptionsOptions : INestedOptions /// options to pass to the invoice’s PaymentIntent. /// [JsonProperty("card")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card")] +#endif public InvoicePaymentSettingsPaymentMethodOptionsCardOptions Card { get; set; } /// @@ -31,6 +43,9 @@ public class InvoicePaymentSettingsPaymentMethodOptionsOptions : INestedOptions /// transfer payment method options to pass to the invoice’s PaymentIntent. /// [JsonProperty("customer_balance")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_balance")] +#endif public InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceOptions CustomerBalance { get; set; } /// @@ -38,6 +53,9 @@ public class InvoicePaymentSettingsPaymentMethodOptionsOptions : INestedOptions /// method options to pass to the invoice’s PaymentIntent. /// [JsonProperty("konbini")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("konbini")] +#endif public InvoicePaymentSettingsPaymentMethodOptionsKonbiniOptions Konbini { get; set; } /// @@ -45,6 +63,9 @@ public class InvoicePaymentSettingsPaymentMethodOptionsOptions : INestedOptions /// Debit payment method options to pass to the invoice’s PaymentIntent. /// [JsonProperty("sepa_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sepa_debit")] +#endif public InvoicePaymentSettingsPaymentMethodOptionsSepaDebitOptions SepaDebit { get; set; } /// @@ -52,6 +73,9 @@ public class InvoicePaymentSettingsPaymentMethodOptionsOptions : INestedOptions /// debit payment method options to pass to the invoice’s PaymentIntent. /// [JsonProperty("us_bank_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("us_bank_account")] +#endif public InvoicePaymentSettingsPaymentMethodOptionsUsBankAccountOptions UsBankAccount { get; set; } } } diff --git a/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFiltersOptions.cs b/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFiltersOptions.cs index 8ce45177ea..c25f6e7c42 100644 --- a/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFiltersOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFiltersOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFiltersOptions : INestedOptions { @@ -12,6 +15,9 @@ public class InvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialCon /// One of: checking, or savings. /// [JsonProperty("account_subcategories")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_subcategories")] +#endif public List AccountSubcategories { get; set; } } } diff --git a/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsOptions.cs b/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsOptions.cs index c9a80017e2..e47cc26926 100644 --- a/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsOptions : INestedOptions { @@ -11,6 +14,9 @@ public class InvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialCon /// method. /// [JsonProperty("filters")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("filters")] +#endif public InvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFiltersOptions Filters { get; set; } /// @@ -21,6 +27,9 @@ public class InvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialCon /// transactions. /// [JsonProperty("permissions")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("permissions")] +#endif public List Permissions { get; set; } /// @@ -28,6 +37,9 @@ public class InvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialCon /// One of: balances, ownership, or transactions. /// [JsonProperty("prefetch")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("prefetch")] +#endif public List Prefetch { get; set; } } } diff --git a/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsPaymentMethodOptionsUsBankAccountOptions.cs b/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsPaymentMethodOptionsUsBankAccountOptions.cs index 48ab141be4..50744ffa69 100644 --- a/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsPaymentMethodOptionsUsBankAccountOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsPaymentMethodOptionsUsBankAccountOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoicePaymentSettingsPaymentMethodOptionsUsBankAccountOptions : INestedOptions { @@ -9,6 +12,9 @@ public class InvoicePaymentSettingsPaymentMethodOptionsUsBankAccountOptions : IN /// Additional fields for Financial Connections Session creation. /// [JsonProperty("financial_connections")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("financial_connections")] +#endif public InvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsOptions FinancialConnections { get; set; } /// @@ -16,6 +22,9 @@ public class InvoicePaymentSettingsPaymentMethodOptionsUsBankAccountOptions : IN /// One of: automatic, instant, or microdeposits. /// [JsonProperty("verification_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("verification_method")] +#endif public string VerificationMethod { get; set; } } } diff --git a/src/Stripe.net/Services/Invoices/InvoiceRemoveLinesOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceRemoveLinesOptions.cs index 553f8e4964..065693e2e0 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceRemoveLinesOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceRemoveLinesOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceRemoveLinesOptions : BaseOptions { @@ -13,12 +16,18 @@ public class InvoiceRemoveLinesOptions : BaseOptions /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("invoice_metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("invoice_metadata")] +#endif public Dictionary InvoiceMetadata { get; set; } /// /// The line items to remove. /// [JsonProperty("lines")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("lines")] +#endif public List Lines { get; set; } } } diff --git a/src/Stripe.net/Services/Invoices/InvoiceRenderingOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceRenderingOptions.cs index 2855bc82f6..64c937bd06 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceRenderingOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceRenderingOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceRenderingOptions : INestedOptions { @@ -14,24 +17,36 @@ public class InvoiceRenderingOptions : INestedOptions /// One of: exclude_tax, or include_inclusive_tax. /// [JsonProperty("amount_tax_display")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_tax_display")] +#endif public string AmountTaxDisplay { get; set; } /// /// Invoice pdf rendering options. /// [JsonProperty("pdf")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("pdf")] +#endif public InvoiceRenderingPdfOptions Pdf { get; set; } /// /// ID of the invoice rendering template to use for this invoice. /// [JsonProperty("template")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("template")] +#endif public string Template { get; set; } /// /// The specific version of invoice rendering template to use for this invoice. /// [JsonProperty("template_version")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("template_version")] +#endif public long? TemplateVersion { get; set; } } } diff --git a/src/Stripe.net/Services/Invoices/InvoiceRenderingPdfOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceRenderingPdfOptions.cs index 2401bb7f8c..d8ce840523 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceRenderingPdfOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceRenderingPdfOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceRenderingPdfOptions : INestedOptions { @@ -12,6 +15,9 @@ public class InvoiceRenderingPdfOptions : INestedOptions /// One of: a4, auto, or letter. /// [JsonProperty("page_size")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("page_size")] +#endif public string PageSize { get; set; } } } diff --git a/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsOptions.cs index babadbd7cf..eaee01f597 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceScheduleDetailsOptions : INestedOptions { @@ -15,6 +18,9 @@ public class InvoiceScheduleDetailsOptions : INestedOptions /// One of: cancel, or release. /// [JsonProperty("end_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("end_behavior")] +#endif public string EndBehavior { get; set; } /// @@ -23,6 +29,9 @@ public class InvoiceScheduleDetailsOptions : INestedOptions /// end_date of one phase will always equal the start_date of the next phase. /// [JsonProperty("phases")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("phases")] +#endif public List Phases { get; set; } /// @@ -31,6 +40,9 @@ public class InvoiceScheduleDetailsOptions : INestedOptions /// One of: always_invoice, create_prorations, or none. /// [JsonProperty("proration_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("proration_behavior")] +#endif public string ProrationBehavior { get; set; } } } diff --git a/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseAddInvoiceItemDiscountOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseAddInvoiceItemDiscountOptions.cs index e24c03cb8f..7e13ece374 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseAddInvoiceItemDiscountOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseAddInvoiceItemDiscountOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceScheduleDetailsPhaseAddInvoiceItemDiscountOptions : INestedOptions { @@ -9,18 +12,27 @@ public class InvoiceScheduleDetailsPhaseAddInvoiceItemDiscountOptions : INestedO /// ID of the coupon to create a new discount for. /// [JsonProperty("coupon")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("coupon")] +#endif public string Coupon { get; set; } /// /// ID of an existing discount on the object (or one of its ancestors) to reuse. /// [JsonProperty("discount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discount")] +#endif public string Discount { get; set; } /// /// ID of the promotion code to create a new discount for. /// [JsonProperty("promotion_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("promotion_code")] +#endif public string PromotionCode { get; set; } } } diff --git a/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseAddInvoiceItemOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseAddInvoiceItemOptions.cs index fa985b064b..bc121d1008 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseAddInvoiceItemOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseAddInvoiceItemOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceScheduleDetailsPhaseAddInvoiceItemOptions : INestedOptions { @@ -10,12 +13,18 @@ public class InvoiceScheduleDetailsPhaseAddInvoiceItemOptions : INestedOptions /// The coupons to redeem into discounts for the item. /// [JsonProperty("discounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discounts")] +#endif public List Discounts { get; set; } /// /// The ID of the price object. One of price or price_data is required. /// [JsonProperty("price")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("price")] +#endif public string Price { get; set; } /// @@ -23,12 +32,18 @@ public class InvoiceScheduleDetailsPhaseAddInvoiceItemOptions : INestedOptions /// object inline. One of price or price_data is required. /// [JsonProperty("price_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("price_data")] +#endif public InvoiceScheduleDetailsPhaseAddInvoiceItemPriceDataOptions PriceData { get; set; } /// /// Quantity for this item. Defaults to 1. /// [JsonProperty("quantity")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("quantity")] +#endif public long? Quantity { get; set; } /// @@ -36,6 +51,9 @@ public class InvoiceScheduleDetailsPhaseAddInvoiceItemOptions : INestedOptions /// apply to this item. /// [JsonProperty("tax_rates")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_rates")] +#endif public List TaxRates { get; set; } } } diff --git a/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseAddInvoiceItemPriceDataOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseAddInvoiceItemPriceDataOptions.cs index ea47828602..2562255d4a 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseAddInvoiceItemPriceDataOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseAddInvoiceItemPriceDataOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceScheduleDetailsPhaseAddInvoiceItemPriceDataOptions : INestedOptions { @@ -11,12 +14,18 @@ public class InvoiceScheduleDetailsPhaseAddInvoiceItemPriceDataOptions : INested /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// /// The ID of the product that this price will belong to. /// [JsonProperty("product")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("product")] +#endif public string Product { get; set; } /// @@ -29,6 +38,9 @@ public class InvoiceScheduleDetailsPhaseAddInvoiceItemPriceDataOptions : INested /// One of: exclusive, inclusive, or unspecified. /// [JsonProperty("tax_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_behavior")] +#endif public string TaxBehavior { get; set; } /// @@ -37,6 +49,9 @@ public class InvoiceScheduleDetailsPhaseAddInvoiceItemPriceDataOptions : INested /// customer. /// [JsonProperty("unit_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_amount")] +#endif public long? UnitAmount { get; set; } /// @@ -45,6 +60,9 @@ public class InvoiceScheduleDetailsPhaseAddInvoiceItemPriceDataOptions : INested /// unit_amount_decimal can be set. /// [JsonProperty("unit_amount_decimal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_amount_decimal")] +#endif public decimal? UnitAmountDecimal { get; set; } } } diff --git a/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseAutomaticTaxLiabilityOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseAutomaticTaxLiabilityOptions.cs index c4911e42c7..f0cefca7dd 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseAutomaticTaxLiabilityOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseAutomaticTaxLiabilityOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceScheduleDetailsPhaseAutomaticTaxLiabilityOptions : INestedOptions { @@ -9,6 +12,9 @@ public class InvoiceScheduleDetailsPhaseAutomaticTaxLiabilityOptions : INestedOp /// The connected account being referenced when type is account. /// [JsonProperty("account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account")] +#endif public string Account { get; set; } /// @@ -16,6 +22,9 @@ public class InvoiceScheduleDetailsPhaseAutomaticTaxLiabilityOptions : INestedOp /// One of: account, or self. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseAutomaticTaxOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseAutomaticTaxOptions.cs index a24b0a04a5..a8142f00a7 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseAutomaticTaxOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseAutomaticTaxOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceScheduleDetailsPhaseAutomaticTaxOptions : INestedOptions { @@ -10,6 +13,9 @@ public class InvoiceScheduleDetailsPhaseAutomaticTaxOptions : INestedOptions /// invoices generated by the subscription. /// [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool? Enabled { get; set; } /// @@ -18,6 +24,9 @@ public class InvoiceScheduleDetailsPhaseAutomaticTaxOptions : INestedOptions /// transaction is returned in the report of the connected account. /// [JsonProperty("liability")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("liability")] +#endif public InvoiceScheduleDetailsPhaseAutomaticTaxLiabilityOptions Liability { get; set; } } } diff --git a/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseBillingThresholdsOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseBillingThresholdsOptions.cs index 80147c661f..56ad07b4f5 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseBillingThresholdsOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseBillingThresholdsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceScheduleDetailsPhaseBillingThresholdsOptions : INestedOptions { @@ -9,6 +12,9 @@ public class InvoiceScheduleDetailsPhaseBillingThresholdsOptions : INestedOption /// Monetary threshold that triggers the subscription to advance to a new billing period. /// [JsonProperty("amount_gte")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_gte")] +#endif public long? AmountGte { get; set; } /// @@ -17,6 +23,9 @@ public class InvoiceScheduleDetailsPhaseBillingThresholdsOptions : INestedOption /// threshold was last reached; otherwise, the value will remain unchanged. /// [JsonProperty("reset_billing_cycle_anchor")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reset_billing_cycle_anchor")] +#endif public bool? ResetBillingCycleAnchor { get; set; } } } diff --git a/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseDiscountOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseDiscountOptions.cs index ea1f007190..654abf7f80 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseDiscountOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseDiscountOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceScheduleDetailsPhaseDiscountOptions : INestedOptions { @@ -9,18 +12,27 @@ public class InvoiceScheduleDetailsPhaseDiscountOptions : INestedOptions /// ID of the coupon to create a new discount for. /// [JsonProperty("coupon")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("coupon")] +#endif public string Coupon { get; set; } /// /// ID of an existing discount on the object (or one of its ancestors) to reuse. /// [JsonProperty("discount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discount")] +#endif public string Discount { get; set; } /// /// ID of the promotion code to create a new discount for. /// [JsonProperty("promotion_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("promotion_code")] +#endif public string PromotionCode { get; set; } } } diff --git a/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseInvoiceSettingsIssuerOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseInvoiceSettingsIssuerOptions.cs index 65a118a77d..07c2f831ce 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseInvoiceSettingsIssuerOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseInvoiceSettingsIssuerOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceScheduleDetailsPhaseInvoiceSettingsIssuerOptions : INestedOptions { @@ -9,6 +12,9 @@ public class InvoiceScheduleDetailsPhaseInvoiceSettingsIssuerOptions : INestedOp /// The connected account being referenced when type is account. /// [JsonProperty("account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account")] +#endif public string Account { get; set; } /// @@ -16,6 +22,9 @@ public class InvoiceScheduleDetailsPhaseInvoiceSettingsIssuerOptions : INestedOp /// One of: account, or self. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseInvoiceSettingsOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseInvoiceSettingsOptions.cs index 83bb706f40..9364ce1d07 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseInvoiceSettingsOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseInvoiceSettingsOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceScheduleDetailsPhaseInvoiceSettingsOptions : INestedOptions { @@ -11,6 +14,9 @@ public class InvoiceScheduleDetailsPhaseInvoiceSettingsOptions : INestedOptions /// on invoices generated by this phase of the subscription schedule. /// [JsonProperty("account_tax_ids")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_tax_ids")] +#endif public List AccountTaxIds { get; set; } /// @@ -19,6 +25,9 @@ public class InvoiceScheduleDetailsPhaseInvoiceSettingsOptions : INestedOptions /// billing=charge_automatically. /// [JsonProperty("days_until_due")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("days_until_due")] +#endif public long? DaysUntilDue { get; set; } /// @@ -26,6 +35,9 @@ public class InvoiceScheduleDetailsPhaseInvoiceSettingsOptions : INestedOptions /// branding and support information of the specified account. /// [JsonProperty("issuer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("issuer")] +#endif public InvoiceScheduleDetailsPhaseInvoiceSettingsIssuerOptions Issuer { get; set; } } } diff --git a/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseItemBillingThresholdsOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseItemBillingThresholdsOptions.cs index 06602cc31a..d7b15b3f94 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseItemBillingThresholdsOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseItemBillingThresholdsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceScheduleDetailsPhaseItemBillingThresholdsOptions : INestedOptions { @@ -12,6 +15,9 @@ public class InvoiceScheduleDetailsPhaseItemBillingThresholdsOptions : INestedOp /// threshold). /// [JsonProperty("usage_gte")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("usage_gte")] +#endif public long? UsageGte { get; set; } } } diff --git a/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseItemDiscountOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseItemDiscountOptions.cs index a845968ddc..57a1ca9ea0 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseItemDiscountOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseItemDiscountOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceScheduleDetailsPhaseItemDiscountOptions : INestedOptions { @@ -9,18 +12,27 @@ public class InvoiceScheduleDetailsPhaseItemDiscountOptions : INestedOptions /// ID of the coupon to create a new discount for. /// [JsonProperty("coupon")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("coupon")] +#endif public string Coupon { get; set; } /// /// ID of an existing discount on the object (or one of its ancestors) to reuse. /// [JsonProperty("discount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discount")] +#endif public string Discount { get; set; } /// /// ID of the promotion code to create a new discount for. /// [JsonProperty("promotion_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("promotion_code")] +#endif public string PromotionCode { get; set; } } } diff --git a/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseItemOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseItemOptions.cs index 8338bc0939..0b381026a6 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseItemOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseItemOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceScheduleDetailsPhaseItemOptions : INestedOptions, IHasMetadata { @@ -12,12 +15,18 @@ public class InvoiceScheduleDetailsPhaseItemOptions : INestedOptions, IHasMetada /// thresholds. /// [JsonProperty("billing_thresholds")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_thresholds")] +#endif public InvoiceScheduleDetailsPhaseItemBillingThresholdsOptions BillingThresholds { get; set; } /// /// The coupons to redeem into discounts for the subscription item. /// [JsonProperty("discounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discounts")] +#endif public List Discounts { get; set; } /// @@ -31,6 +40,9 @@ public class InvoiceScheduleDetailsPhaseItemOptions : INestedOptions, IHasMetada /// configuration item's metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -38,12 +50,18 @@ public class InvoiceScheduleDetailsPhaseItemOptions : INestedOptions, IHasMetada /// price. /// [JsonProperty("plan")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("plan")] +#endif public string Plan { get; set; } /// /// The ID of the price object. /// [JsonProperty("price")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("price")] +#endif public string Price { get; set; } /// @@ -51,6 +69,9 @@ public class InvoiceScheduleDetailsPhaseItemOptions : INestedOptions, IHasMetada /// object inline. /// [JsonProperty("price_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("price_data")] +#endif public InvoiceScheduleDetailsPhaseItemPriceDataOptions PriceData { get; set; } /// @@ -58,6 +79,9 @@ public class InvoiceScheduleDetailsPhaseItemOptions : INestedOptions, IHasMetada /// licensed and not metered. /// [JsonProperty("quantity")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("quantity")] +#endif public long? Quantity { get; set; } /// @@ -68,6 +92,9 @@ public class InvoiceScheduleDetailsPhaseItemOptions : INestedOptions, IHasMetada /// tax rates. /// [JsonProperty("tax_rates")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_rates")] +#endif public List TaxRates { get; set; } } } diff --git a/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseItemPriceDataOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseItemPriceDataOptions.cs index 40f49c7328..a5334993d4 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseItemPriceDataOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseItemPriceDataOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceScheduleDetailsPhaseItemPriceDataOptions : INestedOptions { @@ -11,18 +14,27 @@ public class InvoiceScheduleDetailsPhaseItemPriceDataOptions : INestedOptions /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// /// The ID of the product that this price will belong to. /// [JsonProperty("product")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("product")] +#endif public string Product { get; set; } /// /// The recurring components of a price such as interval and interval_count. /// [JsonProperty("recurring")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("recurring")] +#endif public InvoiceScheduleDetailsPhaseItemPriceDataRecurringOptions Recurring { get; set; } /// @@ -35,6 +47,9 @@ public class InvoiceScheduleDetailsPhaseItemPriceDataOptions : INestedOptions /// One of: exclusive, inclusive, or unspecified. /// [JsonProperty("tax_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_behavior")] +#endif public string TaxBehavior { get; set; } /// @@ -42,6 +57,9 @@ public class InvoiceScheduleDetailsPhaseItemPriceDataOptions : INestedOptions /// how much to charge. /// [JsonProperty("unit_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_amount")] +#endif public long? UnitAmount { get; set; } /// @@ -50,6 +68,9 @@ public class InvoiceScheduleDetailsPhaseItemPriceDataOptions : INestedOptions /// unit_amount_decimal can be set. /// [JsonProperty("unit_amount_decimal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_amount_decimal")] +#endif public decimal? UnitAmountDecimal { get; set; } } } diff --git a/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseItemPriceDataRecurringOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseItemPriceDataRecurringOptions.cs index fbbaa13240..670fcfbfac 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseItemPriceDataRecurringOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseItemPriceDataRecurringOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceScheduleDetailsPhaseItemPriceDataRecurringOptions : INestedOptions { @@ -11,6 +14,9 @@ public class InvoiceScheduleDetailsPhaseItemPriceDataRecurringOptions : INestedO /// One of: day, month, week, or year. /// [JsonProperty("interval")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interval")] +#endif public string Interval { get; set; } /// @@ -19,6 +25,9 @@ public class InvoiceScheduleDetailsPhaseItemPriceDataRecurringOptions : INestedO /// years interval allowed (3 years, 36 months, or 156 weeks). /// [JsonProperty("interval_count")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interval_count")] +#endif public long? IntervalCount { get; set; } } } diff --git a/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseOptions.cs index 54f7697a2e..3b629db5d5 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseOptions.cs @@ -5,6 +5,9 @@ namespace Stripe using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceScheduleDetailsPhaseOptions : INestedOptions, IHasMetadata { @@ -13,6 +16,9 @@ public class InvoiceScheduleDetailsPhaseOptions : INestedOptions, IHasMetadata /// invoice for this phase. You may pass up to 20 items. /// [JsonProperty("add_invoice_items")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("add_invoice_items")] +#endif public List AddInvoiceItems { get; set; } /// @@ -24,12 +30,18 @@ public class InvoiceScheduleDetailsPhaseOptions : INestedOptions, IHasMetadata /// href="https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions">documentation. /// [JsonProperty("application_fee_percent")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("application_fee_percent")] +#endif public decimal? ApplicationFeePercent { get; set; } /// /// Automatic tax settings for this phase. /// [JsonProperty("automatic_tax")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("automatic_tax")] +#endif public InvoiceScheduleDetailsPhaseAutomaticTaxOptions AutomaticTax { get; set; } /// @@ -41,6 +53,9 @@ public class InvoiceScheduleDetailsPhaseOptions : INestedOptions, IHasMetadata /// One of: automatic, or phase_start. /// [JsonProperty("billing_cycle_anchor")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_cycle_anchor")] +#endif public string BillingCycleAnchor { get; set; } /// @@ -48,6 +63,9 @@ public class InvoiceScheduleDetailsPhaseOptions : INestedOptions, IHasMetadata /// new billing period. Pass an empty string to remove previously-defined thresholds. /// [JsonProperty("billing_thresholds")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_thresholds")] +#endif public InvoiceScheduleDetailsPhaseBillingThresholdsOptions BillingThresholds { get; set; } /// @@ -59,6 +77,9 @@ public class InvoiceScheduleDetailsPhaseOptions : INestedOptions, IHasMetadata /// One of: charge_automatically, or send_invoice. /// [JsonProperty("collection_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("collection_method")] +#endif public string CollectionMethod { get; set; } /// @@ -67,6 +88,9 @@ public class InvoiceScheduleDetailsPhaseOptions : INestedOptions, IHasMetadata /// instead. /// [JsonProperty("coupon")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("coupon")] +#endif public string Coupon { get; set; } /// @@ -75,6 +99,9 @@ public class InvoiceScheduleDetailsPhaseOptions : INestedOptions, IHasMetadata /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// @@ -83,6 +110,9 @@ public class InvoiceScheduleDetailsPhaseOptions : INestedOptions, IHasMetadata /// default payment method in the customer's invoice settings. /// [JsonProperty("default_payment_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("default_payment_method")] +#endif public string DefaultPaymentMethod { get; set; } /// @@ -94,6 +124,9 @@ public class InvoiceScheduleDetailsPhaseOptions : INestedOptions, IHasMetadata /// for any Invoices issued by the Subscription during this Phase. /// [JsonProperty("default_tax_rates")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("default_tax_rates")] +#endif public List DefaultTaxRates { get; set; } /// @@ -102,6 +135,9 @@ public class InvoiceScheduleDetailsPhaseOptions : INestedOptions, IHasMetadata /// certain local payment methods UIs. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// @@ -110,6 +146,9 @@ public class InvoiceScheduleDetailsPhaseOptions : INestedOptions, IHasMetadata /// any discounts. /// [JsonProperty("discounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discounts")] +#endif public List Discounts { get; set; } /// @@ -118,12 +157,19 @@ public class InvoiceScheduleDetailsPhaseOptions : INestedOptions, IHasMetadata /// [JsonProperty("end_date")] [JsonConverter(typeof(AnyOfConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("end_date")] + [STJS.JsonConverter(typeof(STJAnyOfConverter))] +#endif public AnyOf EndDate { get; set; } /// /// All invoices will be billed using the specified settings. /// [JsonProperty("invoice_settings")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("invoice_settings")] +#endif public InvoiceScheduleDetailsPhaseInvoiceSettingsOptions InvoiceSettings { get; set; } /// @@ -131,6 +177,9 @@ public class InvoiceScheduleDetailsPhaseOptions : INestedOptions, IHasMetadata /// the subscription schedule. /// [JsonProperty("items")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("items")] +#endif public List Items { get; set; } /// @@ -140,6 +189,9 @@ public class InvoiceScheduleDetailsPhaseOptions : INestedOptions, IHasMetadata /// If set, end_date must not be set. /// [JsonProperty("iterations")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("iterations")] +#endif public long? Iterations { get; set; } /// @@ -153,6 +205,9 @@ public class InvoiceScheduleDetailsPhaseOptions : INestedOptions, IHasMetadata /// metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -160,6 +215,9 @@ public class InvoiceScheduleDetailsPhaseOptions : INestedOptions, IHasMetadata /// invoices. /// [JsonProperty("on_behalf_of")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("on_behalf_of")] +#endif public string OnBehalfOf { get; set; } /// @@ -174,6 +232,9 @@ public class InvoiceScheduleDetailsPhaseOptions : INestedOptions, IHasMetadata /// One of: always_invoice, create_prorations, or none. /// [JsonProperty("proration_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("proration_behavior")] +#endif public string ProrationBehavior { get; set; } /// @@ -182,6 +243,10 @@ public class InvoiceScheduleDetailsPhaseOptions : INestedOptions, IHasMetadata /// [JsonProperty("start_date")] [JsonConverter(typeof(AnyOfConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("start_date")] + [STJS.JsonConverter(typeof(STJAnyOfConverter))] +#endif public AnyOf StartDate { get; set; } /// @@ -189,6 +254,9 @@ public class InvoiceScheduleDetailsPhaseOptions : INestedOptions, IHasMetadata /// subscription's invoices. /// [JsonProperty("transfer_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transfer_data")] +#endif public InvoiceScheduleDetailsPhaseTransferDataOptions TransferData { get; set; } /// @@ -196,6 +264,9 @@ public class InvoiceScheduleDetailsPhaseOptions : INestedOptions, IHasMetadata /// charged for any fees. /// [JsonProperty("trial")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("trial")] +#endif public bool? Trial { get; set; } /// @@ -204,6 +275,10 @@ public class InvoiceScheduleDetailsPhaseOptions : INestedOptions, IHasMetadata /// [JsonProperty("trial_end")] [JsonConverter(typeof(AnyOfConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("trial_end")] + [STJS.JsonConverter(typeof(STJAnyOfConverter))] +#endif public AnyOf TrialEnd { get; set; } } } diff --git a/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseTransferDataOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseTransferDataOptions.cs index ce3522a722..92c71bd345 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseTransferDataOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseTransferDataOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceScheduleDetailsPhaseTransferDataOptions : INestedOptions { @@ -12,12 +15,18 @@ public class InvoiceScheduleDetailsPhaseTransferDataOptions : INestedOptions /// destination. /// [JsonProperty("amount_percent")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_percent")] +#endif public decimal? AmountPercent { get; set; } /// /// ID of an existing, connected Stripe account. /// [JsonProperty("destination")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("destination")] +#endif public string Destination { get; set; } } } diff --git a/src/Stripe.net/Services/Invoices/InvoiceShippingCostOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceShippingCostOptions.cs index 63ffe72fb1..3ab3f2f31f 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceShippingCostOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceShippingCostOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceShippingCostOptions : INestedOptions { @@ -9,12 +12,18 @@ public class InvoiceShippingCostOptions : INestedOptions /// The ID of the shipping rate to use for this order. /// [JsonProperty("shipping_rate")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping_rate")] +#endif public string ShippingRate { get; set; } /// /// Parameters to create a new ad-hoc shipping rate for this order. /// [JsonProperty("shipping_rate_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping_rate_data")] +#endif public InvoiceShippingCostShippingRateDataOptions ShippingRateData { get; set; } } } diff --git a/src/Stripe.net/Services/Invoices/InvoiceShippingCostShippingRateDataDeliveryEstimateMaximumOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceShippingCostShippingRateDataDeliveryEstimateMaximumOptions.cs index d8fcf62c5d..6ef60283be 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceShippingCostShippingRateDataDeliveryEstimateMaximumOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceShippingCostShippingRateDataDeliveryEstimateMaximumOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceShippingCostShippingRateDataDeliveryEstimateMaximumOptions : INestedOptions { @@ -10,12 +13,18 @@ public class InvoiceShippingCostShippingRateDataDeliveryEstimateMaximumOptions : /// One of: business_day, day, hour, month, or week. /// [JsonProperty("unit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit")] +#endif public string Unit { get; set; } /// /// Must be greater than 0. /// [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public long? Value { get; set; } } } diff --git a/src/Stripe.net/Services/Invoices/InvoiceShippingCostShippingRateDataDeliveryEstimateMinimumOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceShippingCostShippingRateDataDeliveryEstimateMinimumOptions.cs index 034cce87e1..3d187bbd26 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceShippingCostShippingRateDataDeliveryEstimateMinimumOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceShippingCostShippingRateDataDeliveryEstimateMinimumOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceShippingCostShippingRateDataDeliveryEstimateMinimumOptions : INestedOptions { @@ -10,12 +13,18 @@ public class InvoiceShippingCostShippingRateDataDeliveryEstimateMinimumOptions : /// One of: business_day, day, hour, month, or week. /// [JsonProperty("unit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit")] +#endif public string Unit { get; set; } /// /// Must be greater than 0. /// [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public long? Value { get; set; } } } diff --git a/src/Stripe.net/Services/Invoices/InvoiceShippingCostShippingRateDataDeliveryEstimateOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceShippingCostShippingRateDataDeliveryEstimateOptions.cs index 7dcab5278f..91ff791769 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceShippingCostShippingRateDataDeliveryEstimateOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceShippingCostShippingRateDataDeliveryEstimateOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceShippingCostShippingRateDataDeliveryEstimateOptions : INestedOptions { @@ -10,12 +13,18 @@ public class InvoiceShippingCostShippingRateDataDeliveryEstimateOptions : INeste /// infinite. /// [JsonProperty("maximum")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("maximum")] +#endif public InvoiceShippingCostShippingRateDataDeliveryEstimateMaximumOptions Maximum { get; set; } /// /// The lower bound of the estimated range. If empty, represents no lower bound. /// [JsonProperty("minimum")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("minimum")] +#endif public InvoiceShippingCostShippingRateDataDeliveryEstimateMinimumOptions Minimum { get; set; } } } diff --git a/src/Stripe.net/Services/Invoices/InvoiceShippingCostShippingRateDataFixedAmountCurrencyOptionsOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceShippingCostShippingRateDataFixedAmountCurrencyOptionsOptions.cs index 800ec8be3d..2ece5fff14 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceShippingCostShippingRateDataFixedAmountCurrencyOptionsOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceShippingCostShippingRateDataFixedAmountCurrencyOptionsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceShippingCostShippingRateDataFixedAmountCurrencyOptionsOptions : INestedOptions { @@ -9,6 +12,9 @@ public class InvoiceShippingCostShippingRateDataFixedAmountCurrencyOptionsOption /// A non-negative integer in cents representing how much to charge. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long? Amount { get; set; } /// @@ -17,6 +23,9 @@ public class InvoiceShippingCostShippingRateDataFixedAmountCurrencyOptionsOption /// One of: exclusive, inclusive, or unspecified. /// [JsonProperty("tax_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_behavior")] +#endif public string TaxBehavior { get; set; } } } diff --git a/src/Stripe.net/Services/Invoices/InvoiceShippingCostShippingRateDataFixedAmountOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceShippingCostShippingRateDataFixedAmountOptions.cs index f28ef98c46..dc5eb7398c 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceShippingCostShippingRateDataFixedAmountOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceShippingCostShippingRateDataFixedAmountOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceShippingCostShippingRateDataFixedAmountOptions : INestedOptions { @@ -10,6 +13,9 @@ public class InvoiceShippingCostShippingRateDataFixedAmountOptions : INestedOpti /// A non-negative integer in cents representing how much to charge. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long? Amount { get; set; } /// @@ -18,6 +24,9 @@ public class InvoiceShippingCostShippingRateDataFixedAmountOptions : INestedOpti /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// @@ -26,6 +35,9 @@ public class InvoiceShippingCostShippingRateDataFixedAmountOptions : INestedOpti /// code and a supported currency. /// [JsonProperty("currency_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency_options")] +#endif public Dictionary CurrencyOptions { get; set; } } } diff --git a/src/Stripe.net/Services/Invoices/InvoiceShippingCostShippingRateDataOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceShippingCostShippingRateDataOptions.cs index 1ca533de8b..3fc65c17cb 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceShippingCostShippingRateDataOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceShippingCostShippingRateDataOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceShippingCostShippingRateDataOptions : INestedOptions, IHasMetadata { @@ -11,6 +14,9 @@ public class InvoiceShippingCostShippingRateDataOptions : INestedOptions, IHasMe /// customer. This will appear on CheckoutSessions. /// [JsonProperty("delivery_estimate")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("delivery_estimate")] +#endif public InvoiceShippingCostShippingRateDataDeliveryEstimateOptions DeliveryEstimate { get; set; } /// @@ -18,6 +24,9 @@ public class InvoiceShippingCostShippingRateDataOptions : INestedOptions, IHasMe /// on CheckoutSessions. /// [JsonProperty("display_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_name")] +#endif public string DisplayName { get; set; } /// @@ -25,6 +34,9 @@ public class InvoiceShippingCostShippingRateDataOptions : INestedOptions, IHasMe /// fixed_amount. /// [JsonProperty("fixed_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fixed_amount")] +#endif public InvoiceShippingCostShippingRateDataFixedAmountOptions FixedAmount { get; set; } /// @@ -34,6 +46,9 @@ public class InvoiceShippingCostShippingRateDataOptions : INestedOptions, IHasMe /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -42,6 +57,9 @@ public class InvoiceShippingCostShippingRateDataOptions : INestedOptions, IHasMe /// One of: exclusive, inclusive, or unspecified. /// [JsonProperty("tax_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_behavior")] +#endif public string TaxBehavior { get; set; } /// @@ -49,12 +67,18 @@ public class InvoiceShippingCostShippingRateDataOptions : INestedOptions, IHasMe /// code is txcd_92010001. /// [JsonProperty("tax_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_code")] +#endif public string TaxCode { get; set; } /// /// The type of calculation to use on the shipping rate. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Invoices/InvoiceShippingDetailsOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceShippingDetailsOptions.cs index 632873729d..e0db15c777 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceShippingDetailsOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceShippingDetailsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceShippingDetailsOptions : INestedOptions { @@ -9,18 +12,27 @@ public class InvoiceShippingDetailsOptions : INestedOptions /// Shipping address. /// [JsonProperty("address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address")] +#endif public AddressOptions Address { get; set; } /// /// Recipient name. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } /// /// Recipient phone (including extension). /// [JsonProperty("phone")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("phone")] +#endif public string Phone { get; set; } } } diff --git a/src/Stripe.net/Services/Invoices/InvoiceSubscriptionDetailsItemBillingThresholdsOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceSubscriptionDetailsItemBillingThresholdsOptions.cs index 2e34768e10..442591b03f 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceSubscriptionDetailsItemBillingThresholdsOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceSubscriptionDetailsItemBillingThresholdsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceSubscriptionDetailsItemBillingThresholdsOptions : INestedOptions { @@ -12,6 +15,9 @@ public class InvoiceSubscriptionDetailsItemBillingThresholdsOptions : INestedOpt /// threshold). /// [JsonProperty("usage_gte")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("usage_gte")] +#endif public long? UsageGte { get; set; } } } diff --git a/src/Stripe.net/Services/Invoices/InvoiceSubscriptionDetailsItemDiscountOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceSubscriptionDetailsItemDiscountOptions.cs index 98773cf6e2..ab8b4a35e4 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceSubscriptionDetailsItemDiscountOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceSubscriptionDetailsItemDiscountOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceSubscriptionDetailsItemDiscountOptions : INestedOptions { @@ -9,18 +12,27 @@ public class InvoiceSubscriptionDetailsItemDiscountOptions : INestedOptions /// ID of the coupon to create a new discount for. /// [JsonProperty("coupon")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("coupon")] +#endif public string Coupon { get; set; } /// /// ID of an existing discount on the object (or one of its ancestors) to reuse. /// [JsonProperty("discount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discount")] +#endif public string Discount { get; set; } /// /// ID of the promotion code to create a new discount for. /// [JsonProperty("promotion_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("promotion_code")] +#endif public string PromotionCode { get; set; } } } diff --git a/src/Stripe.net/Services/Invoices/InvoiceSubscriptionDetailsItemOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceSubscriptionDetailsItemOptions.cs index 95b89132eb..7af986449d 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceSubscriptionDetailsItemOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceSubscriptionDetailsItemOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceSubscriptionDetailsItemOptions : INestedOptions, IHasId, IHasMetadata { @@ -12,6 +15,9 @@ public class InvoiceSubscriptionDetailsItemOptions : INestedOptions, IHasId, IHa /// thresholds. /// [JsonProperty("billing_thresholds")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_thresholds")] +#endif public InvoiceSubscriptionDetailsItemBillingThresholdsOptions BillingThresholds { get; set; } /// @@ -19,24 +25,36 @@ public class InvoiceSubscriptionDetailsItemOptions : INestedOptions, IHasId, IHa /// to true and the current plan's usage_type is metered. /// [JsonProperty("clear_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("clear_usage")] +#endif public bool? ClearUsage { get; set; } /// /// A flag that, if set to true, will delete the specified item. /// [JsonProperty("deleted")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("deleted")] +#endif public bool? Deleted { get; set; } /// /// The coupons to redeem into discounts for the subscription item. /// [JsonProperty("discounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discounts")] +#endif public List Discounts { get; set; } /// /// Subscription item to update. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// @@ -46,12 +64,18 @@ public class InvoiceSubscriptionDetailsItemOptions : INestedOptions, IHasId, IHa /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// Plan ID for this item, as a string. /// [JsonProperty("plan")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("plan")] +#endif public string Plan { get; set; } /// @@ -60,6 +84,9 @@ public class InvoiceSubscriptionDetailsItemOptions : INestedOptions, IHasId, IHa /// quantity parameter is provided. /// [JsonProperty("price")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("price")] +#endif public string Price { get; set; } /// @@ -67,12 +94,18 @@ public class InvoiceSubscriptionDetailsItemOptions : INestedOptions, IHasId, IHa /// object inline. One of price or price_data is required. /// [JsonProperty("price_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("price_data")] +#endif public InvoiceSubscriptionDetailsItemPriceDataOptions PriceData { get; set; } /// /// Quantity for this item. /// [JsonProperty("quantity")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("quantity")] +#endif public long? Quantity { get; set; } /// @@ -83,6 +116,9 @@ public class InvoiceSubscriptionDetailsItemOptions : INestedOptions, IHasId, IHa /// tax rates. /// [JsonProperty("tax_rates")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_rates")] +#endif public List TaxRates { get; set; } } } diff --git a/src/Stripe.net/Services/Invoices/InvoiceSubscriptionDetailsItemPriceDataOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceSubscriptionDetailsItemPriceDataOptions.cs index ee95c29e65..f9a434ac3c 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceSubscriptionDetailsItemPriceDataOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceSubscriptionDetailsItemPriceDataOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceSubscriptionDetailsItemPriceDataOptions : INestedOptions { @@ -11,18 +14,27 @@ public class InvoiceSubscriptionDetailsItemPriceDataOptions : INestedOptions /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// /// The ID of the product that this price will belong to. /// [JsonProperty("product")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("product")] +#endif public string Product { get; set; } /// /// The recurring components of a price such as interval and interval_count. /// [JsonProperty("recurring")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("recurring")] +#endif public InvoiceSubscriptionDetailsItemPriceDataRecurringOptions Recurring { get; set; } /// @@ -35,6 +47,9 @@ public class InvoiceSubscriptionDetailsItemPriceDataOptions : INestedOptions /// One of: exclusive, inclusive, or unspecified. /// [JsonProperty("tax_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_behavior")] +#endif public string TaxBehavior { get; set; } /// @@ -42,6 +57,9 @@ public class InvoiceSubscriptionDetailsItemPriceDataOptions : INestedOptions /// how much to charge. /// [JsonProperty("unit_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_amount")] +#endif public long? UnitAmount { get; set; } /// @@ -50,6 +68,9 @@ public class InvoiceSubscriptionDetailsItemPriceDataOptions : INestedOptions /// unit_amount_decimal can be set. /// [JsonProperty("unit_amount_decimal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_amount_decimal")] +#endif public decimal? UnitAmountDecimal { get; set; } } } diff --git a/src/Stripe.net/Services/Invoices/InvoiceSubscriptionDetailsItemPriceDataRecurringOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceSubscriptionDetailsItemPriceDataRecurringOptions.cs index 0710377257..42bfeec755 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceSubscriptionDetailsItemPriceDataRecurringOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceSubscriptionDetailsItemPriceDataRecurringOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceSubscriptionDetailsItemPriceDataRecurringOptions : INestedOptions { @@ -11,6 +14,9 @@ public class InvoiceSubscriptionDetailsItemPriceDataRecurringOptions : INestedOp /// One of: day, month, week, or year. /// [JsonProperty("interval")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interval")] +#endif public string Interval { get; set; } /// @@ -19,6 +25,9 @@ public class InvoiceSubscriptionDetailsItemPriceDataRecurringOptions : INestedOp /// years interval allowed (3 years, 36 months, or 156 weeks). /// [JsonProperty("interval_count")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interval_count")] +#endif public long? IntervalCount { get; set; } } } diff --git a/src/Stripe.net/Services/Invoices/InvoiceSubscriptionDetailsOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceSubscriptionDetailsOptions.cs index 65101b28cc..dd95901499 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceSubscriptionDetailsOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceSubscriptionDetailsOptions.cs @@ -5,6 +5,9 @@ namespace Stripe using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceSubscriptionDetailsOptions : INestedOptions { @@ -17,6 +20,10 @@ public class InvoiceSubscriptionDetailsOptions : INestedOptions /// [JsonProperty("billing_cycle_anchor")] [JsonConverter(typeof(AnyOfConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_cycle_anchor")] + [STJS.JsonConverter(typeof(STJAnyOfConverter))] +#endif public AnyOf BillingCycleAnchor { get; set; } /// @@ -27,6 +34,10 @@ public class InvoiceSubscriptionDetailsOptions : INestedOptions /// [JsonProperty("cancel_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cancel_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? CancelAt { get; set; } /// @@ -34,12 +45,18 @@ public class InvoiceSubscriptionDetailsOptions : INestedOptions /// (current_period_end). Defaults to false. /// [JsonProperty("cancel_at_period_end")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cancel_at_period_end")] +#endif public bool? CancelAtPeriodEnd { get; set; } /// /// This simulates the subscription being canceled or expired immediately. /// [JsonProperty("cancel_now")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cancel_now")] +#endif public bool? CancelNow { get; set; } /// @@ -48,12 +65,18 @@ public class InvoiceSubscriptionDetailsOptions : INestedOptions /// have tax_rates set. /// [JsonProperty("default_tax_rates")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("default_tax_rates")] +#endif public List DefaultTaxRates { get; set; } /// /// A list of up to 20 subscription items, each with an attached price. /// [JsonProperty("items")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("items")] +#endif public List Items { get; set; } /// @@ -65,6 +88,9 @@ public class InvoiceSubscriptionDetailsOptions : INestedOptions /// One of: always_invoice, create_prorations, or none. /// [JsonProperty("proration_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("proration_behavior")] +#endif public string ProrationBehavior { get; set; } /// @@ -78,6 +104,10 @@ public class InvoiceSubscriptionDetailsOptions : INestedOptions /// [JsonProperty("proration_date")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("proration_date")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? ProrationDate { get; set; } /// @@ -85,6 +115,9 @@ public class InvoiceSubscriptionDetailsOptions : INestedOptions /// will preview the invoice that will be generated if the subscription is resumed. /// [JsonProperty("resume_at")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("resume_at")] +#endif public string ResumeAt { get; set; } /// @@ -92,6 +125,10 @@ public class InvoiceSubscriptionDetailsOptions : INestedOptions /// [JsonProperty("start_date")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("start_date")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? StartDate { get; set; } /// @@ -101,6 +138,10 @@ public class InvoiceSubscriptionDetailsOptions : INestedOptions /// [JsonProperty("trial_end")] [JsonConverter(typeof(AnyOfConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("trial_end")] + [STJS.JsonConverter(typeof(STJAnyOfConverter))] +#endif public AnyOf TrialEnd { get; set; } } } diff --git a/src/Stripe.net/Services/Invoices/InvoiceSubscriptionItemBillingThresholdsOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceSubscriptionItemBillingThresholdsOptions.cs index 269a753bc1..283c4f89ac 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceSubscriptionItemBillingThresholdsOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceSubscriptionItemBillingThresholdsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceSubscriptionItemBillingThresholdsOptions : INestedOptions { @@ -12,6 +15,9 @@ public class InvoiceSubscriptionItemBillingThresholdsOptions : INestedOptions /// threshold). /// [JsonProperty("usage_gte")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("usage_gte")] +#endif public long? UsageGte { get; set; } } } diff --git a/src/Stripe.net/Services/Invoices/InvoiceSubscriptionItemDiscountOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceSubscriptionItemDiscountOptions.cs index 4d0f97405b..12a4b1702f 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceSubscriptionItemDiscountOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceSubscriptionItemDiscountOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceSubscriptionItemDiscountOptions : INestedOptions { @@ -9,18 +12,27 @@ public class InvoiceSubscriptionItemDiscountOptions : INestedOptions /// ID of the coupon to create a new discount for. /// [JsonProperty("coupon")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("coupon")] +#endif public string Coupon { get; set; } /// /// ID of an existing discount on the object (or one of its ancestors) to reuse. /// [JsonProperty("discount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discount")] +#endif public string Discount { get; set; } /// /// ID of the promotion code to create a new discount for. /// [JsonProperty("promotion_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("promotion_code")] +#endif public string PromotionCode { get; set; } } } diff --git a/src/Stripe.net/Services/Invoices/InvoiceSubscriptionItemOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceSubscriptionItemOptions.cs index bdd64206c5..09d4e46a37 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceSubscriptionItemOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceSubscriptionItemOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceSubscriptionItemOptions : INestedOptions, IHasId, IHasMetadata { @@ -12,6 +15,9 @@ public class InvoiceSubscriptionItemOptions : INestedOptions, IHasId, IHasMetada /// thresholds. /// [JsonProperty("billing_thresholds")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_thresholds")] +#endif public InvoiceSubscriptionItemBillingThresholdsOptions BillingThresholds { get; set; } /// @@ -19,24 +25,36 @@ public class InvoiceSubscriptionItemOptions : INestedOptions, IHasId, IHasMetada /// to true and the current plan's usage_type is metered. /// [JsonProperty("clear_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("clear_usage")] +#endif public bool? ClearUsage { get; set; } /// /// A flag that, if set to true, will delete the specified item. /// [JsonProperty("deleted")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("deleted")] +#endif public bool? Deleted { get; set; } /// /// The coupons to redeem into discounts for the subscription item. /// [JsonProperty("discounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discounts")] +#endif public List Discounts { get; set; } /// /// Subscription item to update. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// @@ -46,12 +64,18 @@ public class InvoiceSubscriptionItemOptions : INestedOptions, IHasId, IHasMetada /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// Plan ID for this item, as a string. /// [JsonProperty("plan")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("plan")] +#endif public string Plan { get; set; } /// @@ -60,6 +84,9 @@ public class InvoiceSubscriptionItemOptions : INestedOptions, IHasId, IHasMetada /// quantity parameter is provided. /// [JsonProperty("price")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("price")] +#endif public string Price { get; set; } /// @@ -67,12 +94,18 @@ public class InvoiceSubscriptionItemOptions : INestedOptions, IHasId, IHasMetada /// object inline. One of price or price_data is required. /// [JsonProperty("price_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("price_data")] +#endif public InvoiceSubscriptionItemPriceDataOptions PriceData { get; set; } /// /// Quantity for this item. /// [JsonProperty("quantity")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("quantity")] +#endif public long? Quantity { get; set; } /// @@ -83,6 +116,9 @@ public class InvoiceSubscriptionItemOptions : INestedOptions, IHasId, IHasMetada /// tax rates. /// [JsonProperty("tax_rates")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_rates")] +#endif public List TaxRates { get; set; } } } diff --git a/src/Stripe.net/Services/Invoices/InvoiceSubscriptionItemPriceDataOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceSubscriptionItemPriceDataOptions.cs index d03d0fc3bd..840e48b7e4 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceSubscriptionItemPriceDataOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceSubscriptionItemPriceDataOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceSubscriptionItemPriceDataOptions : INestedOptions { @@ -11,18 +14,27 @@ public class InvoiceSubscriptionItemPriceDataOptions : INestedOptions /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// /// The ID of the product that this price will belong to. /// [JsonProperty("product")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("product")] +#endif public string Product { get; set; } /// /// The recurring components of a price such as interval and interval_count. /// [JsonProperty("recurring")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("recurring")] +#endif public InvoiceSubscriptionItemPriceDataRecurringOptions Recurring { get; set; } /// @@ -35,6 +47,9 @@ public class InvoiceSubscriptionItemPriceDataOptions : INestedOptions /// One of: exclusive, inclusive, or unspecified. /// [JsonProperty("tax_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_behavior")] +#endif public string TaxBehavior { get; set; } /// @@ -42,6 +57,9 @@ public class InvoiceSubscriptionItemPriceDataOptions : INestedOptions /// how much to charge. /// [JsonProperty("unit_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_amount")] +#endif public long? UnitAmount { get; set; } /// @@ -50,6 +68,9 @@ public class InvoiceSubscriptionItemPriceDataOptions : INestedOptions /// unit_amount_decimal can be set. /// [JsonProperty("unit_amount_decimal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_amount_decimal")] +#endif public decimal? UnitAmountDecimal { get; set; } } } diff --git a/src/Stripe.net/Services/Invoices/InvoiceSubscriptionItemPriceDataRecurringOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceSubscriptionItemPriceDataRecurringOptions.cs index 6af3ba25bf..5abc22bad6 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceSubscriptionItemPriceDataRecurringOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceSubscriptionItemPriceDataRecurringOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceSubscriptionItemPriceDataRecurringOptions : INestedOptions { @@ -11,6 +14,9 @@ public class InvoiceSubscriptionItemPriceDataRecurringOptions : INestedOptions /// One of: day, month, week, or year. /// [JsonProperty("interval")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interval")] +#endif public string Interval { get; set; } /// @@ -19,6 +25,9 @@ public class InvoiceSubscriptionItemPriceDataRecurringOptions : INestedOptions /// years interval allowed (3 years, 36 months, or 156 weeks). /// [JsonProperty("interval_count")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interval_count")] +#endif public long? IntervalCount { get; set; } } } diff --git a/src/Stripe.net/Services/Invoices/InvoiceTransferDataOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceTransferDataOptions.cs index f5a3d27615..e90f14e358 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceTransferDataOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceTransferDataOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceTransferDataOptions : INestedOptions { @@ -10,12 +13,18 @@ public class InvoiceTransferDataOptions : INestedOptions /// is set, the full amount is transferred. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long? Amount { get; set; } /// /// ID of an existing, connected Stripe account. /// [JsonProperty("destination")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("destination")] +#endif public string Destination { get; set; } } } diff --git a/src/Stripe.net/Services/Invoices/InvoiceUpdateLinesOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceUpdateLinesOptions.cs index cff4293688..52dcfd7f11 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceUpdateLinesOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceUpdateLinesOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceUpdateLinesOptions : BaseOptions { @@ -18,12 +21,18 @@ public class InvoiceUpdateLinesOptions : BaseOptions /// items, where any existing metadata on the invoice line is merged with the incoming data. /// [JsonProperty("invoice_metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("invoice_metadata")] +#endif public Dictionary InvoiceMetadata { get; set; } /// /// The line items to update. /// [JsonProperty("lines")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("lines")] +#endif public List Lines { get; set; } } } diff --git a/src/Stripe.net/Services/Invoices/InvoiceUpdateOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceUpdateOptions.cs index f2a87b68ce..ee5be5989d 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceUpdateOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceUpdateOptions.cs @@ -5,6 +5,9 @@ namespace Stripe using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InvoiceUpdateOptions : BaseOptions, IHasMetadata { @@ -13,6 +16,9 @@ public class InvoiceUpdateOptions : BaseOptions, IHasMetadata /// draft. /// [JsonProperty("account_tax_ids")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_tax_ids")] +#endif public List AccountTaxIds { get; set; } /// @@ -23,6 +29,9 @@ public class InvoiceUpdateOptions : BaseOptions, IHasMetadata /// href="https://stripe.com/docs/billing/invoices/connect#collecting-fees">documentation. /// [JsonProperty("application_fee_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("application_fee_amount")] +#endif public long? ApplicationFeeAmount { get; set; } /// @@ -31,12 +40,18 @@ public class InvoiceUpdateOptions : BaseOptions, IHasMetadata /// collection of the invoice. /// [JsonProperty("auto_advance")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("auto_advance")] +#endif public bool? AutoAdvance { get; set; } /// /// Settings for automatic tax lookup for this invoice. /// [JsonProperty("automatic_tax")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("automatic_tax")] +#endif public InvoiceAutomaticTaxOptions AutomaticTax { get; set; } /// @@ -46,6 +61,10 @@ public class InvoiceUpdateOptions : BaseOptions, IHasMetadata /// [JsonProperty("automatically_finalizes_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("automatically_finalizes_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? AutomaticallyFinalizesAt { get; set; } /// @@ -54,6 +73,9 @@ public class InvoiceUpdateOptions : BaseOptions, IHasMetadata /// One of: charge_automatically, or send_invoice. /// [JsonProperty("collection_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("collection_method")] +#endif public string CollectionMethod { get; set; } /// @@ -62,6 +84,9 @@ public class InvoiceUpdateOptions : BaseOptions, IHasMetadata /// field list on this invoice. Pass an empty string to remove previously-defined fields. /// [JsonProperty("custom_fields")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("custom_fields")] +#endif public List CustomFields { get; set; } /// @@ -70,6 +95,9 @@ public class InvoiceUpdateOptions : BaseOptions, IHasMetadata /// draft invoices. /// [JsonProperty("days_until_due")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("days_until_due")] +#endif public long? DaysUntilDue { get; set; } /// @@ -78,6 +106,9 @@ public class InvoiceUpdateOptions : BaseOptions, IHasMetadata /// method, if any, or to the default payment method in the customer's invoice settings. /// [JsonProperty("default_payment_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("default_payment_method")] +#endif public string DefaultPaymentMethod { get; set; } /// @@ -86,6 +117,9 @@ public class InvoiceUpdateOptions : BaseOptions, IHasMetadata /// subscription's default source, if any, or to the customer's default source. /// [JsonProperty("default_source")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("default_source")] +#endif public string DefaultSource { get; set; } /// @@ -93,6 +127,9 @@ public class InvoiceUpdateOptions : BaseOptions, IHasMetadata /// Pass an empty string to remove previously-defined tax rates. /// [JsonProperty("default_tax_rates")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("default_tax_rates")] +#endif public List DefaultTaxRates { get; set; } /// @@ -100,6 +137,9 @@ public class InvoiceUpdateOptions : BaseOptions, IHasMetadata /// Referenced as 'memo' in the Dashboard. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// @@ -107,6 +147,9 @@ public class InvoiceUpdateOptions : BaseOptions, IHasMetadata /// previously-defined discounts. /// [JsonProperty("discounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discounts")] +#endif public List Discounts { get; set; } /// @@ -116,6 +159,10 @@ public class InvoiceUpdateOptions : BaseOptions, IHasMetadata /// [JsonProperty("due_date")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("due_date")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? DueDate { get; set; } /// @@ -125,12 +172,19 @@ public class InvoiceUpdateOptions : BaseOptions, IHasMetadata /// [JsonProperty("effective_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("effective_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? EffectiveAt { get; set; } /// /// Footer to be displayed on the invoice. /// [JsonProperty("footer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("footer")] +#endif public string Footer { get; set; } /// @@ -138,6 +192,9 @@ public class InvoiceUpdateOptions : BaseOptions, IHasMetadata /// branding and support information of the specified account. /// [JsonProperty("issuer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("issuer")] +#endif public InvoiceIssuerOptions Issuer { get; set; } /// @@ -147,6 +204,9 @@ public class InvoiceUpdateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -158,6 +218,9 @@ public class InvoiceUpdateOptions : BaseOptions, IHasMetadata /// invoice numbers, Stripe handles this aspect of compliance for you automatically. /// [JsonProperty("number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("number")] +#endif public string Number { get; set; } /// @@ -167,6 +230,9 @@ public class InvoiceUpdateOptions : BaseOptions, IHasMetadata /// with Connect documentation for details. /// [JsonProperty("on_behalf_of")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("on_behalf_of")] +#endif public string OnBehalfOf { get; set; } /// @@ -174,6 +240,9 @@ public class InvoiceUpdateOptions : BaseOptions, IHasMetadata /// finalized. /// [JsonProperty("payment_settings")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_settings")] +#endif public InvoicePaymentSettingsOptions PaymentSettings { get; set; } /// @@ -181,12 +250,18 @@ public class InvoiceUpdateOptions : BaseOptions, IHasMetadata /// customer-facing surfaces such as PDF and Hosted Invoice Page. /// [JsonProperty("rendering")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("rendering")] +#endif public InvoiceRenderingOptions Rendering { get; set; } /// /// Settings for the cost of shipping for this invoice. /// [JsonProperty("shipping_cost")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping_cost")] +#endif public InvoiceShippingCostOptions ShippingCost { get; set; } /// @@ -195,6 +270,9 @@ public class InvoiceUpdateOptions : BaseOptions, IHasMetadata /// customer. /// [JsonProperty("shipping_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping_details")] +#endif public InvoiceShippingDetailsOptions ShippingDetails { get; set; } /// @@ -204,6 +282,9 @@ public class InvoiceUpdateOptions : BaseOptions, IHasMetadata /// subscription item's product's statement_descriptor. /// [JsonProperty("statement_descriptor")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("statement_descriptor")] +#endif public string StatementDescriptor { get; set; } /// @@ -212,6 +293,9 @@ public class InvoiceUpdateOptions : BaseOptions, IHasMetadata /// if you POST an empty value. /// [JsonProperty("transfer_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transfer_data")] +#endif public InvoiceTransferDataOptions TransferData { get; set; } } } diff --git a/src/Stripe.net/Services/Issuing/Authorizations/AuthorizationApproveOptions.cs b/src/Stripe.net/Services/Issuing/Authorizations/AuthorizationApproveOptions.cs index 871c8c8b83..a812d63609 100644 --- a/src/Stripe.net/Services/Issuing/Authorizations/AuthorizationApproveOptions.cs +++ b/src/Stripe.net/Services/Issuing/Authorizations/AuthorizationApproveOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.Issuing { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AuthorizationApproveOptions : BaseOptions, IHasMetadata { @@ -14,6 +17,9 @@ public class AuthorizationApproveOptions : BaseOptions, IHasMetadata /// decline an authorization request). /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long? Amount { get; set; } /// @@ -23,6 +29,9 @@ public class AuthorizationApproveOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } } } diff --git a/src/Stripe.net/Services/Issuing/Authorizations/AuthorizationDeclineOptions.cs b/src/Stripe.net/Services/Issuing/Authorizations/AuthorizationDeclineOptions.cs index b829b22c9b..d406146619 100644 --- a/src/Stripe.net/Services/Issuing/Authorizations/AuthorizationDeclineOptions.cs +++ b/src/Stripe.net/Services/Issuing/Authorizations/AuthorizationDeclineOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.Issuing { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AuthorizationDeclineOptions : BaseOptions, IHasMetadata { @@ -13,6 +16,9 @@ public class AuthorizationDeclineOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } } } diff --git a/src/Stripe.net/Services/Issuing/Authorizations/AuthorizationListOptions.cs b/src/Stripe.net/Services/Issuing/Authorizations/AuthorizationListOptions.cs index 530f69bf99..a0e07763ee 100644 --- a/src/Stripe.net/Services/Issuing/Authorizations/AuthorizationListOptions.cs +++ b/src/Stripe.net/Services/Issuing/Authorizations/AuthorizationListOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AuthorizationListOptions : ListOptionsWithCreated { @@ -9,12 +12,18 @@ public class AuthorizationListOptions : ListOptionsWithCreated /// Only return authorizations that belong to the given card. /// [JsonProperty("card")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card")] +#endif public string Card { get; set; } /// /// Only return authorizations that belong to the given cardholder. /// [JsonProperty("cardholder")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cardholder")] +#endif public string Cardholder { get; set; } /// @@ -23,6 +32,9 @@ public class AuthorizationListOptions : ListOptionsWithCreated /// One of: closed, pending, or reversed. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } } } diff --git a/src/Stripe.net/Services/Issuing/Authorizations/AuthorizationUpdateOptions.cs b/src/Stripe.net/Services/Issuing/Authorizations/AuthorizationUpdateOptions.cs index c25e2c15a4..219fe69869 100644 --- a/src/Stripe.net/Services/Issuing/Authorizations/AuthorizationUpdateOptions.cs +++ b/src/Stripe.net/Services/Issuing/Authorizations/AuthorizationUpdateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.Issuing { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AuthorizationUpdateOptions : BaseOptions, IHasMetadata { @@ -13,6 +16,9 @@ public class AuthorizationUpdateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } } } diff --git a/src/Stripe.net/Services/Issuing/Cardholders/CardholderBillingOptions.cs b/src/Stripe.net/Services/Issuing/Cardholders/CardholderBillingOptions.cs index bc9b918b38..298d5213ad 100644 --- a/src/Stripe.net/Services/Issuing/Cardholders/CardholderBillingOptions.cs +++ b/src/Stripe.net/Services/Issuing/Cardholders/CardholderBillingOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CardholderBillingOptions : INestedOptions { @@ -9,6 +12,9 @@ public class CardholderBillingOptions : INestedOptions /// The cardholder’s billing address. /// [JsonProperty("address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address")] +#endif public AddressOptions Address { get; set; } } } diff --git a/src/Stripe.net/Services/Issuing/Cardholders/CardholderCompanyOptions.cs b/src/Stripe.net/Services/Issuing/Cardholders/CardholderCompanyOptions.cs index a27aef7f6a..43a812171b 100644 --- a/src/Stripe.net/Services/Issuing/Cardholders/CardholderCompanyOptions.cs +++ b/src/Stripe.net/Services/Issuing/Cardholders/CardholderCompanyOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CardholderCompanyOptions : INestedOptions { @@ -9,6 +12,9 @@ public class CardholderCompanyOptions : INestedOptions /// The entity's business ID number. /// [JsonProperty("tax_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_id")] +#endif public string TaxId { get; set; } } } diff --git a/src/Stripe.net/Services/Issuing/Cardholders/CardholderCreateOptions.cs b/src/Stripe.net/Services/Issuing/Cardholders/CardholderCreateOptions.cs index be03c73775..004b36b710 100644 --- a/src/Stripe.net/Services/Issuing/Cardholders/CardholderCreateOptions.cs +++ b/src/Stripe.net/Services/Issuing/Cardholders/CardholderCreateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.Issuing { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CardholderCreateOptions : BaseOptions, IHasMetadata { @@ -10,24 +13,36 @@ public class CardholderCreateOptions : BaseOptions, IHasMetadata /// The cardholder's billing address. /// [JsonProperty("billing")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing")] +#endif public CardholderBillingOptions Billing { get; set; } /// /// Additional information about a company cardholder. /// [JsonProperty("company")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("company")] +#endif public CardholderCompanyOptions Company { get; set; } /// /// The cardholder's email address. /// [JsonProperty("email")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("email")] +#endif public string Email { get; set; } /// /// Additional information about an individual cardholder. /// [JsonProperty("individual")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("individual")] +#endif public CardholderIndividualOptions Individual { get; set; } /// @@ -37,6 +52,9 @@ public class CardholderCreateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -45,6 +63,9 @@ public class CardholderCreateOptions : BaseOptions, IHasMetadata /// numbers. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } /// @@ -55,6 +76,9 @@ public class CardholderCreateOptions : BaseOptions, IHasMetadata /// Secure documentation for more details. /// [JsonProperty("phone_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("phone_number")] +#endif public string PhoneNumber { get; set; } /// @@ -65,6 +89,9 @@ public class CardholderCreateOptions : BaseOptions, IHasMetadata /// One of: de, en, es, fr, or it. /// [JsonProperty("preferred_locales")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preferred_locales")] +#endif public List PreferredLocales { get; set; } /// @@ -73,6 +100,9 @@ public class CardholderCreateOptions : BaseOptions, IHasMetadata /// more details. /// [JsonProperty("spending_controls")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("spending_controls")] +#endif public CardholderSpendingControlsOptions SpendingControls { get; set; } /// @@ -81,6 +111,9 @@ public class CardholderCreateOptions : BaseOptions, IHasMetadata /// One of: active, or inactive. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } /// @@ -90,6 +123,9 @@ public class CardholderCreateOptions : BaseOptions, IHasMetadata /// One of: company, or individual. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Issuing/Cardholders/CardholderIndividualCardIssuingOptions.cs b/src/Stripe.net/Services/Issuing/Cardholders/CardholderIndividualCardIssuingOptions.cs index e57d00fafc..2631bc77b1 100644 --- a/src/Stripe.net/Services/Issuing/Cardholders/CardholderIndividualCardIssuingOptions.cs +++ b/src/Stripe.net/Services/Issuing/Cardholders/CardholderIndividualCardIssuingOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CardholderIndividualCardIssuingOptions : INestedOptions { @@ -11,6 +14,9 @@ public class CardholderIndividualCardIssuingOptions : INestedOptions /// User Terms. Required for cards backed by a Celtic program. /// [JsonProperty("user_terms_acceptance")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("user_terms_acceptance")] +#endif public CardholderIndividualCardIssuingUserTermsAcceptanceOptions UserTermsAcceptance { get; set; } } } diff --git a/src/Stripe.net/Services/Issuing/Cardholders/CardholderIndividualCardIssuingUserTermsAcceptanceOptions.cs b/src/Stripe.net/Services/Issuing/Cardholders/CardholderIndividualCardIssuingUserTermsAcceptanceOptions.cs index ead5dd5763..01394528e2 100644 --- a/src/Stripe.net/Services/Issuing/Cardholders/CardholderIndividualCardIssuingUserTermsAcceptanceOptions.cs +++ b/src/Stripe.net/Services/Issuing/Cardholders/CardholderIndividualCardIssuingUserTermsAcceptanceOptions.cs @@ -4,6 +4,9 @@ namespace Stripe.Issuing using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CardholderIndividualCardIssuingUserTermsAcceptanceOptions : INestedOptions { @@ -13,6 +16,10 @@ public class CardholderIndividualCardIssuingUserTermsAcceptanceOptions : INested /// [JsonProperty("date")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("date")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? Date { get; set; } /// @@ -20,6 +27,9 @@ public class CardholderIndividualCardIssuingUserTermsAcceptanceOptions : INested /// for Celtic Spend Card users. /// [JsonProperty("ip")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ip")] +#endif public string Ip { get; set; } /// @@ -27,6 +37,9 @@ public class CardholderIndividualCardIssuingUserTermsAcceptanceOptions : INested /// Terms. /// [JsonProperty("user_agent")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("user_agent")] +#endif public string UserAgent { get; set; } } } diff --git a/src/Stripe.net/Services/Issuing/Cardholders/CardholderIndividualDobOptions.cs b/src/Stripe.net/Services/Issuing/Cardholders/CardholderIndividualDobOptions.cs index 3fa98a744d..a0739335bc 100644 --- a/src/Stripe.net/Services/Issuing/Cardholders/CardholderIndividualDobOptions.cs +++ b/src/Stripe.net/Services/Issuing/Cardholders/CardholderIndividualDobOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CardholderIndividualDobOptions : INestedOptions { @@ -9,18 +12,27 @@ public class CardholderIndividualDobOptions : INestedOptions /// The day of birth, between 1 and 31. /// [JsonProperty("day")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("day")] +#endif public long? Day { get; set; } /// /// The month of birth, between 1 and 12. /// [JsonProperty("month")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("month")] +#endif public long? Month { get; set; } /// /// The four-digit year of birth. /// [JsonProperty("year")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("year")] +#endif public long? Year { get; set; } } } diff --git a/src/Stripe.net/Services/Issuing/Cardholders/CardholderIndividualOptions.cs b/src/Stripe.net/Services/Issuing/Cardholders/CardholderIndividualOptions.cs index 6ebfb848a5..a5e6086bf3 100644 --- a/src/Stripe.net/Services/Issuing/Cardholders/CardholderIndividualOptions.cs +++ b/src/Stripe.net/Services/Issuing/Cardholders/CardholderIndividualOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CardholderIndividualOptions : INestedOptions { @@ -9,12 +12,18 @@ public class CardholderIndividualOptions : INestedOptions /// Information related to the card_issuing program for this cardholder. /// [JsonProperty("card_issuing")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card_issuing")] +#endif public CardholderIndividualCardIssuingOptions CardIssuing { get; set; } /// /// The date of birth of this cardholder. Cardholders must be older than 13 years old. /// [JsonProperty("dob")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("dob")] +#endif public CardholderIndividualDobOptions Dob { get; set; } /// @@ -23,6 +32,9 @@ public class CardholderIndividualOptions : INestedOptions /// apostrophes) or non-latin letters. /// [JsonProperty("first_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("first_name")] +#endif public string FirstName { get; set; } /// @@ -31,12 +43,18 @@ public class CardholderIndividualOptions : INestedOptions /// apostrophes) or non-latin letters. /// [JsonProperty("last_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last_name")] +#endif public string LastName { get; set; } /// /// Government-issued ID document for this cardholder. /// [JsonProperty("verification")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("verification")] +#endif public CardholderIndividualVerificationOptions Verification { get; set; } } } diff --git a/src/Stripe.net/Services/Issuing/Cardholders/CardholderIndividualVerificationDocumentOptions.cs b/src/Stripe.net/Services/Issuing/Cardholders/CardholderIndividualVerificationDocumentOptions.cs index dcdb4c8036..db3d47ef0b 100644 --- a/src/Stripe.net/Services/Issuing/Cardholders/CardholderIndividualVerificationDocumentOptions.cs +++ b/src/Stripe.net/Services/Issuing/Cardholders/CardholderIndividualVerificationDocumentOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CardholderIndividualVerificationDocumentOptions : INestedOptions { @@ -10,6 +13,9 @@ public class CardholderIndividualVerificationDocumentOptions : INestedOptions /// upload with a purpose value of identity_document. /// [JsonProperty("back")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("back")] +#endif public string Back { get; set; } /// @@ -17,6 +23,9 @@ public class CardholderIndividualVerificationDocumentOptions : INestedOptions /// upload with a purpose value of identity_document. /// [JsonProperty("front")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("front")] +#endif public string Front { get; set; } } } diff --git a/src/Stripe.net/Services/Issuing/Cardholders/CardholderIndividualVerificationOptions.cs b/src/Stripe.net/Services/Issuing/Cardholders/CardholderIndividualVerificationOptions.cs index d87787451f..6611a000ff 100644 --- a/src/Stripe.net/Services/Issuing/Cardholders/CardholderIndividualVerificationOptions.cs +++ b/src/Stripe.net/Services/Issuing/Cardholders/CardholderIndividualVerificationOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CardholderIndividualVerificationOptions : INestedOptions { @@ -9,6 +12,9 @@ public class CardholderIndividualVerificationOptions : INestedOptions /// An identifying document, either a passport or local ID card. /// [JsonProperty("document")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("document")] +#endif public CardholderIndividualVerificationDocumentOptions Document { get; set; } } } diff --git a/src/Stripe.net/Services/Issuing/Cardholders/CardholderListOptions.cs b/src/Stripe.net/Services/Issuing/Cardholders/CardholderListOptions.cs index 4c4ca76bbe..eaeb923fbc 100644 --- a/src/Stripe.net/Services/Issuing/Cardholders/CardholderListOptions.cs +++ b/src/Stripe.net/Services/Issuing/Cardholders/CardholderListOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CardholderListOptions : ListOptionsWithCreated { @@ -9,12 +12,18 @@ public class CardholderListOptions : ListOptionsWithCreated /// Only return cardholders that have the given email address. /// [JsonProperty("email")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("email")] +#endif public string Email { get; set; } /// /// Only return cardholders that have the given phone number. /// [JsonProperty("phone_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("phone_number")] +#endif public string PhoneNumber { get; set; } /// @@ -23,6 +32,9 @@ public class CardholderListOptions : ListOptionsWithCreated /// One of: active, blocked, or inactive. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } /// @@ -31,6 +43,9 @@ public class CardholderListOptions : ListOptionsWithCreated /// One of: company, or individual. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Issuing/Cardholders/CardholderSpendingControlsOptions.cs b/src/Stripe.net/Services/Issuing/Cardholders/CardholderSpendingControlsOptions.cs index 47499af99f..e876cfc29a 100644 --- a/src/Stripe.net/Services/Issuing/Cardholders/CardholderSpendingControlsOptions.cs +++ b/src/Stripe.net/Services/Issuing/Cardholders/CardholderSpendingControlsOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.Issuing { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CardholderSpendingControlsOptions : INestedOptions { @@ -158,6 +161,9 @@ public class CardholderSpendingControlsOptions : INestedOptions /// wrecking_and_salvage_yards. /// [JsonProperty("allowed_categories")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("allowed_categories")] +#endif public List AllowedCategories { get; set; } /// @@ -167,6 +173,9 @@ public class CardholderSpendingControlsOptions : INestedOptions /// blocked_merchant_countries. Provide an empty value to unset this control. /// [JsonProperty("allowed_merchant_countries")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("allowed_merchant_countries")] +#endif public List AllowedMerchantCountries { get; set; } /// @@ -321,6 +330,9 @@ public class CardholderSpendingControlsOptions : INestedOptions /// wrecking_and_salvage_yards. /// [JsonProperty("blocked_categories")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("blocked_categories")] +#endif public List BlockedCategories { get; set; } /// @@ -330,12 +342,18 @@ public class CardholderSpendingControlsOptions : INestedOptions /// this control. /// [JsonProperty("blocked_merchant_countries")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("blocked_merchant_countries")] +#endif public List BlockedMerchantCountries { get; set; } /// /// Limit spending with amount-based rules that apply across this cardholder's cards. /// [JsonProperty("spending_limits")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("spending_limits")] +#endif public List SpendingLimits { get; set; } /// @@ -343,6 +361,9 @@ public class CardholderSpendingControlsOptions : INestedOptions /// currency. /// [JsonProperty("spending_limits_currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("spending_limits_currency")] +#endif public string SpendingLimitsCurrency { get; set; } } } diff --git a/src/Stripe.net/Services/Issuing/Cardholders/CardholderSpendingControlsSpendingLimitOptions.cs b/src/Stripe.net/Services/Issuing/Cardholders/CardholderSpendingControlsSpendingLimitOptions.cs index e6ea705dfe..c59d829d10 100644 --- a/src/Stripe.net/Services/Issuing/Cardholders/CardholderSpendingControlsSpendingLimitOptions.cs +++ b/src/Stripe.net/Services/Issuing/Cardholders/CardholderSpendingControlsSpendingLimitOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.Issuing { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CardholderSpendingControlsSpendingLimitOptions : INestedOptions { @@ -10,6 +13,9 @@ public class CardholderSpendingControlsSpendingLimitOptions : INestedOptions /// Maximum amount allowed to spend per interval. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long? Amount { get; set; } /// @@ -163,6 +169,9 @@ public class CardholderSpendingControlsSpendingLimitOptions : INestedOptions /// wrecking_and_salvage_yards. /// [JsonProperty("categories")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("categories")] +#endif public List Categories { get; set; } /// @@ -171,6 +180,9 @@ public class CardholderSpendingControlsSpendingLimitOptions : INestedOptions /// weekly, or yearly. /// [JsonProperty("interval")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interval")] +#endif public string Interval { get; set; } } } diff --git a/src/Stripe.net/Services/Issuing/Cardholders/CardholderUpdateOptions.cs b/src/Stripe.net/Services/Issuing/Cardholders/CardholderUpdateOptions.cs index 785c8b9e2d..220b607d10 100644 --- a/src/Stripe.net/Services/Issuing/Cardholders/CardholderUpdateOptions.cs +++ b/src/Stripe.net/Services/Issuing/Cardholders/CardholderUpdateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.Issuing { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CardholderUpdateOptions : BaseOptions, IHasMetadata { @@ -10,24 +13,36 @@ public class CardholderUpdateOptions : BaseOptions, IHasMetadata /// The cardholder's billing address. /// [JsonProperty("billing")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing")] +#endif public CardholderBillingOptions Billing { get; set; } /// /// Additional information about a company cardholder. /// [JsonProperty("company")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("company")] +#endif public CardholderCompanyOptions Company { get; set; } /// /// The cardholder's email address. /// [JsonProperty("email")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("email")] +#endif public string Email { get; set; } /// /// Additional information about an individual cardholder. /// [JsonProperty("individual")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("individual")] +#endif public CardholderIndividualOptions Individual { get; set; } /// @@ -37,6 +52,9 @@ public class CardholderUpdateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -45,6 +63,9 @@ public class CardholderUpdateOptions : BaseOptions, IHasMetadata /// documentation for more details. /// [JsonProperty("phone_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("phone_number")] +#endif public string PhoneNumber { get; set; } /// @@ -55,6 +76,9 @@ public class CardholderUpdateOptions : BaseOptions, IHasMetadata /// One of: de, en, es, fr, or it. /// [JsonProperty("preferred_locales")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preferred_locales")] +#endif public List PreferredLocales { get; set; } /// @@ -63,6 +87,9 @@ public class CardholderUpdateOptions : BaseOptions, IHasMetadata /// more details. /// [JsonProperty("spending_controls")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("spending_controls")] +#endif public CardholderSpendingControlsOptions SpendingControls { get; set; } /// @@ -70,6 +97,9 @@ public class CardholderUpdateOptions : BaseOptions, IHasMetadata /// One of: active, or inactive. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } } } diff --git a/src/Stripe.net/Services/Issuing/Cards/CardCreateOptions.cs b/src/Stripe.net/Services/Issuing/Cards/CardCreateOptions.cs index d21317f02e..2eca0162df 100644 --- a/src/Stripe.net/Services/Issuing/Cards/CardCreateOptions.cs +++ b/src/Stripe.net/Services/Issuing/Cards/CardCreateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.Issuing { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CardCreateOptions : BaseOptions, IHasMetadata { @@ -11,15 +14,24 @@ public class CardCreateOptions : BaseOptions, IHasMetadata /// object with which the card will be associated. /// [JsonProperty("cardholder")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cardholder")] +#endif public string Cardholder { get; set; } /// /// The currency for the card. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } [JsonProperty("financial_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("financial_account")] +#endif public string FinancialAccount { get; set; } /// @@ -29,24 +41,36 @@ public class CardCreateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// The personalization design object belonging to this card. /// [JsonProperty("personalization_design")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("personalization_design")] +#endif public string PersonalizationDesign { get; set; } /// /// The desired PIN for this card. /// [JsonProperty("pin")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("pin")] +#endif public CardPinOptions Pin { get; set; } /// /// The card this is meant to be a replacement for (if any). /// [JsonProperty("replacement_for")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("replacement_for")] +#endif public string ReplacementFor { get; set; } /// @@ -55,18 +79,27 @@ public class CardCreateOptions : BaseOptions, IHasMetadata /// One of: damaged, expired, lost, or stolen. /// [JsonProperty("replacement_reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("replacement_reason")] +#endif public string ReplacementReason { get; set; } /// /// The second line to print on the card. Max length: 24 characters. /// [JsonProperty("second_line")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("second_line")] +#endif public string SecondLine { get; set; } /// /// The address where the card will be shipped. /// [JsonProperty("shipping")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping")] +#endif public CardShippingOptions Shipping { get; set; } /// @@ -75,6 +108,9 @@ public class CardCreateOptions : BaseOptions, IHasMetadata /// more details. /// [JsonProperty("spending_controls")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("spending_controls")] +#endif public CardSpendingControlsOptions SpendingControls { get; set; } /// @@ -83,6 +119,9 @@ public class CardCreateOptions : BaseOptions, IHasMetadata /// One of: active, or inactive. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } /// @@ -90,6 +129,9 @@ public class CardCreateOptions : BaseOptions, IHasMetadata /// One of: physical, or virtual. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Issuing/Cards/CardListOptions.cs b/src/Stripe.net/Services/Issuing/Cards/CardListOptions.cs index a489512642..dd823dcc35 100644 --- a/src/Stripe.net/Services/Issuing/Cards/CardListOptions.cs +++ b/src/Stripe.net/Services/Issuing/Cards/CardListOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CardListOptions : ListOptionsWithCreated { @@ -9,27 +12,42 @@ public class CardListOptions : ListOptionsWithCreated /// Only return cards belonging to the Cardholder with the provided ID. /// [JsonProperty("cardholder")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cardholder")] +#endif public string Cardholder { get; set; } /// /// Only return cards that have the given expiration month. /// [JsonProperty("exp_month")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("exp_month")] +#endif public long? ExpMonth { get; set; } /// /// Only return cards that have the given expiration year. /// [JsonProperty("exp_year")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("exp_year")] +#endif public long? ExpYear { get; set; } /// /// Only return cards that have the given last four digits. /// [JsonProperty("last4")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last4")] +#endif public string Last4 { get; set; } [JsonProperty("personalization_design")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("personalization_design")] +#endif public string PersonalizationDesign { get; set; } /// @@ -38,6 +56,9 @@ public class CardListOptions : ListOptionsWithCreated /// One of: active, canceled, or inactive. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } /// @@ -45,6 +66,9 @@ public class CardListOptions : ListOptionsWithCreated /// One of: physical, or virtual. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Issuing/Cards/CardPinOptions.cs b/src/Stripe.net/Services/Issuing/Cards/CardPinOptions.cs index 0242c42d41..fe7b587a3e 100644 --- a/src/Stripe.net/Services/Issuing/Cards/CardPinOptions.cs +++ b/src/Stripe.net/Services/Issuing/Cards/CardPinOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CardPinOptions : INestedOptions { @@ -9,6 +12,9 @@ public class CardPinOptions : INestedOptions /// The card's desired new PIN, encrypted under Stripe's public key. /// [JsonProperty("encrypted_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("encrypted_number")] +#endif public string EncryptedNumber { get; set; } } } diff --git a/src/Stripe.net/Services/Issuing/Cards/CardShippingAddressValidationOptions.cs b/src/Stripe.net/Services/Issuing/Cards/CardShippingAddressValidationOptions.cs index e9428e1c90..c993fad78d 100644 --- a/src/Stripe.net/Services/Issuing/Cards/CardShippingAddressValidationOptions.cs +++ b/src/Stripe.net/Services/Issuing/Cards/CardShippingAddressValidationOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CardShippingAddressValidationOptions : INestedOptions { @@ -11,6 +14,9 @@ public class CardShippingAddressValidationOptions : INestedOptions /// validation_and_normalization. /// [JsonProperty("mode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mode")] +#endif public string Mode { get; set; } } } diff --git a/src/Stripe.net/Services/Issuing/Cards/CardShippingCustomsOptions.cs b/src/Stripe.net/Services/Issuing/Cards/CardShippingCustomsOptions.cs index 77fcb278ae..2ca36a6c94 100644 --- a/src/Stripe.net/Services/Issuing/Cards/CardShippingCustomsOptions.cs +++ b/src/Stripe.net/Services/Issuing/Cards/CardShippingCustomsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CardShippingCustomsOptions : INestedOptions { @@ -10,6 +13,9 @@ public class CardShippingCustomsOptions : INestedOptions /// Required for bulk shipments to Europe. /// [JsonProperty("eori_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("eori_number")] +#endif public string EoriNumber { get; set; } } } diff --git a/src/Stripe.net/Services/Issuing/Cards/CardShippingOptions.cs b/src/Stripe.net/Services/Issuing/Cards/CardShippingOptions.cs index 0daf3cf6ff..e06f4fa8a8 100644 --- a/src/Stripe.net/Services/Issuing/Cards/CardShippingOptions.cs +++ b/src/Stripe.net/Services/Issuing/Cards/CardShippingOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CardShippingOptions : INestedOptions { @@ -9,36 +12,54 @@ public class CardShippingOptions : INestedOptions /// The address that the card is shipped to. /// [JsonProperty("address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address")] +#endif public AddressOptions Address { get; set; } /// /// Address validation settings. /// [JsonProperty("address_validation")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_validation")] +#endif public CardShippingAddressValidationOptions AddressValidation { get; set; } /// /// Customs information for the shipment. /// [JsonProperty("customs")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customs")] +#endif public CardShippingCustomsOptions Customs { get; set; } /// /// The name printed on the shipping label when shipping the card. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } /// /// Phone number of the recipient of the shipment. /// [JsonProperty("phone_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("phone_number")] +#endif public string PhoneNumber { get; set; } /// /// Whether a signature is required for card delivery. /// [JsonProperty("require_signature")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("require_signature")] +#endif public bool? RequireSignature { get; set; } /// @@ -46,6 +67,9 @@ public class CardShippingOptions : INestedOptions /// One of: express, priority, or standard. /// [JsonProperty("service")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("service")] +#endif public string Service { get; set; } /// @@ -53,6 +77,9 @@ public class CardShippingOptions : INestedOptions /// One of: bulk, or individual. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Issuing/Cards/CardSpendingControlsOptions.cs b/src/Stripe.net/Services/Issuing/Cards/CardSpendingControlsOptions.cs index 8a4bef454c..16b1e13a88 100644 --- a/src/Stripe.net/Services/Issuing/Cards/CardSpendingControlsOptions.cs +++ b/src/Stripe.net/Services/Issuing/Cards/CardSpendingControlsOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.Issuing { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CardSpendingControlsOptions : INestedOptions { @@ -158,6 +161,9 @@ public class CardSpendingControlsOptions : INestedOptions /// wrecking_and_salvage_yards. /// [JsonProperty("allowed_categories")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("allowed_categories")] +#endif public List AllowedCategories { get; set; } /// @@ -167,6 +173,9 @@ public class CardSpendingControlsOptions : INestedOptions /// blocked_merchant_countries. Provide an empty value to unset this control. /// [JsonProperty("allowed_merchant_countries")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("allowed_merchant_countries")] +#endif public List AllowedMerchantCountries { get; set; } /// @@ -321,6 +330,9 @@ public class CardSpendingControlsOptions : INestedOptions /// wrecking_and_salvage_yards. /// [JsonProperty("blocked_categories")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("blocked_categories")] +#endif public List BlockedCategories { get; set; } /// @@ -330,6 +342,9 @@ public class CardSpendingControlsOptions : INestedOptions /// this control. /// [JsonProperty("blocked_merchant_countries")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("blocked_merchant_countries")] +#endif public List BlockedMerchantCountries { get; set; } /// @@ -338,6 +353,9 @@ public class CardSpendingControlsOptions : INestedOptions /// card, up the chain). /// [JsonProperty("spending_limits")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("spending_limits")] +#endif public List SpendingLimits { get; set; } } } diff --git a/src/Stripe.net/Services/Issuing/Cards/CardSpendingControlsSpendingLimitOptions.cs b/src/Stripe.net/Services/Issuing/Cards/CardSpendingControlsSpendingLimitOptions.cs index c0664fe7c9..be19eb293a 100644 --- a/src/Stripe.net/Services/Issuing/Cards/CardSpendingControlsSpendingLimitOptions.cs +++ b/src/Stripe.net/Services/Issuing/Cards/CardSpendingControlsSpendingLimitOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.Issuing { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CardSpendingControlsSpendingLimitOptions : INestedOptions { @@ -10,6 +13,9 @@ public class CardSpendingControlsSpendingLimitOptions : INestedOptions /// Maximum amount allowed to spend per interval. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long? Amount { get; set; } /// @@ -163,6 +169,9 @@ public class CardSpendingControlsSpendingLimitOptions : INestedOptions /// wrecking_and_salvage_yards. /// [JsonProperty("categories")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("categories")] +#endif public List Categories { get; set; } /// @@ -171,6 +180,9 @@ public class CardSpendingControlsSpendingLimitOptions : INestedOptions /// weekly, or yearly. /// [JsonProperty("interval")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interval")] +#endif public string Interval { get; set; } } } diff --git a/src/Stripe.net/Services/Issuing/Cards/CardUpdateOptions.cs b/src/Stripe.net/Services/Issuing/Cards/CardUpdateOptions.cs index bde72309a5..a1ff6de337 100644 --- a/src/Stripe.net/Services/Issuing/Cards/CardUpdateOptions.cs +++ b/src/Stripe.net/Services/Issuing/Cards/CardUpdateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.Issuing { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CardUpdateOptions : BaseOptions, IHasMetadata { @@ -11,6 +14,9 @@ public class CardUpdateOptions : BaseOptions, IHasMetadata /// One of: lost, or stolen. /// [JsonProperty("cancellation_reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cancellation_reason")] +#endif public string CancellationReason { get; set; } /// @@ -20,21 +26,33 @@ public class CardUpdateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } [JsonProperty("personalization_design")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("personalization_design")] +#endif public string PersonalizationDesign { get; set; } /// /// The desired new PIN for this card. /// [JsonProperty("pin")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("pin")] +#endif public CardPinOptions Pin { get; set; } /// /// Updated shipping information for the card. /// [JsonProperty("shipping")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping")] +#endif public CardShippingOptions Shipping { get; set; } /// @@ -43,6 +61,9 @@ public class CardUpdateOptions : BaseOptions, IHasMetadata /// more details. /// [JsonProperty("spending_controls")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("spending_controls")] +#endif public CardSpendingControlsOptions SpendingControls { get; set; } /// @@ -53,6 +74,9 @@ public class CardUpdateOptions : BaseOptions, IHasMetadata /// One of: active, canceled, or inactive. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } } } diff --git a/src/Stripe.net/Services/Issuing/Disputes/DisputeCreateOptions.cs b/src/Stripe.net/Services/Issuing/Disputes/DisputeCreateOptions.cs index 4c6eb76ce3..692c079dc7 100644 --- a/src/Stripe.net/Services/Issuing/Disputes/DisputeCreateOptions.cs +++ b/src/Stripe.net/Services/Issuing/Disputes/DisputeCreateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.Issuing { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class DisputeCreateOptions : BaseOptions, IHasMetadata { @@ -12,12 +15,18 @@ public class DisputeCreateOptions : BaseOptions, IHasMetadata /// not set, defaults to the full transaction amount. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long? Amount { get; set; } /// /// Evidence provided for the dispute. /// [JsonProperty("evidence")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("evidence")] +#endif public DisputeEvidenceOptions Evidence { get; set; } /// @@ -27,6 +36,9 @@ public class DisputeCreateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -34,12 +46,18 @@ public class DisputeCreateOptions : BaseOptions, IHasMetadata /// FinancialAccounts, use treasury.received_debit. /// [JsonProperty("transaction")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transaction")] +#endif public string Transaction { get; set; } /// /// Params for disputes related to Treasury FinancialAccounts. /// [JsonProperty("treasury")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("treasury")] +#endif public DisputeTreasuryOptions Treasury { get; set; } } } diff --git a/src/Stripe.net/Services/Issuing/Disputes/DisputeEvidenceCanceledOptions.cs b/src/Stripe.net/Services/Issuing/Disputes/DisputeEvidenceCanceledOptions.cs index 65d5f5db39..8d6975f8cf 100644 --- a/src/Stripe.net/Services/Issuing/Disputes/DisputeEvidenceCanceledOptions.cs +++ b/src/Stripe.net/Services/Issuing/Disputes/DisputeEvidenceCanceledOptions.cs @@ -4,6 +4,9 @@ namespace Stripe.Issuing using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class DisputeEvidenceCanceledOptions : INestedOptions { @@ -12,6 +15,9 @@ public class DisputeEvidenceCanceledOptions : INestedOptions /// Additional documentation supporting the dispute. /// [JsonProperty("additional_documentation")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("additional_documentation")] +#endif public string AdditionalDocumentation { get; set; } /// @@ -19,18 +25,28 @@ public class DisputeEvidenceCanceledOptions : INestedOptions /// [JsonProperty("canceled_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("canceled_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? CanceledAt { get; set; } /// /// Whether the cardholder was provided with a cancellation policy. /// [JsonProperty("cancellation_policy_provided")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cancellation_policy_provided")] +#endif public bool? CancellationPolicyProvided { get; set; } /// /// Reason for canceling the order. /// [JsonProperty("cancellation_reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cancellation_reason")] +#endif public string CancellationReason { get; set; } /// @@ -38,18 +54,28 @@ public class DisputeEvidenceCanceledOptions : INestedOptions /// [JsonProperty("expected_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("expected_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? ExpectedAt { get; set; } /// /// Explanation of why the cardholder is disputing this transaction. /// [JsonProperty("explanation")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("explanation")] +#endif public string Explanation { get; set; } /// /// Description of the merchandise or service that was purchased. /// [JsonProperty("product_description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("product_description")] +#endif public string ProductDescription { get; set; } /// @@ -57,6 +83,9 @@ public class DisputeEvidenceCanceledOptions : INestedOptions /// One of: merchandise, or service. /// [JsonProperty("product_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("product_type")] +#endif public string ProductType { get; set; } /// @@ -64,6 +93,9 @@ public class DisputeEvidenceCanceledOptions : INestedOptions /// One of: merchant_rejected, or successful. /// [JsonProperty("return_status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("return_status")] +#endif public string ReturnStatus { get; set; } /// @@ -71,6 +103,10 @@ public class DisputeEvidenceCanceledOptions : INestedOptions /// [JsonProperty("returned_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("returned_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? ReturnedAt { get; set; } } } diff --git a/src/Stripe.net/Services/Issuing/Disputes/DisputeEvidenceDuplicateOptions.cs b/src/Stripe.net/Services/Issuing/Disputes/DisputeEvidenceDuplicateOptions.cs index 29aebf3ba7..42ed298bf9 100644 --- a/src/Stripe.net/Services/Issuing/Disputes/DisputeEvidenceDuplicateOptions.cs +++ b/src/Stripe.net/Services/Issuing/Disputes/DisputeEvidenceDuplicateOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class DisputeEvidenceDuplicateOptions : INestedOptions { @@ -10,6 +13,9 @@ public class DisputeEvidenceDuplicateOptions : INestedOptions /// Additional documentation supporting the dispute. /// [JsonProperty("additional_documentation")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("additional_documentation")] +#endif public string AdditionalDocumentation { get; set; } /// @@ -17,6 +23,9 @@ public class DisputeEvidenceDuplicateOptions : INestedOptions /// the card statement showing that the product had already been paid for. /// [JsonProperty("card_statement")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card_statement")] +#endif public string CardStatement { get; set; } /// @@ -24,6 +33,9 @@ public class DisputeEvidenceDuplicateOptions : INestedOptions /// the receipt showing that the product had been paid for in cash. /// [JsonProperty("cash_receipt")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cash_receipt")] +#endif public string CashReceipt { get; set; } /// @@ -31,12 +43,18 @@ public class DisputeEvidenceDuplicateOptions : INestedOptions /// the front and back of the check that was used to pay for the product. /// [JsonProperty("check_image")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("check_image")] +#endif public string CheckImage { get; set; } /// /// Explanation of why the cardholder is disputing this transaction. /// [JsonProperty("explanation")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("explanation")] +#endif public string Explanation { get; set; } /// @@ -44,6 +62,9 @@ public class DisputeEvidenceDuplicateOptions : INestedOptions /// or more transactions that are copies of each other, this is original undisputed one. /// [JsonProperty("original_transaction")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("original_transaction")] +#endif public string OriginalTransaction { get; set; } } } diff --git a/src/Stripe.net/Services/Issuing/Disputes/DisputeEvidenceFraudulentOptions.cs b/src/Stripe.net/Services/Issuing/Disputes/DisputeEvidenceFraudulentOptions.cs index aa6ead1c85..408102b813 100644 --- a/src/Stripe.net/Services/Issuing/Disputes/DisputeEvidenceFraudulentOptions.cs +++ b/src/Stripe.net/Services/Issuing/Disputes/DisputeEvidenceFraudulentOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class DisputeEvidenceFraudulentOptions : INestedOptions { @@ -10,12 +13,18 @@ public class DisputeEvidenceFraudulentOptions : INestedOptions /// Additional documentation supporting the dispute. /// [JsonProperty("additional_documentation")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("additional_documentation")] +#endif public string AdditionalDocumentation { get; set; } /// /// Explanation of why the cardholder is disputing this transaction. /// [JsonProperty("explanation")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("explanation")] +#endif public string Explanation { get; set; } } } diff --git a/src/Stripe.net/Services/Issuing/Disputes/DisputeEvidenceMerchandiseNotAsDescribedOptions.cs b/src/Stripe.net/Services/Issuing/Disputes/DisputeEvidenceMerchandiseNotAsDescribedOptions.cs index 89c5619514..cc337c576a 100644 --- a/src/Stripe.net/Services/Issuing/Disputes/DisputeEvidenceMerchandiseNotAsDescribedOptions.cs +++ b/src/Stripe.net/Services/Issuing/Disputes/DisputeEvidenceMerchandiseNotAsDescribedOptions.cs @@ -4,6 +4,9 @@ namespace Stripe.Issuing using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class DisputeEvidenceMerchandiseNotAsDescribedOptions : INestedOptions { @@ -12,12 +15,18 @@ public class DisputeEvidenceMerchandiseNotAsDescribedOptions : INestedOptions /// Additional documentation supporting the dispute. /// [JsonProperty("additional_documentation")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("additional_documentation")] +#endif public string AdditionalDocumentation { get; set; } /// /// Explanation of why the cardholder is disputing this transaction. /// [JsonProperty("explanation")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("explanation")] +#endif public string Explanation { get; set; } /// @@ -25,12 +34,19 @@ public class DisputeEvidenceMerchandiseNotAsDescribedOptions : INestedOptions /// [JsonProperty("received_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("received_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? ReceivedAt { get; set; } /// /// Description of the cardholder's attempt to return the product. /// [JsonProperty("return_description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("return_description")] +#endif public string ReturnDescription { get; set; } /// @@ -38,6 +54,9 @@ public class DisputeEvidenceMerchandiseNotAsDescribedOptions : INestedOptions /// One of: merchant_rejected, or successful. /// [JsonProperty("return_status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("return_status")] +#endif public string ReturnStatus { get; set; } /// @@ -45,6 +64,10 @@ public class DisputeEvidenceMerchandiseNotAsDescribedOptions : INestedOptions /// [JsonProperty("returned_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("returned_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? ReturnedAt { get; set; } } } diff --git a/src/Stripe.net/Services/Issuing/Disputes/DisputeEvidenceNoValidAuthorizationOptions.cs b/src/Stripe.net/Services/Issuing/Disputes/DisputeEvidenceNoValidAuthorizationOptions.cs index 1eed1af727..6b5c032e1a 100644 --- a/src/Stripe.net/Services/Issuing/Disputes/DisputeEvidenceNoValidAuthorizationOptions.cs +++ b/src/Stripe.net/Services/Issuing/Disputes/DisputeEvidenceNoValidAuthorizationOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class DisputeEvidenceNoValidAuthorizationOptions : INestedOptions { @@ -10,12 +13,18 @@ public class DisputeEvidenceNoValidAuthorizationOptions : INestedOptions /// Additional documentation supporting the dispute. /// [JsonProperty("additional_documentation")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("additional_documentation")] +#endif public string AdditionalDocumentation { get; set; } /// /// Explanation of why the cardholder is disputing this transaction. /// [JsonProperty("explanation")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("explanation")] +#endif public string Explanation { get; set; } } } diff --git a/src/Stripe.net/Services/Issuing/Disputes/DisputeEvidenceNotReceivedOptions.cs b/src/Stripe.net/Services/Issuing/Disputes/DisputeEvidenceNotReceivedOptions.cs index a84239bc23..368bc884cb 100644 --- a/src/Stripe.net/Services/Issuing/Disputes/DisputeEvidenceNotReceivedOptions.cs +++ b/src/Stripe.net/Services/Issuing/Disputes/DisputeEvidenceNotReceivedOptions.cs @@ -4,6 +4,9 @@ namespace Stripe.Issuing using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class DisputeEvidenceNotReceivedOptions : INestedOptions { @@ -12,6 +15,9 @@ public class DisputeEvidenceNotReceivedOptions : INestedOptions /// Additional documentation supporting the dispute. /// [JsonProperty("additional_documentation")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("additional_documentation")] +#endif public string AdditionalDocumentation { get; set; } /// @@ -19,18 +25,28 @@ public class DisputeEvidenceNotReceivedOptions : INestedOptions /// [JsonProperty("expected_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("expected_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? ExpectedAt { get; set; } /// /// Explanation of why the cardholder is disputing this transaction. /// [JsonProperty("explanation")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("explanation")] +#endif public string Explanation { get; set; } /// /// Description of the merchandise or service that was purchased. /// [JsonProperty("product_description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("product_description")] +#endif public string ProductDescription { get; set; } /// @@ -38,6 +54,9 @@ public class DisputeEvidenceNotReceivedOptions : INestedOptions /// One of: merchandise, or service. /// [JsonProperty("product_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("product_type")] +#endif public string ProductType { get; set; } } } diff --git a/src/Stripe.net/Services/Issuing/Disputes/DisputeEvidenceOptions.cs b/src/Stripe.net/Services/Issuing/Disputes/DisputeEvidenceOptions.cs index 0f37e4faf4..83d190ad29 100644 --- a/src/Stripe.net/Services/Issuing/Disputes/DisputeEvidenceOptions.cs +++ b/src/Stripe.net/Services/Issuing/Disputes/DisputeEvidenceOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class DisputeEvidenceOptions : INestedOptions { @@ -9,42 +12,63 @@ public class DisputeEvidenceOptions : INestedOptions /// Evidence provided when reason is 'canceled'. /// [JsonProperty("canceled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("canceled")] +#endif public DisputeEvidenceCanceledOptions Canceled { get; set; } /// /// Evidence provided when reason is 'duplicate'. /// [JsonProperty("duplicate")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("duplicate")] +#endif public DisputeEvidenceDuplicateOptions Duplicate { get; set; } /// /// Evidence provided when reason is 'fraudulent'. /// [JsonProperty("fraudulent")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fraudulent")] +#endif public DisputeEvidenceFraudulentOptions Fraudulent { get; set; } /// /// Evidence provided when reason is 'merchandise_not_as_described'. /// [JsonProperty("merchandise_not_as_described")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("merchandise_not_as_described")] +#endif public DisputeEvidenceMerchandiseNotAsDescribedOptions MerchandiseNotAsDescribed { get; set; } /// /// Evidence provided when reason is 'no_valid_authorization'. /// [JsonProperty("no_valid_authorization")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("no_valid_authorization")] +#endif public DisputeEvidenceNoValidAuthorizationOptions NoValidAuthorization { get; set; } /// /// Evidence provided when reason is 'not_received'. /// [JsonProperty("not_received")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("not_received")] +#endif public DisputeEvidenceNotReceivedOptions NotReceived { get; set; } /// /// Evidence provided when reason is 'other'. /// [JsonProperty("other")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("other")] +#endif public DisputeEvidenceOtherOptions Other { get; set; } /// @@ -55,12 +79,18 @@ public class DisputeEvidenceOptions : INestedOptions /// other, or service_not_as_described. /// [JsonProperty("reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reason")] +#endif public string Reason { get; set; } /// /// Evidence provided when reason is 'service_not_as_described'. /// [JsonProperty("service_not_as_described")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("service_not_as_described")] +#endif public DisputeEvidenceServiceNotAsDescribedOptions ServiceNotAsDescribed { get; set; } } } diff --git a/src/Stripe.net/Services/Issuing/Disputes/DisputeEvidenceOtherOptions.cs b/src/Stripe.net/Services/Issuing/Disputes/DisputeEvidenceOtherOptions.cs index 3e13f7810e..14fee1f00d 100644 --- a/src/Stripe.net/Services/Issuing/Disputes/DisputeEvidenceOtherOptions.cs +++ b/src/Stripe.net/Services/Issuing/Disputes/DisputeEvidenceOtherOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class DisputeEvidenceOtherOptions : INestedOptions { @@ -10,18 +13,27 @@ public class DisputeEvidenceOtherOptions : INestedOptions /// Additional documentation supporting the dispute. /// [JsonProperty("additional_documentation")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("additional_documentation")] +#endif public string AdditionalDocumentation { get; set; } /// /// Explanation of why the cardholder is disputing this transaction. /// [JsonProperty("explanation")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("explanation")] +#endif public string Explanation { get; set; } /// /// Description of the merchandise or service that was purchased. /// [JsonProperty("product_description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("product_description")] +#endif public string ProductDescription { get; set; } /// @@ -29,6 +41,9 @@ public class DisputeEvidenceOtherOptions : INestedOptions /// One of: merchandise, or service. /// [JsonProperty("product_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("product_type")] +#endif public string ProductType { get; set; } } } diff --git a/src/Stripe.net/Services/Issuing/Disputes/DisputeEvidenceServiceNotAsDescribedOptions.cs b/src/Stripe.net/Services/Issuing/Disputes/DisputeEvidenceServiceNotAsDescribedOptions.cs index da96aa68ad..65fc63603d 100644 --- a/src/Stripe.net/Services/Issuing/Disputes/DisputeEvidenceServiceNotAsDescribedOptions.cs +++ b/src/Stripe.net/Services/Issuing/Disputes/DisputeEvidenceServiceNotAsDescribedOptions.cs @@ -4,6 +4,9 @@ namespace Stripe.Issuing using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class DisputeEvidenceServiceNotAsDescribedOptions : INestedOptions { @@ -12,6 +15,9 @@ public class DisputeEvidenceServiceNotAsDescribedOptions : INestedOptions /// Additional documentation supporting the dispute. /// [JsonProperty("additional_documentation")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("additional_documentation")] +#endif public string AdditionalDocumentation { get; set; } /// @@ -19,18 +25,28 @@ public class DisputeEvidenceServiceNotAsDescribedOptions : INestedOptions /// [JsonProperty("canceled_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("canceled_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? CanceledAt { get; set; } /// /// Reason for canceling the order. /// [JsonProperty("cancellation_reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cancellation_reason")] +#endif public string CancellationReason { get; set; } /// /// Explanation of why the cardholder is disputing this transaction. /// [JsonProperty("explanation")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("explanation")] +#endif public string Explanation { get; set; } /// @@ -38,6 +54,10 @@ public class DisputeEvidenceServiceNotAsDescribedOptions : INestedOptions /// [JsonProperty("received_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("received_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? ReceivedAt { get; set; } } } diff --git a/src/Stripe.net/Services/Issuing/Disputes/DisputeListOptions.cs b/src/Stripe.net/Services/Issuing/Disputes/DisputeListOptions.cs index 77acd37bc3..49fa34e0eb 100644 --- a/src/Stripe.net/Services/Issuing/Disputes/DisputeListOptions.cs +++ b/src/Stripe.net/Services/Issuing/Disputes/DisputeListOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class DisputeListOptions : ListOptionsWithCreated { @@ -11,12 +14,18 @@ public class DisputeListOptions : ListOptionsWithCreated /// won. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } /// /// Select the Issuing dispute for the given transaction. /// [JsonProperty("transaction")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transaction")] +#endif public string Transaction { get; set; } } } diff --git a/src/Stripe.net/Services/Issuing/Disputes/DisputeSubmitOptions.cs b/src/Stripe.net/Services/Issuing/Disputes/DisputeSubmitOptions.cs index efa8bec608..466cba6b2c 100644 --- a/src/Stripe.net/Services/Issuing/Disputes/DisputeSubmitOptions.cs +++ b/src/Stripe.net/Services/Issuing/Disputes/DisputeSubmitOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.Issuing { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class DisputeSubmitOptions : BaseOptions, IHasMetadata { @@ -13,6 +16,9 @@ public class DisputeSubmitOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } } } diff --git a/src/Stripe.net/Services/Issuing/Disputes/DisputeTreasuryOptions.cs b/src/Stripe.net/Services/Issuing/Disputes/DisputeTreasuryOptions.cs index 001c247d75..30c4e3302e 100644 --- a/src/Stripe.net/Services/Issuing/Disputes/DisputeTreasuryOptions.cs +++ b/src/Stripe.net/Services/Issuing/Disputes/DisputeTreasuryOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class DisputeTreasuryOptions : INestedOptions { @@ -9,6 +12,9 @@ public class DisputeTreasuryOptions : INestedOptions /// The ID of the ReceivedDebit to initiate an Issuings dispute for. /// [JsonProperty("received_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("received_debit")] +#endif public string ReceivedDebit { get; set; } } } diff --git a/src/Stripe.net/Services/Issuing/Disputes/DisputeUpdateOptions.cs b/src/Stripe.net/Services/Issuing/Disputes/DisputeUpdateOptions.cs index 743a85ab44..07216afa8b 100644 --- a/src/Stripe.net/Services/Issuing/Disputes/DisputeUpdateOptions.cs +++ b/src/Stripe.net/Services/Issuing/Disputes/DisputeUpdateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.Issuing { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class DisputeUpdateOptions : BaseOptions, IHasMetadata { @@ -11,12 +14,18 @@ public class DisputeUpdateOptions : BaseOptions, IHasMetadata /// href="https://stripe.com/docs/currencies#zero-decimal">smallest currency unit. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long? Amount { get; set; } /// /// Evidence provided for the dispute. /// [JsonProperty("evidence")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("evidence")] +#endif public DisputeEvidenceOptions Evidence { get; set; } /// @@ -26,6 +35,9 @@ public class DisputeUpdateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } } } diff --git a/src/Stripe.net/Services/Issuing/PersonalizationDesigns/PersonalizationDesignCarrierTextOptions.cs b/src/Stripe.net/Services/Issuing/PersonalizationDesigns/PersonalizationDesignCarrierTextOptions.cs index 9809b8f688..07730a44af 100644 --- a/src/Stripe.net/Services/Issuing/PersonalizationDesigns/PersonalizationDesignCarrierTextOptions.cs +++ b/src/Stripe.net/Services/Issuing/PersonalizationDesigns/PersonalizationDesignCarrierTextOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PersonalizationDesignCarrierTextOptions : INestedOptions { @@ -9,24 +12,36 @@ public class PersonalizationDesignCarrierTextOptions : INestedOptions /// The footer body text of the carrier letter. /// [JsonProperty("footer_body")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("footer_body")] +#endif public string FooterBody { get; set; } /// /// The footer title text of the carrier letter. /// [JsonProperty("footer_title")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("footer_title")] +#endif public string FooterTitle { get; set; } /// /// The header body text of the carrier letter. /// [JsonProperty("header_body")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("header_body")] +#endif public string HeaderBody { get; set; } /// /// The header title text of the carrier letter. /// [JsonProperty("header_title")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("header_title")] +#endif public string HeaderTitle { get; set; } } } diff --git a/src/Stripe.net/Services/Issuing/PersonalizationDesigns/PersonalizationDesignCreateOptions.cs b/src/Stripe.net/Services/Issuing/PersonalizationDesigns/PersonalizationDesignCreateOptions.cs index 41f14a8b1b..7686e01a91 100644 --- a/src/Stripe.net/Services/Issuing/PersonalizationDesigns/PersonalizationDesignCreateOptions.cs +++ b/src/Stripe.net/Services/Issuing/PersonalizationDesigns/PersonalizationDesignCreateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.Issuing { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PersonalizationDesignCreateOptions : BaseOptions, IHasMetadata { @@ -11,12 +14,18 @@ public class PersonalizationDesignCreateOptions : BaseOptions, IHasMetadata /// have a purpose value of issuing_logo. /// [JsonProperty("card_logo")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card_logo")] +#endif public string CardLogo { get; set; } /// /// Hash containing carrier text, for use with physical bundles that support carrier text. /// [JsonProperty("carrier_text")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("carrier_text")] +#endif public PersonalizationDesignCarrierTextOptions CarrierText { get; set; } /// @@ -24,6 +33,9 @@ public class PersonalizationDesignCreateOptions : BaseOptions, IHasMetadata /// This may be up to 200 characters. /// [JsonProperty("lookup_key")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("lookup_key")] +#endif public string LookupKey { get; set; } /// @@ -33,18 +45,27 @@ public class PersonalizationDesignCreateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// Friendly display name. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } /// /// The physical bundle object belonging to this personalization design. /// [JsonProperty("physical_bundle")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("physical_bundle")] +#endif public string PhysicalBundle { get; set; } /// @@ -52,6 +73,9 @@ public class PersonalizationDesignCreateOptions : BaseOptions, IHasMetadata /// not specified. /// [JsonProperty("preferences")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preferences")] +#endif public PersonalizationDesignPreferencesOptions Preferences { get; set; } /// @@ -59,6 +83,9 @@ public class PersonalizationDesignCreateOptions : BaseOptions, IHasMetadata /// design, and assign it to this personalization design. /// [JsonProperty("transfer_lookup_key")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transfer_lookup_key")] +#endif public bool? TransferLookupKey { get; set; } } } diff --git a/src/Stripe.net/Services/Issuing/PersonalizationDesigns/PersonalizationDesignListOptions.cs b/src/Stripe.net/Services/Issuing/PersonalizationDesigns/PersonalizationDesignListOptions.cs index d7440d43e4..e89167086d 100644 --- a/src/Stripe.net/Services/Issuing/PersonalizationDesigns/PersonalizationDesignListOptions.cs +++ b/src/Stripe.net/Services/Issuing/PersonalizationDesigns/PersonalizationDesignListOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.Issuing { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PersonalizationDesignListOptions : ListOptions { @@ -10,12 +13,18 @@ public class PersonalizationDesignListOptions : ListOptions /// Only return personalization designs with the given lookup keys. /// [JsonProperty("lookup_keys")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("lookup_keys")] +#endif public List LookupKeys { get; set; } /// /// Only return personalization designs with the given preferences. /// [JsonProperty("preferences")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preferences")] +#endif public PersonalizationDesignPreferencesOptions Preferences { get; set; } /// @@ -23,6 +32,9 @@ public class PersonalizationDesignListOptions : ListOptions /// One of: active, inactive, rejected, or review. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } } } diff --git a/src/Stripe.net/Services/Issuing/PersonalizationDesigns/PersonalizationDesignPreferencesOptions.cs b/src/Stripe.net/Services/Issuing/PersonalizationDesigns/PersonalizationDesignPreferencesOptions.cs index 6ce44ace6f..1b32f70121 100644 --- a/src/Stripe.net/Services/Issuing/PersonalizationDesigns/PersonalizationDesignPreferencesOptions.cs +++ b/src/Stripe.net/Services/Issuing/PersonalizationDesigns/PersonalizationDesignPreferencesOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PersonalizationDesignPreferencesOptions : INestedOptions { @@ -11,6 +14,9 @@ public class PersonalizationDesignPreferencesOptions : INestedOptions /// design is set as the default design. /// [JsonProperty("is_default")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("is_default")] +#endif public bool? IsDefault { get; set; } /// @@ -18,6 +24,9 @@ public class PersonalizationDesignPreferencesOptions : INestedOptions /// This parameter is only applicable to connected accounts. /// [JsonProperty("is_platform_default")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("is_platform_default")] +#endif public bool? IsPlatformDefault { get; set; } } } diff --git a/src/Stripe.net/Services/Issuing/PersonalizationDesigns/PersonalizationDesignUpdateOptions.cs b/src/Stripe.net/Services/Issuing/PersonalizationDesigns/PersonalizationDesignUpdateOptions.cs index ab50b04adb..ca5de498f7 100644 --- a/src/Stripe.net/Services/Issuing/PersonalizationDesigns/PersonalizationDesignUpdateOptions.cs +++ b/src/Stripe.net/Services/Issuing/PersonalizationDesigns/PersonalizationDesignUpdateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.Issuing { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PersonalizationDesignUpdateOptions : BaseOptions, IHasMetadata { @@ -11,12 +14,18 @@ public class PersonalizationDesignUpdateOptions : BaseOptions, IHasMetadata /// have a purpose value of issuing_logo. /// [JsonProperty("card_logo")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card_logo")] +#endif public string CardLogo { get; set; } /// /// Hash containing carrier text, for use with physical bundles that support carrier text. /// [JsonProperty("carrier_text")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("carrier_text")] +#endif public PersonalizationDesignCarrierTextOptions CarrierText { get; set; } /// @@ -24,6 +33,9 @@ public class PersonalizationDesignUpdateOptions : BaseOptions, IHasMetadata /// This may be up to 200 characters. /// [JsonProperty("lookup_key")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("lookup_key")] +#endif public string LookupKey { get; set; } /// @@ -33,18 +45,27 @@ public class PersonalizationDesignUpdateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// Friendly display name. Providing an empty string will set the field to null. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } /// /// The physical bundle object belonging to this personalization design. /// [JsonProperty("physical_bundle")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("physical_bundle")] +#endif public string PhysicalBundle { get; set; } /// @@ -52,6 +73,9 @@ public class PersonalizationDesignUpdateOptions : BaseOptions, IHasMetadata /// not specified. /// [JsonProperty("preferences")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preferences")] +#endif public PersonalizationDesignPreferencesOptions Preferences { get; set; } /// @@ -59,6 +83,9 @@ public class PersonalizationDesignUpdateOptions : BaseOptions, IHasMetadata /// design, and assign it to this personalization design. /// [JsonProperty("transfer_lookup_key")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transfer_lookup_key")] +#endif public bool? TransferLookupKey { get; set; } } } diff --git a/src/Stripe.net/Services/Issuing/PhysicalBundles/PhysicalBundleListOptions.cs b/src/Stripe.net/Services/Issuing/PhysicalBundles/PhysicalBundleListOptions.cs index 4900269ad2..8e560ea329 100644 --- a/src/Stripe.net/Services/Issuing/PhysicalBundles/PhysicalBundleListOptions.cs +++ b/src/Stripe.net/Services/Issuing/PhysicalBundles/PhysicalBundleListOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PhysicalBundleListOptions : ListOptions { @@ -10,6 +13,9 @@ public class PhysicalBundleListOptions : ListOptions /// One of: active, inactive, or review. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } /// @@ -17,6 +23,9 @@ public class PhysicalBundleListOptions : ListOptions /// One of: custom, or standard. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Issuing/Tokens/TokenListOptions.cs b/src/Stripe.net/Services/Issuing/Tokens/TokenListOptions.cs index 8435a22e22..a2d01c1a7a 100644 --- a/src/Stripe.net/Services/Issuing/Tokens/TokenListOptions.cs +++ b/src/Stripe.net/Services/Issuing/Tokens/TokenListOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TokenListOptions : ListOptionsWithCreated { @@ -9,6 +12,9 @@ public class TokenListOptions : ListOptionsWithCreated /// The Issuing card identifier to list tokens for. /// [JsonProperty("card")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card")] +#endif public string Card { get; set; } /// @@ -16,6 +22,9 @@ public class TokenListOptions : ListOptionsWithCreated /// One of: active, deleted, requested, or suspended. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } } } diff --git a/src/Stripe.net/Services/Issuing/Tokens/TokenUpdateOptions.cs b/src/Stripe.net/Services/Issuing/Tokens/TokenUpdateOptions.cs index fb92e9ca93..8be457c4ac 100644 --- a/src/Stripe.net/Services/Issuing/Tokens/TokenUpdateOptions.cs +++ b/src/Stripe.net/Services/Issuing/Tokens/TokenUpdateOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TokenUpdateOptions : BaseOptions { @@ -10,6 +13,9 @@ public class TokenUpdateOptions : BaseOptions /// One of: active, deleted, or suspended. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } } } diff --git a/src/Stripe.net/Services/Issuing/Transactions/TransactionListOptions.cs b/src/Stripe.net/Services/Issuing/Transactions/TransactionListOptions.cs index 5c26d76df0..3b037e0606 100644 --- a/src/Stripe.net/Services/Issuing/Transactions/TransactionListOptions.cs +++ b/src/Stripe.net/Services/Issuing/Transactions/TransactionListOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TransactionListOptions : ListOptionsWithCreated { @@ -9,12 +12,18 @@ public class TransactionListOptions : ListOptionsWithCreated /// Only return transactions that belong to the given card. /// [JsonProperty("card")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card")] +#endif public string Card { get; set; } /// /// Only return transactions that belong to the given cardholder. /// [JsonProperty("cardholder")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cardholder")] +#endif public string Cardholder { get; set; } /// @@ -23,6 +32,9 @@ public class TransactionListOptions : ListOptionsWithCreated /// One of: capture, or refund. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Issuing/Transactions/TransactionUpdateOptions.cs b/src/Stripe.net/Services/Issuing/Transactions/TransactionUpdateOptions.cs index 63fc850556..2d687c6943 100644 --- a/src/Stripe.net/Services/Issuing/Transactions/TransactionUpdateOptions.cs +++ b/src/Stripe.net/Services/Issuing/Transactions/TransactionUpdateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.Issuing { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TransactionUpdateOptions : BaseOptions, IHasMetadata { @@ -13,6 +16,9 @@ public class TransactionUpdateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentApplyCustomerBalanceOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentApplyCustomerBalanceOptions.cs index 39307b30a2..3e31f73d9d 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentApplyCustomerBalanceOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentApplyCustomerBalanceOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentApplyCustomerBalanceOptions : BaseOptions { @@ -19,6 +22,9 @@ public class PaymentIntentApplyCustomerBalanceOptions : BaseOptions /// PaymentIntent. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long? Amount { get; set; } /// @@ -27,6 +33,9 @@ public class PaymentIntentApplyCustomerBalanceOptions : BaseOptions /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentAutomaticPaymentMethodsOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentAutomaticPaymentMethodsOptions.cs index 6ae3061283..880c75f483 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentAutomaticPaymentMethodsOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentAutomaticPaymentMethodsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentAutomaticPaymentMethodsOptions : INestedOptions { @@ -16,12 +19,18 @@ public class PaymentIntentAutomaticPaymentMethodsOptions : INestedOptions /// One of: always, or never. /// [JsonProperty("allow_redirects")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("allow_redirects")] +#endif public string AllowRedirects { get; set; } /// /// Whether this feature is enabled. /// [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool? Enabled { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentCancelOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentCancelOptions.cs index acd7e8914a..47a35b80a2 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentCancelOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentCancelOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentCancelOptions : BaseOptions { @@ -12,6 +15,9 @@ public class PaymentIntentCancelOptions : BaseOptions /// requested_by_customer. /// [JsonProperty("cancellation_reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cancellation_reason")] +#endif public string CancellationReason { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentCaptureOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentCaptureOptions.cs index c8c4e3edcf..ff2bc026f3 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentCaptureOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentCaptureOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentCaptureOptions : BaseOptions, IHasMetadata { @@ -12,6 +15,9 @@ public class PaymentIntentCaptureOptions : BaseOptions, IHasMetadata /// amount_capturable if it's not provided. /// [JsonProperty("amount_to_capture")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_to_capture")] +#endif public long? AmountToCapture { get; set; } /// @@ -23,6 +29,9 @@ public class PaymentIntentCaptureOptions : BaseOptions, IHasMetadata /// accounts. /// [JsonProperty("application_fee_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("application_fee_amount")] +#endif public long? ApplicationFeeAmount { get; set; } /// @@ -33,6 +42,9 @@ public class PaymentIntentCaptureOptions : BaseOptions, IHasMetadata /// PaymentIntents. /// [JsonProperty("final_capture")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("final_capture")] +#endif public bool? FinalCapture { get; set; } /// @@ -42,6 +54,9 @@ public class PaymentIntentCaptureOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -56,6 +71,9 @@ public class PaymentIntentCaptureOptions : BaseOptions, IHasMetadata /// instead. /// [JsonProperty("statement_descriptor")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("statement_descriptor")] +#endif public string StatementDescriptor { get; set; } /// @@ -65,6 +83,9 @@ public class PaymentIntentCaptureOptions : BaseOptions, IHasMetadata /// customer's statement. /// [JsonProperty("statement_descriptor_suffix")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("statement_descriptor_suffix")] +#endif public string StatementDescriptorSuffix { get; set; } /// @@ -74,6 +95,9 @@ public class PaymentIntentCaptureOptions : BaseOptions, IHasMetadata /// accounts. /// [JsonProperty("transfer_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transfer_data")] +#endif public PaymentIntentTransferDataOptions TransferData { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentConfirmOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentConfirmOptions.cs index df1932d79a..a939a4f10f 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentConfirmOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentConfirmOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentConfirmOptions : BaseOptions { @@ -11,9 +14,15 @@ public class PaymentIntentConfirmOptions : BaseOptions /// One of: automatic, automatic_async, or manual. /// [JsonProperty("capture_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("capture_method")] +#endif public string CaptureMethod { get; set; } [JsonProperty("client_secret")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("client_secret")] +#endif public string ClientSecret { get; set; } /// @@ -24,6 +33,9 @@ public class PaymentIntentConfirmOptions : BaseOptions /// precedence. /// [JsonProperty("confirmation_token")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("confirmation_token")] +#endif public string ConfirmationToken { get; set; } /// @@ -34,15 +46,24 @@ public class PaymentIntentConfirmOptions : BaseOptions /// without authentication. /// [JsonProperty("error_on_requires_action")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("error_on_requires_action")] +#endif public bool? ErrorOnRequiresAction { get; set; } /// /// ID of the mandate that's used for this payment. /// [JsonProperty("mandate")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mandate")] +#endif public string Mandate { get; set; } [JsonProperty("mandate_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mandate_data")] +#endif public PaymentIntentMandateDataOptions MandateData { get; set; } /// @@ -53,6 +74,9 @@ public class PaymentIntentConfirmOptions : BaseOptions /// later. /// [JsonProperty("off_session")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("off_session")] +#endif public bool? OffSession { get; set; } /// @@ -61,6 +85,9 @@ public class PaymentIntentConfirmOptions : BaseOptions /// Source object) to attach to this PaymentIntent. /// [JsonProperty("payment_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method")] +#endif public string PaymentMethod { get; set; } /// @@ -70,12 +97,18 @@ public class PaymentIntentConfirmOptions : BaseOptions /// property on the PaymentIntent. /// [JsonProperty("payment_method_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_data")] +#endif public PaymentIntentPaymentMethodDataOptions PaymentMethodData { get; set; } /// /// Payment method-specific configuration for this PaymentIntent. /// [JsonProperty("payment_method_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_options")] +#endif public PaymentIntentPaymentMethodOptionsOptions PaymentMethodOptions { get; set; } /// @@ -84,6 +117,9 @@ public class PaymentIntentConfirmOptions : BaseOptions /// href="https://dashboard.stripe.com/settings/payment_methods">Stripe Dashboard. /// [JsonProperty("payment_method_types")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_types")] +#endif public List PaymentMethodTypes { get; set; } /// @@ -91,6 +127,9 @@ public class PaymentIntentConfirmOptions : BaseOptions /// href="https://stripe.com/docs/radar/radar-session">Radar Sessions. /// [JsonProperty("radar_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("radar_options")] +#endif public PaymentIntentRadarOptionsOptions RadarOptions { get; set; } /// @@ -100,6 +139,9 @@ public class PaymentIntentConfirmOptions : BaseOptions /// settings. /// [JsonProperty("receipt_email")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("receipt_email")] +#endif public string ReceiptEmail { get; set; } /// @@ -109,6 +151,9 @@ public class PaymentIntentConfirmOptions : BaseOptions /// only used for cards and other redirect-based payment methods. /// [JsonProperty("return_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("return_url")] +#endif public string ReturnUrl { get; set; } /// @@ -137,12 +182,18 @@ public class PaymentIntentConfirmOptions : BaseOptions /// One of: off_session, or on_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } /// /// Shipping information for this PaymentIntent. /// [JsonProperty("shipping")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping")] +#endif public ChargeShippingOptions Shipping { get; set; } /// @@ -150,6 +201,9 @@ public class PaymentIntentConfirmOptions : BaseOptions /// client-side SDKs to handle the next actions. /// [JsonProperty("use_stripe_sdk")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("use_stripe_sdk")] +#endif public bool? UseStripeSdk { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentCreateOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentCreateOptions.cs index 2aeb0dac7d..e72efb3c20 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentCreateOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentCreateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentCreateOptions : BaseOptions, IHasMetadata { @@ -17,6 +20,9 @@ public class PaymentIntentCreateOptions : BaseOptions, IHasMetadata /// 99999999 for a USD charge of $999,999.99). /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long? Amount { get; set; } /// @@ -28,6 +34,9 @@ public class PaymentIntentCreateOptions : BaseOptions, IHasMetadata /// accounts. /// [JsonProperty("application_fee_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("application_fee_amount")] +#endif public long? ApplicationFeeAmount { get; set; } /// @@ -36,6 +45,9 @@ public class PaymentIntentCreateOptions : BaseOptions, IHasMetadata /// parameters. /// [JsonProperty("automatic_payment_methods")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("automatic_payment_methods")] +#endif public PaymentIntentAutomaticPaymentMethodsOptions AutomaticPaymentMethods { get; set; } /// @@ -43,6 +55,9 @@ public class PaymentIntentCreateOptions : BaseOptions, IHasMetadata /// One of: automatic, automatic_async, or manual. /// [JsonProperty("capture_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("capture_method")] +#endif public string CaptureMethod { get; set; } /// @@ -54,6 +69,9 @@ public class PaymentIntentCreateOptions : BaseOptions, IHasMetadata /// API. /// [JsonProperty("confirm")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("confirm")] +#endif public bool? Confirm { get; set; } /// @@ -62,6 +80,9 @@ public class PaymentIntentCreateOptions : BaseOptions, IHasMetadata /// One of: automatic, or manual. /// [JsonProperty("confirmation_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("confirmation_method")] +#endif public string ConfirmationMethod { get; set; } /// @@ -72,6 +93,9 @@ public class PaymentIntentCreateOptions : BaseOptions, IHasMetadata /// precedence. /// [JsonProperty("confirmation_token")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("confirmation_token")] +#endif public string ConfirmationToken { get; set; } /// @@ -80,6 +104,9 @@ public class PaymentIntentCreateOptions : BaseOptions, IHasMetadata /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// @@ -97,12 +124,18 @@ public class PaymentIntentCreateOptions : BaseOptions, IHasMetadata /// payment method representing the card is created and attached to the Customer instead. /// [JsonProperty("customer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] +#endif public string Customer { get; set; } /// /// An arbitrary string attached to the object. Often useful for displaying to users. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// @@ -114,6 +147,9 @@ public class PaymentIntentCreateOptions : BaseOptions, IHasMetadata /// href="https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm">confirm=true. /// [JsonProperty("error_on_requires_action")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("error_on_requires_action")] +#endif public bool? ErrorOnRequiresAction { get; set; } /// @@ -121,6 +157,9 @@ public class PaymentIntentCreateOptions : BaseOptions, IHasMetadata /// href="https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm">confirm=true. /// [JsonProperty("mandate")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mandate")] +#endif public string Mandate { get; set; } /// @@ -129,6 +168,9 @@ public class PaymentIntentCreateOptions : BaseOptions, IHasMetadata /// href="https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm">confirm=true. /// [JsonProperty("mandate_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mandate_data")] +#endif public PaymentIntentMandateDataOptions MandateData { get; set; } /// @@ -138,6 +180,9 @@ public class PaymentIntentCreateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -149,6 +194,9 @@ public class PaymentIntentCreateOptions : BaseOptions, IHasMetadata /// href="https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm">confirm=true. /// [JsonProperty("off_session")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("off_session")] +#endif public bool? OffSession { get; set; } /// @@ -157,6 +205,9 @@ public class PaymentIntentCreateOptions : BaseOptions, IHasMetadata /// accounts. /// [JsonProperty("on_behalf_of")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("on_behalf_of")] +#endif public string OnBehalfOf { get; set; } /// @@ -170,6 +221,9 @@ public class PaymentIntentCreateOptions : BaseOptions, IHasMetadata /// recommend that you explicitly provide the payment_method moving forward. /// [JsonProperty("payment_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method")] +#endif public string PaymentMethod { get; set; } /// @@ -178,6 +232,9 @@ public class PaymentIntentCreateOptions : BaseOptions, IHasMetadata /// configuration to use with this PaymentIntent. /// [JsonProperty("payment_method_configuration")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_configuration")] +#endif public string PaymentMethodConfiguration { get; set; } /// @@ -187,12 +244,18 @@ public class PaymentIntentCreateOptions : BaseOptions, IHasMetadata /// property on the PaymentIntent. /// [JsonProperty("payment_method_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_data")] +#endif public PaymentIntentPaymentMethodDataOptions PaymentMethodData { get; set; } /// /// Payment method-specific configuration for this PaymentIntent. /// [JsonProperty("payment_method_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_options")] +#endif public PaymentIntentPaymentMethodOptionsOptions PaymentMethodOptions { get; set; } /// @@ -202,6 +265,9 @@ public class PaymentIntentCreateOptions : BaseOptions, IHasMetadata /// settings. /// [JsonProperty("payment_method_types")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_types")] +#endif public List PaymentMethodTypes { get; set; } /// @@ -209,6 +275,9 @@ public class PaymentIntentCreateOptions : BaseOptions, IHasMetadata /// href="https://stripe.com/docs/radar/radar-session">Radar Sessions. /// [JsonProperty("radar_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("radar_options")] +#endif public PaymentIntentRadarOptionsOptions RadarOptions { get; set; } /// @@ -217,6 +286,9 @@ public class PaymentIntentCreateOptions : BaseOptions, IHasMetadata /// href="https://dashboard.stripe.com/account/emails">email settings. /// [JsonProperty("receipt_email")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("receipt_email")] +#endif public string ReceiptEmail { get; set; } /// @@ -227,6 +299,9 @@ public class PaymentIntentCreateOptions : BaseOptions, IHasMetadata /// href="https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm">confirm=true. /// [JsonProperty("return_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("return_url")] +#endif public string ReturnUrl { get; set; } /// @@ -251,12 +326,18 @@ public class PaymentIntentCreateOptions : BaseOptions, IHasMetadata /// One of: off_session, or on_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } /// /// Shipping information for this PaymentIntent. /// [JsonProperty("shipping")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping")] +#endif public ChargeShippingOptions Shipping { get; set; } /// @@ -271,6 +352,9 @@ public class PaymentIntentCreateOptions : BaseOptions, IHasMetadata /// instead. /// [JsonProperty("statement_descriptor")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("statement_descriptor")] +#endif public string StatementDescriptor { get; set; } /// @@ -280,6 +364,9 @@ public class PaymentIntentCreateOptions : BaseOptions, IHasMetadata /// customer's statement. /// [JsonProperty("statement_descriptor_suffix")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("statement_descriptor_suffix")] +#endif public string StatementDescriptorSuffix { get; set; } /// @@ -288,6 +375,9 @@ public class PaymentIntentCreateOptions : BaseOptions, IHasMetadata /// accounts. /// [JsonProperty("transfer_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transfer_data")] +#endif public PaymentIntentTransferDataOptions TransferData { get; set; } /// @@ -296,6 +386,9 @@ public class PaymentIntentCreateOptions : BaseOptions, IHasMetadata /// connected accounts. /// [JsonProperty("transfer_group")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transfer_group")] +#endif public string TransferGroup { get; set; } /// @@ -303,6 +396,9 @@ public class PaymentIntentCreateOptions : BaseOptions, IHasMetadata /// client-side SDKs to handle the next actions. /// [JsonProperty("use_stripe_sdk")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("use_stripe_sdk")] +#endif public bool? UseStripeSdk { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentGetOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentGetOptions.cs index 19ea47a450..6bbc060064 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentGetOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentGetOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentGetOptions : BaseOptions { @@ -10,6 +13,9 @@ public class PaymentIntentGetOptions : BaseOptions /// retrieve the source. /// [JsonProperty("client_secret")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("client_secret")] +#endif public string ClientSecret { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentIncrementAuthorizationOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentIncrementAuthorizationOptions.cs index 34ef1975f6..1b2f275956 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentIncrementAuthorizationOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentIncrementAuthorizationOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentIncrementAuthorizationOptions : BaseOptions, IHasMetadata { @@ -11,6 +14,9 @@ public class PaymentIntentIncrementAuthorizationOptions : BaseOptions, IHasMetad /// must be greater than the currently authorized amount. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long? Amount { get; set; } /// @@ -22,12 +28,18 @@ public class PaymentIntentIncrementAuthorizationOptions : BaseOptions, IHasMetad /// accounts. /// [JsonProperty("application_fee_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("application_fee_amount")] +#endif public long? ApplicationFeeAmount { get; set; } /// /// An arbitrary string attached to the object. Often useful for displaying to users. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// @@ -37,6 +49,9 @@ public class PaymentIntentIncrementAuthorizationOptions : BaseOptions, IHasMetad /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -47,6 +62,9 @@ public class PaymentIntentIncrementAuthorizationOptions : BaseOptions, IHasMetad /// Descriptor docs. /// [JsonProperty("statement_descriptor")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("statement_descriptor")] +#endif public string StatementDescriptor { get; set; } /// @@ -55,6 +73,9 @@ public class PaymentIntentIncrementAuthorizationOptions : BaseOptions, IHasMetad /// case for connected accounts. /// [JsonProperty("transfer_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transfer_data")] +#endif public PaymentIntentTransferDataOptions TransferData { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentListOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentListOptions.cs index 8cbb035c28..ca631a3f34 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentListOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentListOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentListOptions : ListOptionsWithCreated { @@ -9,6 +12,9 @@ public class PaymentIntentListOptions : ListOptionsWithCreated /// Only return PaymentIntents for the customer that this customer ID specifies. /// [JsonProperty("customer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] +#endif public string Customer { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentMandateDataCustomerAcceptanceOnlineOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentMandateDataCustomerAcceptanceOnlineOptions.cs index ce43635766..79a341f606 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentMandateDataCustomerAcceptanceOnlineOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentMandateDataCustomerAcceptanceOnlineOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentMandateDataCustomerAcceptanceOnlineOptions : INestedOptions { @@ -9,12 +12,18 @@ public class PaymentIntentMandateDataCustomerAcceptanceOnlineOptions : INestedOp /// The IP address from which the Mandate was accepted by the customer. /// [JsonProperty("ip_address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ip_address")] +#endif public string IpAddress { get; set; } /// /// The user agent of the browser from which the Mandate was accepted by the customer. /// [JsonProperty("user_agent")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("user_agent")] +#endif public string UserAgent { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentMandateDataCustomerAcceptanceOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentMandateDataCustomerAcceptanceOptions.cs index de77e80726..5e7f40f9c3 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentMandateDataCustomerAcceptanceOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentMandateDataCustomerAcceptanceOptions.cs @@ -4,6 +4,9 @@ namespace Stripe using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentMandateDataCustomerAcceptanceOptions : INestedOptions { @@ -12,6 +15,10 @@ public class PaymentIntentMandateDataCustomerAcceptanceOptions : INestedOptions /// [JsonProperty("accepted_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("accepted_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? AcceptedAt { get; set; } /// @@ -19,6 +26,9 @@ public class PaymentIntentMandateDataCustomerAcceptanceOptions : INestedOptions /// acceptance. /// [JsonProperty("offline")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("offline")] +#endif public PaymentIntentMandateDataCustomerAcceptanceOfflineOptions Offline { get; set; } /// @@ -26,6 +36,9 @@ public class PaymentIntentMandateDataCustomerAcceptanceOptions : INestedOptions /// acceptance. /// [JsonProperty("online")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("online")] +#endif public PaymentIntentMandateDataCustomerAcceptanceOnlineOptions Online { get; set; } /// @@ -34,6 +47,9 @@ public class PaymentIntentMandateDataCustomerAcceptanceOptions : INestedOptions /// One of: offline, or online. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentMandateDataOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentMandateDataOptions.cs index 115d23a9ac..5d96409641 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentMandateDataOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentMandateDataOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentMandateDataOptions : INestedOptions { @@ -9,6 +12,9 @@ public class PaymentIntentMandateDataOptions : INestedOptions /// This hash contains details about the customer acceptance of the Mandate. /// [JsonProperty("customer_acceptance")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_acceptance")] +#endif public PaymentIntentMandateDataCustomerAcceptanceOptions CustomerAcceptance { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataAcssDebitOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataAcssDebitOptions.cs index b135ba2e11..390d785855 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataAcssDebitOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataAcssDebitOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodDataAcssDebitOptions : INestedOptions { @@ -9,18 +12,27 @@ public class PaymentIntentPaymentMethodDataAcssDebitOptions : INestedOptions /// Customer's bank account number. /// [JsonProperty("account_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_number")] +#endif public string AccountNumber { get; set; } /// /// Institution number of the customer's bank. /// [JsonProperty("institution_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("institution_number")] +#endif public string InstitutionNumber { get; set; } /// /// Transit number of the customer's bank. /// [JsonProperty("transit_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transit_number")] +#endif public string TransitNumber { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataAuBecsDebitOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataAuBecsDebitOptions.cs index 96b0a549c1..4c2b516008 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataAuBecsDebitOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataAuBecsDebitOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodDataAuBecsDebitOptions : INestedOptions { @@ -9,12 +12,18 @@ public class PaymentIntentPaymentMethodDataAuBecsDebitOptions : INestedOptions /// The account number for the bank account. /// [JsonProperty("account_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_number")] +#endif public string AccountNumber { get; set; } /// /// Bank-State-Branch number of the bank account. /// [JsonProperty("bsb_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bsb_number")] +#endif public string BsbNumber { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataBacsDebitOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataBacsDebitOptions.cs index a3e9ed9695..696ae1aee5 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataBacsDebitOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataBacsDebitOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodDataBacsDebitOptions : INestedOptions { @@ -9,12 +12,18 @@ public class PaymentIntentPaymentMethodDataBacsDebitOptions : INestedOptions /// Account number of the bank account that the funds will be debited from. /// [JsonProperty("account_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_number")] +#endif public string AccountNumber { get; set; } /// /// Sort code of the bank account. (e.g., 10-20-30). /// [JsonProperty("sort_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sort_code")] +#endif public string SortCode { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataBillingDetailsOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataBillingDetailsOptions.cs index 2be9921664..e86728ac85 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataBillingDetailsOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataBillingDetailsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodDataBillingDetailsOptions : INestedOptions { @@ -9,24 +12,36 @@ public class PaymentIntentPaymentMethodDataBillingDetailsOptions : INestedOption /// Billing address. /// [JsonProperty("address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address")] +#endif public AddressOptions Address { get; set; } /// /// Email address. /// [JsonProperty("email")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("email")] +#endif public string Email { get; set; } /// /// Full name. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } /// /// Billing phone number (including extension). /// [JsonProperty("phone")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("phone")] +#endif public string Phone { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataBoletoOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataBoletoOptions.cs index 3181640e34..08aa3cc6b3 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataBoletoOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataBoletoOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodDataBoletoOptions : INestedOptions { @@ -10,6 +13,9 @@ public class PaymentIntentPaymentMethodDataBoletoOptions : INestedOptions /// consumers). /// [JsonProperty("tax_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_id")] +#endif public string TaxId { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataEpsOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataEpsOptions.cs index b065250510..db9154c667 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataEpsOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataEpsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodDataEpsOptions : INestedOptions { @@ -23,6 +26,9 @@ public class PaymentIntentPaymentMethodDataEpsOptions : INestedOptions /// vr_bank_braunau. /// [JsonProperty("bank")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank")] +#endif public string Bank { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataFpxOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataFpxOptions.cs index 52bed15619..3fddcf324b 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataFpxOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataFpxOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodDataFpxOptions : INestedOptions { @@ -10,6 +13,9 @@ public class PaymentIntentPaymentMethodDataFpxOptions : INestedOptions /// One of: company, or individual. /// [JsonProperty("account_holder_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_holder_type")] +#endif public string AccountHolderType { get; set; } /// @@ -21,6 +27,9 @@ public class PaymentIntentPaymentMethodDataFpxOptions : INestedOptions /// public_bank, rhb, standard_chartered, or uob. /// [JsonProperty("bank")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank")] +#endif public string Bank { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataIdealOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataIdealOptions.cs index 2def64005c..f7f37eb1b1 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataIdealOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataIdealOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodDataIdealOptions : INestedOptions { @@ -14,6 +17,9 @@ public class PaymentIntentPaymentMethodDataIdealOptions : INestedOptions /// yoursafe. /// [JsonProperty("bank")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank")] +#endif public string Bank { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataKlarnaOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataKlarnaOptions.cs index fb17606fcb..8513618275 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataKlarnaOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataKlarnaOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodDataKlarnaOptions : INestedOptions { @@ -9,6 +12,9 @@ public class PaymentIntentPaymentMethodDataKlarnaOptions : INestedOptions /// Customer's date of birth. /// [JsonProperty("dob")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("dob")] +#endif public DobOptions Dob { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataNaverPayOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataNaverPayOptions.cs index a2b259b7dd..021a8b48a6 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataNaverPayOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataNaverPayOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodDataNaverPayOptions : INestedOptions { @@ -11,6 +14,9 @@ public class PaymentIntentPaymentMethodDataNaverPayOptions : INestedOptions /// One of: card, or points. /// [JsonProperty("funding")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("funding")] +#endif public string Funding { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataOptions.cs index ad1f724bb4..bbb9bf92c3 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodDataOptions : INestedOptions, IHasMetadata { @@ -11,6 +14,9 @@ public class PaymentIntentPaymentMethodDataOptions : INestedOptions, IHasMetadat /// Debit payment method. /// [JsonProperty("acss_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("acss_debit")] +#endif public PaymentIntentPaymentMethodDataAcssDebitOptions AcssDebit { get; set; } /// @@ -18,6 +24,9 @@ public class PaymentIntentPaymentMethodDataOptions : INestedOptions, IHasMetadat /// payment method. /// [JsonProperty("affirm")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("affirm")] +#endif public PaymentIntentPaymentMethodDataAffirmOptions Affirm { get; set; } /// @@ -25,6 +34,9 @@ public class PaymentIntentPaymentMethodDataOptions : INestedOptions, IHasMetadat /// the AfterpayClearpay payment method. /// [JsonProperty("afterpay_clearpay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("afterpay_clearpay")] +#endif public PaymentIntentPaymentMethodDataAfterpayClearpayOptions AfterpayClearpay { get; set; } /// @@ -32,6 +44,9 @@ public class PaymentIntentPaymentMethodDataOptions : INestedOptions, IHasMetadat /// payment method. /// [JsonProperty("alipay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("alipay")] +#endif public PaymentIntentPaymentMethodDataAlipayOptions Alipay { get; set; } /// @@ -42,6 +57,9 @@ public class PaymentIntentPaymentMethodDataOptions : INestedOptions, IHasMetadat /// One of: always, limited, or unspecified. /// [JsonProperty("allow_redisplay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("allow_redisplay")] +#endif public string AllowRedisplay { get; set; } /// @@ -49,6 +67,9 @@ public class PaymentIntentPaymentMethodDataOptions : INestedOptions, IHasMetadat /// method. /// [JsonProperty("alma")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("alma")] +#endif public PaymentIntentPaymentMethodDataAlmaOptions Alma { get; set; } /// @@ -56,6 +77,9 @@ public class PaymentIntentPaymentMethodDataOptions : INestedOptions, IHasMetadat /// payment method. /// [JsonProperty("amazon_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amazon_pay")] +#endif public PaymentIntentPaymentMethodDataAmazonPayOptions AmazonPay { get; set; } /// @@ -63,6 +87,9 @@ public class PaymentIntentPaymentMethodDataOptions : INestedOptions, IHasMetadat /// bank account. /// [JsonProperty("au_becs_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("au_becs_debit")] +#endif public PaymentIntentPaymentMethodDataAuBecsDebitOptions AuBecsDebit { get; set; } /// @@ -70,6 +97,9 @@ public class PaymentIntentPaymentMethodDataOptions : INestedOptions, IHasMetadat /// Direct Debit bank account. /// [JsonProperty("bacs_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bacs_debit")] +#endif public PaymentIntentPaymentMethodDataBacsDebitOptions BacsDebit { get; set; } /// @@ -77,6 +107,9 @@ public class PaymentIntentPaymentMethodDataOptions : INestedOptions, IHasMetadat /// Bancontact payment method. /// [JsonProperty("bancontact")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bancontact")] +#endif public PaymentIntentPaymentMethodDataBancontactOptions Bancontact { get; set; } /// @@ -84,6 +117,9 @@ public class PaymentIntentPaymentMethodDataOptions : INestedOptions, IHasMetadat /// particular types of payment methods. /// [JsonProperty("billing_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_details")] +#endif public PaymentIntentPaymentMethodDataBillingDetailsOptions BillingDetails { get; set; } /// @@ -91,6 +127,9 @@ public class PaymentIntentPaymentMethodDataOptions : INestedOptions, IHasMetadat /// payment method. /// [JsonProperty("blik")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("blik")] +#endif public PaymentIntentPaymentMethodDataBlikOptions Blik { get; set; } /// @@ -98,6 +137,9 @@ public class PaymentIntentPaymentMethodDataOptions : INestedOptions, IHasMetadat /// payment method. /// [JsonProperty("boleto")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("boleto")] +#endif public PaymentIntentPaymentMethodDataBoletoOptions Boleto { get; set; } /// @@ -105,6 +147,9 @@ public class PaymentIntentPaymentMethodDataOptions : INestedOptions, IHasMetadat /// Pay payment method. /// [JsonProperty("cashapp")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cashapp")] +#endif public PaymentIntentPaymentMethodDataCashappOptions Cashapp { get; set; } /// @@ -112,6 +157,9 @@ public class PaymentIntentPaymentMethodDataOptions : INestedOptions, IHasMetadat /// CustomerBalance payment method. /// [JsonProperty("customer_balance")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_balance")] +#endif public PaymentIntentPaymentMethodDataCustomerBalanceOptions CustomerBalance { get; set; } /// @@ -119,6 +167,9 @@ public class PaymentIntentPaymentMethodDataOptions : INestedOptions, IHasMetadat /// method. /// [JsonProperty("eps")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("eps")] +#endif public PaymentIntentPaymentMethodDataEpsOptions Eps { get; set; } /// @@ -126,6 +177,9 @@ public class PaymentIntentPaymentMethodDataOptions : INestedOptions, IHasMetadat /// method. /// [JsonProperty("fpx")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fpx")] +#endif public PaymentIntentPaymentMethodDataFpxOptions Fpx { get; set; } /// @@ -133,6 +187,9 @@ public class PaymentIntentPaymentMethodDataOptions : INestedOptions, IHasMetadat /// payment method. /// [JsonProperty("giropay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("giropay")] +#endif public PaymentIntentPaymentMethodDataGiropayOptions Giropay { get; set; } /// @@ -140,6 +197,9 @@ public class PaymentIntentPaymentMethodDataOptions : INestedOptions, IHasMetadat /// payment method. /// [JsonProperty("grabpay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("grabpay")] +#endif public PaymentIntentPaymentMethodDataGrabpayOptions Grabpay { get; set; } /// @@ -147,6 +207,9 @@ public class PaymentIntentPaymentMethodDataOptions : INestedOptions, IHasMetadat /// payment method. /// [JsonProperty("ideal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ideal")] +#endif public PaymentIntentPaymentMethodDataIdealOptions Ideal { get; set; } /// @@ -154,6 +217,9 @@ public class PaymentIntentPaymentMethodDataOptions : INestedOptions, IHasMetadat /// Interac Present payment method. /// [JsonProperty("interac_present")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interac_present")] +#endif public PaymentIntentPaymentMethodDataInteracPresentOptions InteracPresent { get; set; } /// @@ -161,6 +227,9 @@ public class PaymentIntentPaymentMethodDataOptions : INestedOptions, IHasMetadat /// Pay payment method. /// [JsonProperty("kakao_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("kakao_pay")] +#endif public PaymentIntentPaymentMethodDataKakaoPayOptions KakaoPay { get; set; } /// @@ -168,6 +237,9 @@ public class PaymentIntentPaymentMethodDataOptions : INestedOptions, IHasMetadat /// payment method. /// [JsonProperty("klarna")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("klarna")] +#endif public PaymentIntentPaymentMethodDataKlarnaOptions Klarna { get; set; } /// @@ -175,6 +247,9 @@ public class PaymentIntentPaymentMethodDataOptions : INestedOptions, IHasMetadat /// payment method. /// [JsonProperty("konbini")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("konbini")] +#endif public PaymentIntentPaymentMethodDataKonbiniOptions Konbini { get; set; } /// @@ -182,6 +257,9 @@ public class PaymentIntentPaymentMethodDataOptions : INestedOptions, IHasMetadat /// Card payment method. /// [JsonProperty("kr_card")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("kr_card")] +#endif public PaymentIntentPaymentMethodDataKrCardOptions KrCard { get; set; } /// @@ -189,6 +267,9 @@ public class PaymentIntentPaymentMethodDataOptions : INestedOptions, IHasMetadat /// payment method. /// [JsonProperty("link")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("link")] +#endif public PaymentIntentPaymentMethodDataLinkOptions Link { get; set; } /// @@ -198,6 +279,9 @@ public class PaymentIntentPaymentMethodDataOptions : INestedOptions, IHasMetadat /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -205,6 +289,9 @@ public class PaymentIntentPaymentMethodDataOptions : INestedOptions, IHasMetadat /// MobilePay payment method. /// [JsonProperty("mobilepay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mobilepay")] +#endif public PaymentIntentPaymentMethodDataMobilepayOptions Mobilepay { get; set; } /// @@ -212,6 +299,9 @@ public class PaymentIntentPaymentMethodDataOptions : INestedOptions, IHasMetadat /// Multibanco payment method. /// [JsonProperty("multibanco")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("multibanco")] +#endif public PaymentIntentPaymentMethodDataMultibancoOptions Multibanco { get; set; } /// @@ -219,6 +309,9 @@ public class PaymentIntentPaymentMethodDataOptions : INestedOptions, IHasMetadat /// Pay payment method. /// [JsonProperty("naver_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("naver_pay")] +#endif public PaymentIntentPaymentMethodDataNaverPayOptions NaverPay { get; set; } /// @@ -226,6 +319,9 @@ public class PaymentIntentPaymentMethodDataOptions : INestedOptions, IHasMetadat /// payment method. /// [JsonProperty("oxxo")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("oxxo")] +#endif public PaymentIntentPaymentMethodDataOxxoOptions Oxxo { get; set; } /// @@ -233,6 +329,9 @@ public class PaymentIntentPaymentMethodDataOptions : INestedOptions, IHasMetadat /// method. /// [JsonProperty("p24")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("p24")] +#endif public PaymentIntentPaymentMethodDataP24Options P24 { get; set; } /// @@ -240,6 +339,9 @@ public class PaymentIntentPaymentMethodDataOptions : INestedOptions, IHasMetadat /// payment method. /// [JsonProperty("payco")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payco")] +#endif public PaymentIntentPaymentMethodDataPaycoOptions Payco { get; set; } /// @@ -247,6 +349,9 @@ public class PaymentIntentPaymentMethodDataOptions : INestedOptions, IHasMetadat /// payment method. /// [JsonProperty("paynow")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("paynow")] +#endif public PaymentIntentPaymentMethodDataPaynowOptions Paynow { get; set; } /// @@ -254,6 +359,9 @@ public class PaymentIntentPaymentMethodDataOptions : INestedOptions, IHasMetadat /// payment method. /// [JsonProperty("paypal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("paypal")] +#endif public PaymentIntentPaymentMethodDataPaypalOptions Paypal { get; set; } /// @@ -261,6 +369,9 @@ public class PaymentIntentPaymentMethodDataOptions : INestedOptions, IHasMetadat /// method. /// [JsonProperty("pix")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("pix")] +#endif public PaymentIntentPaymentMethodDataPixOptions Pix { get; set; } /// @@ -268,6 +379,9 @@ public class PaymentIntentPaymentMethodDataOptions : INestedOptions, IHasMetadat /// PromptPay payment method. /// [JsonProperty("promptpay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("promptpay")] +#endif public PaymentIntentPaymentMethodDataPromptpayOptions Promptpay { get; set; } /// @@ -276,6 +390,9 @@ public class PaymentIntentPaymentMethodDataOptions : INestedOptions, IHasMetadat /// information. /// [JsonProperty("radar_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("radar_options")] +#endif public PaymentIntentPaymentMethodDataRadarOptionsOptions RadarOptions { get; set; } /// @@ -283,6 +400,9 @@ public class PaymentIntentPaymentMethodDataOptions : INestedOptions, IHasMetadat /// Revolut Pay payment method. /// [JsonProperty("revolut_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("revolut_pay")] +#endif public PaymentIntentPaymentMethodDataRevolutPayOptions RevolutPay { get; set; } /// @@ -290,6 +410,9 @@ public class PaymentIntentPaymentMethodDataOptions : INestedOptions, IHasMetadat /// SamsungPay payment method. /// [JsonProperty("samsung_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("samsung_pay")] +#endif public PaymentIntentPaymentMethodDataSamsungPayOptions SamsungPay { get; set; } /// @@ -297,6 +420,9 @@ public class PaymentIntentPaymentMethodDataOptions : INestedOptions, IHasMetadat /// debit bank account. /// [JsonProperty("sepa_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sepa_debit")] +#endif public PaymentIntentPaymentMethodDataSepaDebitOptions SepaDebit { get; set; } /// @@ -304,6 +430,9 @@ public class PaymentIntentPaymentMethodDataOptions : INestedOptions, IHasMetadat /// payment method. /// [JsonProperty("sofort")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sofort")] +#endif public PaymentIntentPaymentMethodDataSofortOptions Sofort { get; set; } /// @@ -311,6 +440,9 @@ public class PaymentIntentPaymentMethodDataOptions : INestedOptions, IHasMetadat /// payment method. /// [JsonProperty("swish")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("swish")] +#endif public PaymentIntentPaymentMethodDataSwishOptions Swish { get; set; } /// @@ -318,6 +450,9 @@ public class PaymentIntentPaymentMethodDataOptions : INestedOptions, IHasMetadat /// method. /// [JsonProperty("twint")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("twint")] +#endif public PaymentIntentPaymentMethodDataTwintOptions Twint { get; set; } /// @@ -335,6 +470,9 @@ public class PaymentIntentPaymentMethodDataOptions : INestedOptions, IHasMetadat /// us_bank_account, wechat_pay, or zip. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } /// @@ -342,6 +480,9 @@ public class PaymentIntentPaymentMethodDataOptions : INestedOptions, IHasMetadat /// US bank account payment method. /// [JsonProperty("us_bank_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("us_bank_account")] +#endif public PaymentIntentPaymentMethodDataUsBankAccountOptions UsBankAccount { get; set; } /// @@ -349,6 +490,9 @@ public class PaymentIntentPaymentMethodDataOptions : INestedOptions, IHasMetadat /// wechat_pay payment method. /// [JsonProperty("wechat_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("wechat_pay")] +#endif public PaymentIntentPaymentMethodDataWechatPayOptions WechatPay { get; set; } /// @@ -356,6 +500,9 @@ public class PaymentIntentPaymentMethodDataOptions : INestedOptions, IHasMetadat /// method. /// [JsonProperty("zip")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("zip")] +#endif public PaymentIntentPaymentMethodDataZipOptions Zip { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataP24Options.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataP24Options.cs index 416a824cf9..aafb1a10b4 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataP24Options.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataP24Options.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodDataP24Options : INestedOptions { @@ -17,6 +20,9 @@ public class PaymentIntentPaymentMethodDataP24Options : INestedOptions /// volkswagen_bank. /// [JsonProperty("bank")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank")] +#endif public string Bank { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataRadarOptionsOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataRadarOptionsOptions.cs index 7005c969fc..f1380156af 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataRadarOptionsOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataRadarOptionsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodDataRadarOptionsOptions : INestedOptions { @@ -11,6 +14,9 @@ public class PaymentIntentPaymentMethodDataRadarOptionsOptions : INestedOptions /// predictions on your payments. /// [JsonProperty("session")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("session")] +#endif public string Session { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataSepaDebitOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataSepaDebitOptions.cs index bc155061bd..9ba09b4fe6 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataSepaDebitOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataSepaDebitOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodDataSepaDebitOptions : INestedOptions { @@ -9,6 +12,9 @@ public class PaymentIntentPaymentMethodDataSepaDebitOptions : INestedOptions /// IBAN of the bank account. /// [JsonProperty("iban")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("iban")] +#endif public string Iban { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataSofortOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataSofortOptions.cs index 6f1af9d8bb..5da20c46c2 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataSofortOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataSofortOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodDataSofortOptions : INestedOptions { @@ -10,6 +13,9 @@ public class PaymentIntentPaymentMethodDataSofortOptions : INestedOptions /// One of: AT, BE, DE, ES, IT, or NL. /// [JsonProperty("country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country")] +#endif public string Country { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataUsBankAccountOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataUsBankAccountOptions.cs index ae10c53bdb..b0fbfee092 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataUsBankAccountOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataUsBankAccountOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodDataUsBankAccountOptions : INestedOptions { @@ -10,12 +13,18 @@ public class PaymentIntentPaymentMethodDataUsBankAccountOptions : INestedOptions /// One of: company, or individual. /// [JsonProperty("account_holder_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_holder_type")] +#endif public string AccountHolderType { get; set; } /// /// Account number of the bank account. /// [JsonProperty("account_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_number")] +#endif public string AccountNumber { get; set; } /// @@ -23,18 +32,27 @@ public class PaymentIntentPaymentMethodDataUsBankAccountOptions : INestedOptions /// One of: checking, or savings. /// [JsonProperty("account_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_type")] +#endif public string AccountType { get; set; } /// /// The ID of a Financial Connections Account to use as a payment method. /// [JsonProperty("financial_connections_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("financial_connections_account")] +#endif public string FinancialConnectionsAccount { get; set; } /// /// Routing number of the bank account. /// [JsonProperty("routing_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("routing_number")] +#endif public string RoutingNumber { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsAcssDebitMandateOptionsOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsAcssDebitMandateOptionsOptions.cs index 99afdb7724..a8f6c943f8 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsAcssDebitMandateOptionsOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsAcssDebitMandateOptionsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsAcssDebitMandateOptionsOptions : INestedOptions { @@ -13,6 +16,9 @@ public class PaymentIntentPaymentMethodOptionsAcssDebitMandateOptionsOptions : I /// Intent. /// [JsonProperty("custom_mandate_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("custom_mandate_url")] +#endif public string CustomMandateUrl { get; set; } /// @@ -20,6 +26,9 @@ public class PaymentIntentPaymentMethodOptionsAcssDebitMandateOptionsOptions : I /// 'interval' or 'combined'. /// [JsonProperty("interval_description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interval_description")] +#endif public string IntervalDescription { get; set; } /// @@ -27,6 +36,9 @@ public class PaymentIntentPaymentMethodOptionsAcssDebitMandateOptionsOptions : I /// One of: combined, interval, or sporadic. /// [JsonProperty("payment_schedule")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_schedule")] +#endif public string PaymentSchedule { get; set; } /// @@ -34,6 +46,9 @@ public class PaymentIntentPaymentMethodOptionsAcssDebitMandateOptionsOptions : I /// One of: business, or personal. /// [JsonProperty("transaction_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transaction_type")] +#endif public string TransactionType { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsAcssDebitOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsAcssDebitOptions.cs index 29607055e8..4ce2c634ea 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsAcssDebitOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsAcssDebitOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsAcssDebitOptions : INestedOptions { @@ -9,6 +12,9 @@ public class PaymentIntentPaymentMethodOptionsAcssDebitOptions : INestedOptions /// Additional fields for Mandate creation. /// [JsonProperty("mandate_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mandate_options")] +#endif public PaymentIntentPaymentMethodOptionsAcssDebitMandateOptionsOptions MandateOptions { get; set; } /// @@ -37,6 +43,9 @@ public class PaymentIntentPaymentMethodOptionsAcssDebitOptions : INestedOptions /// One of: none, off_session, or on_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } /// @@ -44,6 +53,9 @@ public class PaymentIntentPaymentMethodOptionsAcssDebitOptions : INestedOptions /// One of: automatic, instant, or microdeposits. /// [JsonProperty("verification_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("verification_method")] +#endif public string VerificationMethod { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsAffirmOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsAffirmOptions.cs index 1aa04e7c02..4c0278ff2e 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsAffirmOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsAffirmOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsAffirmOptions : INestedOptions { @@ -16,12 +19,18 @@ public class PaymentIntentPaymentMethodOptionsAffirmOptions : INestedOptions /// for this parameter unsets the stored value for this payment method type. /// [JsonProperty("capture_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("capture_method")] +#endif public string CaptureMethod { get; set; } /// /// Preferred language of the Affirm authorization page that the customer is redirected to. /// [JsonProperty("preferred_locale")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preferred_locale")] +#endif public string PreferredLocale { get; set; } /// @@ -49,6 +58,9 @@ public class PaymentIntentPaymentMethodOptionsAffirmOptions : INestedOptions /// off_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsAfterpayClearpayOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsAfterpayClearpayOptions.cs index 612c700d70..a96192da43 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsAfterpayClearpayOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsAfterpayClearpayOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsAfterpayClearpayOptions : INestedOptions { @@ -16,6 +19,9 @@ public class PaymentIntentPaymentMethodOptionsAfterpayClearpayOptions : INestedO /// for this parameter unsets the stored value for this payment method type. /// [JsonProperty("capture_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("capture_method")] +#endif public string CaptureMethod { get; set; } /// @@ -24,6 +30,9 @@ public class PaymentIntentPaymentMethodOptionsAfterpayClearpayOptions : INestedO /// backslashes, and dashes. This field differs from the statement descriptor and item name. /// [JsonProperty("reference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reference")] +#endif public string Reference { get; set; } /// @@ -51,6 +60,9 @@ public class PaymentIntentPaymentMethodOptionsAfterpayClearpayOptions : INestedO /// off_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsAlipayOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsAlipayOptions.cs index 5e0ff73994..d6baefadba 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsAlipayOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsAlipayOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsAlipayOptions : INestedOptions { @@ -31,6 +34,9 @@ public class PaymentIntentPaymentMethodOptionsAlipayOptions : INestedOptions /// One of: none, or off_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsAlmaOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsAlmaOptions.cs index 5bb6475105..a11f315a5c 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsAlmaOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsAlmaOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsAlmaOptions : INestedOptions { @@ -16,6 +19,9 @@ public class PaymentIntentPaymentMethodOptionsAlmaOptions : INestedOptions /// for this parameter unsets the stored value for this payment method type. /// [JsonProperty("capture_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("capture_method")] +#endif public string CaptureMethod { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsAmazonPayOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsAmazonPayOptions.cs index 747419a5f5..091bfec000 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsAmazonPayOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsAmazonPayOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsAmazonPayOptions : INestedOptions { @@ -16,6 +19,9 @@ public class PaymentIntentPaymentMethodOptionsAmazonPayOptions : INestedOptions /// for this parameter unsets the stored value for this payment method type. /// [JsonProperty("capture_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("capture_method")] +#endif public string CaptureMethod { get; set; } /// @@ -40,6 +46,9 @@ public class PaymentIntentPaymentMethodOptionsAmazonPayOptions : INestedOptions /// One of: none, or off_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsAuBecsDebitOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsAuBecsDebitOptions.cs index 435e908399..3966536581 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsAuBecsDebitOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsAuBecsDebitOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsAuBecsDebitOptions : INestedOptions { @@ -31,6 +34,9 @@ public class PaymentIntentPaymentMethodOptionsAuBecsDebitOptions : INestedOption /// One of: none, off_session, or on_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsBacsDebitOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsBacsDebitOptions.cs index 53a0192314..5ce9ba8204 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsBacsDebitOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsBacsDebitOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsBacsDebitOptions : INestedOptions { @@ -9,6 +12,9 @@ public class PaymentIntentPaymentMethodOptionsBacsDebitOptions : INestedOptions /// Additional fields for Mandate creation. /// [JsonProperty("mandate_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mandate_options")] +#endif public PaymentIntentPaymentMethodOptionsBacsDebitMandateOptionsOptions MandateOptions { get; set; } /// @@ -37,6 +43,9 @@ public class PaymentIntentPaymentMethodOptionsBacsDebitOptions : INestedOptions /// One of: none, off_session, or on_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsBancontactOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsBancontactOptions.cs index f3f636022c..e862b79449 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsBancontactOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsBancontactOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsBancontactOptions : INestedOptions { @@ -11,6 +14,9 @@ public class PaymentIntentPaymentMethodOptionsBancontactOptions : INestedOptions /// One of: de, en, fr, or nl. /// [JsonProperty("preferred_language")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preferred_language")] +#endif public string PreferredLanguage { get; set; } /// @@ -39,6 +45,9 @@ public class PaymentIntentPaymentMethodOptionsBancontactOptions : INestedOptions /// One of: none, or off_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsBlikOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsBlikOptions.cs index e41f1be9ee..65b8011c87 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsBlikOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsBlikOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsBlikOptions : INestedOptions { @@ -10,6 +13,9 @@ public class PaymentIntentPaymentMethodOptionsBlikOptions : INestedOptions /// only be set on confirmation. /// [JsonProperty("code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("code")] +#endif public string Code { get; set; } /// @@ -37,6 +43,9 @@ public class PaymentIntentPaymentMethodOptionsBlikOptions : INestedOptions /// off_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsBoletoOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsBoletoOptions.cs index 4bbd85d773..c8217d38bd 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsBoletoOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsBoletoOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsBoletoOptions : INestedOptions { @@ -11,6 +14,9 @@ public class PaymentIntentPaymentMethodOptionsBoletoOptions : INestedOptions /// expire on Wednesday at 23:59 America/Sao_Paulo time. /// [JsonProperty("expires_after_days")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("expires_after_days")] +#endif public long? ExpiresAfterDays { get; set; } /// @@ -39,6 +45,9 @@ public class PaymentIntentPaymentMethodOptionsBoletoOptions : INestedOptions /// One of: none, off_session, or on_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardInstallmentsOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardInstallmentsOptions.cs index 0cf5f50c06..0797900f1a 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardInstallmentsOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardInstallmentsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsCardInstallmentsOptions : INestedOptions { @@ -11,6 +14,9 @@ public class PaymentIntentPaymentMethodOptionsCardInstallmentsOptions : INestedO /// any selected plan from applying to a charge. /// [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool? Enabled { get; set; } /// @@ -18,6 +24,9 @@ public class PaymentIntentPaymentMethodOptionsCardInstallmentsOptions : INestedO /// be provided during confirmation. /// [JsonProperty("plan")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("plan")] +#endif public PaymentIntentPaymentMethodOptionsCardInstallmentsPlanOptions Plan { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardInstallmentsPlanOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardInstallmentsPlanOptions.cs index f977a8b9c9..1340960788 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardInstallmentsPlanOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardInstallmentsPlanOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsCardInstallmentsPlanOptions : INestedOptions { @@ -10,6 +13,9 @@ public class PaymentIntentPaymentMethodOptionsCardInstallmentsPlanOptions : INes /// installment payments your customer will make to their credit card. /// [JsonProperty("count")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("count")] +#endif public long? Count { get; set; } /// @@ -18,12 +24,18 @@ public class PaymentIntentPaymentMethodOptionsCardInstallmentsPlanOptions : INes /// month. /// [JsonProperty("interval")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interval")] +#endif public string Interval { get; set; } /// /// Type of installment plan, one of fixed_count. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardMandateOptionsOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardMandateOptionsOptions.cs index 20622f0559..db51992e9b 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardMandateOptionsOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardMandateOptionsOptions.cs @@ -5,6 +5,9 @@ namespace Stripe using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsCardMandateOptionsOptions : INestedOptions { @@ -12,6 +15,9 @@ public class PaymentIntentPaymentMethodOptionsCardMandateOptionsOptions : INeste /// Amount to be charged for future payments. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long? Amount { get; set; } /// @@ -21,6 +27,9 @@ public class PaymentIntentPaymentMethodOptionsCardMandateOptionsOptions : INeste /// One of: fixed, or maximum. /// [JsonProperty("amount_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_type")] +#endif public string AmountType { get; set; } /// @@ -28,6 +37,9 @@ public class PaymentIntentPaymentMethodOptionsCardMandateOptionsOptions : INeste /// customer. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// @@ -36,6 +48,10 @@ public class PaymentIntentPaymentMethodOptionsCardMandateOptionsOptions : INeste /// [JsonProperty("end_date")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("end_date")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? EndDate { get; set; } /// @@ -44,6 +60,9 @@ public class PaymentIntentPaymentMethodOptionsCardMandateOptionsOptions : INeste /// One of: day, month, sporadic, week, or year. /// [JsonProperty("interval")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interval")] +#endif public string Interval { get; set; } /// @@ -53,12 +72,18 @@ public class PaymentIntentPaymentMethodOptionsCardMandateOptionsOptions : INeste /// interval=sporadic. /// [JsonProperty("interval_count")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interval_count")] +#endif public long? IntervalCount { get; set; } /// /// Unique identifier for the mandate or subscription. /// [JsonProperty("reference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reference")] +#endif public string Reference { get; set; } /// @@ -67,12 +92,19 @@ public class PaymentIntentPaymentMethodOptionsCardMandateOptionsOptions : INeste /// [JsonProperty("start_date")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("start_date")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? StartDate { get; set; } /// /// Specifies the type of mandates supported. Possible values are india. /// [JsonProperty("supported_types")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("supported_types")] +#endif public List SupportedTypes { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardOptions.cs index 9ae2cadf1d..c673e27446 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsCardOptions : INestedOptions { @@ -16,6 +19,9 @@ public class PaymentIntentPaymentMethodOptionsCardOptions : INestedOptions /// for this parameter unsets the stored value for this payment method type. /// [JsonProperty("capture_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("capture_method")] +#endif public string CaptureMethod { get; set; } /// @@ -24,6 +30,9 @@ public class PaymentIntentPaymentMethodOptionsCardOptions : INestedOptions /// be provided during confirmation. /// [JsonProperty("cvc_token")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cvc_token")] +#endif public string CvcToken { get; set; } /// @@ -33,12 +42,18 @@ public class PaymentIntentPaymentMethodOptionsCardOptions : INestedOptions /// href="https://stripe.com/docs/payments/installments">installments integration guide. /// [JsonProperty("installments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("installments")] +#endif public PaymentIntentPaymentMethodOptionsCardInstallmentsOptions Installments { get; set; } /// /// Configuration options for setting up an eMandate for cards issued in India. /// [JsonProperty("mandate_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mandate_options")] +#endif public PaymentIntentPaymentMethodOptionsCardMandateOptionsOptions MandateOptions { get; set; } /// @@ -47,6 +62,9 @@ public class PaymentIntentPaymentMethodOptionsCardOptions : INestedOptions /// provided during confirmation. /// [JsonProperty("moto")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("moto")] +#endif public bool? Moto { get; set; } /// @@ -57,6 +75,9 @@ public class PaymentIntentPaymentMethodOptionsCardOptions : INestedOptions /// mastercard, unionpay, unknown, or visa. /// [JsonProperty("network")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("network")] +#endif public string Network { get; set; } /// @@ -66,6 +87,9 @@ public class PaymentIntentPaymentMethodOptionsCardOptions : INestedOptions /// One of: if_available, or never. /// [JsonProperty("request_extended_authorization")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("request_extended_authorization")] +#endif public string RequestExtendedAuthorization { get; set; } /// @@ -75,6 +99,9 @@ public class PaymentIntentPaymentMethodOptionsCardOptions : INestedOptions /// One of: if_available, or never. /// [JsonProperty("request_incremental_authorization")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("request_incremental_authorization")] +#endif public string RequestIncrementalAuthorization { get; set; } /// @@ -83,6 +110,9 @@ public class PaymentIntentPaymentMethodOptionsCardOptions : INestedOptions /// One of: if_available, or never. /// [JsonProperty("request_multicapture")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("request_multicapture")] +#endif public string RequestMulticapture { get; set; } /// @@ -92,6 +122,9 @@ public class PaymentIntentPaymentMethodOptionsCardOptions : INestedOptions /// One of: if_available, or never. /// [JsonProperty("request_overcapture")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("request_overcapture")] +#endif public string RequestOvercapture { get; set; } /// @@ -107,6 +140,9 @@ public class PaymentIntentPaymentMethodOptionsCardOptions : INestedOptions /// One of: any, automatic, or challenge. /// [JsonProperty("request_three_d_secure")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("request_three_d_secure")] +#endif public string RequestThreeDSecure { get; set; } /// @@ -114,6 +150,9 @@ public class PaymentIntentPaymentMethodOptionsCardOptions : INestedOptions /// provided again (i.e. using the cvc_token parameter). /// [JsonProperty("require_cvc_recollection")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("require_cvc_recollection")] +#endif public bool? RequireCvcRecollection { get; set; } /// @@ -142,6 +181,9 @@ public class PaymentIntentPaymentMethodOptionsCardOptions : INestedOptions /// One of: none, off_session, or on_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } /// @@ -152,6 +194,9 @@ public class PaymentIntentPaymentMethodOptionsCardOptions : INestedOptions /// (including separators) will appear truncated to 22 characters. /// [JsonProperty("statement_descriptor_suffix_kana")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("statement_descriptor_suffix_kana")] +#endif public string StatementDescriptorSuffixKana { get; set; } /// @@ -162,6 +207,9 @@ public class PaymentIntentPaymentMethodOptionsCardOptions : INestedOptions /// (including separators) will appear truncated to 17 characters. /// [JsonProperty("statement_descriptor_suffix_kanji")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("statement_descriptor_suffix_kanji")] +#endif public string StatementDescriptorSuffixKanji { get; set; } /// @@ -169,6 +217,9 @@ public class PaymentIntentPaymentMethodOptionsCardOptions : INestedOptions /// authentication details to use for this payment. /// [JsonProperty("three_d_secure")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("three_d_secure")] +#endif public PaymentIntentPaymentMethodOptionsCardThreeDSecureOptions ThreeDSecure { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardPresentOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardPresentOptions.cs index 454f0c3156..f4d5919a18 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardPresentOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardPresentOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsCardPresentOptions : INestedOptions { @@ -11,6 +14,9 @@ public class PaymentIntentPaymentMethodOptionsCardPresentOptions : INestedOption /// validity window. /// [JsonProperty("request_extended_authorization")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("request_extended_authorization")] +#endif public bool? RequestExtendedAuthorization { get; set; } /// @@ -22,6 +28,9 @@ public class PaymentIntentPaymentMethodOptionsCardPresentOptions : INestedOption /// response to verify support. /// [JsonProperty("request_incremental_authorization_support")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("request_incremental_authorization_support")] +#endif public bool? RequestIncrementalAuthorizationSupport { get; set; } /// @@ -29,6 +38,9 @@ public class PaymentIntentPaymentMethodOptionsCardPresentOptions : INestedOption /// international card schemes. /// [JsonProperty("routing")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("routing")] +#endif public PaymentIntentPaymentMethodOptionsCardPresentRoutingOptions Routing { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardPresentRoutingOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardPresentRoutingOptions.cs index b82aa68918..9881791b20 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardPresentRoutingOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardPresentRoutingOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsCardPresentRoutingOptions : INestedOptions { @@ -10,6 +13,9 @@ public class PaymentIntentPaymentMethodOptionsCardPresentRoutingOptions : INeste /// One of: domestic, or international. /// [JsonProperty("requested_priority")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested_priority")] +#endif public string RequestedPriority { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesOptions.cs index 69639d304e..41dd7a0d1a 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesOptions : INestedOptions { @@ -12,6 +15,9 @@ public class PaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCart /// One of: 0, 1, 2, 3, 4, or A. /// [JsonProperty("cb_avalgo")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cb_avalgo")] +#endif public string CbAvalgo { get; set; } /// @@ -20,6 +26,9 @@ public class PaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCart /// and most significant bit first) that has been Base64 encoded. /// [JsonProperty("cb_exemption")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cb_exemption")] +#endif public string CbExemption { get; set; } /// @@ -27,6 +36,9 @@ public class PaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCart /// numeric value 0-99. /// [JsonProperty("cb_score")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cb_score")] +#endif public long? CbScore { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsOptions.cs index 2e2118cc76..2b9afde8f3 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsOptions : INestedOptions { @@ -9,6 +12,9 @@ public class PaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsOpti /// Cartes Bancaires-specific 3DS fields. /// [JsonProperty("cartes_bancaires")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cartes_bancaires")] +#endif public PaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesOptions CartesBancaires { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardThreeDSecureOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardThreeDSecureOptions.cs index cb776c244f..4ebf3f204c 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardThreeDSecureOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardThreeDSecureOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsCardThreeDSecureOptions : INestedOptions { @@ -10,6 +13,9 @@ public class PaymentIntentPaymentMethodOptionsCardThreeDSecureOptions : INestedO /// One of: A, C, I, N, R, U, or Y. /// [JsonProperty("ares_trans_status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ares_trans_status")] +#endif public string AresTransStatus { get; set; } /// @@ -18,6 +24,9 @@ public class PaymentIntentPaymentMethodOptionsCardThreeDSecureOptions : INestedO /// return the base64-encoded version, which is what you should specify here.). /// [JsonProperty("cryptogram")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cryptogram")] +#endif public string Cryptogram { get; set; } /// @@ -26,6 +35,9 @@ public class PaymentIntentPaymentMethodOptionsCardThreeDSecureOptions : INestedO /// One of: 01, 02, 05, 06, or 07. /// [JsonProperty("electronic_commerce_indicator")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("electronic_commerce_indicator")] +#endif public string ElectronicCommerceIndicator { get; set; } /// @@ -33,6 +45,9 @@ public class PaymentIntentPaymentMethodOptionsCardThreeDSecureOptions : INestedO /// One of: low_risk, or none. /// [JsonProperty("exemption_indicator")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("exemption_indicator")] +#endif public string ExemptionIndicator { get; set; } /// @@ -41,6 +56,9 @@ public class PaymentIntentPaymentMethodOptionsCardThreeDSecureOptions : INestedO /// accordingly. /// [JsonProperty("network_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("network_options")] +#endif public PaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsOptions NetworkOptions { get; set; } /// @@ -48,6 +66,9 @@ public class PaymentIntentPaymentMethodOptionsCardThreeDSecureOptions : INestedO /// AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99. /// [JsonProperty("requestor_challenge_indicator")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requestor_challenge_indicator")] +#endif public string RequestorChallengeIndicator { get; set; } /// @@ -55,6 +76,9 @@ public class PaymentIntentPaymentMethodOptionsCardThreeDSecureOptions : INestedO /// (dsTransID). /// [JsonProperty("transaction_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transaction_id")] +#endif public string TransactionId { get; set; } /// @@ -62,6 +86,9 @@ public class PaymentIntentPaymentMethodOptionsCardThreeDSecureOptions : INestedO /// One of: 1.0.2, 2.1.0, or 2.2.0. /// [JsonProperty("version")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("version")] +#endif public string Version { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCashappOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCashappOptions.cs index fa9fddb939..4ae671a9a8 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCashappOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCashappOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsCashappOptions : INestedOptions { @@ -16,6 +19,9 @@ public class PaymentIntentPaymentMethodOptionsCashappOptions : INestedOptions /// for this parameter unsets the stored value for this payment method type. /// [JsonProperty("capture_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("capture_method")] +#endif public string CaptureMethod { get; set; } /// @@ -44,6 +50,9 @@ public class PaymentIntentPaymentMethodOptionsCashappOptions : INestedOptions /// One of: none, off_session, or on_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransferOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransferOptions.cs index 261e3ded10..9082dfb5c4 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransferOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransferOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransferOptions : INestedOptions { @@ -10,6 +13,9 @@ public class PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferEuBankT /// BE, DE, ES, FR, IE, or NL. /// [JsonProperty("country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country")] +#endif public string Country { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferOptions.cs index f04ec506bb..b5783991d0 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferOptions : INestedOptions { @@ -10,6 +13,9 @@ public class PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferOptions /// Configuration for the eu_bank_transfer funding type. /// [JsonProperty("eu_bank_transfer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("eu_bank_transfer")] +#endif public PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransferOptions EuBankTransfer { get; set; } /// @@ -21,6 +27,9 @@ public class PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferOptions /// swift, or zengin. /// [JsonProperty("requested_address_types")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested_address_types")] +#endif public List RequestedAddressTypes { get; set; } /// @@ -31,6 +40,9 @@ public class PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferOptions /// mx_bank_transfer, or us_bank_transfer. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCustomerBalanceOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCustomerBalanceOptions.cs index 7b0fa9222c..bb02415a22 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCustomerBalanceOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCustomerBalanceOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsCustomerBalanceOptions : INestedOptions { @@ -10,6 +13,9 @@ public class PaymentIntentPaymentMethodOptionsCustomerBalanceOptions : INestedOp /// bank_transfer. /// [JsonProperty("bank_transfer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_transfer")] +#endif public PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferOptions BankTransfer { get; set; } /// @@ -17,6 +23,9 @@ public class PaymentIntentPaymentMethodOptionsCustomerBalanceOptions : INestedOp /// balance. Permitted values include: bank_transfer. /// [JsonProperty("funding_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("funding_type")] +#endif public string FundingType { get; set; } /// @@ -44,6 +53,9 @@ public class PaymentIntentPaymentMethodOptionsCustomerBalanceOptions : INestedOp /// off_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsEpsOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsEpsOptions.cs index bb2ffa1bbf..e272f14483 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsEpsOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsEpsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsEpsOptions : INestedOptions { @@ -30,6 +33,9 @@ public class PaymentIntentPaymentMethodOptionsEpsOptions : INestedOptions /// off_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsFpxOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsFpxOptions.cs index f189fd9bb5..0eaece75d7 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsFpxOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsFpxOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsFpxOptions : INestedOptions { @@ -30,6 +33,9 @@ public class PaymentIntentPaymentMethodOptionsFpxOptions : INestedOptions /// off_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsGiropayOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsGiropayOptions.cs index 3e6a5fa74b..02a5514577 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsGiropayOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsGiropayOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsGiropayOptions : INestedOptions { @@ -30,6 +33,9 @@ public class PaymentIntentPaymentMethodOptionsGiropayOptions : INestedOptions /// off_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsGrabpayOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsGrabpayOptions.cs index 5002c7092d..decfe3cb01 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsGrabpayOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsGrabpayOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsGrabpayOptions : INestedOptions { @@ -30,6 +33,9 @@ public class PaymentIntentPaymentMethodOptionsGrabpayOptions : INestedOptions /// off_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsIdealOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsIdealOptions.cs index 6487b1eb6d..e40d7e6597 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsIdealOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsIdealOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsIdealOptions : INestedOptions { @@ -31,6 +34,9 @@ public class PaymentIntentPaymentMethodOptionsIdealOptions : INestedOptions /// One of: none, or off_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsKakaoPayOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsKakaoPayOptions.cs index 0035ab3a50..045cd4a190 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsKakaoPayOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsKakaoPayOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsKakaoPayOptions : INestedOptions { @@ -16,6 +19,9 @@ public class PaymentIntentPaymentMethodOptionsKakaoPayOptions : INestedOptions /// for this parameter unsets the stored value for this payment method type. /// [JsonProperty("capture_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("capture_method")] +#endif public string CaptureMethod { get; set; } /// @@ -40,6 +46,9 @@ public class PaymentIntentPaymentMethodOptionsKakaoPayOptions : INestedOptions /// One of: none, or off_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsKlarnaOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsKlarnaOptions.cs index 35abe597eb..04df1da353 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsKlarnaOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsKlarnaOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsKlarnaOptions : INestedOptions { @@ -16,6 +19,9 @@ public class PaymentIntentPaymentMethodOptionsKlarnaOptions : INestedOptions /// for this parameter unsets the stored value for this payment method type. /// [JsonProperty("capture_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("capture_method")] +#endif public string CaptureMethod { get; set; } /// @@ -30,6 +36,9 @@ public class PaymentIntentPaymentMethodOptionsKlarnaOptions : INestedOptions /// pl-PL, pt-PT, ro-RO, sv-FI, or sv-SE. /// [JsonProperty("preferred_locale")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preferred_locale")] +#endif public string PreferredLocale { get; set; } /// @@ -57,6 +66,9 @@ public class PaymentIntentPaymentMethodOptionsKlarnaOptions : INestedOptions /// off_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsKonbiniOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsKonbiniOptions.cs index f676fa49b3..fc8ad7dabf 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsKonbiniOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsKonbiniOptions.cs @@ -4,6 +4,9 @@ namespace Stripe using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsKonbiniOptions : INestedOptions { @@ -13,6 +16,9 @@ public class PaymentIntentPaymentMethodOptionsKonbiniOptions : INestedOptions /// case of insufficient uniqueness. We recommend to use the customer's phone number. /// [JsonProperty("confirmation_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("confirmation_number")] +#endif public string ConfirmationNumber { get; set; } /// @@ -22,6 +28,9 @@ public class PaymentIntentPaymentMethodOptionsKonbiniOptions : INestedOptions /// Wednesday 23:59:59 JST. Defaults to 3 days. /// [JsonProperty("expires_after_days")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("expires_after_days")] +#endif public long? ExpiresAfterDays { get; set; } /// @@ -30,6 +39,10 @@ public class PaymentIntentPaymentMethodOptionsKonbiniOptions : INestedOptions /// [JsonProperty("expires_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("expires_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? ExpiresAt { get; set; } /// @@ -37,6 +50,9 @@ public class PaymentIntentPaymentMethodOptionsKonbiniOptions : INestedOptions /// convenience store. /// [JsonProperty("product_description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("product_description")] +#endif public string ProductDescription { get; set; } /// @@ -64,6 +80,9 @@ public class PaymentIntentPaymentMethodOptionsKonbiniOptions : INestedOptions /// off_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsKrCardOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsKrCardOptions.cs index 08b9e47a65..e17dce97c8 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsKrCardOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsKrCardOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsKrCardOptions : INestedOptions { @@ -16,6 +19,9 @@ public class PaymentIntentPaymentMethodOptionsKrCardOptions : INestedOptions /// for this parameter unsets the stored value for this payment method type. /// [JsonProperty("capture_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("capture_method")] +#endif public string CaptureMethod { get; set; } /// @@ -40,6 +46,9 @@ public class PaymentIntentPaymentMethodOptionsKrCardOptions : INestedOptions /// One of: none, or off_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsLinkOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsLinkOptions.cs index 61ce871ded..43cbf7883d 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsLinkOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsLinkOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsLinkOptions : INestedOptions { @@ -17,6 +20,9 @@ public class PaymentIntentPaymentMethodOptionsLinkOptions : INestedOptions /// for this parameter unsets the stored value for this payment method type. /// [JsonProperty("capture_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("capture_method")] +#endif public string CaptureMethod { get; set; } /// @@ -24,6 +30,9 @@ public class PaymentIntentPaymentMethodOptionsLinkOptions : INestedOptions /// [Obsolete("This property is deprecated, please refer to the description for details.")] [JsonProperty("persistent_token")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("persistent_token")] +#endif public string PersistentToken { get; set; } /// @@ -52,6 +61,9 @@ public class PaymentIntentPaymentMethodOptionsLinkOptions : INestedOptions /// One of: none, or off_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsMobilepayOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsMobilepayOptions.cs index f2482ee251..57916a81d8 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsMobilepayOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsMobilepayOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsMobilepayOptions : INestedOptions { @@ -16,6 +19,9 @@ public class PaymentIntentPaymentMethodOptionsMobilepayOptions : INestedOptions /// for this parameter unsets the stored value for this payment method type. /// [JsonProperty("capture_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("capture_method")] +#endif public string CaptureMethod { get; set; } /// @@ -43,6 +49,9 @@ public class PaymentIntentPaymentMethodOptionsMobilepayOptions : INestedOptions /// off_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsMultibancoOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsMultibancoOptions.cs index d4ead57896..013dbb9ee4 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsMultibancoOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsMultibancoOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsMultibancoOptions : INestedOptions { @@ -30,6 +33,9 @@ public class PaymentIntentPaymentMethodOptionsMultibancoOptions : INestedOptions /// off_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsNaverPayOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsNaverPayOptions.cs index 7aef8ad5a4..a1b4ef4361 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsNaverPayOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsNaverPayOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsNaverPayOptions : INestedOptions { @@ -16,6 +19,9 @@ public class PaymentIntentPaymentMethodOptionsNaverPayOptions : INestedOptions /// for this parameter unsets the stored value for this payment method type. /// [JsonProperty("capture_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("capture_method")] +#endif public string CaptureMethod { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsOptions.cs index 279e8af790..16b414cfcc 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsOptions : INestedOptions { @@ -10,6 +13,9 @@ public class PaymentIntentPaymentMethodOptionsOptions : INestedOptions /// ACSS Debit payment method options. /// [JsonProperty("acss_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("acss_debit")] +#endif public PaymentIntentPaymentMethodOptionsAcssDebitOptions AcssDebit { get; set; } /// @@ -17,6 +23,9 @@ public class PaymentIntentPaymentMethodOptionsOptions : INestedOptions /// Affirm payment method options. /// [JsonProperty("affirm")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("affirm")] +#endif public PaymentIntentPaymentMethodOptionsAffirmOptions Affirm { get; set; } /// @@ -24,6 +33,9 @@ public class PaymentIntentPaymentMethodOptionsOptions : INestedOptions /// about the Afterpay Clearpay payment method options. /// [JsonProperty("afterpay_clearpay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("afterpay_clearpay")] +#endif public PaymentIntentPaymentMethodOptionsAfterpayClearpayOptions AfterpayClearpay { get; set; } /// @@ -31,6 +43,9 @@ public class PaymentIntentPaymentMethodOptionsOptions : INestedOptions /// Alipay payment method options. /// [JsonProperty("alipay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("alipay")] +#endif public PaymentIntentPaymentMethodOptionsAlipayOptions Alipay { get; set; } /// @@ -38,6 +53,9 @@ public class PaymentIntentPaymentMethodOptionsOptions : INestedOptions /// payment method options. /// [JsonProperty("alma")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("alma")] +#endif public PaymentIntentPaymentMethodOptionsAlmaOptions Alma { get; set; } /// @@ -45,6 +63,9 @@ public class PaymentIntentPaymentMethodOptionsOptions : INestedOptions /// Amazon Pay payment method options. /// [JsonProperty("amazon_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amazon_pay")] +#endif public PaymentIntentPaymentMethodOptionsAmazonPayOptions AmazonPay { get; set; } /// @@ -52,6 +73,9 @@ public class PaymentIntentPaymentMethodOptionsOptions : INestedOptions /// the AU BECS Direct Debit payment method options. /// [JsonProperty("au_becs_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("au_becs_debit")] +#endif public PaymentIntentPaymentMethodOptionsAuBecsDebitOptions AuBecsDebit { get; set; } /// @@ -59,6 +83,9 @@ public class PaymentIntentPaymentMethodOptionsOptions : INestedOptions /// BACS Debit payment method options. /// [JsonProperty("bacs_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bacs_debit")] +#endif public PaymentIntentPaymentMethodOptionsBacsDebitOptions BacsDebit { get; set; } /// @@ -66,6 +93,9 @@ public class PaymentIntentPaymentMethodOptionsOptions : INestedOptions /// Bancontact payment method options. /// [JsonProperty("bancontact")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bancontact")] +#endif public PaymentIntentPaymentMethodOptionsBancontactOptions Bancontact { get; set; } /// @@ -73,6 +103,9 @@ public class PaymentIntentPaymentMethodOptionsOptions : INestedOptions /// payment method options. /// [JsonProperty("blik")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("blik")] +#endif public PaymentIntentPaymentMethodOptionsBlikOptions Blik { get; set; } /// @@ -80,12 +113,18 @@ public class PaymentIntentPaymentMethodOptionsOptions : INestedOptions /// Boleto payment method options. /// [JsonProperty("boleto")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("boleto")] +#endif public PaymentIntentPaymentMethodOptionsBoletoOptions Boleto { get; set; } /// /// Configuration for any card payments attempted on this PaymentIntent. /// [JsonProperty("card")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card")] +#endif public PaymentIntentPaymentMethodOptionsCardOptions Card { get; set; } /// @@ -93,6 +132,9 @@ public class PaymentIntentPaymentMethodOptionsOptions : INestedOptions /// Card Present payment method options. /// [JsonProperty("card_present")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card_present")] +#endif public PaymentIntentPaymentMethodOptionsCardPresentOptions CardPresent { get; set; } /// @@ -100,6 +142,9 @@ public class PaymentIntentPaymentMethodOptionsOptions : INestedOptions /// App Pay payment method options. /// [JsonProperty("cashapp")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cashapp")] +#endif public PaymentIntentPaymentMethodOptionsCashappOptions Cashapp { get; set; } /// @@ -107,6 +152,9 @@ public class PaymentIntentPaymentMethodOptionsOptions : INestedOptions /// the customer balance payment method options. /// [JsonProperty("customer_balance")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_balance")] +#endif public PaymentIntentPaymentMethodOptionsCustomerBalanceOptions CustomerBalance { get; set; } /// @@ -114,6 +162,9 @@ public class PaymentIntentPaymentMethodOptionsOptions : INestedOptions /// payment method options. /// [JsonProperty("eps")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("eps")] +#endif public PaymentIntentPaymentMethodOptionsEpsOptions Eps { get; set; } /// @@ -121,6 +172,9 @@ public class PaymentIntentPaymentMethodOptionsOptions : INestedOptions /// payment method options. /// [JsonProperty("fpx")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fpx")] +#endif public PaymentIntentPaymentMethodOptionsFpxOptions Fpx { get; set; } /// @@ -128,6 +182,9 @@ public class PaymentIntentPaymentMethodOptionsOptions : INestedOptions /// Giropay payment method options. /// [JsonProperty("giropay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("giropay")] +#endif public PaymentIntentPaymentMethodOptionsGiropayOptions Giropay { get; set; } /// @@ -135,6 +192,9 @@ public class PaymentIntentPaymentMethodOptionsOptions : INestedOptions /// Grabpay payment method options. /// [JsonProperty("grabpay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("grabpay")] +#endif public PaymentIntentPaymentMethodOptionsGrabpayOptions Grabpay { get; set; } /// @@ -142,6 +202,9 @@ public class PaymentIntentPaymentMethodOptionsOptions : INestedOptions /// payment method options. /// [JsonProperty("ideal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ideal")] +#endif public PaymentIntentPaymentMethodOptionsIdealOptions Ideal { get; set; } /// @@ -149,6 +212,9 @@ public class PaymentIntentPaymentMethodOptionsOptions : INestedOptions /// the Card Present payment method options. /// [JsonProperty("interac_present")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interac_present")] +#endif public PaymentIntentPaymentMethodOptionsInteracPresentOptions InteracPresent { get; set; } /// @@ -156,6 +222,9 @@ public class PaymentIntentPaymentMethodOptionsOptions : INestedOptions /// Kakao Pay payment method options. /// [JsonProperty("kakao_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("kakao_pay")] +#endif public PaymentIntentPaymentMethodOptionsKakaoPayOptions KakaoPay { get; set; } /// @@ -163,6 +232,9 @@ public class PaymentIntentPaymentMethodOptionsOptions : INestedOptions /// Klarna payment method options. /// [JsonProperty("klarna")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("klarna")] +#endif public PaymentIntentPaymentMethodOptionsKlarnaOptions Klarna { get; set; } /// @@ -170,6 +242,9 @@ public class PaymentIntentPaymentMethodOptionsOptions : INestedOptions /// Konbini payment method options. /// [JsonProperty("konbini")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("konbini")] +#endif public PaymentIntentPaymentMethodOptionsKonbiniOptions Konbini { get; set; } /// @@ -177,6 +252,9 @@ public class PaymentIntentPaymentMethodOptionsOptions : INestedOptions /// Card payment method options. /// [JsonProperty("kr_card")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("kr_card")] +#endif public PaymentIntentPaymentMethodOptionsKrCardOptions KrCard { get; set; } /// @@ -184,6 +262,9 @@ public class PaymentIntentPaymentMethodOptionsOptions : INestedOptions /// payment method options. /// [JsonProperty("link")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("link")] +#endif public PaymentIntentPaymentMethodOptionsLinkOptions Link { get; set; } /// @@ -191,6 +272,9 @@ public class PaymentIntentPaymentMethodOptionsOptions : INestedOptions /// MobilePay payment method options. /// [JsonProperty("mobilepay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mobilepay")] +#endif public PaymentIntentPaymentMethodOptionsMobilepayOptions Mobilepay { get; set; } /// @@ -198,6 +282,9 @@ public class PaymentIntentPaymentMethodOptionsOptions : INestedOptions /// Multibanco payment method options. /// [JsonProperty("multibanco")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("multibanco")] +#endif public PaymentIntentPaymentMethodOptionsMultibancoOptions Multibanco { get; set; } /// @@ -205,6 +292,9 @@ public class PaymentIntentPaymentMethodOptionsOptions : INestedOptions /// Naver Pay payment method options. /// [JsonProperty("naver_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("naver_pay")] +#endif public PaymentIntentPaymentMethodOptionsNaverPayOptions NaverPay { get; set; } /// @@ -212,6 +302,9 @@ public class PaymentIntentPaymentMethodOptionsOptions : INestedOptions /// payment method options. /// [JsonProperty("oxxo")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("oxxo")] +#endif public PaymentIntentPaymentMethodOptionsOxxoOptions Oxxo { get; set; } /// @@ -219,6 +312,9 @@ public class PaymentIntentPaymentMethodOptionsOptions : INestedOptions /// Przelewy24 payment method options. /// [JsonProperty("p24")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("p24")] +#endif public PaymentIntentPaymentMethodOptionsP24Options P24 { get; set; } /// @@ -226,6 +322,9 @@ public class PaymentIntentPaymentMethodOptionsOptions : INestedOptions /// payment method options. /// [JsonProperty("payco")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payco")] +#endif public PaymentIntentPaymentMethodOptionsPaycoOptions Payco { get; set; } /// @@ -233,6 +332,9 @@ public class PaymentIntentPaymentMethodOptionsOptions : INestedOptions /// PayNow payment method options. /// [JsonProperty("paynow")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("paynow")] +#endif public PaymentIntentPaymentMethodOptionsPaynowOptions Paynow { get; set; } /// @@ -240,6 +342,9 @@ public class PaymentIntentPaymentMethodOptionsOptions : INestedOptions /// PayPal payment method options. /// [JsonProperty("paypal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("paypal")] +#endif public PaymentIntentPaymentMethodOptionsPaypalOptions Paypal { get; set; } /// @@ -247,6 +352,9 @@ public class PaymentIntentPaymentMethodOptionsOptions : INestedOptions /// payment method options. /// [JsonProperty("pix")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("pix")] +#endif public PaymentIntentPaymentMethodOptionsPixOptions Pix { get; set; } /// @@ -254,6 +362,9 @@ public class PaymentIntentPaymentMethodOptionsOptions : INestedOptions /// PromptPay payment method options. /// [JsonProperty("promptpay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("promptpay")] +#endif public PaymentIntentPaymentMethodOptionsPromptpayOptions Promptpay { get; set; } /// @@ -261,6 +372,9 @@ public class PaymentIntentPaymentMethodOptionsOptions : INestedOptions /// Revolut Pay payment method options. /// [JsonProperty("revolut_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("revolut_pay")] +#endif public PaymentIntentPaymentMethodOptionsRevolutPayOptions RevolutPay { get; set; } /// @@ -268,6 +382,9 @@ public class PaymentIntentPaymentMethodOptionsOptions : INestedOptions /// Samsung Pay payment method options. /// [JsonProperty("samsung_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("samsung_pay")] +#endif public PaymentIntentPaymentMethodOptionsSamsungPayOptions SamsungPay { get; set; } /// @@ -275,6 +392,9 @@ public class PaymentIntentPaymentMethodOptionsOptions : INestedOptions /// SEPA Debit payment method options. /// [JsonProperty("sepa_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sepa_debit")] +#endif public PaymentIntentPaymentMethodOptionsSepaDebitOptions SepaDebit { get; set; } /// @@ -282,6 +402,9 @@ public class PaymentIntentPaymentMethodOptionsOptions : INestedOptions /// SOFORT payment method options. /// [JsonProperty("sofort")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sofort")] +#endif public PaymentIntentPaymentMethodOptionsSofortOptions Sofort { get; set; } /// @@ -289,6 +412,9 @@ public class PaymentIntentPaymentMethodOptionsOptions : INestedOptions /// payment method options. /// [JsonProperty("swish")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("swish")] +#endif public PaymentIntentPaymentMethodOptionsSwishOptions Swish { get; set; } /// @@ -296,6 +422,9 @@ public class PaymentIntentPaymentMethodOptionsOptions : INestedOptions /// payment method options. /// [JsonProperty("twint")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("twint")] +#endif public PaymentIntentPaymentMethodOptionsTwintOptions Twint { get; set; } /// @@ -303,6 +432,9 @@ public class PaymentIntentPaymentMethodOptionsOptions : INestedOptions /// the US bank account payment method options. /// [JsonProperty("us_bank_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("us_bank_account")] +#endif public PaymentIntentPaymentMethodOptionsUsBankAccountOptions UsBankAccount { get; set; } /// @@ -310,6 +442,9 @@ public class PaymentIntentPaymentMethodOptionsOptions : INestedOptions /// WeChat Pay payment method options. /// [JsonProperty("wechat_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("wechat_pay")] +#endif public PaymentIntentPaymentMethodOptionsWechatPayOptions WechatPay { get; set; } /// @@ -317,6 +452,9 @@ public class PaymentIntentPaymentMethodOptionsOptions : INestedOptions /// payment method options. /// [JsonProperty("zip")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("zip")] +#endif public PaymentIntentPaymentMethodOptionsZipOptions Zip { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsOxxoOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsOxxoOptions.cs index 0ebd64184a..79106d0c60 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsOxxoOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsOxxoOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsOxxoOptions : INestedOptions { @@ -11,6 +14,9 @@ public class PaymentIntentPaymentMethodOptionsOxxoOptions : INestedOptions /// expire on Wednesday at 23:59 America/Mexico_City time. /// [JsonProperty("expires_after_days")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("expires_after_days")] +#endif public long? ExpiresAfterDays { get; set; } /// @@ -38,6 +44,9 @@ public class PaymentIntentPaymentMethodOptionsOxxoOptions : INestedOptions /// off_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsP24Options.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsP24Options.cs index eb7fc67e6a..a85e26e66b 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsP24Options.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsP24Options.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsP24Options : INestedOptions { @@ -30,12 +33,18 @@ public class PaymentIntentPaymentMethodOptionsP24Options : INestedOptions /// off_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } /// /// Confirm that the payer has accepted the P24 terms and conditions. /// [JsonProperty("tos_shown_and_accepted")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tos_shown_and_accepted")] +#endif public bool? TosShownAndAccepted { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsPaycoOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsPaycoOptions.cs index 90b26f7af3..8620080b3f 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsPaycoOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsPaycoOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsPaycoOptions : INestedOptions { @@ -16,6 +19,9 @@ public class PaymentIntentPaymentMethodOptionsPaycoOptions : INestedOptions /// for this parameter unsets the stored value for this payment method type. /// [JsonProperty("capture_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("capture_method")] +#endif public string CaptureMethod { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsPaynowOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsPaynowOptions.cs index 2dc6b91ccd..5fd7a71f8f 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsPaynowOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsPaynowOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsPaynowOptions : INestedOptions { @@ -30,6 +33,9 @@ public class PaymentIntentPaymentMethodOptionsPaynowOptions : INestedOptions /// off_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsPaypalOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsPaypalOptions.cs index 1fd2de6f7a..1dcd717cc2 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsPaypalOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsPaypalOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsPaypalOptions : INestedOptions { @@ -9,6 +12,9 @@ public class PaymentIntentPaymentMethodOptionsPaypalOptions : INestedOptions /// Controls when the funds will be captured from the customer's account. /// [JsonProperty("capture_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("capture_method")] +#endif public string CaptureMethod { get; set; } /// @@ -20,6 +26,9 @@ public class PaymentIntentPaymentMethodOptionsPaypalOptions : INestedOptions /// pl-PL, pt-PT, sk-SK, or sv-SE. /// [JsonProperty("preferred_locale")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preferred_locale")] +#endif public string PreferredLocale { get; set; } /// @@ -28,12 +37,18 @@ public class PaymentIntentPaymentMethodOptionsPaypalOptions : INestedOptions /// settings to block multiple payments per invoice ID. /// [JsonProperty("reference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reference")] +#endif public string Reference { get; set; } /// /// The risk correlation ID for an on-session payment using a saved PayPal payment method. /// [JsonProperty("risk_correlation_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("risk_correlation_id")] +#endif public string RiskCorrelationId { get; set; } /// @@ -62,6 +77,9 @@ public class PaymentIntentPaymentMethodOptionsPaypalOptions : INestedOptions /// One of: none, or off_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsPixOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsPixOptions.cs index b4560946ce..8a56462c5a 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsPixOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsPixOptions.cs @@ -4,6 +4,9 @@ namespace Stripe using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsPixOptions : INestedOptions { @@ -12,6 +15,9 @@ public class PaymentIntentPaymentMethodOptionsPixOptions : INestedOptions /// Defaults to 86400 seconds. /// [JsonProperty("expires_after_seconds")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("expires_after_seconds")] +#endif public long? ExpiresAfterSeconds { get; set; } /// @@ -20,6 +26,10 @@ public class PaymentIntentPaymentMethodOptionsPixOptions : INestedOptions /// [JsonProperty("expires_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("expires_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? ExpiresAt { get; set; } /// @@ -47,6 +57,9 @@ public class PaymentIntentPaymentMethodOptionsPixOptions : INestedOptions /// off_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsPromptpayOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsPromptpayOptions.cs index 7666412d56..e4d8b29550 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsPromptpayOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsPromptpayOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsPromptpayOptions : INestedOptions { @@ -30,6 +33,9 @@ public class PaymentIntentPaymentMethodOptionsPromptpayOptions : INestedOptions /// off_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsRevolutPayOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsRevolutPayOptions.cs index bde4224a82..e2b868723d 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsRevolutPayOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsRevolutPayOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsRevolutPayOptions : INestedOptions { @@ -16,6 +19,9 @@ public class PaymentIntentPaymentMethodOptionsRevolutPayOptions : INestedOptions /// for this parameter unsets the stored value for this payment method type. /// [JsonProperty("capture_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("capture_method")] +#endif public string CaptureMethod { get; set; } /// @@ -40,6 +46,9 @@ public class PaymentIntentPaymentMethodOptionsRevolutPayOptions : INestedOptions /// One of: none, or off_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsSamsungPayOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsSamsungPayOptions.cs index a913ad2ee7..23ba364855 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsSamsungPayOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsSamsungPayOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsSamsungPayOptions : INestedOptions { @@ -16,6 +19,9 @@ public class PaymentIntentPaymentMethodOptionsSamsungPayOptions : INestedOptions /// for this parameter unsets the stored value for this payment method type. /// [JsonProperty("capture_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("capture_method")] +#endif public string CaptureMethod { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsSepaDebitOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsSepaDebitOptions.cs index 856d47c19c..dd496dcea9 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsSepaDebitOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsSepaDebitOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsSepaDebitOptions : INestedOptions { @@ -9,6 +12,9 @@ public class PaymentIntentPaymentMethodOptionsSepaDebitOptions : INestedOptions /// Additional fields for Mandate creation. /// [JsonProperty("mandate_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mandate_options")] +#endif public PaymentIntentPaymentMethodOptionsSepaDebitMandateOptionsOptions MandateOptions { get; set; } /// @@ -37,6 +43,9 @@ public class PaymentIntentPaymentMethodOptionsSepaDebitOptions : INestedOptions /// One of: none, off_session, or on_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsSofortOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsSofortOptions.cs index 988f63814a..454e7fd053 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsSofortOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsSofortOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsSofortOptions : INestedOptions { @@ -10,6 +13,9 @@ public class PaymentIntentPaymentMethodOptionsSofortOptions : INestedOptions /// One of: de, en, es, fr, it, nl, or pl. /// [JsonProperty("preferred_language")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preferred_language")] +#endif public string PreferredLanguage { get; set; } /// @@ -38,6 +44,9 @@ public class PaymentIntentPaymentMethodOptionsSofortOptions : INestedOptions /// One of: none, or off_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsSwishOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsSwishOptions.cs index a0aed59ac0..787cf86583 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsSwishOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsSwishOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsSwishOptions : INestedOptions { @@ -9,6 +12,9 @@ public class PaymentIntentPaymentMethodOptionsSwishOptions : INestedOptions /// The order ID displayed in the Swish app after the payment is authorized. /// [JsonProperty("reference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reference")] +#endif public string Reference { get; set; } /// @@ -36,6 +42,9 @@ public class PaymentIntentPaymentMethodOptionsSwishOptions : INestedOptions /// off_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsTwintOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsTwintOptions.cs index 88da95ea44..0d8da01d92 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsTwintOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsTwintOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsTwintOptions : INestedOptions { @@ -30,6 +33,9 @@ public class PaymentIntentPaymentMethodOptionsTwintOptions : INestedOptions /// off_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsFiltersOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsFiltersOptions.cs index b2b4fa4969..1425a20ab0 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsFiltersOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsFiltersOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsFiltersOptions : INestedOptions { @@ -12,6 +15,9 @@ public class PaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsF /// One of: checking, or savings. /// [JsonProperty("account_subcategories")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_subcategories")] +#endif public List AccountSubcategories { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsOptions.cs index 77c0c6e23b..e799ae2dab 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsOptions : INestedOptions { @@ -11,6 +14,9 @@ public class PaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsO /// method. /// [JsonProperty("filters")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("filters")] +#endif public PaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsFiltersOptions Filters { get; set; } /// @@ -21,6 +27,9 @@ public class PaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsO /// transactions. /// [JsonProperty("permissions")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("permissions")] +#endif public List Permissions { get; set; } /// @@ -28,6 +37,9 @@ public class PaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsO /// One of: balances, ownership, or transactions. /// [JsonProperty("prefetch")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("prefetch")] +#endif public List Prefetch { get; set; } /// @@ -35,6 +47,9 @@ public class PaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsO /// user will be redirected to this URL to return to your app. /// [JsonProperty("return_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("return_url")] +#endif public string ReturnUrl { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsUsBankAccountMandateOptionsOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsUsBankAccountMandateOptionsOptions.cs index d850f16d6f..b8bbea04b3 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsUsBankAccountMandateOptionsOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsUsBankAccountMandateOptionsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsUsBankAccountMandateOptionsOptions : INestedOptions { @@ -9,6 +12,9 @@ public class PaymentIntentPaymentMethodOptionsUsBankAccountMandateOptionsOptions /// The method used to collect offline mandate customer acceptance. /// [JsonProperty("collection_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("collection_method")] +#endif public string CollectionMethod { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsUsBankAccountNetworksOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsUsBankAccountNetworksOptions.cs index c6abb0992e..7c0ba5f61d 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsUsBankAccountNetworksOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsUsBankAccountNetworksOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsUsBankAccountNetworksOptions : INestedOptions { @@ -11,6 +14,9 @@ public class PaymentIntentPaymentMethodOptionsUsBankAccountNetworksOptions : INe /// One of: ach, or us_domestic_wire. /// [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif public List Requested { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsUsBankAccountOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsUsBankAccountOptions.cs index c1c6b3acf6..ba26d7741a 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsUsBankAccountOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsUsBankAccountOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsUsBankAccountOptions : INestedOptions { @@ -9,18 +12,27 @@ public class PaymentIntentPaymentMethodOptionsUsBankAccountOptions : INestedOpti /// Additional fields for Financial Connections Session creation. /// [JsonProperty("financial_connections")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("financial_connections")] +#endif public PaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsOptions FinancialConnections { get; set; } /// /// Additional fields for Mandate creation. /// [JsonProperty("mandate_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mandate_options")] +#endif public PaymentIntentPaymentMethodOptionsUsBankAccountMandateOptionsOptions MandateOptions { get; set; } /// /// Additional fields for network related functions. /// [JsonProperty("networks")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("networks")] +#endif public PaymentIntentPaymentMethodOptionsUsBankAccountNetworksOptions Networks { get; set; } /// @@ -28,6 +40,9 @@ public class PaymentIntentPaymentMethodOptionsUsBankAccountOptions : INestedOpti /// One of: fastest, or standard. /// [JsonProperty("preferred_settlement_speed")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preferred_settlement_speed")] +#endif public string PreferredSettlementSpeed { get; set; } /// @@ -56,6 +71,9 @@ public class PaymentIntentPaymentMethodOptionsUsBankAccountOptions : INestedOpti /// One of: none, off_session, or on_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } /// @@ -63,6 +81,9 @@ public class PaymentIntentPaymentMethodOptionsUsBankAccountOptions : INestedOpti /// One of: automatic, instant, or microdeposits. /// [JsonProperty("verification_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("verification_method")] +#endif public string VerificationMethod { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsWechatPayOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsWechatPayOptions.cs index c45f0c9ff6..93b45f1908 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsWechatPayOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsWechatPayOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsWechatPayOptions : INestedOptions { @@ -9,6 +12,9 @@ public class PaymentIntentPaymentMethodOptionsWechatPayOptions : INestedOptions /// The app ID registered with WeChat Pay. Only required when client is ios or android. /// [JsonProperty("app_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("app_id")] +#endif public string AppId { get; set; } /// @@ -16,6 +22,9 @@ public class PaymentIntentPaymentMethodOptionsWechatPayOptions : INestedOptions /// One of: android, ios, or web. /// [JsonProperty("client")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("client")] +#endif public string Client { get; set; } /// @@ -43,6 +52,9 @@ public class PaymentIntentPaymentMethodOptionsWechatPayOptions : INestedOptions /// off_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsZipOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsZipOptions.cs index 5027ca5b9a..f7090928c6 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsZipOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsZipOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentPaymentMethodOptionsZipOptions : INestedOptions { @@ -30,6 +33,9 @@ public class PaymentIntentPaymentMethodOptionsZipOptions : INestedOptions /// off_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentRadarOptionsOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentRadarOptionsOptions.cs index 11ee244102..665d230e3b 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentRadarOptionsOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentRadarOptionsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentRadarOptionsOptions : INestedOptions { @@ -11,6 +14,9 @@ public class PaymentIntentRadarOptionsOptions : INestedOptions /// predictions on your payments. /// [JsonProperty("session")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("session")] +#endif public string Session { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentTransferDataOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentTransferDataOptions.cs index 4031d6e4dd..931f0d6319 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentTransferDataOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentTransferDataOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentTransferDataOptions : INestedOptions { @@ -15,6 +18,9 @@ public class PaymentIntentTransferDataOptions : INestedOptions /// might be a better fit for your integration. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long? Amount { get; set; } /// @@ -24,6 +30,9 @@ public class PaymentIntentTransferDataOptions : INestedOptions /// transfer field. /// [JsonProperty("destination")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("destination")] +#endif public string Destination { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentUpdateOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentUpdateOptions.cs index 8644115ee9..0acb33634c 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentUpdateOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentUpdateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentUpdateOptions : BaseOptions, IHasMetadata { @@ -17,6 +20,9 @@ public class PaymentIntentUpdateOptions : BaseOptions, IHasMetadata /// 99999999 for a USD charge of $999,999.99). /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long? Amount { get; set; } /// @@ -28,6 +34,9 @@ public class PaymentIntentUpdateOptions : BaseOptions, IHasMetadata /// accounts. /// [JsonProperty("application_fee_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("application_fee_amount")] +#endif public long? ApplicationFeeAmount { get; set; } /// @@ -35,6 +44,9 @@ public class PaymentIntentUpdateOptions : BaseOptions, IHasMetadata /// One of: automatic, automatic_async, or manual. /// [JsonProperty("capture_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("capture_method")] +#endif public string CaptureMethod { get; set; } /// @@ -43,6 +55,9 @@ public class PaymentIntentUpdateOptions : BaseOptions, IHasMetadata /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// @@ -60,12 +75,18 @@ public class PaymentIntentUpdateOptions : BaseOptions, IHasMetadata /// payment method representing the card is created and attached to the Customer instead. /// [JsonProperty("customer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] +#endif public string Customer { get; set; } /// /// An arbitrary string attached to the object. Often useful for displaying to users. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// @@ -75,6 +96,9 @@ public class PaymentIntentUpdateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -84,6 +108,9 @@ public class PaymentIntentUpdateOptions : BaseOptions, IHasMetadata /// an empty string. /// [JsonProperty("payment_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method")] +#endif public string PaymentMethod { get; set; } /// @@ -92,6 +119,9 @@ public class PaymentIntentUpdateOptions : BaseOptions, IHasMetadata /// configuration to use with this PaymentIntent. /// [JsonProperty("payment_method_configuration")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_configuration")] +#endif public string PaymentMethodConfiguration { get; set; } /// @@ -101,12 +131,18 @@ public class PaymentIntentUpdateOptions : BaseOptions, IHasMetadata /// property on the PaymentIntent. /// [JsonProperty("payment_method_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_data")] +#endif public PaymentIntentPaymentMethodDataOptions PaymentMethodData { get; set; } /// /// Payment-method-specific configuration for this PaymentIntent. /// [JsonProperty("payment_method_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_options")] +#endif public PaymentIntentPaymentMethodOptionsOptions PaymentMethodOptions { get; set; } /// @@ -115,6 +151,9 @@ public class PaymentIntentUpdateOptions : BaseOptions, IHasMetadata /// href="https://dashboard.stripe.com/settings/payment_methods">Stripe Dashboard. /// [JsonProperty("payment_method_types")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_types")] +#endif public List PaymentMethodTypes { get; set; } /// @@ -124,6 +163,9 @@ public class PaymentIntentUpdateOptions : BaseOptions, IHasMetadata /// settings. /// [JsonProperty("receipt_email")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("receipt_email")] +#endif public string ReceiptEmail { get; set; } /// @@ -152,12 +194,18 @@ public class PaymentIntentUpdateOptions : BaseOptions, IHasMetadata /// One of: off_session, or on_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } /// /// Shipping information for this PaymentIntent. /// [JsonProperty("shipping")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping")] +#endif public ChargeShippingOptions Shipping { get; set; } /// @@ -172,6 +220,9 @@ public class PaymentIntentUpdateOptions : BaseOptions, IHasMetadata /// instead. /// [JsonProperty("statement_descriptor")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("statement_descriptor")] +#endif public string StatementDescriptor { get; set; } /// @@ -181,6 +232,9 @@ public class PaymentIntentUpdateOptions : BaseOptions, IHasMetadata /// customer's statement. /// [JsonProperty("statement_descriptor_suffix")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("statement_descriptor_suffix")] +#endif public string StatementDescriptorSuffix { get; set; } /// @@ -189,6 +243,9 @@ public class PaymentIntentUpdateOptions : BaseOptions, IHasMetadata /// for connected accounts. /// [JsonProperty("transfer_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transfer_data")] +#endif public PaymentIntentTransferDataOptions TransferData { get; set; } /// @@ -198,6 +255,9 @@ public class PaymentIntentUpdateOptions : BaseOptions, IHasMetadata /// accounts. /// [JsonProperty("transfer_group")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transfer_group")] +#endif public string TransferGroup { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentVerifyMicrodepositsOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentVerifyMicrodepositsOptions.cs index 62da6ae93a..f9a033b8d2 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentVerifyMicrodepositsOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentVerifyMicrodepositsOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentIntentVerifyMicrodepositsOptions : BaseOptions { @@ -11,6 +14,9 @@ public class PaymentIntentVerifyMicrodepositsOptions : BaseOptions /// to the bank account. /// [JsonProperty("amounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amounts")] +#endif public List Amounts { get; set; } /// @@ -18,6 +24,9 @@ public class PaymentIntentVerifyMicrodepositsOptions : BaseOptions /// account. /// [JsonProperty("descriptor_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("descriptor_code")] +#endif public string DescriptorCode { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentLinks/PaymentLinkAfterCompletionHostedConfirmationOptions.cs b/src/Stripe.net/Services/PaymentLinks/PaymentLinkAfterCompletionHostedConfirmationOptions.cs index 1c760bc2ba..c74b24f9db 100644 --- a/src/Stripe.net/Services/PaymentLinks/PaymentLinkAfterCompletionHostedConfirmationOptions.cs +++ b/src/Stripe.net/Services/PaymentLinks/PaymentLinkAfterCompletionHostedConfirmationOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentLinkAfterCompletionHostedConfirmationOptions : INestedOptions { @@ -9,6 +12,9 @@ public class PaymentLinkAfterCompletionHostedConfirmationOptions : INestedOption /// A custom message to display to the customer after the purchase is complete. /// [JsonProperty("custom_message")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("custom_message")] +#endif public string CustomMessage { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentLinks/PaymentLinkAfterCompletionOptions.cs b/src/Stripe.net/Services/PaymentLinks/PaymentLinkAfterCompletionOptions.cs index cd828a082e..a3d8952002 100644 --- a/src/Stripe.net/Services/PaymentLinks/PaymentLinkAfterCompletionOptions.cs +++ b/src/Stripe.net/Services/PaymentLinks/PaymentLinkAfterCompletionOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentLinkAfterCompletionOptions : INestedOptions { @@ -9,12 +12,18 @@ public class PaymentLinkAfterCompletionOptions : INestedOptions /// Configuration when type=hosted_confirmation. /// [JsonProperty("hosted_confirmation")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("hosted_confirmation")] +#endif public PaymentLinkAfterCompletionHostedConfirmationOptions HostedConfirmation { get; set; } /// /// Configuration when type=redirect. /// [JsonProperty("redirect")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("redirect")] +#endif public PaymentLinkAfterCompletionRedirectOptions Redirect { get; set; } /// @@ -23,6 +32,9 @@ public class PaymentLinkAfterCompletionOptions : INestedOptions /// One of: hosted_confirmation, or redirect. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentLinks/PaymentLinkAfterCompletionRedirectOptions.cs b/src/Stripe.net/Services/PaymentLinks/PaymentLinkAfterCompletionRedirectOptions.cs index 937230cd1a..1af03a3beb 100644 --- a/src/Stripe.net/Services/PaymentLinks/PaymentLinkAfterCompletionRedirectOptions.cs +++ b/src/Stripe.net/Services/PaymentLinks/PaymentLinkAfterCompletionRedirectOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentLinkAfterCompletionRedirectOptions : INestedOptions { @@ -12,6 +15,9 @@ public class PaymentLinkAfterCompletionRedirectOptions : INestedOptions /// session included. /// [JsonProperty("url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("url")] +#endif public string Url { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentLinks/PaymentLinkAutomaticTaxLiabilityOptions.cs b/src/Stripe.net/Services/PaymentLinks/PaymentLinkAutomaticTaxLiabilityOptions.cs index 8312ba128c..3c055cb8f0 100644 --- a/src/Stripe.net/Services/PaymentLinks/PaymentLinkAutomaticTaxLiabilityOptions.cs +++ b/src/Stripe.net/Services/PaymentLinks/PaymentLinkAutomaticTaxLiabilityOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentLinkAutomaticTaxLiabilityOptions : INestedOptions { @@ -9,6 +12,9 @@ public class PaymentLinkAutomaticTaxLiabilityOptions : INestedOptions /// The connected account being referenced when type is account. /// [JsonProperty("account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account")] +#endif public string Account { get; set; } /// @@ -16,6 +22,9 @@ public class PaymentLinkAutomaticTaxLiabilityOptions : INestedOptions /// One of: account, or self. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentLinks/PaymentLinkAutomaticTaxOptions.cs b/src/Stripe.net/Services/PaymentLinks/PaymentLinkAutomaticTaxOptions.cs index 09467817a9..dd01222e83 100644 --- a/src/Stripe.net/Services/PaymentLinks/PaymentLinkAutomaticTaxOptions.cs +++ b/src/Stripe.net/Services/PaymentLinks/PaymentLinkAutomaticTaxOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentLinkAutomaticTaxOptions : INestedOptions { @@ -9,6 +12,9 @@ public class PaymentLinkAutomaticTaxOptions : INestedOptions /// If true, tax will be calculated automatically using the customer's location. /// [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool? Enabled { get; set; } /// @@ -17,6 +23,9 @@ public class PaymentLinkAutomaticTaxOptions : INestedOptions /// transaction is returned in the report of the connected account. /// [JsonProperty("liability")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("liability")] +#endif public PaymentLinkAutomaticTaxLiabilityOptions Liability { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentLinks/PaymentLinkConsentCollectionOptions.cs b/src/Stripe.net/Services/PaymentLinks/PaymentLinkConsentCollectionOptions.cs index afe9d867a5..7a3c194953 100644 --- a/src/Stripe.net/Services/PaymentLinks/PaymentLinkConsentCollectionOptions.cs +++ b/src/Stripe.net/Services/PaymentLinks/PaymentLinkConsentCollectionOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentLinkConsentCollectionOptions : INestedOptions { @@ -10,6 +13,9 @@ public class PaymentLinkConsentCollectionOptions : INestedOptions /// hidden, it will hide legal text related to the reuse of a payment method. /// [JsonProperty("payment_method_reuse_agreement")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_reuse_agreement")] +#endif public PaymentLinkConsentCollectionPaymentMethodReuseAgreementOptions PaymentMethodReuseAgreement { get; set; } /// @@ -20,6 +26,9 @@ public class PaymentLinkConsentCollectionOptions : INestedOptions /// One of: auto, or none. /// [JsonProperty("promotions")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("promotions")] +#endif public string Promotions { get; set; } /// @@ -29,6 +38,9 @@ public class PaymentLinkConsentCollectionOptions : INestedOptions /// One of: none, or required. /// [JsonProperty("terms_of_service")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("terms_of_service")] +#endif public string TermsOfService { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentLinks/PaymentLinkConsentCollectionPaymentMethodReuseAgreementOptions.cs b/src/Stripe.net/Services/PaymentLinks/PaymentLinkConsentCollectionPaymentMethodReuseAgreementOptions.cs index f36a825572..028c2fc5bb 100644 --- a/src/Stripe.net/Services/PaymentLinks/PaymentLinkConsentCollectionPaymentMethodReuseAgreementOptions.cs +++ b/src/Stripe.net/Services/PaymentLinks/PaymentLinkConsentCollectionPaymentMethodReuseAgreementOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentLinkConsentCollectionPaymentMethodReuseAgreementOptions : INestedOptions { @@ -12,6 +15,9 @@ public class PaymentLinkConsentCollectionPaymentMethodReuseAgreementOptions : IN /// One of: auto, or hidden. /// [JsonProperty("position")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("position")] +#endif public string Position { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentLinks/PaymentLinkCreateOptions.cs b/src/Stripe.net/Services/PaymentLinks/PaymentLinkCreateOptions.cs index 5935994a19..48f32831be 100644 --- a/src/Stripe.net/Services/PaymentLinks/PaymentLinkCreateOptions.cs +++ b/src/Stripe.net/Services/PaymentLinks/PaymentLinkCreateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentLinkCreateOptions : BaseOptions, IHasMetadata { @@ -10,12 +13,18 @@ public class PaymentLinkCreateOptions : BaseOptions, IHasMetadata /// Behavior after the purchase is complete. /// [JsonProperty("after_completion")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("after_completion")] +#endif public PaymentLinkAfterCompletionOptions AfterCompletion { get; set; } /// /// Enables user redeemable promotion codes. /// [JsonProperty("allow_promotion_codes")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("allow_promotion_codes")] +#endif public bool? AllowPromotionCodes { get; set; } /// @@ -24,6 +33,9 @@ public class PaymentLinkCreateOptions : BaseOptions, IHasMetadata /// when there are no line items with recurring prices. /// [JsonProperty("application_fee_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("application_fee_amount")] +#endif public long? ApplicationFeeAmount { get; set; } /// @@ -33,12 +45,18 @@ public class PaymentLinkCreateOptions : BaseOptions, IHasMetadata /// recurring price to use this field. /// [JsonProperty("application_fee_percent")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("application_fee_percent")] +#endif public decimal? ApplicationFeePercent { get; set; } /// /// Configuration for automatic tax collection. /// [JsonProperty("automatic_tax")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("automatic_tax")] +#endif public PaymentLinkAutomaticTaxOptions AutomaticTax { get; set; } /// @@ -46,12 +64,18 @@ public class PaymentLinkCreateOptions : BaseOptions, IHasMetadata /// One of: auto, or required. /// [JsonProperty("billing_address_collection")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_address_collection")] +#endif public string BillingAddressCollection { get; set; } /// /// Configure fields to gather active consent from customers. /// [JsonProperty("consent_collection")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("consent_collection")] +#endif public PaymentLinkConsentCollectionOptions ConsentCollection { get; set; } /// @@ -60,6 +84,9 @@ public class PaymentLinkCreateOptions : BaseOptions, IHasMetadata /// currency and supported by each line item's price. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// @@ -67,12 +94,18 @@ public class PaymentLinkCreateOptions : BaseOptions, IHasMetadata /// are supported. /// [JsonProperty("custom_fields")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("custom_fields")] +#endif public List CustomFields { get; set; } /// /// Display additional text for your customers using custom text. /// [JsonProperty("custom_text")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("custom_text")] +#endif public PaymentLinkCustomTextOptions CustomText { get; set; } /// @@ -82,6 +115,9 @@ public class PaymentLinkCreateOptions : BaseOptions, IHasMetadata /// One of: always, or if_required. /// [JsonProperty("customer_creation")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_creation")] +#endif public string CustomerCreation { get; set; } /// @@ -89,12 +125,18 @@ public class PaymentLinkCreateOptions : BaseOptions, IHasMetadata /// active. /// [JsonProperty("inactive_message")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("inactive_message")] +#endif public string InactiveMessage { get; set; } /// /// Generate a post-purchase Invoice for one-time payments. /// [JsonProperty("invoice_creation")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("invoice_creation")] +#endif public PaymentLinkInvoiceCreationOptions InvoiceCreation { get; set; } /// @@ -102,6 +144,9 @@ public class PaymentLinkCreateOptions : BaseOptions, IHasMetadata /// sold. Up to 20 line items are supported. /// [JsonProperty("line_items")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("line_items")] +#endif public List LineItems { get; set; } /// @@ -114,12 +159,18 @@ public class PaymentLinkCreateOptions : BaseOptions, IHasMetadata /// this payment link. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// The account on behalf of which to charge. /// [JsonProperty("on_behalf_of")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("on_behalf_of")] +#endif public string OnBehalfOf { get; set; } /// @@ -127,6 +178,9 @@ public class PaymentLinkCreateOptions : BaseOptions, IHasMetadata /// payment mode. /// [JsonProperty("payment_intent_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_intent_data")] +#endif public PaymentLinkPaymentIntentDataOptions PaymentIntentData { get; set; } /// @@ -143,6 +197,9 @@ public class PaymentLinkCreateOptions : BaseOptions, IHasMetadata /// One of: always, or if_required. /// [JsonProperty("payment_method_collection")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_collection")] +#endif public string PaymentMethodCollection { get; set; } /// @@ -160,6 +217,9 @@ public class PaymentLinkCreateOptions : BaseOptions, IHasMetadata /// us_bank_account, wechat_pay, or zip. /// [JsonProperty("payment_method_types")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_types")] +#endif public List PaymentMethodTypes { get; set; } /// @@ -168,18 +228,27 @@ public class PaymentLinkCreateOptions : BaseOptions, IHasMetadata /// We recommend that you review your privacy policy and check with your legal contacts. /// [JsonProperty("phone_number_collection")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("phone_number_collection")] +#endif public PaymentLinkPhoneNumberCollectionOptions PhoneNumberCollection { get; set; } /// /// Settings that restrict the usage of a payment link. /// [JsonProperty("restrictions")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("restrictions")] +#endif public PaymentLinkRestrictionsOptions Restrictions { get; set; } /// /// Configuration for collecting the customer's shipping address. /// [JsonProperty("shipping_address_collection")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping_address_collection")] +#endif public PaymentLinkShippingAddressCollectionOptions ShippingAddressCollection { get; set; } /// @@ -188,6 +257,9 @@ public class PaymentLinkCreateOptions : BaseOptions, IHasMetadata /// this payment link. /// [JsonProperty("shipping_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping_options")] +#endif public List ShippingOptions { get; set; } /// @@ -199,6 +271,9 @@ public class PaymentLinkCreateOptions : BaseOptions, IHasMetadata /// One of: auto, book, donate, pay, or subscribe. /// [JsonProperty("submit_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("submit_type")] +#endif public string SubmitType { get; set; } /// @@ -206,12 +281,18 @@ public class PaymentLinkCreateOptions : BaseOptions, IHasMetadata /// be at least one line item with a recurring price to use subscription_data. /// [JsonProperty("subscription_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("subscription_data")] +#endif public PaymentLinkSubscriptionDataOptions SubscriptionData { get; set; } /// /// Controls tax ID collection during checkout. /// [JsonProperty("tax_id_collection")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_id_collection")] +#endif public PaymentLinkTaxIdCollectionOptions TaxIdCollection { get; set; } /// @@ -219,6 +300,9 @@ public class PaymentLinkCreateOptions : BaseOptions, IHasMetadata /// funds from each payment will be transferred to. /// [JsonProperty("transfer_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transfer_data")] +#endif public PaymentLinkTransferDataOptions TransferData { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentLinks/PaymentLinkCustomFieldDropdownOptionOptions.cs b/src/Stripe.net/Services/PaymentLinks/PaymentLinkCustomFieldDropdownOptionOptions.cs index 8af245b6d2..f5064a82e8 100644 --- a/src/Stripe.net/Services/PaymentLinks/PaymentLinkCustomFieldDropdownOptionOptions.cs +++ b/src/Stripe.net/Services/PaymentLinks/PaymentLinkCustomFieldDropdownOptionOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentLinkCustomFieldDropdownOptionOptions : INestedOptions { @@ -9,6 +12,9 @@ public class PaymentLinkCustomFieldDropdownOptionOptions : INestedOptions /// The label for the option, displayed to the customer. Up to 100 characters. /// [JsonProperty("label")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("label")] +#endif public string Label { get; set; } /// @@ -17,6 +23,9 @@ public class PaymentLinkCustomFieldDropdownOptionOptions : INestedOptions /// alphanumeric, and up to 100 characters. /// [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public string Value { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentLinks/PaymentLinkCustomFieldDropdownOptions.cs b/src/Stripe.net/Services/PaymentLinks/PaymentLinkCustomFieldDropdownOptions.cs index a717ae6681..6275981143 100644 --- a/src/Stripe.net/Services/PaymentLinks/PaymentLinkCustomFieldDropdownOptions.cs +++ b/src/Stripe.net/Services/PaymentLinks/PaymentLinkCustomFieldDropdownOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentLinkCustomFieldDropdownOptions : INestedOptions { @@ -10,6 +13,9 @@ public class PaymentLinkCustomFieldDropdownOptions : INestedOptions /// The options available for the customer to select. Up to 200 options allowed. /// [JsonProperty("options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("options")] +#endif public List Options { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentLinks/PaymentLinkCustomFieldLabelOptions.cs b/src/Stripe.net/Services/PaymentLinks/PaymentLinkCustomFieldLabelOptions.cs index 0e3821048f..7bb0020583 100644 --- a/src/Stripe.net/Services/PaymentLinks/PaymentLinkCustomFieldLabelOptions.cs +++ b/src/Stripe.net/Services/PaymentLinks/PaymentLinkCustomFieldLabelOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentLinkCustomFieldLabelOptions : INestedOptions { @@ -9,12 +12,18 @@ public class PaymentLinkCustomFieldLabelOptions : INestedOptions /// Custom text for the label, displayed to the customer. Up to 50 characters. /// [JsonProperty("custom")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("custom")] +#endif public string Custom { get; set; } /// /// The type of the label. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentLinks/PaymentLinkCustomFieldNumericOptions.cs b/src/Stripe.net/Services/PaymentLinks/PaymentLinkCustomFieldNumericOptions.cs index 59cb2c582a..b7d5b30fb3 100644 --- a/src/Stripe.net/Services/PaymentLinks/PaymentLinkCustomFieldNumericOptions.cs +++ b/src/Stripe.net/Services/PaymentLinks/PaymentLinkCustomFieldNumericOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentLinkCustomFieldNumericOptions : INestedOptions { @@ -9,12 +12,18 @@ public class PaymentLinkCustomFieldNumericOptions : INestedOptions /// The maximum character length constraint for the customer's input. /// [JsonProperty("maximum_length")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("maximum_length")] +#endif public long? MaximumLength { get; set; } /// /// The minimum character length requirement for the customer's input. /// [JsonProperty("minimum_length")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("minimum_length")] +#endif public long? MinimumLength { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentLinks/PaymentLinkCustomFieldOptions.cs b/src/Stripe.net/Services/PaymentLinks/PaymentLinkCustomFieldOptions.cs index 0ed12340f7..da20aa5b72 100644 --- a/src/Stripe.net/Services/PaymentLinks/PaymentLinkCustomFieldOptions.cs +++ b/src/Stripe.net/Services/PaymentLinks/PaymentLinkCustomFieldOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentLinkCustomFieldOptions : INestedOptions { @@ -9,6 +12,9 @@ public class PaymentLinkCustomFieldOptions : INestedOptions /// Configuration for type=dropdown fields. /// [JsonProperty("dropdown")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("dropdown")] +#endif public PaymentLinkCustomFieldDropdownOptions Dropdown { get; set; } /// @@ -16,18 +22,27 @@ public class PaymentLinkCustomFieldOptions : INestedOptions /// unique to this field, alphanumeric, and up to 200 characters. /// [JsonProperty("key")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("key")] +#endif public string Key { get; set; } /// /// The label for the field, displayed to the customer. /// [JsonProperty("label")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("label")] +#endif public PaymentLinkCustomFieldLabelOptions Label { get; set; } /// /// Configuration for type=numeric fields. /// [JsonProperty("numeric")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("numeric")] +#endif public PaymentLinkCustomFieldNumericOptions Numeric { get; set; } /// @@ -35,12 +50,18 @@ public class PaymentLinkCustomFieldOptions : INestedOptions /// Session. Defaults to false. /// [JsonProperty("optional")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("optional")] +#endif public bool? Optional { get; set; } /// /// Configuration for type=text fields. /// [JsonProperty("text")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("text")] +#endif public PaymentLinkCustomFieldTextOptions Text { get; set; } /// @@ -48,6 +69,9 @@ public class PaymentLinkCustomFieldOptions : INestedOptions /// One of: dropdown, numeric, or text. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentLinks/PaymentLinkCustomFieldTextOptions.cs b/src/Stripe.net/Services/PaymentLinks/PaymentLinkCustomFieldTextOptions.cs index b9e6455c66..7bd0bebd7f 100644 --- a/src/Stripe.net/Services/PaymentLinks/PaymentLinkCustomFieldTextOptions.cs +++ b/src/Stripe.net/Services/PaymentLinks/PaymentLinkCustomFieldTextOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentLinkCustomFieldTextOptions : INestedOptions { @@ -9,12 +12,18 @@ public class PaymentLinkCustomFieldTextOptions : INestedOptions /// The maximum character length constraint for the customer's input. /// [JsonProperty("maximum_length")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("maximum_length")] +#endif public long? MaximumLength { get; set; } /// /// The minimum character length requirement for the customer's input. /// [JsonProperty("minimum_length")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("minimum_length")] +#endif public long? MinimumLength { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentLinks/PaymentLinkCustomTextAfterSubmitOptions.cs b/src/Stripe.net/Services/PaymentLinks/PaymentLinkCustomTextAfterSubmitOptions.cs index 4be18d2266..51f46d5677 100644 --- a/src/Stripe.net/Services/PaymentLinks/PaymentLinkCustomTextAfterSubmitOptions.cs +++ b/src/Stripe.net/Services/PaymentLinks/PaymentLinkCustomTextAfterSubmitOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentLinkCustomTextAfterSubmitOptions : INestedOptions { @@ -9,6 +12,9 @@ public class PaymentLinkCustomTextAfterSubmitOptions : INestedOptions /// Text may be up to 1200 characters in length. /// [JsonProperty("message")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("message")] +#endif public string Message { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentLinks/PaymentLinkCustomTextOptions.cs b/src/Stripe.net/Services/PaymentLinks/PaymentLinkCustomTextOptions.cs index e6b110e3cd..2608e21417 100644 --- a/src/Stripe.net/Services/PaymentLinks/PaymentLinkCustomTextOptions.cs +++ b/src/Stripe.net/Services/PaymentLinks/PaymentLinkCustomTextOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentLinkCustomTextOptions : INestedOptions { @@ -9,18 +12,27 @@ public class PaymentLinkCustomTextOptions : INestedOptions /// Custom text that should be displayed after the payment confirmation button. /// [JsonProperty("after_submit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("after_submit")] +#endif public PaymentLinkCustomTextAfterSubmitOptions AfterSubmit { get; set; } /// /// Custom text that should be displayed alongside shipping address collection. /// [JsonProperty("shipping_address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping_address")] +#endif public PaymentLinkCustomTextShippingAddressOptions ShippingAddress { get; set; } /// /// Custom text that should be displayed alongside the payment confirmation button. /// [JsonProperty("submit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("submit")] +#endif public PaymentLinkCustomTextSubmitOptions Submit { get; set; } /// @@ -28,6 +40,9 @@ public class PaymentLinkCustomTextOptions : INestedOptions /// text. /// [JsonProperty("terms_of_service_acceptance")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("terms_of_service_acceptance")] +#endif public PaymentLinkCustomTextTermsOfServiceAcceptanceOptions TermsOfServiceAcceptance { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentLinks/PaymentLinkCustomTextShippingAddressOptions.cs b/src/Stripe.net/Services/PaymentLinks/PaymentLinkCustomTextShippingAddressOptions.cs index 7b6afbb9e0..d90f30095f 100644 --- a/src/Stripe.net/Services/PaymentLinks/PaymentLinkCustomTextShippingAddressOptions.cs +++ b/src/Stripe.net/Services/PaymentLinks/PaymentLinkCustomTextShippingAddressOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentLinkCustomTextShippingAddressOptions : INestedOptions { @@ -9,6 +12,9 @@ public class PaymentLinkCustomTextShippingAddressOptions : INestedOptions /// Text may be up to 1200 characters in length. /// [JsonProperty("message")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("message")] +#endif public string Message { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentLinks/PaymentLinkCustomTextSubmitOptions.cs b/src/Stripe.net/Services/PaymentLinks/PaymentLinkCustomTextSubmitOptions.cs index 44730486b7..cd3a0e38ea 100644 --- a/src/Stripe.net/Services/PaymentLinks/PaymentLinkCustomTextSubmitOptions.cs +++ b/src/Stripe.net/Services/PaymentLinks/PaymentLinkCustomTextSubmitOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentLinkCustomTextSubmitOptions : INestedOptions { @@ -9,6 +12,9 @@ public class PaymentLinkCustomTextSubmitOptions : INestedOptions /// Text may be up to 1200 characters in length. /// [JsonProperty("message")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("message")] +#endif public string Message { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentLinks/PaymentLinkCustomTextTermsOfServiceAcceptanceOptions.cs b/src/Stripe.net/Services/PaymentLinks/PaymentLinkCustomTextTermsOfServiceAcceptanceOptions.cs index 3efc6ccf79..9b1fd94bf0 100644 --- a/src/Stripe.net/Services/PaymentLinks/PaymentLinkCustomTextTermsOfServiceAcceptanceOptions.cs +++ b/src/Stripe.net/Services/PaymentLinks/PaymentLinkCustomTextTermsOfServiceAcceptanceOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentLinkCustomTextTermsOfServiceAcceptanceOptions : INestedOptions { @@ -9,6 +12,9 @@ public class PaymentLinkCustomTextTermsOfServiceAcceptanceOptions : INestedOptio /// Text may be up to 1200 characters in length. /// [JsonProperty("message")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("message")] +#endif public string Message { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentLinks/PaymentLinkInvoiceCreationInvoiceDataCustomFieldOptions.cs b/src/Stripe.net/Services/PaymentLinks/PaymentLinkInvoiceCreationInvoiceDataCustomFieldOptions.cs index 7039f84fe6..63acefbd89 100644 --- a/src/Stripe.net/Services/PaymentLinks/PaymentLinkInvoiceCreationInvoiceDataCustomFieldOptions.cs +++ b/src/Stripe.net/Services/PaymentLinks/PaymentLinkInvoiceCreationInvoiceDataCustomFieldOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentLinkInvoiceCreationInvoiceDataCustomFieldOptions : INestedOptions { @@ -9,12 +12,18 @@ public class PaymentLinkInvoiceCreationInvoiceDataCustomFieldOptions : INestedOp /// The name of the custom field. This may be up to 40 characters. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } /// /// The value of the custom field. This may be up to 140 characters. /// [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public string Value { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentLinks/PaymentLinkInvoiceCreationInvoiceDataIssuerOptions.cs b/src/Stripe.net/Services/PaymentLinks/PaymentLinkInvoiceCreationInvoiceDataIssuerOptions.cs index 96e14dc50f..5afeb03d14 100644 --- a/src/Stripe.net/Services/PaymentLinks/PaymentLinkInvoiceCreationInvoiceDataIssuerOptions.cs +++ b/src/Stripe.net/Services/PaymentLinks/PaymentLinkInvoiceCreationInvoiceDataIssuerOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentLinkInvoiceCreationInvoiceDataIssuerOptions : INestedOptions { @@ -9,6 +12,9 @@ public class PaymentLinkInvoiceCreationInvoiceDataIssuerOptions : INestedOptions /// The connected account being referenced when type is account. /// [JsonProperty("account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account")] +#endif public string Account { get; set; } /// @@ -16,6 +22,9 @@ public class PaymentLinkInvoiceCreationInvoiceDataIssuerOptions : INestedOptions /// One of: account, or self. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentLinks/PaymentLinkInvoiceCreationInvoiceDataOptions.cs b/src/Stripe.net/Services/PaymentLinks/PaymentLinkInvoiceCreationInvoiceDataOptions.cs index fde2918ab8..073ec417d2 100644 --- a/src/Stripe.net/Services/PaymentLinks/PaymentLinkInvoiceCreationInvoiceDataOptions.cs +++ b/src/Stripe.net/Services/PaymentLinks/PaymentLinkInvoiceCreationInvoiceDataOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentLinkInvoiceCreationInvoiceDataOptions : INestedOptions, IHasMetadata { @@ -10,24 +13,36 @@ public class PaymentLinkInvoiceCreationInvoiceDataOptions : INestedOptions, IHas /// The account tax IDs associated with the invoice. /// [JsonProperty("account_tax_ids")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_tax_ids")] +#endif public List AccountTaxIds { get; set; } /// /// Default custom fields to be displayed on invoices for this customer. /// [JsonProperty("custom_fields")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("custom_fields")] +#endif public List CustomFields { get; set; } /// /// An arbitrary string attached to the object. Often useful for displaying to users. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// /// Default footer to be displayed on invoices for this customer. /// [JsonProperty("footer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("footer")] +#endif public string Footer { get; set; } /// @@ -35,6 +50,9 @@ public class PaymentLinkInvoiceCreationInvoiceDataOptions : INestedOptions, IHas /// branding and support information of the specified account. /// [JsonProperty("issuer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("issuer")] +#endif public PaymentLinkInvoiceCreationInvoiceDataIssuerOptions Issuer { get; set; } /// @@ -44,12 +62,18 @@ public class PaymentLinkInvoiceCreationInvoiceDataOptions : INestedOptions, IHas /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// Default options for invoice PDF rendering for this customer. /// [JsonProperty("rendering_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("rendering_options")] +#endif public PaymentLinkInvoiceCreationInvoiceDataRenderingOptionsOptions RenderingOptions { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentLinks/PaymentLinkInvoiceCreationInvoiceDataRenderingOptionsOptions.cs b/src/Stripe.net/Services/PaymentLinks/PaymentLinkInvoiceCreationInvoiceDataRenderingOptionsOptions.cs index d78ca9b759..f5fda0884f 100644 --- a/src/Stripe.net/Services/PaymentLinks/PaymentLinkInvoiceCreationInvoiceDataRenderingOptionsOptions.cs +++ b/src/Stripe.net/Services/PaymentLinks/PaymentLinkInvoiceCreationInvoiceDataRenderingOptionsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentLinkInvoiceCreationInvoiceDataRenderingOptionsOptions : INestedOptions { @@ -14,6 +17,9 @@ public class PaymentLinkInvoiceCreationInvoiceDataRenderingOptionsOptions : INes /// One of: exclude_tax, or include_inclusive_tax. /// [JsonProperty("amount_tax_display")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_tax_display")] +#endif public string AmountTaxDisplay { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentLinks/PaymentLinkInvoiceCreationOptions.cs b/src/Stripe.net/Services/PaymentLinks/PaymentLinkInvoiceCreationOptions.cs index 66c926b4a0..279efb02a0 100644 --- a/src/Stripe.net/Services/PaymentLinks/PaymentLinkInvoiceCreationOptions.cs +++ b/src/Stripe.net/Services/PaymentLinks/PaymentLinkInvoiceCreationOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentLinkInvoiceCreationOptions : INestedOptions { @@ -9,12 +12,18 @@ public class PaymentLinkInvoiceCreationOptions : INestedOptions /// Whether the feature is enabled. /// [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool? Enabled { get; set; } /// /// Invoice PDF configuration. /// [JsonProperty("invoice_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("invoice_data")] +#endif public PaymentLinkInvoiceCreationInvoiceDataOptions InvoiceData { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentLinks/PaymentLinkLineItemAdjustableQuantityOptions.cs b/src/Stripe.net/Services/PaymentLinks/PaymentLinkLineItemAdjustableQuantityOptions.cs index 7b4baae301..b3d17c4200 100644 --- a/src/Stripe.net/Services/PaymentLinks/PaymentLinkLineItemAdjustableQuantityOptions.cs +++ b/src/Stripe.net/Services/PaymentLinks/PaymentLinkLineItemAdjustableQuantityOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentLinkLineItemAdjustableQuantityOptions : INestedOptions { @@ -9,6 +12,9 @@ public class PaymentLinkLineItemAdjustableQuantityOptions : INestedOptions /// Set to true if the quantity can be adjusted to any non-negative Integer. /// [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool? Enabled { get; set; } /// @@ -16,6 +22,9 @@ public class PaymentLinkLineItemAdjustableQuantityOptions : INestedOptions /// specify a value up to 999. /// [JsonProperty("maximum")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("maximum")] +#endif public long? Maximum { get; set; } /// @@ -23,6 +32,9 @@ public class PaymentLinkLineItemAdjustableQuantityOptions : INestedOptions /// only one item in the cart then that item's quantity cannot go down to 0. /// [JsonProperty("minimum")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("minimum")] +#endif public long? Minimum { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentLinks/PaymentLinkLineItemOptions.cs b/src/Stripe.net/Services/PaymentLinks/PaymentLinkLineItemOptions.cs index e62af82b00..eb658e1791 100644 --- a/src/Stripe.net/Services/PaymentLinks/PaymentLinkLineItemOptions.cs +++ b/src/Stripe.net/Services/PaymentLinks/PaymentLinkLineItemOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentLinkLineItemOptions : INestedOptions, IHasId { @@ -10,12 +13,18 @@ public class PaymentLinkLineItemOptions : INestedOptions, IHasId /// during checkout. /// [JsonProperty("adjustable_quantity")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("adjustable_quantity")] +#endif public PaymentLinkLineItemAdjustableQuantityOptions AdjustableQuantity { get; set; } /// /// The ID of an existing line item on the payment link. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// @@ -23,12 +32,18 @@ public class PaymentLinkLineItemOptions : INestedOptions, IHasId /// href="https://stripe.com/docs/api/plans">Plan object. /// [JsonProperty("price")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("price")] +#endif public string Price { get; set; } /// /// The quantity of the line item being purchased. /// [JsonProperty("quantity")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("quantity")] +#endif public long? Quantity { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentLinks/PaymentLinkListOptions.cs b/src/Stripe.net/Services/PaymentLinks/PaymentLinkListOptions.cs index 38927f8c95..510754af63 100644 --- a/src/Stripe.net/Services/PaymentLinks/PaymentLinkListOptions.cs +++ b/src/Stripe.net/Services/PaymentLinks/PaymentLinkListOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentLinkListOptions : ListOptions { @@ -10,6 +13,9 @@ public class PaymentLinkListOptions : ListOptions /// all inactive payment links). /// [JsonProperty("active")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("active")] +#endif public bool? Active { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentLinks/PaymentLinkPaymentIntentDataOptions.cs b/src/Stripe.net/Services/PaymentLinks/PaymentLinkPaymentIntentDataOptions.cs index ae2bf0bcbb..46dd7374b1 100644 --- a/src/Stripe.net/Services/PaymentLinks/PaymentLinkPaymentIntentDataOptions.cs +++ b/src/Stripe.net/Services/PaymentLinks/PaymentLinkPaymentIntentDataOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentLinkPaymentIntentDataOptions : INestedOptions, IHasMetadata { @@ -11,12 +14,18 @@ public class PaymentLinkPaymentIntentDataOptions : INestedOptions, IHasMetadata /// One of: automatic, automatic_async, or manual. /// [JsonProperty("capture_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("capture_method")] +#endif public string CaptureMethod { get; set; } /// /// An arbitrary string attached to the object. Often useful for displaying to users. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// @@ -27,6 +36,9 @@ public class PaymentLinkPaymentIntentDataOptions : INestedOptions, IHasMetadata /// clear prior values. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -53,6 +65,9 @@ public class PaymentLinkPaymentIntentDataOptions : INestedOptions, IHasMetadata /// One of: off_session, or on_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } /// @@ -67,6 +82,9 @@ public class PaymentLinkPaymentIntentDataOptions : INestedOptions, IHasMetadata /// instead. /// [JsonProperty("statement_descriptor")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("statement_descriptor")] +#endif public string StatementDescriptor { get; set; } /// @@ -76,6 +94,9 @@ public class PaymentLinkPaymentIntentDataOptions : INestedOptions, IHasMetadata /// customer's statement. /// [JsonProperty("statement_descriptor_suffix")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("statement_descriptor_suffix")] +#endif public string StatementDescriptorSuffix { get; set; } /// @@ -85,6 +106,9 @@ public class PaymentLinkPaymentIntentDataOptions : INestedOptions, IHasMetadata /// connected accounts for details. /// [JsonProperty("transfer_group")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transfer_group")] +#endif public string TransferGroup { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentLinks/PaymentLinkPhoneNumberCollectionOptions.cs b/src/Stripe.net/Services/PaymentLinks/PaymentLinkPhoneNumberCollectionOptions.cs index d1ece1763b..7f13a2e718 100644 --- a/src/Stripe.net/Services/PaymentLinks/PaymentLinkPhoneNumberCollectionOptions.cs +++ b/src/Stripe.net/Services/PaymentLinks/PaymentLinkPhoneNumberCollectionOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentLinkPhoneNumberCollectionOptions : INestedOptions { @@ -9,6 +12,9 @@ public class PaymentLinkPhoneNumberCollectionOptions : INestedOptions /// Set to true to enable phone number collection. /// [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool? Enabled { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentLinks/PaymentLinkRestrictionsCompletedSessionsOptions.cs b/src/Stripe.net/Services/PaymentLinks/PaymentLinkRestrictionsCompletedSessionsOptions.cs index 64943d2683..324599989a 100644 --- a/src/Stripe.net/Services/PaymentLinks/PaymentLinkRestrictionsCompletedSessionsOptions.cs +++ b/src/Stripe.net/Services/PaymentLinks/PaymentLinkRestrictionsCompletedSessionsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentLinkRestrictionsCompletedSessionsOptions : INestedOptions { @@ -10,6 +13,9 @@ public class PaymentLinkRestrictionsCompletedSessionsOptions : INestedOptions /// completed_sessions restriction to be met. /// [JsonProperty("limit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("limit")] +#endif public long? Limit { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentLinks/PaymentLinkRestrictionsOptions.cs b/src/Stripe.net/Services/PaymentLinks/PaymentLinkRestrictionsOptions.cs index 598ea49b60..4e63b82bed 100644 --- a/src/Stripe.net/Services/PaymentLinks/PaymentLinkRestrictionsOptions.cs +++ b/src/Stripe.net/Services/PaymentLinks/PaymentLinkRestrictionsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentLinkRestrictionsOptions : INestedOptions { @@ -9,6 +12,9 @@ public class PaymentLinkRestrictionsOptions : INestedOptions /// Configuration for the completed_sessions restriction type. /// [JsonProperty("completed_sessions")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("completed_sessions")] +#endif public PaymentLinkRestrictionsCompletedSessionsOptions CompletedSessions { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentLinks/PaymentLinkShippingAddressCollectionOptions.cs b/src/Stripe.net/Services/PaymentLinks/PaymentLinkShippingAddressCollectionOptions.cs index e6bd2b5a8f..b4fc4a1f95 100644 --- a/src/Stripe.net/Services/PaymentLinks/PaymentLinkShippingAddressCollectionOptions.cs +++ b/src/Stripe.net/Services/PaymentLinks/PaymentLinkShippingAddressCollectionOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentLinkShippingAddressCollectionOptions : INestedOptions { @@ -41,6 +44,9 @@ public class PaymentLinkShippingAddressCollectionOptions : INestedOptions /// YE, YT, ZA, ZM, ZW, or ZZ. /// [JsonProperty("allowed_countries")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("allowed_countries")] +#endif public List AllowedCountries { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentLinks/PaymentLinkShippingOptionOptions.cs b/src/Stripe.net/Services/PaymentLinks/PaymentLinkShippingOptionOptions.cs index 549cad3763..b38fdbfdda 100644 --- a/src/Stripe.net/Services/PaymentLinks/PaymentLinkShippingOptionOptions.cs +++ b/src/Stripe.net/Services/PaymentLinks/PaymentLinkShippingOptionOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentLinkShippingOptionOptions : INestedOptions { @@ -9,6 +12,9 @@ public class PaymentLinkShippingOptionOptions : INestedOptions /// The ID of the Shipping Rate to use for this shipping option. /// [JsonProperty("shipping_rate")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping_rate")] +#endif public string ShippingRate { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentLinks/PaymentLinkSubscriptionDataInvoiceSettingsIssuerOptions.cs b/src/Stripe.net/Services/PaymentLinks/PaymentLinkSubscriptionDataInvoiceSettingsIssuerOptions.cs index 75f3732a2e..0c20bef73d 100644 --- a/src/Stripe.net/Services/PaymentLinks/PaymentLinkSubscriptionDataInvoiceSettingsIssuerOptions.cs +++ b/src/Stripe.net/Services/PaymentLinks/PaymentLinkSubscriptionDataInvoiceSettingsIssuerOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentLinkSubscriptionDataInvoiceSettingsIssuerOptions : INestedOptions { @@ -9,6 +12,9 @@ public class PaymentLinkSubscriptionDataInvoiceSettingsIssuerOptions : INestedOp /// The connected account being referenced when type is account. /// [JsonProperty("account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account")] +#endif public string Account { get; set; } /// @@ -16,6 +22,9 @@ public class PaymentLinkSubscriptionDataInvoiceSettingsIssuerOptions : INestedOp /// One of: account, or self. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentLinks/PaymentLinkSubscriptionDataInvoiceSettingsOptions.cs b/src/Stripe.net/Services/PaymentLinks/PaymentLinkSubscriptionDataInvoiceSettingsOptions.cs index 07d06308c1..0549e4fa00 100644 --- a/src/Stripe.net/Services/PaymentLinks/PaymentLinkSubscriptionDataInvoiceSettingsOptions.cs +++ b/src/Stripe.net/Services/PaymentLinks/PaymentLinkSubscriptionDataInvoiceSettingsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentLinkSubscriptionDataInvoiceSettingsOptions : INestedOptions { @@ -10,6 +13,9 @@ public class PaymentLinkSubscriptionDataInvoiceSettingsOptions : INestedOptions /// branding and support information of the specified account. /// [JsonProperty("issuer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("issuer")] +#endif public PaymentLinkSubscriptionDataInvoiceSettingsIssuerOptions Issuer { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentLinks/PaymentLinkSubscriptionDataOptions.cs b/src/Stripe.net/Services/PaymentLinks/PaymentLinkSubscriptionDataOptions.cs index 0997aa8ad7..44f551d4d7 100644 --- a/src/Stripe.net/Services/PaymentLinks/PaymentLinkSubscriptionDataOptions.cs +++ b/src/Stripe.net/Services/PaymentLinks/PaymentLinkSubscriptionDataOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentLinkSubscriptionDataOptions : INestedOptions, IHasMetadata { @@ -12,12 +15,18 @@ public class PaymentLinkSubscriptionDataOptions : INestedOptions, IHasMetadata /// and certain local payment methods UIs. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// /// All invoices will be billed using the specified settings. /// [JsonProperty("invoice_settings")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("invoice_settings")] +#endif public PaymentLinkSubscriptionDataInvoiceSettingsOptions InvoiceSettings { get; set; } /// @@ -28,6 +37,9 @@ public class PaymentLinkSubscriptionDataOptions : INestedOptions, IHasMetadata /// clear prior values. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -35,12 +47,18 @@ public class PaymentLinkSubscriptionDataOptions : INestedOptions, IHasMetadata /// the first time. Has to be at least 1. /// [JsonProperty("trial_period_days")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("trial_period_days")] +#endif public long? TrialPeriodDays { get; set; } /// /// Settings related to subscription trials. /// [JsonProperty("trial_settings")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("trial_settings")] +#endif public PaymentLinkSubscriptionDataTrialSettingsOptions TrialSettings { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentLinks/PaymentLinkSubscriptionDataTrialSettingsEndBehaviorOptions.cs b/src/Stripe.net/Services/PaymentLinks/PaymentLinkSubscriptionDataTrialSettingsEndBehaviorOptions.cs index 117bd42664..44b5d70fc1 100644 --- a/src/Stripe.net/Services/PaymentLinks/PaymentLinkSubscriptionDataTrialSettingsEndBehaviorOptions.cs +++ b/src/Stripe.net/Services/PaymentLinks/PaymentLinkSubscriptionDataTrialSettingsEndBehaviorOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentLinkSubscriptionDataTrialSettingsEndBehaviorOptions : INestedOptions { @@ -11,6 +14,9 @@ public class PaymentLinkSubscriptionDataTrialSettingsEndBehaviorOptions : INeste /// One of: cancel, create_invoice, or pause. /// [JsonProperty("missing_payment_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("missing_payment_method")] +#endif public string MissingPaymentMethod { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentLinks/PaymentLinkSubscriptionDataTrialSettingsOptions.cs b/src/Stripe.net/Services/PaymentLinks/PaymentLinkSubscriptionDataTrialSettingsOptions.cs index 71973782a6..9626f54f21 100644 --- a/src/Stripe.net/Services/PaymentLinks/PaymentLinkSubscriptionDataTrialSettingsOptions.cs +++ b/src/Stripe.net/Services/PaymentLinks/PaymentLinkSubscriptionDataTrialSettingsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentLinkSubscriptionDataTrialSettingsOptions : INestedOptions { @@ -9,6 +12,9 @@ public class PaymentLinkSubscriptionDataTrialSettingsOptions : INestedOptions /// Defines how the subscription should behave when the user's free trial ends. /// [JsonProperty("end_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("end_behavior")] +#endif public PaymentLinkSubscriptionDataTrialSettingsEndBehaviorOptions EndBehavior { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentLinks/PaymentLinkTaxIdCollectionOptions.cs b/src/Stripe.net/Services/PaymentLinks/PaymentLinkTaxIdCollectionOptions.cs index 4ba4061efc..170218d5f3 100644 --- a/src/Stripe.net/Services/PaymentLinks/PaymentLinkTaxIdCollectionOptions.cs +++ b/src/Stripe.net/Services/PaymentLinks/PaymentLinkTaxIdCollectionOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentLinkTaxIdCollectionOptions : INestedOptions { @@ -9,6 +12,9 @@ public class PaymentLinkTaxIdCollectionOptions : INestedOptions /// Enable tax ID collection during checkout. Defaults to false. /// [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool? Enabled { get; set; } /// @@ -16,6 +22,9 @@ public class PaymentLinkTaxIdCollectionOptions : INestedOptions /// One of: if_supported, or never. /// [JsonProperty("required")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("required")] +#endif public string Required { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentLinks/PaymentLinkTransferDataOptions.cs b/src/Stripe.net/Services/PaymentLinks/PaymentLinkTransferDataOptions.cs index bc9ba8aa82..c368b502d3 100644 --- a/src/Stripe.net/Services/PaymentLinks/PaymentLinkTransferDataOptions.cs +++ b/src/Stripe.net/Services/PaymentLinks/PaymentLinkTransferDataOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentLinkTransferDataOptions : INestedOptions { @@ -9,6 +12,9 @@ public class PaymentLinkTransferDataOptions : INestedOptions /// The amount that will be transferred automatically when a charge succeeds. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long? Amount { get; set; } /// @@ -18,6 +24,9 @@ public class PaymentLinkTransferDataOptions : INestedOptions /// transfer field. /// [JsonProperty("destination")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("destination")] +#endif public string Destination { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentLinks/PaymentLinkUpdateOptions.cs b/src/Stripe.net/Services/PaymentLinks/PaymentLinkUpdateOptions.cs index 07340e69e7..fcc7527465 100644 --- a/src/Stripe.net/Services/PaymentLinks/PaymentLinkUpdateOptions.cs +++ b/src/Stripe.net/Services/PaymentLinks/PaymentLinkUpdateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentLinkUpdateOptions : BaseOptions, IHasMetadata { @@ -11,24 +14,36 @@ public class PaymentLinkUpdateOptions : BaseOptions, IHasMetadata /// URL will be shown a page saying that the link has been deactivated. /// [JsonProperty("active")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("active")] +#endif public bool? Active { get; set; } /// /// Behavior after the purchase is complete. /// [JsonProperty("after_completion")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("after_completion")] +#endif public PaymentLinkAfterCompletionOptions AfterCompletion { get; set; } /// /// Enables user redeemable promotion codes. /// [JsonProperty("allow_promotion_codes")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("allow_promotion_codes")] +#endif public bool? AllowPromotionCodes { get; set; } /// /// Configuration for automatic tax collection. /// [JsonProperty("automatic_tax")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("automatic_tax")] +#endif public PaymentLinkAutomaticTaxOptions AutomaticTax { get; set; } /// @@ -36,6 +51,9 @@ public class PaymentLinkUpdateOptions : BaseOptions, IHasMetadata /// One of: auto, or required. /// [JsonProperty("billing_address_collection")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_address_collection")] +#endif public string BillingAddressCollection { get; set; } /// @@ -43,12 +61,18 @@ public class PaymentLinkUpdateOptions : BaseOptions, IHasMetadata /// are supported. /// [JsonProperty("custom_fields")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("custom_fields")] +#endif public List CustomFields { get; set; } /// /// Display additional text for your customers using custom text. /// [JsonProperty("custom_text")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("custom_text")] +#endif public PaymentLinkCustomTextOptions CustomText { get; set; } /// @@ -58,6 +82,9 @@ public class PaymentLinkUpdateOptions : BaseOptions, IHasMetadata /// One of: always, or if_required. /// [JsonProperty("customer_creation")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_creation")] +#endif public string CustomerCreation { get; set; } /// @@ -65,12 +92,18 @@ public class PaymentLinkUpdateOptions : BaseOptions, IHasMetadata /// active. /// [JsonProperty("inactive_message")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("inactive_message")] +#endif public string InactiveMessage { get; set; } /// /// Generate a post-purchase Invoice for one-time payments. /// [JsonProperty("invoice_creation")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("invoice_creation")] +#endif public PaymentLinkInvoiceCreationOptions InvoiceCreation { get; set; } /// @@ -78,6 +111,9 @@ public class PaymentLinkUpdateOptions : BaseOptions, IHasMetadata /// sold. Up to 20 line items are supported. /// [JsonProperty("line_items")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("line_items")] +#endif public List LineItems { get; set; } /// @@ -90,6 +126,9 @@ public class PaymentLinkUpdateOptions : BaseOptions, IHasMetadata /// this payment link. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -97,6 +136,9 @@ public class PaymentLinkUpdateOptions : BaseOptions, IHasMetadata /// payment mode. /// [JsonProperty("payment_intent_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_intent_data")] +#endif public PaymentLinkPaymentIntentDataOptions PaymentIntentData { get; set; } /// @@ -113,6 +155,9 @@ public class PaymentLinkUpdateOptions : BaseOptions, IHasMetadata /// One of: always, or if_required. /// [JsonProperty("payment_method_collection")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_collection")] +#endif public string PaymentMethodCollection { get; set; } /// @@ -129,18 +174,27 @@ public class PaymentLinkUpdateOptions : BaseOptions, IHasMetadata /// us_bank_account, wechat_pay, or zip. /// [JsonProperty("payment_method_types")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_types")] +#endif public List PaymentMethodTypes { get; set; } /// /// Settings that restrict the usage of a payment link. /// [JsonProperty("restrictions")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("restrictions")] +#endif public PaymentLinkRestrictionsOptions Restrictions { get; set; } /// /// Configuration for collecting the customer's shipping address. /// [JsonProperty("shipping_address_collection")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping_address_collection")] +#endif public PaymentLinkShippingAddressCollectionOptions ShippingAddressCollection { get; set; } /// @@ -152,6 +206,9 @@ public class PaymentLinkUpdateOptions : BaseOptions, IHasMetadata /// One of: auto, book, donate, pay, or subscribe. /// [JsonProperty("submit_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("submit_type")] +#endif public string SubmitType { get; set; } /// @@ -159,12 +216,18 @@ public class PaymentLinkUpdateOptions : BaseOptions, IHasMetadata /// be at least one line item with a recurring price to use subscription_data. /// [JsonProperty("subscription_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("subscription_data")] +#endif public PaymentLinkSubscriptionDataOptions SubscriptionData { get; set; } /// /// Controls tax ID collection during checkout. /// [JsonProperty("tax_id_collection")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_id_collection")] +#endif public PaymentLinkTaxIdCollectionOptions TaxIdCollection { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationAcssDebitDisplayPreferenceOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationAcssDebitDisplayPreferenceOptions.cs index 1fae658347..dc33e5570c 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationAcssDebitDisplayPreferenceOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationAcssDebitDisplayPreferenceOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationAcssDebitDisplayPreferenceOptions : INestedOptions { @@ -10,6 +13,9 @@ public class PaymentMethodConfigurationAcssDebitDisplayPreferenceOptions : INest /// One of: none, off, or on. /// [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif public string Preference { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationAcssDebitOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationAcssDebitOptions.cs index 0026ea488e..9a7b848029 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationAcssDebitOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationAcssDebitOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationAcssDebitOptions : INestedOptions { @@ -9,6 +12,9 @@ public class PaymentMethodConfigurationAcssDebitOptions : INestedOptions /// Whether or not the payment method should be displayed. /// [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif public PaymentMethodConfigurationAcssDebitDisplayPreferenceOptions DisplayPreference { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationAffirmDisplayPreferenceOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationAffirmDisplayPreferenceOptions.cs index 16fec47041..a0fcd884f7 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationAffirmDisplayPreferenceOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationAffirmDisplayPreferenceOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationAffirmDisplayPreferenceOptions : INestedOptions { @@ -10,6 +13,9 @@ public class PaymentMethodConfigurationAffirmDisplayPreferenceOptions : INestedO /// One of: none, off, or on. /// [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif public string Preference { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationAffirmOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationAffirmOptions.cs index 332a749902..a85ce30898 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationAffirmOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationAffirmOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationAffirmOptions : INestedOptions { @@ -9,6 +12,9 @@ public class PaymentMethodConfigurationAffirmOptions : INestedOptions /// Whether or not the payment method should be displayed. /// [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif public PaymentMethodConfigurationAffirmDisplayPreferenceOptions DisplayPreference { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationAfterpayClearpayDisplayPreferenceOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationAfterpayClearpayDisplayPreferenceOptions.cs index 9b2352c8c2..4a8ce7f062 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationAfterpayClearpayDisplayPreferenceOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationAfterpayClearpayDisplayPreferenceOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationAfterpayClearpayDisplayPreferenceOptions : INestedOptions { @@ -10,6 +13,9 @@ public class PaymentMethodConfigurationAfterpayClearpayDisplayPreferenceOptions /// One of: none, off, or on. /// [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif public string Preference { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationAfterpayClearpayOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationAfterpayClearpayOptions.cs index 39b0c52a88..644e10f4d0 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationAfterpayClearpayOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationAfterpayClearpayOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationAfterpayClearpayOptions : INestedOptions { @@ -9,6 +12,9 @@ public class PaymentMethodConfigurationAfterpayClearpayOptions : INestedOptions /// Whether or not the payment method should be displayed. /// [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif public PaymentMethodConfigurationAfterpayClearpayDisplayPreferenceOptions DisplayPreference { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationAlipayDisplayPreferenceOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationAlipayDisplayPreferenceOptions.cs index 8a9cbaa171..36abf40d5f 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationAlipayDisplayPreferenceOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationAlipayDisplayPreferenceOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationAlipayDisplayPreferenceOptions : INestedOptions { @@ -10,6 +13,9 @@ public class PaymentMethodConfigurationAlipayDisplayPreferenceOptions : INestedO /// One of: none, off, or on. /// [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif public string Preference { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationAlipayOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationAlipayOptions.cs index 1165e91be8..39f8b44d50 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationAlipayOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationAlipayOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationAlipayOptions : INestedOptions { @@ -9,6 +12,9 @@ public class PaymentMethodConfigurationAlipayOptions : INestedOptions /// Whether or not the payment method should be displayed. /// [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif public PaymentMethodConfigurationAlipayDisplayPreferenceOptions DisplayPreference { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationAlmaDisplayPreferenceOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationAlmaDisplayPreferenceOptions.cs index cd0046a7dc..498a65b172 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationAlmaDisplayPreferenceOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationAlmaDisplayPreferenceOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationAlmaDisplayPreferenceOptions : INestedOptions { @@ -10,6 +13,9 @@ public class PaymentMethodConfigurationAlmaDisplayPreferenceOptions : INestedOpt /// One of: none, off, or on. /// [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif public string Preference { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationAlmaOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationAlmaOptions.cs index 38d7422542..e3712d3f4b 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationAlmaOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationAlmaOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationAlmaOptions : INestedOptions { @@ -9,6 +12,9 @@ public class PaymentMethodConfigurationAlmaOptions : INestedOptions /// Whether or not the payment method should be displayed. /// [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif public PaymentMethodConfigurationAlmaDisplayPreferenceOptions DisplayPreference { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationAmazonPayDisplayPreferenceOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationAmazonPayDisplayPreferenceOptions.cs index 54cbb19126..34e260d6f6 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationAmazonPayDisplayPreferenceOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationAmazonPayDisplayPreferenceOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationAmazonPayDisplayPreferenceOptions : INestedOptions { @@ -10,6 +13,9 @@ public class PaymentMethodConfigurationAmazonPayDisplayPreferenceOptions : INest /// One of: none, off, or on. /// [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif public string Preference { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationAmazonPayOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationAmazonPayOptions.cs index 7520ba9eae..14efbe94b6 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationAmazonPayOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationAmazonPayOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationAmazonPayOptions : INestedOptions { @@ -9,6 +12,9 @@ public class PaymentMethodConfigurationAmazonPayOptions : INestedOptions /// Whether or not the payment method should be displayed. /// [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif public PaymentMethodConfigurationAmazonPayDisplayPreferenceOptions DisplayPreference { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationApplePayDisplayPreferenceOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationApplePayDisplayPreferenceOptions.cs index 99a5f52c87..f024538e16 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationApplePayDisplayPreferenceOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationApplePayDisplayPreferenceOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationApplePayDisplayPreferenceOptions : INestedOptions { @@ -10,6 +13,9 @@ public class PaymentMethodConfigurationApplePayDisplayPreferenceOptions : INeste /// One of: none, off, or on. /// [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif public string Preference { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationApplePayLaterDisplayPreferenceOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationApplePayLaterDisplayPreferenceOptions.cs index 4309ad1f89..ed8a28abf9 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationApplePayLaterDisplayPreferenceOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationApplePayLaterDisplayPreferenceOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationApplePayLaterDisplayPreferenceOptions : INestedOptions { @@ -10,6 +13,9 @@ public class PaymentMethodConfigurationApplePayLaterDisplayPreferenceOptions : I /// One of: none, off, or on. /// [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif public string Preference { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationApplePayLaterOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationApplePayLaterOptions.cs index ecbada69aa..5b4b9ca989 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationApplePayLaterOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationApplePayLaterOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationApplePayLaterOptions : INestedOptions { @@ -9,6 +12,9 @@ public class PaymentMethodConfigurationApplePayLaterOptions : INestedOptions /// Whether or not the payment method should be displayed. /// [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif public PaymentMethodConfigurationApplePayLaterDisplayPreferenceOptions DisplayPreference { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationApplePayOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationApplePayOptions.cs index 7bcfe569e7..f10b6f9913 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationApplePayOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationApplePayOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationApplePayOptions : INestedOptions { @@ -9,6 +12,9 @@ public class PaymentMethodConfigurationApplePayOptions : INestedOptions /// Whether or not the payment method should be displayed. /// [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif public PaymentMethodConfigurationApplePayDisplayPreferenceOptions DisplayPreference { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationAuBecsDebitDisplayPreferenceOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationAuBecsDebitDisplayPreferenceOptions.cs index 29f0be2e6f..234e5187e6 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationAuBecsDebitDisplayPreferenceOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationAuBecsDebitDisplayPreferenceOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationAuBecsDebitDisplayPreferenceOptions : INestedOptions { @@ -10,6 +13,9 @@ public class PaymentMethodConfigurationAuBecsDebitDisplayPreferenceOptions : INe /// One of: none, off, or on. /// [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif public string Preference { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationAuBecsDebitOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationAuBecsDebitOptions.cs index d4c9ecfe3d..3b7a45f842 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationAuBecsDebitOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationAuBecsDebitOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationAuBecsDebitOptions : INestedOptions { @@ -9,6 +12,9 @@ public class PaymentMethodConfigurationAuBecsDebitOptions : INestedOptions /// Whether or not the payment method should be displayed. /// [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif public PaymentMethodConfigurationAuBecsDebitDisplayPreferenceOptions DisplayPreference { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationBacsDebitDisplayPreferenceOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationBacsDebitDisplayPreferenceOptions.cs index 317b4623f5..48db0b2c74 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationBacsDebitDisplayPreferenceOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationBacsDebitDisplayPreferenceOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationBacsDebitDisplayPreferenceOptions : INestedOptions { @@ -10,6 +13,9 @@ public class PaymentMethodConfigurationBacsDebitDisplayPreferenceOptions : INest /// One of: none, off, or on. /// [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif public string Preference { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationBacsDebitOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationBacsDebitOptions.cs index 4ce22a549d..961a8d7aea 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationBacsDebitOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationBacsDebitOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationBacsDebitOptions : INestedOptions { @@ -9,6 +12,9 @@ public class PaymentMethodConfigurationBacsDebitOptions : INestedOptions /// Whether or not the payment method should be displayed. /// [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif public PaymentMethodConfigurationBacsDebitDisplayPreferenceOptions DisplayPreference { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationBancontactDisplayPreferenceOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationBancontactDisplayPreferenceOptions.cs index 6083867e1d..8843047d81 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationBancontactDisplayPreferenceOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationBancontactDisplayPreferenceOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationBancontactDisplayPreferenceOptions : INestedOptions { @@ -10,6 +13,9 @@ public class PaymentMethodConfigurationBancontactDisplayPreferenceOptions : INes /// One of: none, off, or on. /// [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif public string Preference { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationBancontactOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationBancontactOptions.cs index 7512aca75f..5b0eb6e065 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationBancontactOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationBancontactOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationBancontactOptions : INestedOptions { @@ -9,6 +12,9 @@ public class PaymentMethodConfigurationBancontactOptions : INestedOptions /// Whether or not the payment method should be displayed. /// [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif public PaymentMethodConfigurationBancontactDisplayPreferenceOptions DisplayPreference { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationBlikDisplayPreferenceOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationBlikDisplayPreferenceOptions.cs index 34b0859c78..fc23cfa2ab 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationBlikDisplayPreferenceOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationBlikDisplayPreferenceOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationBlikDisplayPreferenceOptions : INestedOptions { @@ -10,6 +13,9 @@ public class PaymentMethodConfigurationBlikDisplayPreferenceOptions : INestedOpt /// One of: none, off, or on. /// [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif public string Preference { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationBlikOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationBlikOptions.cs index 597b0cf3f0..170cfd71d5 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationBlikOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationBlikOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationBlikOptions : INestedOptions { @@ -9,6 +12,9 @@ public class PaymentMethodConfigurationBlikOptions : INestedOptions /// Whether or not the payment method should be displayed. /// [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif public PaymentMethodConfigurationBlikDisplayPreferenceOptions DisplayPreference { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationBoletoDisplayPreferenceOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationBoletoDisplayPreferenceOptions.cs index 84c8ce840b..9911173a08 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationBoletoDisplayPreferenceOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationBoletoDisplayPreferenceOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationBoletoDisplayPreferenceOptions : INestedOptions { @@ -10,6 +13,9 @@ public class PaymentMethodConfigurationBoletoDisplayPreferenceOptions : INestedO /// One of: none, off, or on. /// [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif public string Preference { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationBoletoOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationBoletoOptions.cs index 40d9a1c797..297f980491 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationBoletoOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationBoletoOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationBoletoOptions : INestedOptions { @@ -9,6 +12,9 @@ public class PaymentMethodConfigurationBoletoOptions : INestedOptions /// Whether or not the payment method should be displayed. /// [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif public PaymentMethodConfigurationBoletoDisplayPreferenceOptions DisplayPreference { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationCardDisplayPreferenceOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationCardDisplayPreferenceOptions.cs index 92dc0ffd05..a9606a86da 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationCardDisplayPreferenceOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationCardDisplayPreferenceOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationCardDisplayPreferenceOptions : INestedOptions { @@ -10,6 +13,9 @@ public class PaymentMethodConfigurationCardDisplayPreferenceOptions : INestedOpt /// One of: none, off, or on. /// [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif public string Preference { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationCardOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationCardOptions.cs index 3df444baf0..29814c2338 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationCardOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationCardOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationCardOptions : INestedOptions { @@ -9,6 +12,9 @@ public class PaymentMethodConfigurationCardOptions : INestedOptions /// Whether or not the payment method should be displayed. /// [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif public PaymentMethodConfigurationCardDisplayPreferenceOptions DisplayPreference { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationCartesBancairesDisplayPreferenceOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationCartesBancairesDisplayPreferenceOptions.cs index 3b43131940..2a22cd65c5 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationCartesBancairesDisplayPreferenceOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationCartesBancairesDisplayPreferenceOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationCartesBancairesDisplayPreferenceOptions : INestedOptions { @@ -10,6 +13,9 @@ public class PaymentMethodConfigurationCartesBancairesDisplayPreferenceOptions : /// One of: none, off, or on. /// [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif public string Preference { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationCartesBancairesOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationCartesBancairesOptions.cs index da06e17745..c678411ead 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationCartesBancairesOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationCartesBancairesOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationCartesBancairesOptions : INestedOptions { @@ -9,6 +12,9 @@ public class PaymentMethodConfigurationCartesBancairesOptions : INestedOptions /// Whether or not the payment method should be displayed. /// [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif public PaymentMethodConfigurationCartesBancairesDisplayPreferenceOptions DisplayPreference { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationCashappDisplayPreferenceOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationCashappDisplayPreferenceOptions.cs index 70d90018a1..5f0bc084ba 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationCashappDisplayPreferenceOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationCashappDisplayPreferenceOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationCashappDisplayPreferenceOptions : INestedOptions { @@ -10,6 +13,9 @@ public class PaymentMethodConfigurationCashappDisplayPreferenceOptions : INested /// One of: none, off, or on. /// [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif public string Preference { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationCashappOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationCashappOptions.cs index 17740e1763..e201665243 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationCashappOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationCashappOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationCashappOptions : INestedOptions { @@ -9,6 +12,9 @@ public class PaymentMethodConfigurationCashappOptions : INestedOptions /// Whether or not the payment method should be displayed. /// [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif public PaymentMethodConfigurationCashappDisplayPreferenceOptions DisplayPreference { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationCreateOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationCreateOptions.cs index 9bdd5e8ac9..2e9992eda3 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationCreateOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationCreateOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationCreateOptions : BaseOptions { @@ -11,6 +14,9 @@ public class PaymentMethodConfigurationCreateOptions : BaseOptions /// country availability. /// [JsonProperty("acss_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("acss_debit")] +#endif public PaymentMethodConfigurationAcssDebitOptions AcssDebit { get; set; } /// @@ -21,6 +27,9 @@ public class PaymentMethodConfigurationCreateOptions : BaseOptions /// for more details like country availability. /// [JsonProperty("affirm")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("affirm")] +#endif public PaymentMethodConfigurationAffirmOptions Affirm { get; set; } /// @@ -30,6 +39,9 @@ public class PaymentMethodConfigurationCreateOptions : BaseOptions /// beauty, and sports products. /// [JsonProperty("afterpay_clearpay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("afterpay_clearpay")] +#endif public PaymentMethodConfigurationAfterpayClearpayOptions AfterpayClearpay { get; set; } /// @@ -40,6 +52,9 @@ public class PaymentMethodConfigurationCreateOptions : BaseOptions /// href="https://stripe.com/docs/payments/alipay">page for more details. /// [JsonProperty("alipay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("alipay")] +#endif public PaymentMethodConfigurationAlipayOptions Alipay { get; set; } /// @@ -47,6 +62,9 @@ public class PaymentMethodConfigurationCreateOptions : BaseOptions /// 2, 3, or 4 installments. /// [JsonProperty("alma")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("alma")] +#endif public PaymentMethodConfigurationAlmaOptions Alma { get; set; } /// @@ -54,6 +72,9 @@ public class PaymentMethodConfigurationCreateOptions : BaseOptions /// on Amazon. /// [JsonProperty("amazon_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amazon_pay")] +#endif public PaymentMethodConfigurationAmazonPayOptions AmazonPay { get; set; } /// @@ -64,6 +85,9 @@ public class PaymentMethodConfigurationCreateOptions : BaseOptions /// Check this page for more details. /// [JsonProperty("apple_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("apple_pay")] +#endif public PaymentMethodConfigurationApplePayOptions ApplePay { get; set; } /// @@ -71,6 +95,9 @@ public class PaymentMethodConfigurationCreateOptions : BaseOptions /// customers a way to split purchases into four installments across six weeks. /// [JsonProperty("apple_pay_later")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("apple_pay_later")] +#endif public PaymentMethodConfigurationApplePayLaterOptions ApplePayLater { get; set; } /// @@ -79,6 +106,9 @@ public class PaymentMethodConfigurationCreateOptions : BaseOptions /// href="https://stripe.com/docs/payments/au-becs-debit">page for more details. /// [JsonProperty("au_becs_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("au_becs_debit")] +#endif public PaymentMethodConfigurationAuBecsDebitOptions AuBecsDebit { get; set; } /// @@ -88,6 +118,9 @@ public class PaymentMethodConfigurationCreateOptions : BaseOptions /// details. /// [JsonProperty("bacs_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bacs_debit")] +#endif public PaymentMethodConfigurationBacsDebitOptions BacsDebit { get; set; } /// @@ -98,6 +131,9 @@ public class PaymentMethodConfigurationCreateOptions : BaseOptions /// href="https://stripe.com/docs/payments/bancontact">page for more details. /// [JsonProperty("bancontact")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bancontact")] +#endif public PaymentMethodConfigurationBancontactOptions Bancontact { get; set; } /// @@ -108,6 +144,9 @@ public class PaymentMethodConfigurationCreateOptions : BaseOptions /// href="https://stripe.com/docs/payments/blik">page for more details. /// [JsonProperty("blik")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("blik")] +#endif public PaymentMethodConfigurationBlikOptions Blik { get; set; } /// @@ -116,6 +155,9 @@ public class PaymentMethodConfigurationCreateOptions : BaseOptions /// details. /// [JsonProperty("boleto")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("boleto")] +#endif public PaymentMethodConfigurationBoletoOptions Boleto { get; set; } /// @@ -123,6 +165,9 @@ public class PaymentMethodConfigurationCreateOptions : BaseOptions /// supports global and local card networks. /// [JsonProperty("card")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card")] +#endif public PaymentMethodConfigurationCardOptions Card { get; set; } /// @@ -132,6 +177,9 @@ public class PaymentMethodConfigurationCreateOptions : BaseOptions /// href="https://stripe.com/docs/payments/cartes-bancaires">page for more details. /// [JsonProperty("cartes_bancaires")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cartes_bancaires")] +#endif public PaymentMethodConfigurationCartesBancairesOptions CartesBancaires { get; set; } /// @@ -140,6 +188,9 @@ public class PaymentMethodConfigurationCreateOptions : BaseOptions /// href="https://stripe.com/docs/payments/cash-app-pay">page for more details. /// [JsonProperty("cashapp")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cashapp")] +#endif public PaymentMethodConfigurationCashappOptions Cashapp { get; set; } /// @@ -149,6 +200,9 @@ public class PaymentMethodConfigurationCreateOptions : BaseOptions /// details. /// [JsonProperty("customer_balance")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_balance")] +#endif public PaymentMethodConfigurationCustomerBalanceOptions CustomerBalance { get; set; } /// @@ -158,6 +212,9 @@ public class PaymentMethodConfigurationCreateOptions : BaseOptions /// href="https://stripe.com/docs/payments/eps">page for more details. /// [JsonProperty("eps")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("eps")] +#endif public PaymentMethodConfigurationEpsOptions Eps { get; set; } /// @@ -170,6 +227,9 @@ public class PaymentMethodConfigurationCreateOptions : BaseOptions /// href="https://stripe.com/docs/payments/fpx">page for more details. /// [JsonProperty("fpx")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fpx")] +#endif public PaymentMethodConfigurationFpxOptions Fpx { get; set; } /// @@ -181,6 +241,9 @@ public class PaymentMethodConfigurationCreateOptions : BaseOptions /// href="https://stripe.com/docs/payments/giropay">page for more details. /// [JsonProperty("giropay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("giropay")] +#endif public PaymentMethodConfigurationGiropayOptions Giropay { get; set; } /// @@ -191,6 +254,9 @@ public class PaymentMethodConfigurationCreateOptions : BaseOptions /// href="https://stripe.com/docs/google-pay">page for more details. /// [JsonProperty("google_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("google_pay")] +#endif public PaymentMethodConfigurationGooglePayOptions GooglePay { get; set; } /// @@ -200,6 +266,9 @@ public class PaymentMethodConfigurationCreateOptions : BaseOptions /// this page for more details. /// [JsonProperty("grabpay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("grabpay")] +#endif public PaymentMethodConfigurationGrabpayOptions Grabpay { get; set; } /// @@ -210,6 +279,9 @@ public class PaymentMethodConfigurationCreateOptions : BaseOptions /// page for more details. /// [JsonProperty("ideal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ideal")] +#endif public PaymentMethodConfigurationIdealOptions Ideal { get; set; } /// @@ -221,6 +293,9 @@ public class PaymentMethodConfigurationCreateOptions : BaseOptions /// for more details. /// [JsonProperty("jcb")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("jcb")] +#endif public PaymentMethodConfigurationJcbOptions Jcb { get; set; } /// @@ -232,6 +307,9 @@ public class PaymentMethodConfigurationCreateOptions : BaseOptions /// href="https://stripe.com/docs/payments/klarna">page for more details. /// [JsonProperty("klarna")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("klarna")] +#endif public PaymentMethodConfigurationKlarnaOptions Klarna { get; set; } /// @@ -240,6 +318,9 @@ public class PaymentMethodConfigurationCreateOptions : BaseOptions /// for more details. /// [JsonProperty("konbini")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("konbini")] +#endif public PaymentMethodConfigurationKonbiniOptions Konbini { get; set; } /// @@ -248,6 +329,9 @@ public class PaymentMethodConfigurationCreateOptions : BaseOptions /// with one click for any business on the network. /// [JsonProperty("link")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("link")] +#endif public PaymentMethodConfigurationLinkOptions Link { get; set; } /// @@ -259,6 +343,9 @@ public class PaymentMethodConfigurationCreateOptions : BaseOptions /// href="https://stripe.com/docs/payments/mobilepay">page for more details. /// [JsonProperty("mobilepay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mobilepay")] +#endif public PaymentMethodConfigurationMobilepayOptions Mobilepay { get; set; } /// @@ -267,12 +354,18 @@ public class PaymentMethodConfigurationCreateOptions : BaseOptions /// single integration path for creating payments using any supported method. /// [JsonProperty("multibanco")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("multibanco")] +#endif public PaymentMethodConfigurationMultibancoOptions Multibanco { get; set; } /// /// Configuration name. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } /// @@ -282,6 +375,9 @@ public class PaymentMethodConfigurationCreateOptions : BaseOptions /// href="https://stripe.com/docs/payments/oxxo">page for more details. /// [JsonProperty("oxxo")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("oxxo")] +#endif public PaymentMethodConfigurationOxxoOptions Oxxo { get; set; } /// @@ -292,12 +388,18 @@ public class PaymentMethodConfigurationCreateOptions : BaseOptions /// more details. /// [JsonProperty("p24")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("p24")] +#endif public PaymentMethodConfigurationP24Options P24 { get; set; } /// /// Configuration's parent configuration. Specify to create a child configuration. /// [JsonProperty("parent")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("parent")] +#endif public string Parent { get; set; } /// @@ -307,6 +409,9 @@ public class PaymentMethodConfigurationCreateOptions : BaseOptions /// more details. /// [JsonProperty("paynow")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("paynow")] +#endif public PaymentMethodConfigurationPaynowOptions Paynow { get; set; } /// @@ -315,6 +420,9 @@ public class PaymentMethodConfigurationCreateOptions : BaseOptions /// href="https://stripe.com/docs/payments/paypal">page for more details. /// [JsonProperty("paypal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("paypal")] +#endif public PaymentMethodConfigurationPaypalOptions Paypal { get; set; } /// @@ -323,6 +431,9 @@ public class PaymentMethodConfigurationCreateOptions : BaseOptions /// href="https://stripe.com/docs/payments/promptpay">page for more details. /// [JsonProperty("promptpay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("promptpay")] +#endif public PaymentMethodConfigurationPromptpayOptions Promptpay { get; set; } /// @@ -332,6 +443,9 @@ public class PaymentMethodConfigurationCreateOptions : BaseOptions /// purchase. /// [JsonProperty("revolut_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("revolut_pay")] +#endif public PaymentMethodConfigurationRevolutPayOptions RevolutPay { get; set; } /// @@ -343,6 +457,9 @@ public class PaymentMethodConfigurationCreateOptions : BaseOptions /// more details. /// [JsonProperty("sepa_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sepa_debit")] +#endif public PaymentMethodConfigurationSepaDebitOptions SepaDebit { get; set; } /// @@ -353,6 +470,9 @@ public class PaymentMethodConfigurationCreateOptions : BaseOptions /// href="https://stripe.com/docs/payments/sofort">page for more details. /// [JsonProperty("sofort")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sofort")] +#endif public PaymentMethodConfigurationSofortOptions Sofort { get; set; } /// @@ -363,6 +483,9 @@ public class PaymentMethodConfigurationCreateOptions : BaseOptions /// Check this page for more details. /// [JsonProperty("swish")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("swish")] +#endif public PaymentMethodConfigurationSwishOptions Swish { get; set; } /// @@ -371,6 +494,9 @@ public class PaymentMethodConfigurationCreateOptions : BaseOptions /// more details. /// [JsonProperty("twint")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("twint")] +#endif public PaymentMethodConfigurationTwintOptions Twint { get; set; } /// @@ -380,6 +506,9 @@ public class PaymentMethodConfigurationCreateOptions : BaseOptions /// href="https://stripe.com/docs/payments/ach-direct-debit">page for more details. /// [JsonProperty("us_bank_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("us_bank_account")] +#endif public PaymentMethodConfigurationUsBankAccountOptions UsBankAccount { get; set; } /// @@ -390,6 +519,9 @@ public class PaymentMethodConfigurationCreateOptions : BaseOptions /// href="https://stripe.com/docs/payments/wechat-pay">page for more details. /// [JsonProperty("wechat_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("wechat_pay")] +#endif public PaymentMethodConfigurationWechatPayOptions WechatPay { get; set; } /// @@ -398,6 +530,9 @@ public class PaymentMethodConfigurationCreateOptions : BaseOptions /// availability. /// [JsonProperty("zip")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("zip")] +#endif public PaymentMethodConfigurationZipOptions Zip { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationCustomerBalanceDisplayPreferenceOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationCustomerBalanceDisplayPreferenceOptions.cs index dbcb3ca801..ddf70ea0bf 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationCustomerBalanceDisplayPreferenceOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationCustomerBalanceDisplayPreferenceOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationCustomerBalanceDisplayPreferenceOptions : INestedOptions { @@ -10,6 +13,9 @@ public class PaymentMethodConfigurationCustomerBalanceDisplayPreferenceOptions : /// One of: none, off, or on. /// [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif public string Preference { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationCustomerBalanceOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationCustomerBalanceOptions.cs index 1b700db133..6cd64fc6e6 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationCustomerBalanceOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationCustomerBalanceOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationCustomerBalanceOptions : INestedOptions { @@ -9,6 +12,9 @@ public class PaymentMethodConfigurationCustomerBalanceOptions : INestedOptions /// Whether or not the payment method should be displayed. /// [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif public PaymentMethodConfigurationCustomerBalanceDisplayPreferenceOptions DisplayPreference { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationEpsDisplayPreferenceOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationEpsDisplayPreferenceOptions.cs index 97f5822127..ad3eb9419f 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationEpsDisplayPreferenceOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationEpsDisplayPreferenceOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationEpsDisplayPreferenceOptions : INestedOptions { @@ -10,6 +13,9 @@ public class PaymentMethodConfigurationEpsDisplayPreferenceOptions : INestedOpti /// One of: none, off, or on. /// [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif public string Preference { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationEpsOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationEpsOptions.cs index 2a51fba0f5..a09ace1892 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationEpsOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationEpsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationEpsOptions : INestedOptions { @@ -9,6 +12,9 @@ public class PaymentMethodConfigurationEpsOptions : INestedOptions /// Whether or not the payment method should be displayed. /// [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif public PaymentMethodConfigurationEpsDisplayPreferenceOptions DisplayPreference { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationFpxDisplayPreferenceOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationFpxDisplayPreferenceOptions.cs index b208d5540a..9b83792448 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationFpxDisplayPreferenceOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationFpxDisplayPreferenceOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationFpxDisplayPreferenceOptions : INestedOptions { @@ -10,6 +13,9 @@ public class PaymentMethodConfigurationFpxDisplayPreferenceOptions : INestedOpti /// One of: none, off, or on. /// [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif public string Preference { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationFpxOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationFpxOptions.cs index 33c07118fa..f5b9d5d924 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationFpxOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationFpxOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationFpxOptions : INestedOptions { @@ -9,6 +12,9 @@ public class PaymentMethodConfigurationFpxOptions : INestedOptions /// Whether or not the payment method should be displayed. /// [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif public PaymentMethodConfigurationFpxDisplayPreferenceOptions DisplayPreference { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationGiropayDisplayPreferenceOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationGiropayDisplayPreferenceOptions.cs index 81aa68ccae..ba5cebf1c8 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationGiropayDisplayPreferenceOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationGiropayDisplayPreferenceOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationGiropayDisplayPreferenceOptions : INestedOptions { @@ -10,6 +13,9 @@ public class PaymentMethodConfigurationGiropayDisplayPreferenceOptions : INested /// One of: none, off, or on. /// [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif public string Preference { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationGiropayOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationGiropayOptions.cs index 83d122fdef..1f70c0d5fa 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationGiropayOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationGiropayOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationGiropayOptions : INestedOptions { @@ -9,6 +12,9 @@ public class PaymentMethodConfigurationGiropayOptions : INestedOptions /// Whether or not the payment method should be displayed. /// [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif public PaymentMethodConfigurationGiropayDisplayPreferenceOptions DisplayPreference { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationGooglePayDisplayPreferenceOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationGooglePayDisplayPreferenceOptions.cs index 603af20481..3eec32aded 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationGooglePayDisplayPreferenceOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationGooglePayDisplayPreferenceOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationGooglePayDisplayPreferenceOptions : INestedOptions { @@ -10,6 +13,9 @@ public class PaymentMethodConfigurationGooglePayDisplayPreferenceOptions : INest /// One of: none, off, or on. /// [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif public string Preference { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationGooglePayOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationGooglePayOptions.cs index cea516871d..ad50424b8a 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationGooglePayOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationGooglePayOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationGooglePayOptions : INestedOptions { @@ -9,6 +12,9 @@ public class PaymentMethodConfigurationGooglePayOptions : INestedOptions /// Whether or not the payment method should be displayed. /// [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif public PaymentMethodConfigurationGooglePayDisplayPreferenceOptions DisplayPreference { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationGrabpayDisplayPreferenceOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationGrabpayDisplayPreferenceOptions.cs index 4126c9742d..a9a62d3d80 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationGrabpayDisplayPreferenceOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationGrabpayDisplayPreferenceOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationGrabpayDisplayPreferenceOptions : INestedOptions { @@ -10,6 +13,9 @@ public class PaymentMethodConfigurationGrabpayDisplayPreferenceOptions : INested /// One of: none, off, or on. /// [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif public string Preference { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationGrabpayOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationGrabpayOptions.cs index 2d13b1494f..d8d07ae884 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationGrabpayOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationGrabpayOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationGrabpayOptions : INestedOptions { @@ -9,6 +12,9 @@ public class PaymentMethodConfigurationGrabpayOptions : INestedOptions /// Whether or not the payment method should be displayed. /// [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif public PaymentMethodConfigurationGrabpayDisplayPreferenceOptions DisplayPreference { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationIdealDisplayPreferenceOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationIdealDisplayPreferenceOptions.cs index 6858943f0b..9aec95c933 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationIdealDisplayPreferenceOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationIdealDisplayPreferenceOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationIdealDisplayPreferenceOptions : INestedOptions { @@ -10,6 +13,9 @@ public class PaymentMethodConfigurationIdealDisplayPreferenceOptions : INestedOp /// One of: none, off, or on. /// [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif public string Preference { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationIdealOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationIdealOptions.cs index 2f288fbf03..97805ae7fd 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationIdealOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationIdealOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationIdealOptions : INestedOptions { @@ -9,6 +12,9 @@ public class PaymentMethodConfigurationIdealOptions : INestedOptions /// Whether or not the payment method should be displayed. /// [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif public PaymentMethodConfigurationIdealDisplayPreferenceOptions DisplayPreference { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationJcbDisplayPreferenceOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationJcbDisplayPreferenceOptions.cs index 5639aeaf62..573f693c6d 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationJcbDisplayPreferenceOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationJcbDisplayPreferenceOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationJcbDisplayPreferenceOptions : INestedOptions { @@ -10,6 +13,9 @@ public class PaymentMethodConfigurationJcbDisplayPreferenceOptions : INestedOpti /// One of: none, off, or on. /// [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif public string Preference { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationJcbOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationJcbOptions.cs index 5bb8994def..40b7b6cc63 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationJcbOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationJcbOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationJcbOptions : INestedOptions { @@ -9,6 +12,9 @@ public class PaymentMethodConfigurationJcbOptions : INestedOptions /// Whether or not the payment method should be displayed. /// [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif public PaymentMethodConfigurationJcbDisplayPreferenceOptions DisplayPreference { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationKlarnaDisplayPreferenceOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationKlarnaDisplayPreferenceOptions.cs index 7ec0cfae8a..74dac1b146 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationKlarnaDisplayPreferenceOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationKlarnaDisplayPreferenceOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationKlarnaDisplayPreferenceOptions : INestedOptions { @@ -10,6 +13,9 @@ public class PaymentMethodConfigurationKlarnaDisplayPreferenceOptions : INestedO /// One of: none, off, or on. /// [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif public string Preference { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationKlarnaOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationKlarnaOptions.cs index 05e04290f4..ed6d5bafe6 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationKlarnaOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationKlarnaOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationKlarnaOptions : INestedOptions { @@ -9,6 +12,9 @@ public class PaymentMethodConfigurationKlarnaOptions : INestedOptions /// Whether or not the payment method should be displayed. /// [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif public PaymentMethodConfigurationKlarnaDisplayPreferenceOptions DisplayPreference { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationKonbiniDisplayPreferenceOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationKonbiniDisplayPreferenceOptions.cs index 204212343b..91c74e3cc3 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationKonbiniDisplayPreferenceOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationKonbiniDisplayPreferenceOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationKonbiniDisplayPreferenceOptions : INestedOptions { @@ -10,6 +13,9 @@ public class PaymentMethodConfigurationKonbiniDisplayPreferenceOptions : INested /// One of: none, off, or on. /// [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif public string Preference { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationKonbiniOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationKonbiniOptions.cs index 2ac71614cd..92266cc171 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationKonbiniOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationKonbiniOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationKonbiniOptions : INestedOptions { @@ -9,6 +12,9 @@ public class PaymentMethodConfigurationKonbiniOptions : INestedOptions /// Whether or not the payment method should be displayed. /// [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif public PaymentMethodConfigurationKonbiniDisplayPreferenceOptions DisplayPreference { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationLinkDisplayPreferenceOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationLinkDisplayPreferenceOptions.cs index 596c988125..fa6f663059 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationLinkDisplayPreferenceOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationLinkDisplayPreferenceOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationLinkDisplayPreferenceOptions : INestedOptions { @@ -10,6 +13,9 @@ public class PaymentMethodConfigurationLinkDisplayPreferenceOptions : INestedOpt /// One of: none, off, or on. /// [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif public string Preference { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationLinkOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationLinkOptions.cs index 88e8cbb76a..070ed58bb0 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationLinkOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationLinkOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationLinkOptions : INestedOptions { @@ -9,6 +12,9 @@ public class PaymentMethodConfigurationLinkOptions : INestedOptions /// Whether or not the payment method should be displayed. /// [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif public PaymentMethodConfigurationLinkDisplayPreferenceOptions DisplayPreference { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationListOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationListOptions.cs index 1c840c47d9..33ebc12d17 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationListOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationListOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationListOptions : ListOptions { @@ -9,6 +12,9 @@ public class PaymentMethodConfigurationListOptions : ListOptions /// The Connect application to filter by. /// [JsonProperty("application")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("application")] +#endif public string Application { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationMobilepayDisplayPreferenceOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationMobilepayDisplayPreferenceOptions.cs index f4fae56502..a57fad275a 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationMobilepayDisplayPreferenceOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationMobilepayDisplayPreferenceOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationMobilepayDisplayPreferenceOptions : INestedOptions { @@ -10,6 +13,9 @@ public class PaymentMethodConfigurationMobilepayDisplayPreferenceOptions : INest /// One of: none, off, or on. /// [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif public string Preference { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationMobilepayOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationMobilepayOptions.cs index 9b11c49cf8..c44c6ce743 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationMobilepayOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationMobilepayOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationMobilepayOptions : INestedOptions { @@ -9,6 +12,9 @@ public class PaymentMethodConfigurationMobilepayOptions : INestedOptions /// Whether or not the payment method should be displayed. /// [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif public PaymentMethodConfigurationMobilepayDisplayPreferenceOptions DisplayPreference { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationMultibancoDisplayPreferenceOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationMultibancoDisplayPreferenceOptions.cs index e924a813ee..199ab10e6f 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationMultibancoDisplayPreferenceOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationMultibancoDisplayPreferenceOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationMultibancoDisplayPreferenceOptions : INestedOptions { @@ -10,6 +13,9 @@ public class PaymentMethodConfigurationMultibancoDisplayPreferenceOptions : INes /// One of: none, off, or on. /// [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif public string Preference { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationMultibancoOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationMultibancoOptions.cs index 936f37e04f..5337bb9672 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationMultibancoOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationMultibancoOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationMultibancoOptions : INestedOptions { @@ -9,6 +12,9 @@ public class PaymentMethodConfigurationMultibancoOptions : INestedOptions /// Whether or not the payment method should be displayed. /// [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif public PaymentMethodConfigurationMultibancoDisplayPreferenceOptions DisplayPreference { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationOxxoDisplayPreferenceOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationOxxoDisplayPreferenceOptions.cs index f3559b3b6c..1d9fdf26ca 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationOxxoDisplayPreferenceOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationOxxoDisplayPreferenceOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationOxxoDisplayPreferenceOptions : INestedOptions { @@ -10,6 +13,9 @@ public class PaymentMethodConfigurationOxxoDisplayPreferenceOptions : INestedOpt /// One of: none, off, or on. /// [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif public string Preference { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationOxxoOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationOxxoOptions.cs index 96376fe957..b3618f6281 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationOxxoOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationOxxoOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationOxxoOptions : INestedOptions { @@ -9,6 +12,9 @@ public class PaymentMethodConfigurationOxxoOptions : INestedOptions /// Whether or not the payment method should be displayed. /// [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif public PaymentMethodConfigurationOxxoDisplayPreferenceOptions DisplayPreference { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationP24DisplayPreferenceOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationP24DisplayPreferenceOptions.cs index 035e351c9b..0e59181800 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationP24DisplayPreferenceOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationP24DisplayPreferenceOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationP24DisplayPreferenceOptions : INestedOptions { @@ -10,6 +13,9 @@ public class PaymentMethodConfigurationP24DisplayPreferenceOptions : INestedOpti /// One of: none, off, or on. /// [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif public string Preference { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationP24Options.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationP24Options.cs index fcd8b0a104..6b0938d9fa 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationP24Options.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationP24Options.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationP24Options : INestedOptions { @@ -9,6 +12,9 @@ public class PaymentMethodConfigurationP24Options : INestedOptions /// Whether or not the payment method should be displayed. /// [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif public PaymentMethodConfigurationP24DisplayPreferenceOptions DisplayPreference { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationPaynowDisplayPreferenceOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationPaynowDisplayPreferenceOptions.cs index 7a06748e31..df3fed092e 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationPaynowDisplayPreferenceOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationPaynowDisplayPreferenceOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationPaynowDisplayPreferenceOptions : INestedOptions { @@ -10,6 +13,9 @@ public class PaymentMethodConfigurationPaynowDisplayPreferenceOptions : INestedO /// One of: none, off, or on. /// [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif public string Preference { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationPaynowOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationPaynowOptions.cs index b3173594f6..a770e92fc3 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationPaynowOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationPaynowOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationPaynowOptions : INestedOptions { @@ -9,6 +12,9 @@ public class PaymentMethodConfigurationPaynowOptions : INestedOptions /// Whether or not the payment method should be displayed. /// [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif public PaymentMethodConfigurationPaynowDisplayPreferenceOptions DisplayPreference { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationPaypalDisplayPreferenceOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationPaypalDisplayPreferenceOptions.cs index aa3b0a7d45..252b413902 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationPaypalDisplayPreferenceOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationPaypalDisplayPreferenceOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationPaypalDisplayPreferenceOptions : INestedOptions { @@ -10,6 +13,9 @@ public class PaymentMethodConfigurationPaypalDisplayPreferenceOptions : INestedO /// One of: none, off, or on. /// [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif public string Preference { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationPaypalOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationPaypalOptions.cs index 0d3a3c9936..5723f5763c 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationPaypalOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationPaypalOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationPaypalOptions : INestedOptions { @@ -9,6 +12,9 @@ public class PaymentMethodConfigurationPaypalOptions : INestedOptions /// Whether or not the payment method should be displayed. /// [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif public PaymentMethodConfigurationPaypalDisplayPreferenceOptions DisplayPreference { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationPromptpayDisplayPreferenceOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationPromptpayDisplayPreferenceOptions.cs index 7cdde91e08..9a671ea91d 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationPromptpayDisplayPreferenceOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationPromptpayDisplayPreferenceOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationPromptpayDisplayPreferenceOptions : INestedOptions { @@ -10,6 +13,9 @@ public class PaymentMethodConfigurationPromptpayDisplayPreferenceOptions : INest /// One of: none, off, or on. /// [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif public string Preference { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationPromptpayOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationPromptpayOptions.cs index 1499cc0767..e98681c6e3 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationPromptpayOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationPromptpayOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationPromptpayOptions : INestedOptions { @@ -9,6 +12,9 @@ public class PaymentMethodConfigurationPromptpayOptions : INestedOptions /// Whether or not the payment method should be displayed. /// [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif public PaymentMethodConfigurationPromptpayDisplayPreferenceOptions DisplayPreference { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationRevolutPayDisplayPreferenceOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationRevolutPayDisplayPreferenceOptions.cs index d32e84463f..9e78df814d 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationRevolutPayDisplayPreferenceOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationRevolutPayDisplayPreferenceOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationRevolutPayDisplayPreferenceOptions : INestedOptions { @@ -10,6 +13,9 @@ public class PaymentMethodConfigurationRevolutPayDisplayPreferenceOptions : INes /// One of: none, off, or on. /// [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif public string Preference { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationRevolutPayOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationRevolutPayOptions.cs index b84f59aaf5..8397e09e7b 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationRevolutPayOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationRevolutPayOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationRevolutPayOptions : INestedOptions { @@ -9,6 +12,9 @@ public class PaymentMethodConfigurationRevolutPayOptions : INestedOptions /// Whether or not the payment method should be displayed. /// [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif public PaymentMethodConfigurationRevolutPayDisplayPreferenceOptions DisplayPreference { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationSepaDebitDisplayPreferenceOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationSepaDebitDisplayPreferenceOptions.cs index d43557b2f6..0ff06dfa1e 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationSepaDebitDisplayPreferenceOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationSepaDebitDisplayPreferenceOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationSepaDebitDisplayPreferenceOptions : INestedOptions { @@ -10,6 +13,9 @@ public class PaymentMethodConfigurationSepaDebitDisplayPreferenceOptions : INest /// One of: none, off, or on. /// [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif public string Preference { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationSepaDebitOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationSepaDebitOptions.cs index 41c6d28cee..45f8529c68 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationSepaDebitOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationSepaDebitOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationSepaDebitOptions : INestedOptions { @@ -9,6 +12,9 @@ public class PaymentMethodConfigurationSepaDebitOptions : INestedOptions /// Whether or not the payment method should be displayed. /// [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif public PaymentMethodConfigurationSepaDebitDisplayPreferenceOptions DisplayPreference { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationSofortDisplayPreferenceOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationSofortDisplayPreferenceOptions.cs index 62fe515eb6..eadd508033 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationSofortDisplayPreferenceOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationSofortDisplayPreferenceOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationSofortDisplayPreferenceOptions : INestedOptions { @@ -10,6 +13,9 @@ public class PaymentMethodConfigurationSofortDisplayPreferenceOptions : INestedO /// One of: none, off, or on. /// [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif public string Preference { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationSofortOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationSofortOptions.cs index f8bf856763..e2ec896ba3 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationSofortOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationSofortOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationSofortOptions : INestedOptions { @@ -9,6 +12,9 @@ public class PaymentMethodConfigurationSofortOptions : INestedOptions /// Whether or not the payment method should be displayed. /// [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif public PaymentMethodConfigurationSofortDisplayPreferenceOptions DisplayPreference { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationSwishDisplayPreferenceOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationSwishDisplayPreferenceOptions.cs index 16957bead3..fdc06252cf 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationSwishDisplayPreferenceOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationSwishDisplayPreferenceOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationSwishDisplayPreferenceOptions : INestedOptions { @@ -10,6 +13,9 @@ public class PaymentMethodConfigurationSwishDisplayPreferenceOptions : INestedOp /// One of: none, off, or on. /// [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif public string Preference { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationSwishOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationSwishOptions.cs index 327fb3cbdb..3c98140279 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationSwishOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationSwishOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationSwishOptions : INestedOptions { @@ -9,6 +12,9 @@ public class PaymentMethodConfigurationSwishOptions : INestedOptions /// Whether or not the payment method should be displayed. /// [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif public PaymentMethodConfigurationSwishDisplayPreferenceOptions DisplayPreference { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationTwintDisplayPreferenceOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationTwintDisplayPreferenceOptions.cs index 6eb72ad892..e816fa9324 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationTwintDisplayPreferenceOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationTwintDisplayPreferenceOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationTwintDisplayPreferenceOptions : INestedOptions { @@ -10,6 +13,9 @@ public class PaymentMethodConfigurationTwintDisplayPreferenceOptions : INestedOp /// One of: none, off, or on. /// [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif public string Preference { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationTwintOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationTwintOptions.cs index 20633c1feb..6d8d99108e 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationTwintOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationTwintOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationTwintOptions : INestedOptions { @@ -9,6 +12,9 @@ public class PaymentMethodConfigurationTwintOptions : INestedOptions /// Whether or not the payment method should be displayed. /// [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif public PaymentMethodConfigurationTwintDisplayPreferenceOptions DisplayPreference { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationUpdateOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationUpdateOptions.cs index bf98706a48..acd89ca280 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationUpdateOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationUpdateOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationUpdateOptions : BaseOptions { @@ -11,12 +14,18 @@ public class PaymentMethodConfigurationUpdateOptions : BaseOptions /// country availability. /// [JsonProperty("acss_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("acss_debit")] +#endif public PaymentMethodConfigurationAcssDebitOptions AcssDebit { get; set; } /// /// Whether the configuration can be used for new payments. /// [JsonProperty("active")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("active")] +#endif public bool? Active { get; set; } /// @@ -27,6 +36,9 @@ public class PaymentMethodConfigurationUpdateOptions : BaseOptions /// for more details like country availability. /// [JsonProperty("affirm")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("affirm")] +#endif public PaymentMethodConfigurationAffirmOptions Affirm { get; set; } /// @@ -36,6 +48,9 @@ public class PaymentMethodConfigurationUpdateOptions : BaseOptions /// beauty, and sports products. /// [JsonProperty("afterpay_clearpay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("afterpay_clearpay")] +#endif public PaymentMethodConfigurationAfterpayClearpayOptions AfterpayClearpay { get; set; } /// @@ -46,6 +61,9 @@ public class PaymentMethodConfigurationUpdateOptions : BaseOptions /// href="https://stripe.com/docs/payments/alipay">page for more details. /// [JsonProperty("alipay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("alipay")] +#endif public PaymentMethodConfigurationAlipayOptions Alipay { get; set; } /// @@ -53,6 +71,9 @@ public class PaymentMethodConfigurationUpdateOptions : BaseOptions /// 2, 3, or 4 installments. /// [JsonProperty("alma")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("alma")] +#endif public PaymentMethodConfigurationAlmaOptions Alma { get; set; } /// @@ -60,6 +81,9 @@ public class PaymentMethodConfigurationUpdateOptions : BaseOptions /// on Amazon. /// [JsonProperty("amazon_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amazon_pay")] +#endif public PaymentMethodConfigurationAmazonPayOptions AmazonPay { get; set; } /// @@ -70,6 +94,9 @@ public class PaymentMethodConfigurationUpdateOptions : BaseOptions /// Check this page for more details. /// [JsonProperty("apple_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("apple_pay")] +#endif public PaymentMethodConfigurationApplePayOptions ApplePay { get; set; } /// @@ -77,6 +104,9 @@ public class PaymentMethodConfigurationUpdateOptions : BaseOptions /// customers a way to split purchases into four installments across six weeks. /// [JsonProperty("apple_pay_later")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("apple_pay_later")] +#endif public PaymentMethodConfigurationApplePayLaterOptions ApplePayLater { get; set; } /// @@ -85,6 +115,9 @@ public class PaymentMethodConfigurationUpdateOptions : BaseOptions /// href="https://stripe.com/docs/payments/au-becs-debit">page for more details. /// [JsonProperty("au_becs_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("au_becs_debit")] +#endif public PaymentMethodConfigurationAuBecsDebitOptions AuBecsDebit { get; set; } /// @@ -94,6 +127,9 @@ public class PaymentMethodConfigurationUpdateOptions : BaseOptions /// details. /// [JsonProperty("bacs_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bacs_debit")] +#endif public PaymentMethodConfigurationBacsDebitOptions BacsDebit { get; set; } /// @@ -104,6 +140,9 @@ public class PaymentMethodConfigurationUpdateOptions : BaseOptions /// href="https://stripe.com/docs/payments/bancontact">page for more details. /// [JsonProperty("bancontact")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bancontact")] +#endif public PaymentMethodConfigurationBancontactOptions Bancontact { get; set; } /// @@ -114,6 +153,9 @@ public class PaymentMethodConfigurationUpdateOptions : BaseOptions /// href="https://stripe.com/docs/payments/blik">page for more details. /// [JsonProperty("blik")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("blik")] +#endif public PaymentMethodConfigurationBlikOptions Blik { get; set; } /// @@ -122,6 +164,9 @@ public class PaymentMethodConfigurationUpdateOptions : BaseOptions /// details. /// [JsonProperty("boleto")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("boleto")] +#endif public PaymentMethodConfigurationBoletoOptions Boleto { get; set; } /// @@ -129,6 +174,9 @@ public class PaymentMethodConfigurationUpdateOptions : BaseOptions /// supports global and local card networks. /// [JsonProperty("card")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card")] +#endif public PaymentMethodConfigurationCardOptions Card { get; set; } /// @@ -138,6 +186,9 @@ public class PaymentMethodConfigurationUpdateOptions : BaseOptions /// href="https://stripe.com/docs/payments/cartes-bancaires">page for more details. /// [JsonProperty("cartes_bancaires")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cartes_bancaires")] +#endif public PaymentMethodConfigurationCartesBancairesOptions CartesBancaires { get; set; } /// @@ -146,6 +197,9 @@ public class PaymentMethodConfigurationUpdateOptions : BaseOptions /// href="https://stripe.com/docs/payments/cash-app-pay">page for more details. /// [JsonProperty("cashapp")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cashapp")] +#endif public PaymentMethodConfigurationCashappOptions Cashapp { get; set; } /// @@ -155,6 +209,9 @@ public class PaymentMethodConfigurationUpdateOptions : BaseOptions /// details. /// [JsonProperty("customer_balance")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_balance")] +#endif public PaymentMethodConfigurationCustomerBalanceOptions CustomerBalance { get; set; } /// @@ -164,6 +221,9 @@ public class PaymentMethodConfigurationUpdateOptions : BaseOptions /// href="https://stripe.com/docs/payments/eps">page for more details. /// [JsonProperty("eps")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("eps")] +#endif public PaymentMethodConfigurationEpsOptions Eps { get; set; } /// @@ -176,6 +236,9 @@ public class PaymentMethodConfigurationUpdateOptions : BaseOptions /// href="https://stripe.com/docs/payments/fpx">page for more details. /// [JsonProperty("fpx")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fpx")] +#endif public PaymentMethodConfigurationFpxOptions Fpx { get; set; } /// @@ -187,6 +250,9 @@ public class PaymentMethodConfigurationUpdateOptions : BaseOptions /// href="https://stripe.com/docs/payments/giropay">page for more details. /// [JsonProperty("giropay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("giropay")] +#endif public PaymentMethodConfigurationGiropayOptions Giropay { get; set; } /// @@ -197,6 +263,9 @@ public class PaymentMethodConfigurationUpdateOptions : BaseOptions /// href="https://stripe.com/docs/google-pay">page for more details. /// [JsonProperty("google_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("google_pay")] +#endif public PaymentMethodConfigurationGooglePayOptions GooglePay { get; set; } /// @@ -206,6 +275,9 @@ public class PaymentMethodConfigurationUpdateOptions : BaseOptions /// this page for more details. /// [JsonProperty("grabpay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("grabpay")] +#endif public PaymentMethodConfigurationGrabpayOptions Grabpay { get; set; } /// @@ -216,6 +288,9 @@ public class PaymentMethodConfigurationUpdateOptions : BaseOptions /// page for more details. /// [JsonProperty("ideal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ideal")] +#endif public PaymentMethodConfigurationIdealOptions Ideal { get; set; } /// @@ -227,6 +302,9 @@ public class PaymentMethodConfigurationUpdateOptions : BaseOptions /// for more details. /// [JsonProperty("jcb")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("jcb")] +#endif public PaymentMethodConfigurationJcbOptions Jcb { get; set; } /// @@ -238,6 +316,9 @@ public class PaymentMethodConfigurationUpdateOptions : BaseOptions /// href="https://stripe.com/docs/payments/klarna">page for more details. /// [JsonProperty("klarna")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("klarna")] +#endif public PaymentMethodConfigurationKlarnaOptions Klarna { get; set; } /// @@ -246,6 +327,9 @@ public class PaymentMethodConfigurationUpdateOptions : BaseOptions /// for more details. /// [JsonProperty("konbini")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("konbini")] +#endif public PaymentMethodConfigurationKonbiniOptions Konbini { get; set; } /// @@ -254,6 +338,9 @@ public class PaymentMethodConfigurationUpdateOptions : BaseOptions /// with one click for any business on the network. /// [JsonProperty("link")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("link")] +#endif public PaymentMethodConfigurationLinkOptions Link { get; set; } /// @@ -265,6 +352,9 @@ public class PaymentMethodConfigurationUpdateOptions : BaseOptions /// href="https://stripe.com/docs/payments/mobilepay">page for more details. /// [JsonProperty("mobilepay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mobilepay")] +#endif public PaymentMethodConfigurationMobilepayOptions Mobilepay { get; set; } /// @@ -273,12 +363,18 @@ public class PaymentMethodConfigurationUpdateOptions : BaseOptions /// single integration path for creating payments using any supported method. /// [JsonProperty("multibanco")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("multibanco")] +#endif public PaymentMethodConfigurationMultibancoOptions Multibanco { get; set; } /// /// Configuration name. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } /// @@ -288,6 +384,9 @@ public class PaymentMethodConfigurationUpdateOptions : BaseOptions /// href="https://stripe.com/docs/payments/oxxo">page for more details. /// [JsonProperty("oxxo")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("oxxo")] +#endif public PaymentMethodConfigurationOxxoOptions Oxxo { get; set; } /// @@ -298,6 +397,9 @@ public class PaymentMethodConfigurationUpdateOptions : BaseOptions /// more details. /// [JsonProperty("p24")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("p24")] +#endif public PaymentMethodConfigurationP24Options P24 { get; set; } /// @@ -307,6 +409,9 @@ public class PaymentMethodConfigurationUpdateOptions : BaseOptions /// more details. /// [JsonProperty("paynow")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("paynow")] +#endif public PaymentMethodConfigurationPaynowOptions Paynow { get; set; } /// @@ -315,6 +420,9 @@ public class PaymentMethodConfigurationUpdateOptions : BaseOptions /// href="https://stripe.com/docs/payments/paypal">page for more details. /// [JsonProperty("paypal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("paypal")] +#endif public PaymentMethodConfigurationPaypalOptions Paypal { get; set; } /// @@ -323,6 +431,9 @@ public class PaymentMethodConfigurationUpdateOptions : BaseOptions /// href="https://stripe.com/docs/payments/promptpay">page for more details. /// [JsonProperty("promptpay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("promptpay")] +#endif public PaymentMethodConfigurationPromptpayOptions Promptpay { get; set; } /// @@ -332,6 +443,9 @@ public class PaymentMethodConfigurationUpdateOptions : BaseOptions /// purchase. /// [JsonProperty("revolut_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("revolut_pay")] +#endif public PaymentMethodConfigurationRevolutPayOptions RevolutPay { get; set; } /// @@ -343,6 +457,9 @@ public class PaymentMethodConfigurationUpdateOptions : BaseOptions /// more details. /// [JsonProperty("sepa_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sepa_debit")] +#endif public PaymentMethodConfigurationSepaDebitOptions SepaDebit { get; set; } /// @@ -353,6 +470,9 @@ public class PaymentMethodConfigurationUpdateOptions : BaseOptions /// href="https://stripe.com/docs/payments/sofort">page for more details. /// [JsonProperty("sofort")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sofort")] +#endif public PaymentMethodConfigurationSofortOptions Sofort { get; set; } /// @@ -363,6 +483,9 @@ public class PaymentMethodConfigurationUpdateOptions : BaseOptions /// Check this page for more details. /// [JsonProperty("swish")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("swish")] +#endif public PaymentMethodConfigurationSwishOptions Swish { get; set; } /// @@ -371,6 +494,9 @@ public class PaymentMethodConfigurationUpdateOptions : BaseOptions /// more details. /// [JsonProperty("twint")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("twint")] +#endif public PaymentMethodConfigurationTwintOptions Twint { get; set; } /// @@ -380,6 +506,9 @@ public class PaymentMethodConfigurationUpdateOptions : BaseOptions /// href="https://stripe.com/docs/payments/ach-direct-debit">page for more details. /// [JsonProperty("us_bank_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("us_bank_account")] +#endif public PaymentMethodConfigurationUsBankAccountOptions UsBankAccount { get; set; } /// @@ -390,6 +519,9 @@ public class PaymentMethodConfigurationUpdateOptions : BaseOptions /// href="https://stripe.com/docs/payments/wechat-pay">page for more details. /// [JsonProperty("wechat_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("wechat_pay")] +#endif public PaymentMethodConfigurationWechatPayOptions WechatPay { get; set; } /// @@ -398,6 +530,9 @@ public class PaymentMethodConfigurationUpdateOptions : BaseOptions /// availability. /// [JsonProperty("zip")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("zip")] +#endif public PaymentMethodConfigurationZipOptions Zip { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationUsBankAccountDisplayPreferenceOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationUsBankAccountDisplayPreferenceOptions.cs index c2a4ef3d60..7af40d5247 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationUsBankAccountDisplayPreferenceOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationUsBankAccountDisplayPreferenceOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationUsBankAccountDisplayPreferenceOptions : INestedOptions { @@ -10,6 +13,9 @@ public class PaymentMethodConfigurationUsBankAccountDisplayPreferenceOptions : I /// One of: none, off, or on. /// [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif public string Preference { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationUsBankAccountOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationUsBankAccountOptions.cs index cf087f9e81..0432b8d7c4 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationUsBankAccountOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationUsBankAccountOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationUsBankAccountOptions : INestedOptions { @@ -9,6 +12,9 @@ public class PaymentMethodConfigurationUsBankAccountOptions : INestedOptions /// Whether or not the payment method should be displayed. /// [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif public PaymentMethodConfigurationUsBankAccountDisplayPreferenceOptions DisplayPreference { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationWechatPayDisplayPreferenceOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationWechatPayDisplayPreferenceOptions.cs index dfe4489476..7ae86bbce8 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationWechatPayDisplayPreferenceOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationWechatPayDisplayPreferenceOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationWechatPayDisplayPreferenceOptions : INestedOptions { @@ -10,6 +13,9 @@ public class PaymentMethodConfigurationWechatPayDisplayPreferenceOptions : INest /// One of: none, off, or on. /// [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif public string Preference { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationWechatPayOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationWechatPayOptions.cs index 74699f48e2..21abbddec2 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationWechatPayOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationWechatPayOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationWechatPayOptions : INestedOptions { @@ -9,6 +12,9 @@ public class PaymentMethodConfigurationWechatPayOptions : INestedOptions /// Whether or not the payment method should be displayed. /// [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif public PaymentMethodConfigurationWechatPayDisplayPreferenceOptions DisplayPreference { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationZipDisplayPreferenceOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationZipDisplayPreferenceOptions.cs index 3b7f22320c..3d332c92ea 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationZipDisplayPreferenceOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationZipDisplayPreferenceOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationZipDisplayPreferenceOptions : INestedOptions { @@ -10,6 +13,9 @@ public class PaymentMethodConfigurationZipDisplayPreferenceOptions : INestedOpti /// One of: none, off, or on. /// [JsonProperty("preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preference")] +#endif public string Preference { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationZipOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationZipOptions.cs index ef87fc4603..7b28c47f2e 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationZipOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationZipOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodConfigurationZipOptions : INestedOptions { @@ -9,6 +12,9 @@ public class PaymentMethodConfigurationZipOptions : INestedOptions /// Whether or not the payment method should be displayed. /// [JsonProperty("display_preference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_preference")] +#endif public PaymentMethodConfigurationZipDisplayPreferenceOptions DisplayPreference { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodDomains/PaymentMethodDomainCreateOptions.cs b/src/Stripe.net/Services/PaymentMethodDomains/PaymentMethodDomainCreateOptions.cs index 6e3a7f80d9..34cee048b5 100644 --- a/src/Stripe.net/Services/PaymentMethodDomains/PaymentMethodDomainCreateOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodDomains/PaymentMethodDomainCreateOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodDomainCreateOptions : BaseOptions { @@ -9,6 +12,9 @@ public class PaymentMethodDomainCreateOptions : BaseOptions /// The domain name that this payment method domain object represents. /// [JsonProperty("domain_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("domain_name")] +#endif public string DomainName { get; set; } /// @@ -16,6 +22,9 @@ public class PaymentMethodDomainCreateOptions : BaseOptions /// methods that require a payment method domain will not appear in Elements. /// [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool? Enabled { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodDomains/PaymentMethodDomainListOptions.cs b/src/Stripe.net/Services/PaymentMethodDomains/PaymentMethodDomainListOptions.cs index 9296b9edcb..373c6af3b3 100644 --- a/src/Stripe.net/Services/PaymentMethodDomains/PaymentMethodDomainListOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodDomains/PaymentMethodDomainListOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodDomainListOptions : ListOptions { @@ -9,6 +12,9 @@ public class PaymentMethodDomainListOptions : ListOptions /// The domain name that this payment method domain object represents. /// [JsonProperty("domain_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("domain_name")] +#endif public string DomainName { get; set; } /// @@ -16,6 +22,9 @@ public class PaymentMethodDomainListOptions : ListOptions /// methods will not appear in Elements. /// [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool? Enabled { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethodDomains/PaymentMethodDomainUpdateOptions.cs b/src/Stripe.net/Services/PaymentMethodDomains/PaymentMethodDomainUpdateOptions.cs index 9c850286ce..368d7ddc75 100644 --- a/src/Stripe.net/Services/PaymentMethodDomains/PaymentMethodDomainUpdateOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodDomains/PaymentMethodDomainUpdateOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodDomainUpdateOptions : BaseOptions { @@ -10,6 +13,9 @@ public class PaymentMethodDomainUpdateOptions : BaseOptions /// methods that require a payment method domain will not appear in Elements. /// [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool? Enabled { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethods/PaymentMethodAcssDebitOptions.cs b/src/Stripe.net/Services/PaymentMethods/PaymentMethodAcssDebitOptions.cs index ccd690b563..4feb89a8d8 100644 --- a/src/Stripe.net/Services/PaymentMethods/PaymentMethodAcssDebitOptions.cs +++ b/src/Stripe.net/Services/PaymentMethods/PaymentMethodAcssDebitOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodAcssDebitOptions : INestedOptions { @@ -9,18 +12,27 @@ public class PaymentMethodAcssDebitOptions : INestedOptions /// Customer's bank account number. /// [JsonProperty("account_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_number")] +#endif public string AccountNumber { get; set; } /// /// Institution number of the customer's bank. /// [JsonProperty("institution_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("institution_number")] +#endif public string InstitutionNumber { get; set; } /// /// Transit number of the customer's bank. /// [JsonProperty("transit_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transit_number")] +#endif public string TransitNumber { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethods/PaymentMethodAttachOptions.cs b/src/Stripe.net/Services/PaymentMethods/PaymentMethodAttachOptions.cs index 688fc3c14d..a08bb1ae79 100644 --- a/src/Stripe.net/Services/PaymentMethods/PaymentMethodAttachOptions.cs +++ b/src/Stripe.net/Services/PaymentMethods/PaymentMethodAttachOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodAttachOptions : BaseOptions { @@ -9,6 +12,9 @@ public class PaymentMethodAttachOptions : BaseOptions /// The ID of the customer to which to attach the PaymentMethod. /// [JsonProperty("customer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] +#endif public string Customer { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethods/PaymentMethodAuBecsDebitOptions.cs b/src/Stripe.net/Services/PaymentMethods/PaymentMethodAuBecsDebitOptions.cs index 8ec2b539b1..44f1965dad 100644 --- a/src/Stripe.net/Services/PaymentMethods/PaymentMethodAuBecsDebitOptions.cs +++ b/src/Stripe.net/Services/PaymentMethods/PaymentMethodAuBecsDebitOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodAuBecsDebitOptions : INestedOptions { @@ -9,12 +12,18 @@ public class PaymentMethodAuBecsDebitOptions : INestedOptions /// The account number for the bank account. /// [JsonProperty("account_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_number")] +#endif public string AccountNumber { get; set; } /// /// Bank-State-Branch number of the bank account. /// [JsonProperty("bsb_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bsb_number")] +#endif public string BsbNumber { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethods/PaymentMethodBacsDebitOptions.cs b/src/Stripe.net/Services/PaymentMethods/PaymentMethodBacsDebitOptions.cs index 2dc4cfbe06..0ca555d5d5 100644 --- a/src/Stripe.net/Services/PaymentMethods/PaymentMethodBacsDebitOptions.cs +++ b/src/Stripe.net/Services/PaymentMethods/PaymentMethodBacsDebitOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodBacsDebitOptions : INestedOptions { @@ -9,12 +12,18 @@ public class PaymentMethodBacsDebitOptions : INestedOptions /// Account number of the bank account that the funds will be debited from. /// [JsonProperty("account_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_number")] +#endif public string AccountNumber { get; set; } /// /// Sort code of the bank account. (e.g., 10-20-30). /// [JsonProperty("sort_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sort_code")] +#endif public string SortCode { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethods/PaymentMethodBillingDetailsOptions.cs b/src/Stripe.net/Services/PaymentMethods/PaymentMethodBillingDetailsOptions.cs index 39ef798a1c..b5fc921b67 100644 --- a/src/Stripe.net/Services/PaymentMethods/PaymentMethodBillingDetailsOptions.cs +++ b/src/Stripe.net/Services/PaymentMethods/PaymentMethodBillingDetailsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodBillingDetailsOptions : INestedOptions { @@ -9,24 +12,36 @@ public class PaymentMethodBillingDetailsOptions : INestedOptions /// Billing address. /// [JsonProperty("address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address")] +#endif public AddressOptions Address { get; set; } /// /// Email address. /// [JsonProperty("email")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("email")] +#endif public string Email { get; set; } /// /// Full name. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } /// /// Billing phone number (including extension). /// [JsonProperty("phone")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("phone")] +#endif public string Phone { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethods/PaymentMethodBoletoOptions.cs b/src/Stripe.net/Services/PaymentMethods/PaymentMethodBoletoOptions.cs index e075107c14..dd58ce8881 100644 --- a/src/Stripe.net/Services/PaymentMethods/PaymentMethodBoletoOptions.cs +++ b/src/Stripe.net/Services/PaymentMethods/PaymentMethodBoletoOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodBoletoOptions : INestedOptions { @@ -10,6 +13,9 @@ public class PaymentMethodBoletoOptions : INestedOptions /// consumers). /// [JsonProperty("tax_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_id")] +#endif public string TaxId { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethods/PaymentMethodCardNetworksOptions.cs b/src/Stripe.net/Services/PaymentMethods/PaymentMethodCardNetworksOptions.cs index 9274756eeb..1d9f6397c2 100644 --- a/src/Stripe.net/Services/PaymentMethods/PaymentMethodCardNetworksOptions.cs +++ b/src/Stripe.net/Services/PaymentMethods/PaymentMethodCardNetworksOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodCardNetworksOptions : INestedOptions { @@ -12,6 +15,9 @@ public class PaymentMethodCardNetworksOptions : INestedOptions /// One of: cartes_bancaires, mastercard, or visa. /// [JsonProperty("preferred")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preferred")] +#endif public string Preferred { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethods/PaymentMethodCardOptions.cs b/src/Stripe.net/Services/PaymentMethods/PaymentMethodCardOptions.cs index 989a9894da..a5eb484487 100644 --- a/src/Stripe.net/Services/PaymentMethods/PaymentMethodCardOptions.cs +++ b/src/Stripe.net/Services/PaymentMethods/PaymentMethodCardOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodCardOptions : INestedOptions { @@ -9,30 +12,45 @@ public class PaymentMethodCardOptions : INestedOptions /// The card's CVC. It is highly recommended to always include this value. /// [JsonProperty("cvc")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cvc")] +#endif public string Cvc { get; set; } /// /// Two-digit number representing the card's expiration month. /// [JsonProperty("exp_month")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("exp_month")] +#endif public long? ExpMonth { get; set; } /// /// Four-digit number representing the card's expiration year. /// [JsonProperty("exp_year")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("exp_year")] +#endif public long? ExpYear { get; set; } /// /// Contains information about card networks used to process the payment. /// [JsonProperty("networks")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("networks")] +#endif public PaymentMethodCardNetworksOptions Networks { get; set; } /// /// The card number, as a string without any separators. /// [JsonProperty("number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("number")] +#endif public string Number { get; set; } /// @@ -41,6 +59,9 @@ public class PaymentMethodCardOptions : INestedOptions /// card: {token: "tok_visa"}. /// [JsonProperty("token")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("token")] +#endif public string Token { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethods/PaymentMethodCreateOptions.cs b/src/Stripe.net/Services/PaymentMethods/PaymentMethodCreateOptions.cs index 8c292c0c3f..17a2168a1c 100644 --- a/src/Stripe.net/Services/PaymentMethods/PaymentMethodCreateOptions.cs +++ b/src/Stripe.net/Services/PaymentMethods/PaymentMethodCreateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodCreateOptions : BaseOptions, IHasMetadata { @@ -11,6 +14,9 @@ public class PaymentMethodCreateOptions : BaseOptions, IHasMetadata /// Debit payment method. /// [JsonProperty("acss_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("acss_debit")] +#endif public PaymentMethodAcssDebitOptions AcssDebit { get; set; } /// @@ -18,6 +24,9 @@ public class PaymentMethodCreateOptions : BaseOptions, IHasMetadata /// payment method. /// [JsonProperty("affirm")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("affirm")] +#endif public PaymentMethodAffirmOptions Affirm { get; set; } /// @@ -25,6 +34,9 @@ public class PaymentMethodCreateOptions : BaseOptions, IHasMetadata /// the AfterpayClearpay payment method. /// [JsonProperty("afterpay_clearpay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("afterpay_clearpay")] +#endif public PaymentMethodAfterpayClearpayOptions AfterpayClearpay { get; set; } /// @@ -32,6 +44,9 @@ public class PaymentMethodCreateOptions : BaseOptions, IHasMetadata /// payment method. /// [JsonProperty("alipay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("alipay")] +#endif public PaymentMethodAlipayOptions Alipay { get; set; } /// @@ -42,6 +57,9 @@ public class PaymentMethodCreateOptions : BaseOptions, IHasMetadata /// One of: always, limited, or unspecified. /// [JsonProperty("allow_redisplay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("allow_redisplay")] +#endif public string AllowRedisplay { get; set; } /// @@ -49,6 +67,9 @@ public class PaymentMethodCreateOptions : BaseOptions, IHasMetadata /// method. /// [JsonProperty("alma")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("alma")] +#endif public PaymentMethodAlmaOptions Alma { get; set; } /// @@ -56,6 +77,9 @@ public class PaymentMethodCreateOptions : BaseOptions, IHasMetadata /// payment method. /// [JsonProperty("amazon_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amazon_pay")] +#endif public PaymentMethodAmazonPayOptions AmazonPay { get; set; } /// @@ -63,6 +87,9 @@ public class PaymentMethodCreateOptions : BaseOptions, IHasMetadata /// bank account. /// [JsonProperty("au_becs_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("au_becs_debit")] +#endif public PaymentMethodAuBecsDebitOptions AuBecsDebit { get; set; } /// @@ -70,6 +97,9 @@ public class PaymentMethodCreateOptions : BaseOptions, IHasMetadata /// Direct Debit bank account. /// [JsonProperty("bacs_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bacs_debit")] +#endif public PaymentMethodBacsDebitOptions BacsDebit { get; set; } /// @@ -77,6 +107,9 @@ public class PaymentMethodCreateOptions : BaseOptions, IHasMetadata /// Bancontact payment method. /// [JsonProperty("bancontact")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bancontact")] +#endif public PaymentMethodBancontactOptions Bancontact { get; set; } /// @@ -84,6 +117,9 @@ public class PaymentMethodCreateOptions : BaseOptions, IHasMetadata /// particular types of payment methods. /// [JsonProperty("billing_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_details")] +#endif public PaymentMethodBillingDetailsOptions BillingDetails { get; set; } /// @@ -91,6 +127,9 @@ public class PaymentMethodCreateOptions : BaseOptions, IHasMetadata /// payment method. /// [JsonProperty("blik")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("blik")] +#endif public PaymentMethodBlikOptions Blik { get; set; } /// @@ -98,6 +137,9 @@ public class PaymentMethodCreateOptions : BaseOptions, IHasMetadata /// payment method. /// [JsonProperty("boleto")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("boleto")] +#endif public PaymentMethodBoletoOptions Boleto { get; set; } /// @@ -110,6 +152,9 @@ public class PaymentMethodCreateOptions : BaseOptions, IHasMetadata /// API directly. /// [JsonProperty("card")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card")] +#endif public PaymentMethodCardOptions Card { get; set; } /// @@ -117,12 +162,18 @@ public class PaymentMethodCreateOptions : BaseOptions, IHasMetadata /// Pay payment method. /// [JsonProperty("cashapp")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cashapp")] +#endif public PaymentMethodCashappOptions Cashapp { get; set; } /// /// The Customer to whom the original PaymentMethod is attached. /// [JsonProperty("customer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] +#endif public string Customer { get; set; } /// @@ -130,6 +181,9 @@ public class PaymentMethodCreateOptions : BaseOptions, IHasMetadata /// CustomerBalance payment method. /// [JsonProperty("customer_balance")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_balance")] +#endif public PaymentMethodCustomerBalanceOptions CustomerBalance { get; set; } /// @@ -137,6 +191,9 @@ public class PaymentMethodCreateOptions : BaseOptions, IHasMetadata /// method. /// [JsonProperty("eps")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("eps")] +#endif public PaymentMethodEpsOptions Eps { get; set; } /// @@ -144,6 +201,9 @@ public class PaymentMethodCreateOptions : BaseOptions, IHasMetadata /// method. /// [JsonProperty("fpx")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fpx")] +#endif public PaymentMethodFpxOptions Fpx { get; set; } /// @@ -151,6 +211,9 @@ public class PaymentMethodCreateOptions : BaseOptions, IHasMetadata /// payment method. /// [JsonProperty("giropay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("giropay")] +#endif public PaymentMethodGiropayOptions Giropay { get; set; } /// @@ -158,6 +221,9 @@ public class PaymentMethodCreateOptions : BaseOptions, IHasMetadata /// payment method. /// [JsonProperty("grabpay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("grabpay")] +#endif public PaymentMethodGrabpayOptions Grabpay { get; set; } /// @@ -165,6 +231,9 @@ public class PaymentMethodCreateOptions : BaseOptions, IHasMetadata /// payment method. /// [JsonProperty("ideal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ideal")] +#endif public PaymentMethodIdealOptions Ideal { get; set; } /// @@ -172,6 +241,9 @@ public class PaymentMethodCreateOptions : BaseOptions, IHasMetadata /// Interac Present payment method. /// [JsonProperty("interac_present")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interac_present")] +#endif public PaymentMethodInteracPresentOptions InteracPresent { get; set; } /// @@ -179,6 +251,9 @@ public class PaymentMethodCreateOptions : BaseOptions, IHasMetadata /// Pay payment method. /// [JsonProperty("kakao_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("kakao_pay")] +#endif public PaymentMethodKakaoPayOptions KakaoPay { get; set; } /// @@ -186,6 +261,9 @@ public class PaymentMethodCreateOptions : BaseOptions, IHasMetadata /// payment method. /// [JsonProperty("klarna")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("klarna")] +#endif public PaymentMethodKlarnaOptions Klarna { get; set; } /// @@ -193,6 +271,9 @@ public class PaymentMethodCreateOptions : BaseOptions, IHasMetadata /// payment method. /// [JsonProperty("konbini")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("konbini")] +#endif public PaymentMethodKonbiniOptions Konbini { get; set; } /// @@ -200,6 +281,9 @@ public class PaymentMethodCreateOptions : BaseOptions, IHasMetadata /// Card payment method. /// [JsonProperty("kr_card")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("kr_card")] +#endif public PaymentMethodKrCardOptions KrCard { get; set; } /// @@ -207,6 +291,9 @@ public class PaymentMethodCreateOptions : BaseOptions, IHasMetadata /// payment method. /// [JsonProperty("link")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("link")] +#endif public PaymentMethodLinkOptions Link { get; set; } /// @@ -216,6 +303,9 @@ public class PaymentMethodCreateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -223,6 +313,9 @@ public class PaymentMethodCreateOptions : BaseOptions, IHasMetadata /// MobilePay payment method. /// [JsonProperty("mobilepay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mobilepay")] +#endif public PaymentMethodMobilepayOptions Mobilepay { get; set; } /// @@ -230,6 +323,9 @@ public class PaymentMethodCreateOptions : BaseOptions, IHasMetadata /// Multibanco payment method. /// [JsonProperty("multibanco")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("multibanco")] +#endif public PaymentMethodMultibancoOptions Multibanco { get; set; } /// @@ -237,6 +333,9 @@ public class PaymentMethodCreateOptions : BaseOptions, IHasMetadata /// Pay payment method. /// [JsonProperty("naver_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("naver_pay")] +#endif public PaymentMethodNaverPayOptions NaverPay { get; set; } /// @@ -244,6 +343,9 @@ public class PaymentMethodCreateOptions : BaseOptions, IHasMetadata /// payment method. /// [JsonProperty("oxxo")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("oxxo")] +#endif public PaymentMethodOxxoOptions Oxxo { get; set; } /// @@ -251,6 +353,9 @@ public class PaymentMethodCreateOptions : BaseOptions, IHasMetadata /// method. /// [JsonProperty("p24")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("p24")] +#endif public PaymentMethodP24Options P24 { get; set; } /// @@ -258,12 +363,18 @@ public class PaymentMethodCreateOptions : BaseOptions, IHasMetadata /// payment method. /// [JsonProperty("payco")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payco")] +#endif public PaymentMethodPaycoOptions Payco { get; set; } /// /// The PaymentMethod to share. /// [JsonProperty("payment_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method")] +#endif public string PaymentMethod { get; set; } /// @@ -271,6 +382,9 @@ public class PaymentMethodCreateOptions : BaseOptions, IHasMetadata /// payment method. /// [JsonProperty("paynow")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("paynow")] +#endif public PaymentMethodPaynowOptions Paynow { get; set; } /// @@ -278,6 +392,9 @@ public class PaymentMethodCreateOptions : BaseOptions, IHasMetadata /// payment method. /// [JsonProperty("paypal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("paypal")] +#endif public PaymentMethodPaypalOptions Paypal { get; set; } /// @@ -285,6 +402,9 @@ public class PaymentMethodCreateOptions : BaseOptions, IHasMetadata /// method. /// [JsonProperty("pix")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("pix")] +#endif public PaymentMethodPixOptions Pix { get; set; } /// @@ -292,6 +412,9 @@ public class PaymentMethodCreateOptions : BaseOptions, IHasMetadata /// PromptPay payment method. /// [JsonProperty("promptpay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("promptpay")] +#endif public PaymentMethodPromptpayOptions Promptpay { get; set; } /// @@ -300,6 +423,9 @@ public class PaymentMethodCreateOptions : BaseOptions, IHasMetadata /// information. /// [JsonProperty("radar_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("radar_options")] +#endif public PaymentMethodRadarOptionsOptions RadarOptions { get; set; } /// @@ -307,6 +433,9 @@ public class PaymentMethodCreateOptions : BaseOptions, IHasMetadata /// Revolut Pay payment method. /// [JsonProperty("revolut_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("revolut_pay")] +#endif public PaymentMethodRevolutPayOptions RevolutPay { get; set; } /// @@ -314,6 +443,9 @@ public class PaymentMethodCreateOptions : BaseOptions, IHasMetadata /// SamsungPay payment method. /// [JsonProperty("samsung_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("samsung_pay")] +#endif public PaymentMethodSamsungPayOptions SamsungPay { get; set; } /// @@ -321,6 +453,9 @@ public class PaymentMethodCreateOptions : BaseOptions, IHasMetadata /// debit bank account. /// [JsonProperty("sepa_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sepa_debit")] +#endif public PaymentMethodSepaDebitOptions SepaDebit { get; set; } /// @@ -328,6 +463,9 @@ public class PaymentMethodCreateOptions : BaseOptions, IHasMetadata /// payment method. /// [JsonProperty("sofort")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sofort")] +#endif public PaymentMethodSofortOptions Sofort { get; set; } /// @@ -335,6 +473,9 @@ public class PaymentMethodCreateOptions : BaseOptions, IHasMetadata /// payment method. /// [JsonProperty("swish")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("swish")] +#endif public PaymentMethodSwishOptions Swish { get; set; } /// @@ -342,6 +483,9 @@ public class PaymentMethodCreateOptions : BaseOptions, IHasMetadata /// method. /// [JsonProperty("twint")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("twint")] +#endif public PaymentMethodTwintOptions Twint { get; set; } /// @@ -359,6 +503,9 @@ public class PaymentMethodCreateOptions : BaseOptions, IHasMetadata /// twint, us_bank_account, wechat_pay, or zip. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } /// @@ -366,6 +513,9 @@ public class PaymentMethodCreateOptions : BaseOptions, IHasMetadata /// US bank account payment method. /// [JsonProperty("us_bank_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("us_bank_account")] +#endif public PaymentMethodUsBankAccountOptions UsBankAccount { get; set; } /// @@ -373,6 +523,9 @@ public class PaymentMethodCreateOptions : BaseOptions, IHasMetadata /// wechat_pay payment method. /// [JsonProperty("wechat_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("wechat_pay")] +#endif public PaymentMethodWechatPayOptions WechatPay { get; set; } /// @@ -380,6 +533,9 @@ public class PaymentMethodCreateOptions : BaseOptions, IHasMetadata /// method. /// [JsonProperty("zip")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("zip")] +#endif public PaymentMethodZipOptions Zip { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethods/PaymentMethodEpsOptions.cs b/src/Stripe.net/Services/PaymentMethods/PaymentMethodEpsOptions.cs index bb382323ac..13d678d84e 100644 --- a/src/Stripe.net/Services/PaymentMethods/PaymentMethodEpsOptions.cs +++ b/src/Stripe.net/Services/PaymentMethods/PaymentMethodEpsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodEpsOptions : INestedOptions { @@ -23,6 +26,9 @@ public class PaymentMethodEpsOptions : INestedOptions /// vr_bank_braunau. /// [JsonProperty("bank")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank")] +#endif public string Bank { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethods/PaymentMethodFpxOptions.cs b/src/Stripe.net/Services/PaymentMethods/PaymentMethodFpxOptions.cs index a332baa340..d42daa8750 100644 --- a/src/Stripe.net/Services/PaymentMethods/PaymentMethodFpxOptions.cs +++ b/src/Stripe.net/Services/PaymentMethods/PaymentMethodFpxOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodFpxOptions : INestedOptions { @@ -10,6 +13,9 @@ public class PaymentMethodFpxOptions : INestedOptions /// One of: company, or individual. /// [JsonProperty("account_holder_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_holder_type")] +#endif public string AccountHolderType { get; set; } /// @@ -21,6 +27,9 @@ public class PaymentMethodFpxOptions : INestedOptions /// public_bank, rhb, standard_chartered, or uob. /// [JsonProperty("bank")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank")] +#endif public string Bank { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethods/PaymentMethodIdealOptions.cs b/src/Stripe.net/Services/PaymentMethods/PaymentMethodIdealOptions.cs index 50f6e0f818..ce1d3c602e 100644 --- a/src/Stripe.net/Services/PaymentMethods/PaymentMethodIdealOptions.cs +++ b/src/Stripe.net/Services/PaymentMethods/PaymentMethodIdealOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodIdealOptions : INestedOptions { @@ -14,6 +17,9 @@ public class PaymentMethodIdealOptions : INestedOptions /// yoursafe. /// [JsonProperty("bank")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank")] +#endif public string Bank { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethods/PaymentMethodKlarnaOptions.cs b/src/Stripe.net/Services/PaymentMethods/PaymentMethodKlarnaOptions.cs index 668faacc8b..6c9cb0db97 100644 --- a/src/Stripe.net/Services/PaymentMethods/PaymentMethodKlarnaOptions.cs +++ b/src/Stripe.net/Services/PaymentMethods/PaymentMethodKlarnaOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodKlarnaOptions : INestedOptions { @@ -9,6 +12,9 @@ public class PaymentMethodKlarnaOptions : INestedOptions /// Customer's date of birth. /// [JsonProperty("dob")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("dob")] +#endif public DobOptions Dob { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethods/PaymentMethodListOptions.cs b/src/Stripe.net/Services/PaymentMethods/PaymentMethodListOptions.cs index dc7f163c68..62af21cd95 100644 --- a/src/Stripe.net/Services/PaymentMethods/PaymentMethodListOptions.cs +++ b/src/Stripe.net/Services/PaymentMethods/PaymentMethodListOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodListOptions : ListOptions { @@ -9,6 +12,9 @@ public class PaymentMethodListOptions : ListOptions /// The ID of the customer whose PaymentMethods will be retrieved. /// [JsonProperty("customer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] +#endif public string Customer { get; set; } /// @@ -27,6 +33,9 @@ public class PaymentMethodListOptions : ListOptions /// twint, us_bank_account, wechat_pay, or zip. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethods/PaymentMethodNaverPayOptions.cs b/src/Stripe.net/Services/PaymentMethods/PaymentMethodNaverPayOptions.cs index 31e35cd5fe..d815100ef3 100644 --- a/src/Stripe.net/Services/PaymentMethods/PaymentMethodNaverPayOptions.cs +++ b/src/Stripe.net/Services/PaymentMethods/PaymentMethodNaverPayOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodNaverPayOptions : INestedOptions { @@ -11,6 +14,9 @@ public class PaymentMethodNaverPayOptions : INestedOptions /// One of: card, or points. /// [JsonProperty("funding")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("funding")] +#endif public string Funding { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethods/PaymentMethodP24Options.cs b/src/Stripe.net/Services/PaymentMethods/PaymentMethodP24Options.cs index 317f4707a3..ff2277c6cb 100644 --- a/src/Stripe.net/Services/PaymentMethods/PaymentMethodP24Options.cs +++ b/src/Stripe.net/Services/PaymentMethods/PaymentMethodP24Options.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodP24Options : INestedOptions { @@ -17,6 +20,9 @@ public class PaymentMethodP24Options : INestedOptions /// volkswagen_bank. /// [JsonProperty("bank")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank")] +#endif public string Bank { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethods/PaymentMethodRadarOptionsOptions.cs b/src/Stripe.net/Services/PaymentMethods/PaymentMethodRadarOptionsOptions.cs index 16ea93d62a..86b90fe043 100644 --- a/src/Stripe.net/Services/PaymentMethods/PaymentMethodRadarOptionsOptions.cs +++ b/src/Stripe.net/Services/PaymentMethods/PaymentMethodRadarOptionsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodRadarOptionsOptions : INestedOptions { @@ -11,6 +14,9 @@ public class PaymentMethodRadarOptionsOptions : INestedOptions /// predictions on your payments. /// [JsonProperty("session")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("session")] +#endif public string Session { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethods/PaymentMethodSepaDebitOptions.cs b/src/Stripe.net/Services/PaymentMethods/PaymentMethodSepaDebitOptions.cs index 8d9b4a13c1..9fadf48d7a 100644 --- a/src/Stripe.net/Services/PaymentMethods/PaymentMethodSepaDebitOptions.cs +++ b/src/Stripe.net/Services/PaymentMethods/PaymentMethodSepaDebitOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodSepaDebitOptions : INestedOptions { @@ -9,6 +12,9 @@ public class PaymentMethodSepaDebitOptions : INestedOptions /// IBAN of the bank account. /// [JsonProperty("iban")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("iban")] +#endif public string Iban { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethods/PaymentMethodSofortOptions.cs b/src/Stripe.net/Services/PaymentMethods/PaymentMethodSofortOptions.cs index b72408d6f6..3c0524a284 100644 --- a/src/Stripe.net/Services/PaymentMethods/PaymentMethodSofortOptions.cs +++ b/src/Stripe.net/Services/PaymentMethods/PaymentMethodSofortOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodSofortOptions : INestedOptions { @@ -10,6 +13,9 @@ public class PaymentMethodSofortOptions : INestedOptions /// One of: AT, BE, DE, ES, IT, or NL. /// [JsonProperty("country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country")] +#endif public string Country { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethods/PaymentMethodUpdateOptions.cs b/src/Stripe.net/Services/PaymentMethods/PaymentMethodUpdateOptions.cs index 17f3c83c5a..3e27c6d1a2 100644 --- a/src/Stripe.net/Services/PaymentMethods/PaymentMethodUpdateOptions.cs +++ b/src/Stripe.net/Services/PaymentMethods/PaymentMethodUpdateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodUpdateOptions : BaseOptions, IHasMetadata { @@ -14,6 +17,9 @@ public class PaymentMethodUpdateOptions : BaseOptions, IHasMetadata /// One of: always, limited, or unspecified. /// [JsonProperty("allow_redisplay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("allow_redisplay")] +#endif public string AllowRedisplay { get; set; } /// @@ -21,12 +27,18 @@ public class PaymentMethodUpdateOptions : BaseOptions, IHasMetadata /// particular types of payment methods. /// [JsonProperty("billing_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_details")] +#endif public PaymentMethodBillingDetailsOptions BillingDetails { get; set; } /// /// If this is a card PaymentMethod, this hash contains the user's card details. /// [JsonProperty("card")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card")] +#endif public PaymentMethodCardOptions Card { get; set; } /// @@ -34,6 +46,9 @@ public class PaymentMethodUpdateOptions : BaseOptions, IHasMetadata /// payment method. /// [JsonProperty("link")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("link")] +#endif public PaymentMethodLinkOptions Link { get; set; } /// @@ -43,6 +58,9 @@ public class PaymentMethodUpdateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -50,6 +68,9 @@ public class PaymentMethodUpdateOptions : BaseOptions, IHasMetadata /// Pay payment method. /// [JsonProperty("naver_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("naver_pay")] +#endif public PaymentMethodNaverPayOptions NaverPay { get; set; } /// @@ -57,6 +78,9 @@ public class PaymentMethodUpdateOptions : BaseOptions, IHasMetadata /// US bank account payment method. /// [JsonProperty("us_bank_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("us_bank_account")] +#endif public PaymentMethodUsBankAccountOptions UsBankAccount { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethods/PaymentMethodUsBankAccountOptions.cs b/src/Stripe.net/Services/PaymentMethods/PaymentMethodUsBankAccountOptions.cs index 29b6bf18be..0de33724ac 100644 --- a/src/Stripe.net/Services/PaymentMethods/PaymentMethodUsBankAccountOptions.cs +++ b/src/Stripe.net/Services/PaymentMethods/PaymentMethodUsBankAccountOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PaymentMethodUsBankAccountOptions : INestedOptions { @@ -10,12 +13,18 @@ public class PaymentMethodUsBankAccountOptions : INestedOptions /// One of: company, or individual. /// [JsonProperty("account_holder_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_holder_type")] +#endif public string AccountHolderType { get; set; } /// /// Account number of the bank account. /// [JsonProperty("account_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_number")] +#endif public string AccountNumber { get; set; } /// @@ -23,18 +32,27 @@ public class PaymentMethodUsBankAccountOptions : INestedOptions /// One of: checking, or savings. /// [JsonProperty("account_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_type")] +#endif public string AccountType { get; set; } /// /// The ID of a Financial Connections Account to use as a payment method. /// [JsonProperty("financial_connections_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("financial_connections_account")] +#endif public string FinancialConnectionsAccount { get; set; } /// /// Routing number of the bank account. /// [JsonProperty("routing_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("routing_number")] +#endif public string RoutingNumber { get; set; } } } diff --git a/src/Stripe.net/Services/Payouts/PayoutCreateOptions.cs b/src/Stripe.net/Services/Payouts/PayoutCreateOptions.cs index 727ecfc027..69b7541130 100644 --- a/src/Stripe.net/Services/Payouts/PayoutCreateOptions.cs +++ b/src/Stripe.net/Services/Payouts/PayoutCreateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PayoutCreateOptions : BaseOptions, IHasMetadata { @@ -10,6 +13,9 @@ public class PayoutCreateOptions : BaseOptions, IHasMetadata /// A positive integer in cents representing how much to payout. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long? Amount { get; set; } /// @@ -18,12 +24,18 @@ public class PayoutCreateOptions : BaseOptions, IHasMetadata /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// /// An arbitrary string attached to the object. Often useful for displaying to users. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// @@ -31,6 +43,9 @@ public class PayoutCreateOptions : BaseOptions, IHasMetadata /// destination, we use the default external account for the specified currency. /// [JsonProperty("destination")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("destination")] +#endif public string Destination { get; set; } /// @@ -40,6 +55,9 @@ public class PayoutCreateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -51,6 +69,9 @@ public class PayoutCreateOptions : BaseOptions, IHasMetadata /// One of: instant, or standard. /// [JsonProperty("method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("method")] +#endif public string Method { get; set; } /// @@ -60,6 +81,9 @@ public class PayoutCreateOptions : BaseOptions, IHasMetadata /// One of: bank_account, card, or fpx. /// [JsonProperty("source_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("source_type")] +#endif public string SourceType { get; set; } /// @@ -69,6 +93,9 @@ public class PayoutCreateOptions : BaseOptions, IHasMetadata /// display it at all. /// [JsonProperty("statement_descriptor")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("statement_descriptor")] +#endif public string StatementDescriptor { get; set; } } } diff --git a/src/Stripe.net/Services/Payouts/PayoutListOptions.cs b/src/Stripe.net/Services/Payouts/PayoutListOptions.cs index d2a5a52d84..f20c0d55d8 100644 --- a/src/Stripe.net/Services/Payouts/PayoutListOptions.cs +++ b/src/Stripe.net/Services/Payouts/PayoutListOptions.cs @@ -4,6 +4,9 @@ namespace Stripe using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PayoutListOptions : ListOptionsWithCreated { @@ -12,12 +15,19 @@ public class PayoutListOptions : ListOptionsWithCreated /// [JsonProperty("arrival_date")] [JsonConverter(typeof(AnyOfConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("arrival_date")] + [STJS.JsonConverter(typeof(STJAnyOfConverter))] +#endif public AnyOf ArrivalDate { get; set; } /// /// The ID of an external account - only return payouts sent to this external account. /// [JsonProperty("destination")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("destination")] +#endif public string Destination { get; set; } /// @@ -25,6 +35,9 @@ public class PayoutListOptions : ListOptionsWithCreated /// failed, or canceled. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } } } diff --git a/src/Stripe.net/Services/Payouts/PayoutReverseOptions.cs b/src/Stripe.net/Services/Payouts/PayoutReverseOptions.cs index 28ebef557f..96dac0b073 100644 --- a/src/Stripe.net/Services/Payouts/PayoutReverseOptions.cs +++ b/src/Stripe.net/Services/Payouts/PayoutReverseOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PayoutReverseOptions : BaseOptions, IHasMetadata { @@ -13,6 +16,9 @@ public class PayoutReverseOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } } } diff --git a/src/Stripe.net/Services/Payouts/PayoutUpdateOptions.cs b/src/Stripe.net/Services/Payouts/PayoutUpdateOptions.cs index ef3f6060e9..e6580e0549 100644 --- a/src/Stripe.net/Services/Payouts/PayoutUpdateOptions.cs +++ b/src/Stripe.net/Services/Payouts/PayoutUpdateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PayoutUpdateOptions : BaseOptions, IHasMetadata { @@ -13,6 +16,9 @@ public class PayoutUpdateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } } } diff --git a/src/Stripe.net/Services/Plans/PlanCreateOptions.cs b/src/Stripe.net/Services/Plans/PlanCreateOptions.cs index 54573585f0..43214a98a6 100644 --- a/src/Stripe.net/Services/Plans/PlanCreateOptions.cs +++ b/src/Stripe.net/Services/Plans/PlanCreateOptions.cs @@ -4,6 +4,9 @@ namespace Stripe using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PlanCreateOptions : BaseOptions, IHasId, IHasMetadata { @@ -11,6 +14,9 @@ public class PlanCreateOptions : BaseOptions, IHasId, IHasMetadata /// Whether the plan is currently available for new subscriptions. Defaults to true. /// [JsonProperty("active")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("active")] +#endif public bool? Active { get; set; } /// @@ -23,6 +29,9 @@ public class PlanCreateOptions : BaseOptions, IHasId, IHasMetadata /// One of: last_during_period, last_ever, max, or sum. /// [JsonProperty("aggregate_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("aggregate_usage")] +#endif public string AggregateUsage { get; set; } /// @@ -30,6 +39,9 @@ public class PlanCreateOptions : BaseOptions, IHasId, IHasMetadata /// how much to charge on a recurring basis. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long? Amount { get; set; } /// @@ -37,6 +49,9 @@ public class PlanCreateOptions : BaseOptions, IHasId, IHasMetadata /// one of amount and amount_decimal can be set. /// [JsonProperty("amount_decimal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_decimal")] +#endif public decimal? AmountDecimal { get; set; } /// @@ -49,6 +64,9 @@ public class PlanCreateOptions : BaseOptions, IHasId, IHasMetadata /// One of: per_unit, or tiered. /// [JsonProperty("billing_scheme")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_scheme")] +#endif public string BillingScheme { get; set; } /// @@ -57,6 +75,9 @@ public class PlanCreateOptions : BaseOptions, IHasId, IHasMetadata /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// @@ -66,6 +87,9 @@ public class PlanCreateOptions : BaseOptions, IHasId, IHasMetadata /// test modes. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// @@ -74,6 +98,9 @@ public class PlanCreateOptions : BaseOptions, IHasId, IHasMetadata /// One of: day, month, week, or year. /// [JsonProperty("interval")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interval")] +#endif public string Interval { get; set; } /// @@ -82,6 +109,9 @@ public class PlanCreateOptions : BaseOptions, IHasId, IHasMetadata /// years interval allowed (3 years, 36 months, or 156 weeks). /// [JsonProperty("interval_count")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interval_count")] +#endif public long? IntervalCount { get; set; } /// @@ -91,22 +121,35 @@ public class PlanCreateOptions : BaseOptions, IHasId, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// The meter tracking the usage of a metered price. /// [JsonProperty("meter")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("meter")] +#endif public string Meter { get; set; } /// /// A brief description of the plan, hidden from customers. /// [JsonProperty("nickname")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("nickname")] +#endif public string Nickname { get; set; } [JsonProperty("product")] [JsonConverter(typeof(AnyOfConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("product")] + [STJS.JsonConverter(typeof(STJAnyOfConverter))] +#endif public AnyOf Product { get; set; } /// @@ -114,6 +157,9 @@ public class PlanCreateOptions : BaseOptions, IHasId, IHasMetadata /// be set to tiered. See also the documentation for billing_scheme. /// [JsonProperty("tiers")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tiers")] +#endif public List Tiers { get; set; } /// @@ -124,6 +170,9 @@ public class PlanCreateOptions : BaseOptions, IHasId, IHasMetadata /// One of: graduated, or volume. /// [JsonProperty("tiers_mode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tiers_mode")] +#endif public string TiersMode { get; set; } /// @@ -131,6 +180,9 @@ public class PlanCreateOptions : BaseOptions, IHasId, IHasMetadata /// price. Cannot be combined with tiers. /// [JsonProperty("transform_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transform_usage")] +#endif public PlanTransformUsageOptions TransformUsage { get; set; } /// @@ -138,6 +190,9 @@ public class PlanCreateOptions : BaseOptions, IHasId, IHasMetadata /// href="https://stripe.com/docs/api#create_subscription-trial_from_plan">trial_from_plan=true. /// [JsonProperty("trial_period_days")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("trial_period_days")] +#endif public long? TrialPeriodDays { get; set; } /// @@ -148,6 +203,9 @@ public class PlanCreateOptions : BaseOptions, IHasId, IHasMetadata /// One of: licensed, or metered. /// [JsonProperty("usage_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("usage_type")] +#endif public string UsageType { get; set; } } } diff --git a/src/Stripe.net/Services/Plans/PlanListOptions.cs b/src/Stripe.net/Services/Plans/PlanListOptions.cs index d795a4801a..5928bee29d 100644 --- a/src/Stripe.net/Services/Plans/PlanListOptions.cs +++ b/src/Stripe.net/Services/Plans/PlanListOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PlanListOptions : ListOptionsWithCreated { @@ -10,12 +13,18 @@ public class PlanListOptions : ListOptionsWithCreated /// inactive plans). /// [JsonProperty("active")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("active")] +#endif public bool? Active { get; set; } /// /// Only return plans for the given product. /// [JsonProperty("product")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("product")] +#endif public string Product { get; set; } } } diff --git a/src/Stripe.net/Services/Plans/PlanProductOptions.cs b/src/Stripe.net/Services/Plans/PlanProductOptions.cs index 887ef3e685..69216835f5 100644 --- a/src/Stripe.net/Services/Plans/PlanProductOptions.cs +++ b/src/Stripe.net/Services/Plans/PlanProductOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PlanProductOptions : INestedOptions, IHasId, IHasMetadata { @@ -10,6 +13,9 @@ public class PlanProductOptions : INestedOptions, IHasId, IHasMetadata /// Whether the product is currently available for purchase. Defaults to true. /// [JsonProperty("active")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("active")] +#endif public bool? Active { get; set; } /// @@ -17,6 +23,9 @@ public class PlanProductOptions : INestedOptions, IHasId, IHasMetadata /// randomly generated. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// @@ -26,12 +35,18 @@ public class PlanProductOptions : INestedOptions, IHasId, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// The product's name, meant to be displayable to the customer. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } /// @@ -44,12 +59,18 @@ public class PlanProductOptions : INestedOptions, IHasId, IHasMetadata /// statement in capital letters. Non-ASCII characters are automatically stripped. /// [JsonProperty("statement_descriptor")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("statement_descriptor")] +#endif public string StatementDescriptor { get; set; } /// /// A tax code ID. /// [JsonProperty("tax_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_code")] +#endif public string TaxCode { get; set; } /// @@ -57,6 +78,9 @@ public class PlanProductOptions : INestedOptions, IHasId, IHasMetadata /// customers' receipts, invoices, Checkout, and the customer portal. /// [JsonProperty("unit_label")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_label")] +#endif public string UnitLabel { get; set; } } } diff --git a/src/Stripe.net/Services/Plans/PlanTierOptions.cs b/src/Stripe.net/Services/Plans/PlanTierOptions.cs index 1818801ab3..d4533fc2d3 100644 --- a/src/Stripe.net/Services/Plans/PlanTierOptions.cs +++ b/src/Stripe.net/Services/Plans/PlanTierOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PlanTierOptions : INestedOptions { @@ -11,6 +14,9 @@ public class PlanTierOptions : INestedOptions /// tier. /// [JsonProperty("flat_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("flat_amount")] +#endif public long? FlatAmount { get; set; } /// @@ -19,12 +25,18 @@ public class PlanTierOptions : INestedOptions /// flat_amount_decimal can be set. /// [JsonProperty("flat_amount_decimal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("flat_amount_decimal")] +#endif public decimal? FlatAmountDecimal { get; set; } /// /// The per unit billing amount for each individual unit for which this tier applies. /// [JsonProperty("unit_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_amount")] +#endif public long? UnitAmount { get; set; } /// @@ -33,6 +45,9 @@ public class PlanTierOptions : INestedOptions /// unit_amount_decimal can be set. /// [JsonProperty("unit_amount_decimal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_amount_decimal")] +#endif public decimal? UnitAmountDecimal { get; set; } /// @@ -41,6 +56,10 @@ public class PlanTierOptions : INestedOptions /// [JsonProperty("up_to")] [JsonConverter(typeof(AnyOfConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("up_to")] + [STJS.JsonConverter(typeof(STJAnyOfConverter))] +#endif public AnyOf UpTo { get; set; } } } diff --git a/src/Stripe.net/Services/Plans/PlanTransformUsageOptions.cs b/src/Stripe.net/Services/Plans/PlanTransformUsageOptions.cs index d0124b517f..55b57589fb 100644 --- a/src/Stripe.net/Services/Plans/PlanTransformUsageOptions.cs +++ b/src/Stripe.net/Services/Plans/PlanTransformUsageOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PlanTransformUsageOptions : INestedOptions { @@ -9,6 +12,9 @@ public class PlanTransformUsageOptions : INestedOptions /// Divide usage by this number. /// [JsonProperty("divide_by")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("divide_by")] +#endif public long? DivideBy { get; set; } /// @@ -16,6 +22,9 @@ public class PlanTransformUsageOptions : INestedOptions /// One of: down, or up. /// [JsonProperty("round")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("round")] +#endif public string Round { get; set; } } } diff --git a/src/Stripe.net/Services/Plans/PlanUpdateOptions.cs b/src/Stripe.net/Services/Plans/PlanUpdateOptions.cs index 55ff66c37b..430457ba7f 100644 --- a/src/Stripe.net/Services/Plans/PlanUpdateOptions.cs +++ b/src/Stripe.net/Services/Plans/PlanUpdateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PlanUpdateOptions : BaseOptions, IHasMetadata { @@ -10,6 +13,9 @@ public class PlanUpdateOptions : BaseOptions, IHasMetadata /// Whether the plan is currently available for new subscriptions. /// [JsonProperty("active")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("active")] +#endif public bool? Active { get; set; } /// @@ -19,12 +25,18 @@ public class PlanUpdateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// A brief description of the plan, hidden from customers. /// [JsonProperty("nickname")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("nickname")] +#endif public string Nickname { get; set; } /// @@ -32,6 +44,9 @@ public class PlanUpdateOptions : BaseOptions, IHasMetadata /// subscription or subscription schedule. /// [JsonProperty("product")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("product")] +#endif public string Product { get; set; } /// @@ -39,6 +54,9 @@ public class PlanUpdateOptions : BaseOptions, IHasMetadata /// href="https://stripe.com/docs/api#create_subscription-trial_from_plan">trial_from_plan=true. /// [JsonProperty("trial_period_days")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("trial_period_days")] +#endif public long? TrialPeriodDays { get; set; } } } diff --git a/src/Stripe.net/Services/Prices/PriceCreateOptions.cs b/src/Stripe.net/Services/Prices/PriceCreateOptions.cs index 7fd1658bb9..3b69427285 100644 --- a/src/Stripe.net/Services/Prices/PriceCreateOptions.cs +++ b/src/Stripe.net/Services/Prices/PriceCreateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PriceCreateOptions : BaseOptions, IHasMetadata { @@ -10,6 +13,9 @@ public class PriceCreateOptions : BaseOptions, IHasMetadata /// Whether the price can be used for new purchases. Defaults to true. /// [JsonProperty("active")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("active")] +#endif public bool? Active { get; set; } /// @@ -23,6 +29,9 @@ public class PriceCreateOptions : BaseOptions, IHasMetadata /// One of: per_unit, or tiered. /// [JsonProperty("billing_scheme")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_scheme")] +#endif public string BillingScheme { get; set; } /// @@ -31,6 +40,9 @@ public class PriceCreateOptions : BaseOptions, IHasMetadata /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// @@ -39,6 +51,9 @@ public class PriceCreateOptions : BaseOptions, IHasMetadata /// href="https://stripe.com/docs/currencies">supported currency. /// [JsonProperty("currency_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency_options")] +#endif public Dictionary CurrencyOptions { get; set; } /// @@ -46,6 +61,9 @@ public class PriceCreateOptions : BaseOptions, IHasMetadata /// Checkout Sessions and Payment Links. /// [JsonProperty("custom_unit_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("custom_unit_amount")] +#endif public PriceCustomUnitAmountOptions CustomUnitAmount { get; set; } /// @@ -53,6 +71,9 @@ public class PriceCreateOptions : BaseOptions, IHasMetadata /// 200 characters. /// [JsonProperty("lookup_key")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("lookup_key")] +#endif public string LookupKey { get; set; } /// @@ -62,30 +83,45 @@ public class PriceCreateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// A brief description of the price, hidden from customers. /// [JsonProperty("nickname")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("nickname")] +#endif public string Nickname { get; set; } /// /// The ID of the product that this price will belong to. /// [JsonProperty("product")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("product")] +#endif public string Product { get; set; } /// /// These fields can be used to create a new product that this price will belong to. /// [JsonProperty("product_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("product_data")] +#endif public PriceProductDataOptions ProductData { get; set; } /// /// The recurring components of a price such as interval and usage_type. /// [JsonProperty("recurring")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("recurring")] +#endif public PriceRecurringOptions Recurring { get; set; } /// @@ -98,6 +134,9 @@ public class PriceCreateOptions : BaseOptions, IHasMetadata /// One of: exclusive, inclusive, or unspecified. /// [JsonProperty("tax_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_behavior")] +#endif public string TaxBehavior { get; set; } /// @@ -105,6 +144,9 @@ public class PriceCreateOptions : BaseOptions, IHasMetadata /// be set to tiered. See also the documentation for billing_scheme. /// [JsonProperty("tiers")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tiers")] +#endif public List Tiers { get; set; } /// @@ -115,6 +157,9 @@ public class PriceCreateOptions : BaseOptions, IHasMetadata /// One of: graduated, or volume. /// [JsonProperty("tiers_mode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tiers_mode")] +#endif public string TiersMode { get; set; } /// @@ -122,6 +167,9 @@ public class PriceCreateOptions : BaseOptions, IHasMetadata /// assign it to this price. /// [JsonProperty("transfer_lookup_key")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transfer_lookup_key")] +#endif public bool? TransferLookupKey { get; set; } /// @@ -129,6 +177,9 @@ public class PriceCreateOptions : BaseOptions, IHasMetadata /// price. Cannot be combined with tiers. /// [JsonProperty("transform_quantity")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transform_quantity")] +#endif public PriceTransformQuantityOptions TransformQuantity { get; set; } /// @@ -137,6 +188,9 @@ public class PriceCreateOptions : BaseOptions, IHasMetadata /// custom_unit_amount is required, unless billing_scheme=tiered. /// [JsonProperty("unit_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_amount")] +#endif public long? UnitAmount { get; set; } /// @@ -145,6 +199,9 @@ public class PriceCreateOptions : BaseOptions, IHasMetadata /// unit_amount_decimal can be set. /// [JsonProperty("unit_amount_decimal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_amount_decimal")] +#endif public decimal? UnitAmountDecimal { get; set; } } } diff --git a/src/Stripe.net/Services/Prices/PriceCurrencyOptionsCustomUnitAmountOptions.cs b/src/Stripe.net/Services/Prices/PriceCurrencyOptionsCustomUnitAmountOptions.cs index 4b05583d88..3fe1289d5d 100644 --- a/src/Stripe.net/Services/Prices/PriceCurrencyOptionsCustomUnitAmountOptions.cs +++ b/src/Stripe.net/Services/Prices/PriceCurrencyOptionsCustomUnitAmountOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PriceCurrencyOptionsCustomUnitAmountOptions : INestedOptions { @@ -10,12 +13,18 @@ public class PriceCurrencyOptionsCustomUnitAmountOptions : INestedOptions /// custom_unit_amount. /// [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool? Enabled { get; set; } /// /// The maximum unit amount the customer can specify for this item. /// [JsonProperty("maximum")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("maximum")] +#endif public long? Maximum { get; set; } /// @@ -23,12 +32,18 @@ public class PriceCurrencyOptionsCustomUnitAmountOptions : INestedOptions /// minimum charge amount. /// [JsonProperty("minimum")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("minimum")] +#endif public long? Minimum { get; set; } /// /// The starting unit amount which can be updated by the customer. /// [JsonProperty("preset")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preset")] +#endif public long? Preset { get; set; } } } diff --git a/src/Stripe.net/Services/Prices/PriceCurrencyOptionsOptions.cs b/src/Stripe.net/Services/Prices/PriceCurrencyOptionsOptions.cs index 0dc7657e8b..c522d49265 100644 --- a/src/Stripe.net/Services/Prices/PriceCurrencyOptionsOptions.cs +++ b/src/Stripe.net/Services/Prices/PriceCurrencyOptionsOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PriceCurrencyOptionsOptions : INestedOptions { @@ -11,6 +14,9 @@ public class PriceCurrencyOptionsOptions : INestedOptions /// Checkout Sessions and Payment Links. /// [JsonProperty("custom_unit_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("custom_unit_amount")] +#endif public PriceCurrencyOptionsCustomUnitAmountOptions CustomUnitAmount { get; set; } /// @@ -23,6 +29,9 @@ public class PriceCurrencyOptionsOptions : INestedOptions /// One of: exclusive, inclusive, or unspecified. /// [JsonProperty("tax_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_behavior")] +#endif public string TaxBehavior { get; set; } /// @@ -30,6 +39,9 @@ public class PriceCurrencyOptionsOptions : INestedOptions /// be set to tiered. See also the documentation for billing_scheme. /// [JsonProperty("tiers")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tiers")] +#endif public List Tiers { get; set; } /// @@ -37,6 +49,9 @@ public class PriceCurrencyOptionsOptions : INestedOptions /// how much to charge. /// [JsonProperty("unit_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_amount")] +#endif public long? UnitAmount { get; set; } /// @@ -45,6 +60,9 @@ public class PriceCurrencyOptionsOptions : INestedOptions /// unit_amount_decimal can be set. /// [JsonProperty("unit_amount_decimal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_amount_decimal")] +#endif public decimal? UnitAmountDecimal { get; set; } } } diff --git a/src/Stripe.net/Services/Prices/PriceCurrencyOptionsTierOptions.cs b/src/Stripe.net/Services/Prices/PriceCurrencyOptionsTierOptions.cs index 0e8d2b226f..2c8ae3f921 100644 --- a/src/Stripe.net/Services/Prices/PriceCurrencyOptionsTierOptions.cs +++ b/src/Stripe.net/Services/Prices/PriceCurrencyOptionsTierOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PriceCurrencyOptionsTierOptions : INestedOptions { @@ -11,6 +14,9 @@ public class PriceCurrencyOptionsTierOptions : INestedOptions /// tier. /// [JsonProperty("flat_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("flat_amount")] +#endif public long? FlatAmount { get; set; } /// @@ -19,12 +25,18 @@ public class PriceCurrencyOptionsTierOptions : INestedOptions /// flat_amount_decimal can be set. /// [JsonProperty("flat_amount_decimal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("flat_amount_decimal")] +#endif public decimal? FlatAmountDecimal { get; set; } /// /// The per unit billing amount for each individual unit for which this tier applies. /// [JsonProperty("unit_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_amount")] +#endif public long? UnitAmount { get; set; } /// @@ -33,6 +45,9 @@ public class PriceCurrencyOptionsTierOptions : INestedOptions /// unit_amount_decimal can be set. /// [JsonProperty("unit_amount_decimal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_amount_decimal")] +#endif public decimal? UnitAmountDecimal { get; set; } /// @@ -41,6 +56,10 @@ public class PriceCurrencyOptionsTierOptions : INestedOptions /// [JsonProperty("up_to")] [JsonConverter(typeof(AnyOfConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("up_to")] + [STJS.JsonConverter(typeof(STJAnyOfConverter))] +#endif public AnyOf UpTo { get; set; } } } diff --git a/src/Stripe.net/Services/Prices/PriceCustomUnitAmountOptions.cs b/src/Stripe.net/Services/Prices/PriceCustomUnitAmountOptions.cs index 9552dd1286..f3cf45832c 100644 --- a/src/Stripe.net/Services/Prices/PriceCustomUnitAmountOptions.cs +++ b/src/Stripe.net/Services/Prices/PriceCustomUnitAmountOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PriceCustomUnitAmountOptions : INestedOptions { @@ -10,12 +13,18 @@ public class PriceCustomUnitAmountOptions : INestedOptions /// custom_unit_amount. /// [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool? Enabled { get; set; } /// /// The maximum unit amount the customer can specify for this item. /// [JsonProperty("maximum")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("maximum")] +#endif public long? Maximum { get; set; } /// @@ -23,12 +32,18 @@ public class PriceCustomUnitAmountOptions : INestedOptions /// minimum charge amount. /// [JsonProperty("minimum")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("minimum")] +#endif public long? Minimum { get; set; } /// /// The starting unit amount which can be updated by the customer. /// [JsonProperty("preset")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preset")] +#endif public long? Preset { get; set; } } } diff --git a/src/Stripe.net/Services/Prices/PriceListOptions.cs b/src/Stripe.net/Services/Prices/PriceListOptions.cs index 1bbbe6afd8..969c46e87c 100644 --- a/src/Stripe.net/Services/Prices/PriceListOptions.cs +++ b/src/Stripe.net/Services/Prices/PriceListOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PriceListOptions : ListOptionsWithCreated { @@ -11,12 +14,18 @@ public class PriceListOptions : ListOptionsWithCreated /// inactive prices). /// [JsonProperty("active")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("active")] +#endif public bool? Active { get; set; } /// /// Only return prices for the given currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// @@ -24,18 +33,27 @@ public class PriceListOptions : ListOptionsWithCreated /// lookup_keys. /// [JsonProperty("lookup_keys")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("lookup_keys")] +#endif public List LookupKeys { get; set; } /// /// Only return prices for the given product. /// [JsonProperty("product")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("product")] +#endif public string Product { get; set; } /// /// Only return prices with these recurring fields. /// [JsonProperty("recurring")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("recurring")] +#endif public PriceRecurringListOptions Recurring { get; set; } /// @@ -43,6 +61,9 @@ public class PriceListOptions : ListOptionsWithCreated /// One of: one_time, or recurring. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Prices/PriceProductDataOptions.cs b/src/Stripe.net/Services/Prices/PriceProductDataOptions.cs index d4793828b3..88b15646f4 100644 --- a/src/Stripe.net/Services/Prices/PriceProductDataOptions.cs +++ b/src/Stripe.net/Services/Prices/PriceProductDataOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PriceProductDataOptions : INestedOptions, IHasId, IHasMetadata { @@ -10,6 +13,9 @@ public class PriceProductDataOptions : INestedOptions, IHasId, IHasMetadata /// Whether the product is currently available for purchase. Defaults to true. /// [JsonProperty("active")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("active")] +#endif public bool? Active { get; set; } /// @@ -17,6 +23,9 @@ public class PriceProductDataOptions : INestedOptions, IHasId, IHasMetadata /// randomly generated. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// @@ -26,12 +35,18 @@ public class PriceProductDataOptions : INestedOptions, IHasId, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// The product's name, meant to be displayable to the customer. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } /// @@ -44,12 +59,18 @@ public class PriceProductDataOptions : INestedOptions, IHasId, IHasMetadata /// statement in capital letters. Non-ASCII characters are automatically stripped. /// [JsonProperty("statement_descriptor")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("statement_descriptor")] +#endif public string StatementDescriptor { get; set; } /// /// A tax code ID. /// [JsonProperty("tax_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_code")] +#endif public string TaxCode { get; set; } /// @@ -57,6 +78,9 @@ public class PriceProductDataOptions : INestedOptions, IHasId, IHasMetadata /// customers' receipts, invoices, Checkout, and the customer portal. /// [JsonProperty("unit_label")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_label")] +#endif public string UnitLabel { get; set; } } } diff --git a/src/Stripe.net/Services/Prices/PriceRecurringListOptions.cs b/src/Stripe.net/Services/Prices/PriceRecurringListOptions.cs index 8812f7b22a..0bc9e030d6 100644 --- a/src/Stripe.net/Services/Prices/PriceRecurringListOptions.cs +++ b/src/Stripe.net/Services/Prices/PriceRecurringListOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PriceRecurringListOptions : INestedOptions { @@ -11,12 +14,18 @@ public class PriceRecurringListOptions : INestedOptions /// One of: day, month, week, or year. /// [JsonProperty("interval")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interval")] +#endif public string Interval { get; set; } /// /// Filter by the price's meter. /// [JsonProperty("meter")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("meter")] +#endif public string Meter { get; set; } /// @@ -25,6 +34,9 @@ public class PriceRecurringListOptions : INestedOptions /// One of: licensed, or metered. /// [JsonProperty("usage_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("usage_type")] +#endif public string UsageType { get; set; } } } diff --git a/src/Stripe.net/Services/Prices/PriceRecurringOptions.cs b/src/Stripe.net/Services/Prices/PriceRecurringOptions.cs index 1fd03dba8a..b093d92fec 100644 --- a/src/Stripe.net/Services/Prices/PriceRecurringOptions.cs +++ b/src/Stripe.net/Services/Prices/PriceRecurringOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PriceRecurringOptions : INestedOptions { @@ -11,6 +14,9 @@ public class PriceRecurringOptions : INestedOptions /// One of: last_during_period, last_ever, max, or sum. /// [JsonProperty("aggregate_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("aggregate_usage")] +#endif public string AggregateUsage { get; set; } /// @@ -19,6 +25,9 @@ public class PriceRecurringOptions : INestedOptions /// One of: day, month, week, or year. /// [JsonProperty("interval")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interval")] +#endif public string Interval { get; set; } /// @@ -27,12 +36,18 @@ public class PriceRecurringOptions : INestedOptions /// years interval allowed (3 years, 36 months, or 156 weeks). /// [JsonProperty("interval_count")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interval_count")] +#endif public long? IntervalCount { get; set; } /// /// The meter tracking the usage of a metered price. /// [JsonProperty("meter")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("meter")] +#endif public string Meter { get; set; } /// @@ -40,6 +55,9 @@ public class PriceRecurringOptions : INestedOptions /// href="https://stripe.com/docs/api#create_subscription-trial_from_plan">trial_from_plan=true. /// [JsonProperty("trial_period_days")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("trial_period_days")] +#endif public long? TrialPeriodDays { get; set; } /// @@ -50,6 +68,9 @@ public class PriceRecurringOptions : INestedOptions /// One of: licensed, or metered. /// [JsonProperty("usage_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("usage_type")] +#endif public string UsageType { get; set; } } } diff --git a/src/Stripe.net/Services/Prices/PriceTierOptions.cs b/src/Stripe.net/Services/Prices/PriceTierOptions.cs index cbfa15ca23..64bc70f170 100644 --- a/src/Stripe.net/Services/Prices/PriceTierOptions.cs +++ b/src/Stripe.net/Services/Prices/PriceTierOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PriceTierOptions : INestedOptions { @@ -11,6 +14,9 @@ public class PriceTierOptions : INestedOptions /// tier. /// [JsonProperty("flat_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("flat_amount")] +#endif public long? FlatAmount { get; set; } /// @@ -19,12 +25,18 @@ public class PriceTierOptions : INestedOptions /// flat_amount_decimal can be set. /// [JsonProperty("flat_amount_decimal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("flat_amount_decimal")] +#endif public decimal? FlatAmountDecimal { get; set; } /// /// The per unit billing amount for each individual unit for which this tier applies. /// [JsonProperty("unit_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_amount")] +#endif public long? UnitAmount { get; set; } /// @@ -33,6 +45,9 @@ public class PriceTierOptions : INestedOptions /// unit_amount_decimal can be set. /// [JsonProperty("unit_amount_decimal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_amount_decimal")] +#endif public decimal? UnitAmountDecimal { get; set; } /// @@ -41,6 +56,10 @@ public class PriceTierOptions : INestedOptions /// [JsonProperty("up_to")] [JsonConverter(typeof(AnyOfConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("up_to")] + [STJS.JsonConverter(typeof(STJAnyOfConverter))] +#endif public AnyOf UpTo { get; set; } } } diff --git a/src/Stripe.net/Services/Prices/PriceTransformQuantityOptions.cs b/src/Stripe.net/Services/Prices/PriceTransformQuantityOptions.cs index 450fbe89b4..e29ac8a4a2 100644 --- a/src/Stripe.net/Services/Prices/PriceTransformQuantityOptions.cs +++ b/src/Stripe.net/Services/Prices/PriceTransformQuantityOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PriceTransformQuantityOptions : INestedOptions { @@ -9,6 +12,9 @@ public class PriceTransformQuantityOptions : INestedOptions /// Divide usage by this number. /// [JsonProperty("divide_by")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("divide_by")] +#endif public long? DivideBy { get; set; } /// @@ -16,6 +22,9 @@ public class PriceTransformQuantityOptions : INestedOptions /// One of: down, or up. /// [JsonProperty("round")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("round")] +#endif public string Round { get; set; } } } diff --git a/src/Stripe.net/Services/Prices/PriceUpdateOptions.cs b/src/Stripe.net/Services/Prices/PriceUpdateOptions.cs index 8cd8632907..690c1794ec 100644 --- a/src/Stripe.net/Services/Prices/PriceUpdateOptions.cs +++ b/src/Stripe.net/Services/Prices/PriceUpdateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PriceUpdateOptions : BaseOptions, IHasMetadata { @@ -10,6 +13,9 @@ public class PriceUpdateOptions : BaseOptions, IHasMetadata /// Whether the price can be used for new purchases. Defaults to true. /// [JsonProperty("active")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("active")] +#endif public bool? Active { get; set; } /// @@ -18,6 +24,9 @@ public class PriceUpdateOptions : BaseOptions, IHasMetadata /// href="https://stripe.com/docs/currencies">supported currency. /// [JsonProperty("currency_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency_options")] +#endif public Dictionary CurrencyOptions { get; set; } /// @@ -25,6 +34,9 @@ public class PriceUpdateOptions : BaseOptions, IHasMetadata /// 200 characters. /// [JsonProperty("lookup_key")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("lookup_key")] +#endif public string LookupKey { get; set; } /// @@ -34,12 +46,18 @@ public class PriceUpdateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// A brief description of the price, hidden from customers. /// [JsonProperty("nickname")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("nickname")] +#endif public string Nickname { get; set; } /// @@ -52,6 +70,9 @@ public class PriceUpdateOptions : BaseOptions, IHasMetadata /// One of: exclusive, inclusive, or unspecified. /// [JsonProperty("tax_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_behavior")] +#endif public string TaxBehavior { get; set; } /// @@ -59,6 +80,9 @@ public class PriceUpdateOptions : BaseOptions, IHasMetadata /// assign it to this price. /// [JsonProperty("transfer_lookup_key")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transfer_lookup_key")] +#endif public bool? TransferLookupKey { get; set; } } } diff --git a/src/Stripe.net/Services/ProductFeatures/ProductFeatureCreateOptions.cs b/src/Stripe.net/Services/ProductFeatures/ProductFeatureCreateOptions.cs index f388518b98..cebbe523e8 100644 --- a/src/Stripe.net/Services/ProductFeatures/ProductFeatureCreateOptions.cs +++ b/src/Stripe.net/Services/ProductFeatures/ProductFeatureCreateOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ProductFeatureCreateOptions : BaseOptions { @@ -10,6 +13,9 @@ public class ProductFeatureCreateOptions : BaseOptions /// object attached to this product. /// [JsonProperty("entitlement_feature")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("entitlement_feature")] +#endif public string EntitlementFeature { get; set; } } } diff --git a/src/Stripe.net/Services/Products/ProductCreateOptions.cs b/src/Stripe.net/Services/Products/ProductCreateOptions.cs index 50dacf49e0..8089f4db4f 100644 --- a/src/Stripe.net/Services/Products/ProductCreateOptions.cs +++ b/src/Stripe.net/Services/Products/ProductCreateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ProductCreateOptions : BaseOptions, IHasId, IHasMetadata { @@ -10,6 +13,9 @@ public class ProductCreateOptions : BaseOptions, IHasId, IHasMetadata /// Whether the product is currently available for purchase. Defaults to true. /// [JsonProperty("active")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("active")] +#endif public bool? Active { get; set; } /// @@ -17,6 +23,9 @@ public class ProductCreateOptions : BaseOptions, IHasId, IHasMetadata /// object. This Price will be set as the default price for this product. /// [JsonProperty("default_price_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("default_price_data")] +#endif public ProductDefaultPriceDataOptions DefaultPriceData { get; set; } /// @@ -25,6 +34,9 @@ public class ProductCreateOptions : BaseOptions, IHasId, IHasMetadata /// rendering purposes. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// @@ -32,6 +44,9 @@ public class ProductCreateOptions : BaseOptions, IHasId, IHasMetadata /// but the ID must be unique across all products in your Stripe account. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// @@ -39,6 +54,9 @@ public class ProductCreateOptions : BaseOptions, IHasId, IHasMetadata /// customer. /// [JsonProperty("images")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("images")] +#endif public List Images { get; set; } /// @@ -46,6 +64,9 @@ public class ProductCreateOptions : BaseOptions, IHasId, IHasMetadata /// href="https://stripe.com/docs/payments/checkout/pricing-table">pricing tables. /// [JsonProperty("marketing_features")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("marketing_features")] +#endif public List MarketingFeatures { get; set; } /// @@ -55,24 +76,36 @@ public class ProductCreateOptions : BaseOptions, IHasId, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// The product's name, meant to be displayable to the customer. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } /// /// The dimensions of this product for shipping purposes. /// [JsonProperty("package_dimensions")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("package_dimensions")] +#endif public ProductPackageDimensionsOptions PackageDimensions { get; set; } /// /// Whether this product is shipped (i.e., physical goods). /// [JsonProperty("shippable")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shippable")] +#endif public bool? Shippable { get; set; } /// @@ -86,12 +119,18 @@ public class ProductCreateOptions : BaseOptions, IHasId, IHasMetadata /// contain at least one letter. Only used for subscription payments. /// [JsonProperty("statement_descriptor")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("statement_descriptor")] +#endif public string StatementDescriptor { get; set; } /// /// A tax code ID. /// [JsonProperty("tax_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_code")] +#endif public string TaxCode { get; set; } /// @@ -102,6 +141,9 @@ public class ProductCreateOptions : BaseOptions, IHasId, IHasMetadata /// One of: good, or service. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } /// @@ -109,12 +151,18 @@ public class ProductCreateOptions : BaseOptions, IHasId, IHasMetadata /// customers' receipts, invoices, Checkout, and the customer portal. /// [JsonProperty("unit_label")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_label")] +#endif public string UnitLabel { get; set; } /// /// A URL of a publicly-accessible webpage for this product. /// [JsonProperty("url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("url")] +#endif public string Url { get; set; } } } diff --git a/src/Stripe.net/Services/Products/ProductDefaultPriceDataCurrencyOptionsCustomUnitAmountOptions.cs b/src/Stripe.net/Services/Products/ProductDefaultPriceDataCurrencyOptionsCustomUnitAmountOptions.cs index af436a3e18..8346546d1d 100644 --- a/src/Stripe.net/Services/Products/ProductDefaultPriceDataCurrencyOptionsCustomUnitAmountOptions.cs +++ b/src/Stripe.net/Services/Products/ProductDefaultPriceDataCurrencyOptionsCustomUnitAmountOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ProductDefaultPriceDataCurrencyOptionsCustomUnitAmountOptions : INestedOptions { @@ -10,12 +13,18 @@ public class ProductDefaultPriceDataCurrencyOptionsCustomUnitAmountOptions : INe /// custom_unit_amount. /// [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool? Enabled { get; set; } /// /// The maximum unit amount the customer can specify for this item. /// [JsonProperty("maximum")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("maximum")] +#endif public long? Maximum { get; set; } /// @@ -23,12 +32,18 @@ public class ProductDefaultPriceDataCurrencyOptionsCustomUnitAmountOptions : INe /// minimum charge amount. /// [JsonProperty("minimum")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("minimum")] +#endif public long? Minimum { get; set; } /// /// The starting unit amount which can be updated by the customer. /// [JsonProperty("preset")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preset")] +#endif public long? Preset { get; set; } } } diff --git a/src/Stripe.net/Services/Products/ProductDefaultPriceDataCurrencyOptionsOptions.cs b/src/Stripe.net/Services/Products/ProductDefaultPriceDataCurrencyOptionsOptions.cs index 03ed7f94ac..4d7c7e41e2 100644 --- a/src/Stripe.net/Services/Products/ProductDefaultPriceDataCurrencyOptionsOptions.cs +++ b/src/Stripe.net/Services/Products/ProductDefaultPriceDataCurrencyOptionsOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ProductDefaultPriceDataCurrencyOptionsOptions : INestedOptions { @@ -11,6 +14,9 @@ public class ProductDefaultPriceDataCurrencyOptionsOptions : INestedOptions /// Checkout Sessions and Payment Links. /// [JsonProperty("custom_unit_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("custom_unit_amount")] +#endif public ProductDefaultPriceDataCurrencyOptionsCustomUnitAmountOptions CustomUnitAmount { get; set; } /// @@ -23,6 +29,9 @@ public class ProductDefaultPriceDataCurrencyOptionsOptions : INestedOptions /// One of: exclusive, inclusive, or unspecified. /// [JsonProperty("tax_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_behavior")] +#endif public string TaxBehavior { get; set; } /// @@ -30,6 +39,9 @@ public class ProductDefaultPriceDataCurrencyOptionsOptions : INestedOptions /// be set to tiered. See also the documentation for billing_scheme. /// [JsonProperty("tiers")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tiers")] +#endif public List Tiers { get; set; } /// @@ -37,6 +49,9 @@ public class ProductDefaultPriceDataCurrencyOptionsOptions : INestedOptions /// how much to charge. /// [JsonProperty("unit_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_amount")] +#endif public long? UnitAmount { get; set; } /// @@ -45,6 +60,9 @@ public class ProductDefaultPriceDataCurrencyOptionsOptions : INestedOptions /// unit_amount_decimal can be set. /// [JsonProperty("unit_amount_decimal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_amount_decimal")] +#endif public decimal? UnitAmountDecimal { get; set; } } } diff --git a/src/Stripe.net/Services/Products/ProductDefaultPriceDataCurrencyOptionsTierOptions.cs b/src/Stripe.net/Services/Products/ProductDefaultPriceDataCurrencyOptionsTierOptions.cs index 7b1d8983ed..110b3c7823 100644 --- a/src/Stripe.net/Services/Products/ProductDefaultPriceDataCurrencyOptionsTierOptions.cs +++ b/src/Stripe.net/Services/Products/ProductDefaultPriceDataCurrencyOptionsTierOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ProductDefaultPriceDataCurrencyOptionsTierOptions : INestedOptions { @@ -11,6 +14,9 @@ public class ProductDefaultPriceDataCurrencyOptionsTierOptions : INestedOptions /// tier. /// [JsonProperty("flat_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("flat_amount")] +#endif public long? FlatAmount { get; set; } /// @@ -19,12 +25,18 @@ public class ProductDefaultPriceDataCurrencyOptionsTierOptions : INestedOptions /// flat_amount_decimal can be set. /// [JsonProperty("flat_amount_decimal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("flat_amount_decimal")] +#endif public decimal? FlatAmountDecimal { get; set; } /// /// The per unit billing amount for each individual unit for which this tier applies. /// [JsonProperty("unit_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_amount")] +#endif public long? UnitAmount { get; set; } /// @@ -33,6 +45,9 @@ public class ProductDefaultPriceDataCurrencyOptionsTierOptions : INestedOptions /// unit_amount_decimal can be set. /// [JsonProperty("unit_amount_decimal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_amount_decimal")] +#endif public decimal? UnitAmountDecimal { get; set; } /// @@ -41,6 +56,10 @@ public class ProductDefaultPriceDataCurrencyOptionsTierOptions : INestedOptions /// [JsonProperty("up_to")] [JsonConverter(typeof(AnyOfConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("up_to")] + [STJS.JsonConverter(typeof(STJAnyOfConverter))] +#endif public AnyOf UpTo { get; set; } } } diff --git a/src/Stripe.net/Services/Products/ProductDefaultPriceDataCustomUnitAmountOptions.cs b/src/Stripe.net/Services/Products/ProductDefaultPriceDataCustomUnitAmountOptions.cs index 35b9c7b58a..1fdf565a30 100644 --- a/src/Stripe.net/Services/Products/ProductDefaultPriceDataCustomUnitAmountOptions.cs +++ b/src/Stripe.net/Services/Products/ProductDefaultPriceDataCustomUnitAmountOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ProductDefaultPriceDataCustomUnitAmountOptions : INestedOptions { @@ -10,12 +13,18 @@ public class ProductDefaultPriceDataCustomUnitAmountOptions : INestedOptions /// custom_unit_amount. /// [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool? Enabled { get; set; } /// /// The maximum unit amount the customer can specify for this item. /// [JsonProperty("maximum")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("maximum")] +#endif public long? Maximum { get; set; } /// @@ -23,12 +32,18 @@ public class ProductDefaultPriceDataCustomUnitAmountOptions : INestedOptions /// minimum charge amount. /// [JsonProperty("minimum")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("minimum")] +#endif public long? Minimum { get; set; } /// /// The starting unit amount which can be updated by the customer. /// [JsonProperty("preset")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preset")] +#endif public long? Preset { get; set; } } } diff --git a/src/Stripe.net/Services/Products/ProductDefaultPriceDataOptions.cs b/src/Stripe.net/Services/Products/ProductDefaultPriceDataOptions.cs index 8796923589..5bd97c6eff 100644 --- a/src/Stripe.net/Services/Products/ProductDefaultPriceDataOptions.cs +++ b/src/Stripe.net/Services/Products/ProductDefaultPriceDataOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ProductDefaultPriceDataOptions : INestedOptions { @@ -12,6 +15,9 @@ public class ProductDefaultPriceDataOptions : INestedOptions /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// @@ -20,6 +26,9 @@ public class ProductDefaultPriceDataOptions : INestedOptions /// href="https://stripe.com/docs/currencies">supported currency. /// [JsonProperty("currency_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency_options")] +#endif public Dictionary CurrencyOptions { get; set; } /// @@ -27,12 +36,18 @@ public class ProductDefaultPriceDataOptions : INestedOptions /// Checkout Sessions and Payment Links. /// [JsonProperty("custom_unit_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("custom_unit_amount")] +#endif public ProductDefaultPriceDataCustomUnitAmountOptions CustomUnitAmount { get; set; } /// /// The recurring components of a price such as interval and interval_count. /// [JsonProperty("recurring")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("recurring")] +#endif public ProductDefaultPriceDataRecurringOptions Recurring { get; set; } /// @@ -45,6 +60,9 @@ public class ProductDefaultPriceDataOptions : INestedOptions /// One of: exclusive, inclusive, or unspecified. /// [JsonProperty("tax_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_behavior")] +#endif public string TaxBehavior { get; set; } /// @@ -53,6 +71,9 @@ public class ProductDefaultPriceDataOptions : INestedOptions /// custom_unit_amount is required. /// [JsonProperty("unit_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_amount")] +#endif public long? UnitAmount { get; set; } /// @@ -61,6 +82,9 @@ public class ProductDefaultPriceDataOptions : INestedOptions /// unit_amount_decimal can be set. /// [JsonProperty("unit_amount_decimal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_amount_decimal")] +#endif public decimal? UnitAmountDecimal { get; set; } } } diff --git a/src/Stripe.net/Services/Products/ProductDefaultPriceDataRecurringOptions.cs b/src/Stripe.net/Services/Products/ProductDefaultPriceDataRecurringOptions.cs index 7a08e6b1ce..de06fa2dba 100644 --- a/src/Stripe.net/Services/Products/ProductDefaultPriceDataRecurringOptions.cs +++ b/src/Stripe.net/Services/Products/ProductDefaultPriceDataRecurringOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ProductDefaultPriceDataRecurringOptions : INestedOptions { @@ -11,6 +14,9 @@ public class ProductDefaultPriceDataRecurringOptions : INestedOptions /// One of: day, month, week, or year. /// [JsonProperty("interval")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interval")] +#endif public string Interval { get; set; } /// @@ -19,6 +25,9 @@ public class ProductDefaultPriceDataRecurringOptions : INestedOptions /// years interval allowed (3 years, 36 months, or 156 weeks). /// [JsonProperty("interval_count")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interval_count")] +#endif public long? IntervalCount { get; set; } } } diff --git a/src/Stripe.net/Services/Products/ProductListOptions.cs b/src/Stripe.net/Services/Products/ProductListOptions.cs index 02492ebb84..008c8d1214 100644 --- a/src/Stripe.net/Services/Products/ProductListOptions.cs +++ b/src/Stripe.net/Services/Products/ProductListOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ProductListOptions : ListOptionsWithCreated { @@ -11,6 +14,9 @@ public class ProductListOptions : ListOptionsWithCreated /// inactive products). /// [JsonProperty("active")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("active")] +#endif public bool? Active { get; set; } /// @@ -19,12 +25,18 @@ public class ProductListOptions : ListOptionsWithCreated /// href="https://stripe.com/docs/api#list_products-ending_before">ending_before. /// [JsonProperty("ids")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ids")] +#endif public List Ids { get; set; } /// /// Only return products that can be shipped (i.e., physical, not digital products). /// [JsonProperty("shippable")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shippable")] +#endif public bool? Shippable { get; set; } /// @@ -32,12 +44,18 @@ public class ProductListOptions : ListOptionsWithCreated /// One of: good, or service. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } /// /// Only return products with the given url. /// [JsonProperty("url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("url")] +#endif public string Url { get; set; } } } diff --git a/src/Stripe.net/Services/Products/ProductMarketingFeatureOptions.cs b/src/Stripe.net/Services/Products/ProductMarketingFeatureOptions.cs index fa0e7a4bf5..9b5e82ad97 100644 --- a/src/Stripe.net/Services/Products/ProductMarketingFeatureOptions.cs +++ b/src/Stripe.net/Services/Products/ProductMarketingFeatureOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ProductMarketingFeatureOptions : INestedOptions { @@ -9,6 +12,9 @@ public class ProductMarketingFeatureOptions : INestedOptions /// The marketing feature name. Up to 80 characters long. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } } } diff --git a/src/Stripe.net/Services/Products/ProductPackageDimensionsOptions.cs b/src/Stripe.net/Services/Products/ProductPackageDimensionsOptions.cs index 8ed79fcc58..388d7c829d 100644 --- a/src/Stripe.net/Services/Products/ProductPackageDimensionsOptions.cs +++ b/src/Stripe.net/Services/Products/ProductPackageDimensionsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ProductPackageDimensionsOptions : INestedOptions { @@ -9,24 +12,36 @@ public class ProductPackageDimensionsOptions : INestedOptions /// Height, in inches. Maximum precision is 2 decimal places. /// [JsonProperty("height")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("height")] +#endif public decimal? Height { get; set; } /// /// Length, in inches. Maximum precision is 2 decimal places. /// [JsonProperty("length")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("length")] +#endif public decimal? Length { get; set; } /// /// Weight, in ounces. Maximum precision is 2 decimal places. /// [JsonProperty("weight")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("weight")] +#endif public decimal? Weight { get; set; } /// /// Width, in inches. Maximum precision is 2 decimal places. /// [JsonProperty("width")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("width")] +#endif public decimal? Width { get; set; } } } diff --git a/src/Stripe.net/Services/Products/ProductUpdateOptions.cs b/src/Stripe.net/Services/Products/ProductUpdateOptions.cs index c69869b292..a4879d7882 100644 --- a/src/Stripe.net/Services/Products/ProductUpdateOptions.cs +++ b/src/Stripe.net/Services/Products/ProductUpdateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ProductUpdateOptions : BaseOptions, IHasMetadata { @@ -10,6 +13,9 @@ public class ProductUpdateOptions : BaseOptions, IHasMetadata /// Whether the product is available for purchase. /// [JsonProperty("active")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("active")] +#endif public bool? Active { get; set; } /// @@ -17,6 +23,9 @@ public class ProductUpdateOptions : BaseOptions, IHasMetadata /// default price for this product. /// [JsonProperty("default_price")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("default_price")] +#endif public string DefaultPrice { get; set; } /// @@ -25,6 +34,9 @@ public class ProductUpdateOptions : BaseOptions, IHasMetadata /// rendering purposes. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// @@ -32,6 +44,9 @@ public class ProductUpdateOptions : BaseOptions, IHasMetadata /// customer. /// [JsonProperty("images")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("images")] +#endif public List Images { get; set; } /// @@ -39,6 +54,9 @@ public class ProductUpdateOptions : BaseOptions, IHasMetadata /// href="https://stripe.com/docs/payments/checkout/pricing-table">pricing tables. /// [JsonProperty("marketing_features")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("marketing_features")] +#endif public List MarketingFeatures { get; set; } /// @@ -48,24 +66,36 @@ public class ProductUpdateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// The product's name, meant to be displayable to the customer. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } /// /// The dimensions of this product for shipping purposes. /// [JsonProperty("package_dimensions")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("package_dimensions")] +#endif public ProductPackageDimensionsOptions PackageDimensions { get; set; } /// /// Whether this product is shipped (i.e., physical goods). /// [JsonProperty("shippable")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shippable")] +#endif public bool? Shippable { get; set; } /// @@ -80,12 +110,18 @@ public class ProductUpdateOptions : BaseOptions, IHasMetadata /// subscription payments. /// [JsonProperty("statement_descriptor")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("statement_descriptor")] +#endif public string StatementDescriptor { get; set; } /// /// A tax code ID. /// [JsonProperty("tax_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_code")] +#endif public string TaxCode { get; set; } /// @@ -94,12 +130,18 @@ public class ProductUpdateOptions : BaseOptions, IHasMetadata /// type=service. /// [JsonProperty("unit_label")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_label")] +#endif public string UnitLabel { get; set; } /// /// A URL of a publicly-accessible webpage for this product. /// [JsonProperty("url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("url")] +#endif public string Url { get; set; } } } diff --git a/src/Stripe.net/Services/PromotionCodes/PromotionCodeCreateOptions.cs b/src/Stripe.net/Services/PromotionCodes/PromotionCodeCreateOptions.cs index 68618f61a7..01dd544e8b 100644 --- a/src/Stripe.net/Services/PromotionCodes/PromotionCodeCreateOptions.cs +++ b/src/Stripe.net/Services/PromotionCodes/PromotionCodeCreateOptions.cs @@ -5,6 +5,9 @@ namespace Stripe using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PromotionCodeCreateOptions : BaseOptions, IHasMetadata { @@ -12,6 +15,9 @@ public class PromotionCodeCreateOptions : BaseOptions, IHasMetadata /// Whether the promotion code is currently active. /// [JsonProperty("active")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("active")] +#endif public bool? Active { get; set; } /// @@ -22,12 +28,18 @@ public class PromotionCodeCreateOptions : BaseOptions, IHasMetadata /// If left blank, we will generate one automatically. /// [JsonProperty("code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("code")] +#endif public string Code { get; set; } /// /// The coupon for this promotion code. /// [JsonProperty("coupon")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("coupon")] +#endif public string Coupon { get; set; } /// @@ -35,6 +47,9 @@ public class PromotionCodeCreateOptions : BaseOptions, IHasMetadata /// be used by all customers. /// [JsonProperty("customer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] +#endif public string Customer { get; set; } /// @@ -43,6 +58,10 @@ public class PromotionCodeCreateOptions : BaseOptions, IHasMetadata /// [JsonProperty("expires_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("expires_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? ExpiresAt { get; set; } /// @@ -51,6 +70,9 @@ public class PromotionCodeCreateOptions : BaseOptions, IHasMetadata /// than the coupon's max_redemptions. /// [JsonProperty("max_redemptions")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("max_redemptions")] +#endif public long? MaxRedemptions { get; set; } /// @@ -60,12 +82,18 @@ public class PromotionCodeCreateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// Settings that restrict the redemption of the promotion code. /// [JsonProperty("restrictions")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("restrictions")] +#endif public PromotionCodeRestrictionsOptions Restrictions { get; set; } } } diff --git a/src/Stripe.net/Services/PromotionCodes/PromotionCodeListOptions.cs b/src/Stripe.net/Services/PromotionCodes/PromotionCodeListOptions.cs index 5d1ea951bc..0eea40a486 100644 --- a/src/Stripe.net/Services/PromotionCodes/PromotionCodeListOptions.cs +++ b/src/Stripe.net/Services/PromotionCodes/PromotionCodeListOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PromotionCodeListOptions : ListOptionsWithCreated { @@ -9,24 +12,36 @@ public class PromotionCodeListOptions : ListOptionsWithCreated /// Filter promotion codes by whether they are active. /// [JsonProperty("active")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("active")] +#endif public bool? Active { get; set; } /// /// Only return promotion codes that have this case-insensitive code. /// [JsonProperty("code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("code")] +#endif public string Code { get; set; } /// /// Only return promotion codes for this coupon. /// [JsonProperty("coupon")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("coupon")] +#endif public string Coupon { get; set; } /// /// Only return promotion codes that are restricted to this customer. /// [JsonProperty("customer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] +#endif public string Customer { get; set; } } } diff --git a/src/Stripe.net/Services/PromotionCodes/PromotionCodeRestrictionsCurrencyOptionsOptions.cs b/src/Stripe.net/Services/PromotionCodes/PromotionCodeRestrictionsCurrencyOptionsOptions.cs index 421f32d4d5..504c8c4abd 100644 --- a/src/Stripe.net/Services/PromotionCodes/PromotionCodeRestrictionsCurrencyOptionsOptions.cs +++ b/src/Stripe.net/Services/PromotionCodes/PromotionCodeRestrictionsCurrencyOptionsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PromotionCodeRestrictionsCurrencyOptionsOptions : INestedOptions { @@ -10,6 +13,9 @@ public class PromotionCodeRestrictionsCurrencyOptionsOptions : INestedOptions /// must be $100 or more to work). /// [JsonProperty("minimum_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("minimum_amount")] +#endif public long? MinimumAmount { get; set; } } } diff --git a/src/Stripe.net/Services/PromotionCodes/PromotionCodeRestrictionsOptions.cs b/src/Stripe.net/Services/PromotionCodes/PromotionCodeRestrictionsOptions.cs index b68972d581..83933411a0 100644 --- a/src/Stripe.net/Services/PromotionCodes/PromotionCodeRestrictionsOptions.cs +++ b/src/Stripe.net/Services/PromotionCodes/PromotionCodeRestrictionsOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PromotionCodeRestrictionsOptions : INestedOptions { @@ -12,6 +15,9 @@ public class PromotionCodeRestrictionsOptions : INestedOptions /// code and a supported currency. /// [JsonProperty("currency_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency_options")] +#endif public Dictionary CurrencyOptions { get; set; } /// @@ -19,6 +25,9 @@ public class PromotionCodeRestrictionsOptions : INestedOptions /// any successful payments or invoices. /// [JsonProperty("first_time_transaction")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("first_time_transaction")] +#endif public bool? FirstTimeTransaction { get; set; } /// @@ -26,6 +35,9 @@ public class PromotionCodeRestrictionsOptions : INestedOptions /// must be $100 or more to work). /// [JsonProperty("minimum_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("minimum_amount")] +#endif public long? MinimumAmount { get; set; } /// @@ -33,6 +45,9 @@ public class PromotionCodeRestrictionsOptions : INestedOptions /// minimum_amount. /// [JsonProperty("minimum_amount_currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("minimum_amount_currency")] +#endif public string MinimumAmountCurrency { get; set; } } } diff --git a/src/Stripe.net/Services/PromotionCodes/PromotionCodeUpdateOptions.cs b/src/Stripe.net/Services/PromotionCodes/PromotionCodeUpdateOptions.cs index 40c7f648b5..012e18703a 100644 --- a/src/Stripe.net/Services/PromotionCodes/PromotionCodeUpdateOptions.cs +++ b/src/Stripe.net/Services/PromotionCodes/PromotionCodeUpdateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PromotionCodeUpdateOptions : BaseOptions, IHasMetadata { @@ -11,6 +14,9 @@ public class PromotionCodeUpdateOptions : BaseOptions, IHasMetadata /// when the coupon is still valid and the promotion code is otherwise redeemable. /// [JsonProperty("active")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("active")] +#endif public bool? Active { get; set; } /// @@ -20,12 +26,18 @@ public class PromotionCodeUpdateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// Settings that restrict the redemption of the promotion code. /// [JsonProperty("restrictions")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("restrictions")] +#endif public PromotionCodeRestrictionsOptions Restrictions { get; set; } } } diff --git a/src/Stripe.net/Services/Quotes/QuoteAutomaticTaxLiabilityOptions.cs b/src/Stripe.net/Services/Quotes/QuoteAutomaticTaxLiabilityOptions.cs index 2cdba77baf..6579a2d93a 100644 --- a/src/Stripe.net/Services/Quotes/QuoteAutomaticTaxLiabilityOptions.cs +++ b/src/Stripe.net/Services/Quotes/QuoteAutomaticTaxLiabilityOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class QuoteAutomaticTaxLiabilityOptions : INestedOptions { @@ -9,6 +12,9 @@ public class QuoteAutomaticTaxLiabilityOptions : INestedOptions /// The connected account being referenced when type is account. /// [JsonProperty("account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account")] +#endif public string Account { get; set; } /// @@ -16,6 +22,9 @@ public class QuoteAutomaticTaxLiabilityOptions : INestedOptions /// One of: account, or self. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Quotes/QuoteAutomaticTaxOptions.cs b/src/Stripe.net/Services/Quotes/QuoteAutomaticTaxOptions.cs index 4e14d15635..1fd5e825e0 100644 --- a/src/Stripe.net/Services/Quotes/QuoteAutomaticTaxOptions.cs +++ b/src/Stripe.net/Services/Quotes/QuoteAutomaticTaxOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class QuoteAutomaticTaxOptions : INestedOptions { @@ -10,6 +13,9 @@ public class QuoteAutomaticTaxOptions : INestedOptions /// subscriptions as well as the quote itself. /// [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool? Enabled { get; set; } /// @@ -18,6 +24,9 @@ public class QuoteAutomaticTaxOptions : INestedOptions /// transaction is returned in the report of the connected account. /// [JsonProperty("liability")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("liability")] +#endif public QuoteAutomaticTaxLiabilityOptions Liability { get; set; } } } diff --git a/src/Stripe.net/Services/Quotes/QuoteCreateOptions.cs b/src/Stripe.net/Services/Quotes/QuoteCreateOptions.cs index 2bcc1c45ba..c871f089cb 100644 --- a/src/Stripe.net/Services/Quotes/QuoteCreateOptions.cs +++ b/src/Stripe.net/Services/Quotes/QuoteCreateOptions.cs @@ -5,6 +5,9 @@ namespace Stripe using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class QuoteCreateOptions : BaseOptions, IHasMetadata { @@ -14,6 +17,9 @@ public class QuoteCreateOptions : BaseOptions, IHasMetadata /// line items with recurring prices when using this field. /// [JsonProperty("application_fee_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("application_fee_amount")] +#endif public long? ApplicationFeeAmount { get; set; } /// @@ -23,6 +29,9 @@ public class QuoteCreateOptions : BaseOptions, IHasMetadata /// recurring price to use this field. /// [JsonProperty("application_fee_percent")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("application_fee_percent")] +#endif public decimal? ApplicationFeePercent { get; set; } /// @@ -30,6 +39,9 @@ public class QuoteCreateOptions : BaseOptions, IHasMetadata /// subscriptions. /// [JsonProperty("automatic_tax")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("automatic_tax")] +#endif public QuoteAutomaticTaxOptions AutomaticTax { get; set; } /// @@ -42,6 +54,9 @@ public class QuoteCreateOptions : BaseOptions, IHasMetadata /// One of: charge_automatically, or send_invoice. /// [JsonProperty("collection_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("collection_method")] +#endif public string CollectionMethod { get; set; } /// @@ -49,12 +64,18 @@ public class QuoteCreateOptions : BaseOptions, IHasMetadata /// the quote. Once specified, it cannot be changed. /// [JsonProperty("customer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] +#endif public string Customer { get; set; } /// /// The tax rates that will apply to any line item that does not have tax_rates set. /// [JsonProperty("default_tax_rates")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("default_tax_rates")] +#endif public List DefaultTaxRates { get; set; } /// @@ -64,12 +85,18 @@ public class QuoteCreateOptions : BaseOptions, IHasMetadata /// will be used. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// /// The discounts applied to the quote. /// [JsonProperty("discounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discounts")] +#endif public List Discounts { get; set; } /// @@ -81,6 +108,10 @@ public class QuoteCreateOptions : BaseOptions, IHasMetadata /// [JsonProperty("expires_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("expires_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? ExpiresAt { get; set; } /// @@ -90,6 +121,9 @@ public class QuoteCreateOptions : BaseOptions, IHasMetadata /// will be used. /// [JsonProperty("footer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("footer")] +#endif public string Footer { get; set; } /// @@ -98,6 +132,9 @@ public class QuoteCreateOptions : BaseOptions, IHasMetadata /// expires_at. /// [JsonProperty("from_quote")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("from_quote")] +#endif public QuoteFromQuoteOptions FromQuote { get; set; } /// @@ -107,12 +144,18 @@ public class QuoteCreateOptions : BaseOptions, IHasMetadata /// will be used. /// [JsonProperty("header")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("header")] +#endif public string Header { get; set; } /// /// All invoices will be billed using the specified settings. /// [JsonProperty("invoice_settings")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("invoice_settings")] +#endif public QuoteInvoiceSettingsOptions InvoiceSettings { get; set; } /// @@ -120,6 +163,9 @@ public class QuoteCreateOptions : BaseOptions, IHasMetadata /// information about the product, the quantity, and the resulting cost. /// [JsonProperty("line_items")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("line_items")] +#endif public List LineItems { get; set; } /// @@ -129,12 +175,18 @@ public class QuoteCreateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// The account on behalf of which to charge. /// [JsonProperty("on_behalf_of")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("on_behalf_of")] +#endif public string OnBehalfOf { get; set; } /// @@ -145,18 +197,27 @@ public class QuoteCreateOptions : BaseOptions, IHasMetadata /// subscription is created. /// [JsonProperty("subscription_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("subscription_data")] +#endif public QuoteSubscriptionDataOptions SubscriptionData { get; set; } /// /// ID of the test clock to attach to the quote. /// [JsonProperty("test_clock")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("test_clock")] +#endif public string TestClock { get; set; } /// /// The data with which to automatically create a Transfer for each of the invoices. /// [JsonProperty("transfer_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transfer_data")] +#endif public QuoteTransferDataOptions TransferData { get; set; } } } diff --git a/src/Stripe.net/Services/Quotes/QuoteDiscountOptions.cs b/src/Stripe.net/Services/Quotes/QuoteDiscountOptions.cs index 7df91df249..0bf8666cfc 100644 --- a/src/Stripe.net/Services/Quotes/QuoteDiscountOptions.cs +++ b/src/Stripe.net/Services/Quotes/QuoteDiscountOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class QuoteDiscountOptions : INestedOptions { @@ -9,18 +12,27 @@ public class QuoteDiscountOptions : INestedOptions /// ID of the coupon to create a new discount for. /// [JsonProperty("coupon")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("coupon")] +#endif public string Coupon { get; set; } /// /// ID of an existing discount on the object (or one of its ancestors) to reuse. /// [JsonProperty("discount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discount")] +#endif public string Discount { get; set; } /// /// ID of the promotion code to create a new discount for. /// [JsonProperty("promotion_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("promotion_code")] +#endif public string PromotionCode { get; set; } } } diff --git a/src/Stripe.net/Services/Quotes/QuoteFinalizeOptions.cs b/src/Stripe.net/Services/Quotes/QuoteFinalizeOptions.cs index b7d7ee0553..b40bbdec87 100644 --- a/src/Stripe.net/Services/Quotes/QuoteFinalizeOptions.cs +++ b/src/Stripe.net/Services/Quotes/QuoteFinalizeOptions.cs @@ -4,6 +4,9 @@ namespace Stripe using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class QuoteFinalizeOptions : BaseOptions { @@ -13,6 +16,10 @@ public class QuoteFinalizeOptions : BaseOptions /// [JsonProperty("expires_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("expires_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? ExpiresAt { get; set; } } } diff --git a/src/Stripe.net/Services/Quotes/QuoteFromQuoteOptions.cs b/src/Stripe.net/Services/Quotes/QuoteFromQuoteOptions.cs index faeb4b6185..8802e36e01 100644 --- a/src/Stripe.net/Services/Quotes/QuoteFromQuoteOptions.cs +++ b/src/Stripe.net/Services/Quotes/QuoteFromQuoteOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class QuoteFromQuoteOptions : INestedOptions { @@ -9,12 +12,18 @@ public class QuoteFromQuoteOptions : INestedOptions /// Whether this quote is a revision of the previous quote. /// [JsonProperty("is_revision")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("is_revision")] +#endif public bool? IsRevision { get; set; } /// /// The id of the quote that will be cloned. /// [JsonProperty("quote")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("quote")] +#endif public string Quote { get; set; } } } diff --git a/src/Stripe.net/Services/Quotes/QuoteInvoiceSettingsIssuerOptions.cs b/src/Stripe.net/Services/Quotes/QuoteInvoiceSettingsIssuerOptions.cs index d4cc9351a7..5ea3787a37 100644 --- a/src/Stripe.net/Services/Quotes/QuoteInvoiceSettingsIssuerOptions.cs +++ b/src/Stripe.net/Services/Quotes/QuoteInvoiceSettingsIssuerOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class QuoteInvoiceSettingsIssuerOptions : INestedOptions { @@ -9,6 +12,9 @@ public class QuoteInvoiceSettingsIssuerOptions : INestedOptions /// The connected account being referenced when type is account. /// [JsonProperty("account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account")] +#endif public string Account { get; set; } /// @@ -16,6 +22,9 @@ public class QuoteInvoiceSettingsIssuerOptions : INestedOptions /// One of: account, or self. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Quotes/QuoteInvoiceSettingsOptions.cs b/src/Stripe.net/Services/Quotes/QuoteInvoiceSettingsOptions.cs index ef5e5ff798..eb62470e09 100644 --- a/src/Stripe.net/Services/Quotes/QuoteInvoiceSettingsOptions.cs +++ b/src/Stripe.net/Services/Quotes/QuoteInvoiceSettingsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class QuoteInvoiceSettingsOptions : INestedOptions { @@ -11,6 +14,9 @@ public class QuoteInvoiceSettingsOptions : INestedOptions /// collection_method=charge_automatically. /// [JsonProperty("days_until_due")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("days_until_due")] +#endif public long? DaysUntilDue { get; set; } /// @@ -18,6 +24,9 @@ public class QuoteInvoiceSettingsOptions : INestedOptions /// branding and support information of the specified account. /// [JsonProperty("issuer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("issuer")] +#endif public QuoteInvoiceSettingsIssuerOptions Issuer { get; set; } } } diff --git a/src/Stripe.net/Services/Quotes/QuoteLineItemDiscountOptions.cs b/src/Stripe.net/Services/Quotes/QuoteLineItemDiscountOptions.cs index dab79368b3..9fec5a5707 100644 --- a/src/Stripe.net/Services/Quotes/QuoteLineItemDiscountOptions.cs +++ b/src/Stripe.net/Services/Quotes/QuoteLineItemDiscountOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class QuoteLineItemDiscountOptions : INestedOptions { @@ -9,18 +12,27 @@ public class QuoteLineItemDiscountOptions : INestedOptions /// ID of the coupon to create a new discount for. /// [JsonProperty("coupon")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("coupon")] +#endif public string Coupon { get; set; } /// /// ID of an existing discount on the object (or one of its ancestors) to reuse. /// [JsonProperty("discount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discount")] +#endif public string Discount { get; set; } /// /// ID of the promotion code to create a new discount for. /// [JsonProperty("promotion_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("promotion_code")] +#endif public string PromotionCode { get; set; } } } diff --git a/src/Stripe.net/Services/Quotes/QuoteLineItemOptions.cs b/src/Stripe.net/Services/Quotes/QuoteLineItemOptions.cs index 397f798694..fe5fcc55fe 100644 --- a/src/Stripe.net/Services/Quotes/QuoteLineItemOptions.cs +++ b/src/Stripe.net/Services/Quotes/QuoteLineItemOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class QuoteLineItemOptions : INestedOptions, IHasId { @@ -10,18 +13,27 @@ public class QuoteLineItemOptions : INestedOptions, IHasId /// The discounts applied to this line item. /// [JsonProperty("discounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discounts")] +#endif public List Discounts { get; set; } /// /// The ID of an existing line item on the quote. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// /// The ID of the price object. One of price or price_data is required. /// [JsonProperty("price")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("price")] +#endif public string Price { get; set; } /// @@ -29,12 +41,18 @@ public class QuoteLineItemOptions : INestedOptions, IHasId /// object inline. One of price or price_data is required. /// [JsonProperty("price_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("price_data")] +#endif public QuoteLineItemPriceDataOptions PriceData { get; set; } /// /// The quantity of the line item. /// [JsonProperty("quantity")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("quantity")] +#endif public long? Quantity { get; set; } /// @@ -42,6 +60,9 @@ public class QuoteLineItemOptions : INestedOptions, IHasId /// the quote do not apply to this line item. /// [JsonProperty("tax_rates")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_rates")] +#endif public List TaxRates { get; set; } } } diff --git a/src/Stripe.net/Services/Quotes/QuoteLineItemPriceDataOptions.cs b/src/Stripe.net/Services/Quotes/QuoteLineItemPriceDataOptions.cs index 14f4bc2d03..00dfe349a1 100644 --- a/src/Stripe.net/Services/Quotes/QuoteLineItemPriceDataOptions.cs +++ b/src/Stripe.net/Services/Quotes/QuoteLineItemPriceDataOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class QuoteLineItemPriceDataOptions : INestedOptions { @@ -11,18 +14,27 @@ public class QuoteLineItemPriceDataOptions : INestedOptions /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// /// The ID of the product that this price will belong to. /// [JsonProperty("product")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("product")] +#endif public string Product { get; set; } /// /// The recurring components of a price such as interval and interval_count. /// [JsonProperty("recurring")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("recurring")] +#endif public QuoteLineItemPriceDataRecurringOptions Recurring { get; set; } /// @@ -35,6 +47,9 @@ public class QuoteLineItemPriceDataOptions : INestedOptions /// One of: exclusive, inclusive, or unspecified. /// [JsonProperty("tax_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_behavior")] +#endif public string TaxBehavior { get; set; } /// @@ -42,6 +57,9 @@ public class QuoteLineItemPriceDataOptions : INestedOptions /// how much to charge. /// [JsonProperty("unit_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_amount")] +#endif public long? UnitAmount { get; set; } /// @@ -50,6 +68,9 @@ public class QuoteLineItemPriceDataOptions : INestedOptions /// unit_amount_decimal can be set. /// [JsonProperty("unit_amount_decimal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_amount_decimal")] +#endif public decimal? UnitAmountDecimal { get; set; } } } diff --git a/src/Stripe.net/Services/Quotes/QuoteLineItemPriceDataRecurringOptions.cs b/src/Stripe.net/Services/Quotes/QuoteLineItemPriceDataRecurringOptions.cs index 1159629049..7c1bd5834b 100644 --- a/src/Stripe.net/Services/Quotes/QuoteLineItemPriceDataRecurringOptions.cs +++ b/src/Stripe.net/Services/Quotes/QuoteLineItemPriceDataRecurringOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class QuoteLineItemPriceDataRecurringOptions : INestedOptions { @@ -11,6 +14,9 @@ public class QuoteLineItemPriceDataRecurringOptions : INestedOptions /// One of: day, month, week, or year. /// [JsonProperty("interval")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interval")] +#endif public string Interval { get; set; } /// @@ -19,6 +25,9 @@ public class QuoteLineItemPriceDataRecurringOptions : INestedOptions /// years interval allowed (3 years, 36 months, or 156 weeks). /// [JsonProperty("interval_count")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interval_count")] +#endif public long? IntervalCount { get; set; } } } diff --git a/src/Stripe.net/Services/Quotes/QuoteListOptions.cs b/src/Stripe.net/Services/Quotes/QuoteListOptions.cs index f1e8f1fb63..b7104f7215 100644 --- a/src/Stripe.net/Services/Quotes/QuoteListOptions.cs +++ b/src/Stripe.net/Services/Quotes/QuoteListOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class QuoteListOptions : ListOptions { @@ -9,6 +12,9 @@ public class QuoteListOptions : ListOptions /// The ID of the customer whose quotes will be retrieved. /// [JsonProperty("customer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] +#endif public string Customer { get; set; } /// @@ -16,6 +22,9 @@ public class QuoteListOptions : ListOptions /// One of: accepted, canceled, draft, or open. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } /// @@ -24,6 +33,9 @@ public class QuoteListOptions : ListOptions /// not set. /// [JsonProperty("test_clock")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("test_clock")] +#endif public string TestClock { get; set; } } } diff --git a/src/Stripe.net/Services/Quotes/QuoteSubscriptionDataOptions.cs b/src/Stripe.net/Services/Quotes/QuoteSubscriptionDataOptions.cs index 4497e67108..5285852a96 100644 --- a/src/Stripe.net/Services/Quotes/QuoteSubscriptionDataOptions.cs +++ b/src/Stripe.net/Services/Quotes/QuoteSubscriptionDataOptions.cs @@ -5,6 +5,9 @@ namespace Stripe using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class QuoteSubscriptionDataOptions : INestedOptions, IHasMetadata { @@ -14,6 +17,9 @@ public class QuoteSubscriptionDataOptions : INestedOptions, IHasMetadata /// and certain local payment methods UIs. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// @@ -26,6 +32,10 @@ public class QuoteSubscriptionDataOptions : INestedOptions, IHasMetadata /// [JsonProperty("effective_date")] [JsonConverter(typeof(AnyOfConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("effective_date")] + [STJS.JsonConverter(typeof(STJAnyOfConverter))] +#endif public AnyOf EffectiveDate { get; set; } /// @@ -38,6 +48,9 @@ public class QuoteSubscriptionDataOptions : INestedOptions, IHasMetadata /// metadata, this field is declarative. Updates will clear prior values. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -45,6 +58,9 @@ public class QuoteSubscriptionDataOptions : INestedOptions, IHasMetadata /// the first time. /// [JsonProperty("trial_period_days")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("trial_period_days")] +#endif public long? TrialPeriodDays { get; set; } } } diff --git a/src/Stripe.net/Services/Quotes/QuoteTransferDataOptions.cs b/src/Stripe.net/Services/Quotes/QuoteTransferDataOptions.cs index 053f20e6ee..1e912081e7 100644 --- a/src/Stripe.net/Services/Quotes/QuoteTransferDataOptions.cs +++ b/src/Stripe.net/Services/Quotes/QuoteTransferDataOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class QuoteTransferDataOptions : INestedOptions { @@ -11,6 +14,9 @@ public class QuoteTransferDataOptions : INestedOptions /// prices when using this field. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long? Amount { get; set; } /// @@ -21,12 +27,18 @@ public class QuoteTransferDataOptions : INestedOptions /// field. /// [JsonProperty("amount_percent")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_percent")] +#endif public decimal? AmountPercent { get; set; } /// /// ID of an existing, connected Stripe account. /// [JsonProperty("destination")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("destination")] +#endif public string Destination { get; set; } } } diff --git a/src/Stripe.net/Services/Quotes/QuoteUpdateOptions.cs b/src/Stripe.net/Services/Quotes/QuoteUpdateOptions.cs index fd5f5f7d3c..448b53d71d 100644 --- a/src/Stripe.net/Services/Quotes/QuoteUpdateOptions.cs +++ b/src/Stripe.net/Services/Quotes/QuoteUpdateOptions.cs @@ -5,6 +5,9 @@ namespace Stripe using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class QuoteUpdateOptions : BaseOptions, IHasMetadata { @@ -14,6 +17,9 @@ public class QuoteUpdateOptions : BaseOptions, IHasMetadata /// line items with recurring prices when using this field. /// [JsonProperty("application_fee_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("application_fee_amount")] +#endif public long? ApplicationFeeAmount { get; set; } /// @@ -23,6 +29,9 @@ public class QuoteUpdateOptions : BaseOptions, IHasMetadata /// recurring price to use this field. /// [JsonProperty("application_fee_percent")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("application_fee_percent")] +#endif public decimal? ApplicationFeePercent { get; set; } /// @@ -30,6 +39,9 @@ public class QuoteUpdateOptions : BaseOptions, IHasMetadata /// subscriptions. /// [JsonProperty("automatic_tax")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("automatic_tax")] +#endif public QuoteAutomaticTaxOptions AutomaticTax { get; set; } /// @@ -42,6 +54,9 @@ public class QuoteUpdateOptions : BaseOptions, IHasMetadata /// One of: charge_automatically, or send_invoice. /// [JsonProperty("collection_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("collection_method")] +#endif public string CollectionMethod { get; set; } /// @@ -49,24 +64,36 @@ public class QuoteUpdateOptions : BaseOptions, IHasMetadata /// the quote. Once specified, it cannot be changed. /// [JsonProperty("customer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] +#endif public string Customer { get; set; } /// /// The tax rates that will apply to any line item that does not have tax_rates set. /// [JsonProperty("default_tax_rates")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("default_tax_rates")] +#endif public List DefaultTaxRates { get; set; } /// /// A description that will be displayed on the quote PDF. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// /// The discounts applied to the quote. /// [JsonProperty("discounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discounts")] +#endif public List Discounts { get; set; } /// @@ -75,24 +102,37 @@ public class QuoteUpdateOptions : BaseOptions, IHasMetadata /// [JsonProperty("expires_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("expires_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? ExpiresAt { get; set; } /// /// A footer that will be displayed on the quote PDF. /// [JsonProperty("footer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("footer")] +#endif public string Footer { get; set; } /// /// A header that will be displayed on the quote PDF. /// [JsonProperty("header")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("header")] +#endif public string Header { get; set; } /// /// All invoices will be billed using the specified settings. /// [JsonProperty("invoice_settings")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("invoice_settings")] +#endif public QuoteInvoiceSettingsOptions InvoiceSettings { get; set; } /// @@ -100,6 +140,9 @@ public class QuoteUpdateOptions : BaseOptions, IHasMetadata /// information about the product, the quantity, and the resulting cost. /// [JsonProperty("line_items")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("line_items")] +#endif public List LineItems { get; set; } /// @@ -109,12 +152,18 @@ public class QuoteUpdateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// The account on behalf of which to charge. /// [JsonProperty("on_behalf_of")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("on_behalf_of")] +#endif public string OnBehalfOf { get; set; } /// @@ -125,12 +174,18 @@ public class QuoteUpdateOptions : BaseOptions, IHasMetadata /// subscription is created. /// [JsonProperty("subscription_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("subscription_data")] +#endif public QuoteSubscriptionDataOptions SubscriptionData { get; set; } /// /// The data with which to automatically create a Transfer for each of the invoices. /// [JsonProperty("transfer_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transfer_data")] +#endif public QuoteTransferDataOptions TransferData { get; set; } } } diff --git a/src/Stripe.net/Services/Radar/EarlyFraudWarnings/EarlyFraudWarningListOptions.cs b/src/Stripe.net/Services/Radar/EarlyFraudWarnings/EarlyFraudWarningListOptions.cs index b4ada0380b..ab86df6054 100644 --- a/src/Stripe.net/Services/Radar/EarlyFraudWarnings/EarlyFraudWarningListOptions.cs +++ b/src/Stripe.net/Services/Radar/EarlyFraudWarnings/EarlyFraudWarningListOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Radar { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class EarlyFraudWarningListOptions : ListOptionsWithCreated { @@ -9,6 +12,9 @@ public class EarlyFraudWarningListOptions : ListOptionsWithCreated /// Only return early fraud warnings for the charge specified by this charge ID. /// [JsonProperty("charge")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("charge")] +#endif public string Charge { get; set; } /// @@ -16,6 +22,9 @@ public class EarlyFraudWarningListOptions : ListOptionsWithCreated /// specified by this PaymentIntent ID. /// [JsonProperty("payment_intent")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_intent")] +#endif public string PaymentIntent { get; set; } } } diff --git a/src/Stripe.net/Services/Radar/ValueListItems/ValueListItemCreateOptions.cs b/src/Stripe.net/Services/Radar/ValueListItems/ValueListItemCreateOptions.cs index 961d6c3f88..6933b31322 100644 --- a/src/Stripe.net/Services/Radar/ValueListItems/ValueListItemCreateOptions.cs +++ b/src/Stripe.net/Services/Radar/ValueListItems/ValueListItemCreateOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Radar { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ValueListItemCreateOptions : BaseOptions { @@ -9,12 +12,18 @@ public class ValueListItemCreateOptions : BaseOptions /// The value of the item (whose type must match the type of the parent value list). /// [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public string Value { get; set; } /// /// The identifier of the value list which the created item will be added to. /// [JsonProperty("value_list")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value_list")] +#endif public string ValueList { get; set; } } } diff --git a/src/Stripe.net/Services/Radar/ValueListItems/ValueListItemListOptions.cs b/src/Stripe.net/Services/Radar/ValueListItems/ValueListItemListOptions.cs index 310db24c36..74b17fea05 100644 --- a/src/Stripe.net/Services/Radar/ValueListItems/ValueListItemListOptions.cs +++ b/src/Stripe.net/Services/Radar/ValueListItems/ValueListItemListOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Radar { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ValueListItemListOptions : ListOptionsWithCreated { @@ -10,12 +13,18 @@ public class ValueListItemListOptions : ListOptionsWithCreated /// an "is like" match). /// [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public string Value { get; set; } /// /// Identifier for the parent value list this item belongs to. /// [JsonProperty("value_list")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value_list")] +#endif public string ValueList { get; set; } } } diff --git a/src/Stripe.net/Services/Radar/ValueLists/ValueListCreateOptions.cs b/src/Stripe.net/Services/Radar/ValueLists/ValueListCreateOptions.cs index 3e50d0ccfd..016082f5fa 100644 --- a/src/Stripe.net/Services/Radar/ValueLists/ValueListCreateOptions.cs +++ b/src/Stripe.net/Services/Radar/ValueLists/ValueListCreateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.Radar { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ValueListCreateOptions : BaseOptions, IHasMetadata { @@ -10,6 +13,9 @@ public class ValueListCreateOptions : BaseOptions, IHasMetadata /// The name of the value list for use in rules. /// [JsonProperty("alias")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("alias")] +#endif public string Alias { get; set; } /// @@ -23,6 +29,9 @@ public class ValueListCreateOptions : BaseOptions, IHasMetadata /// sepa_debit_fingerprint, string, or us_bank_account_fingerprint. /// [JsonProperty("item_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("item_type")] +#endif public string ItemType { get; set; } /// @@ -32,12 +41,18 @@ public class ValueListCreateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// The human-readable name of the value list. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } } } diff --git a/src/Stripe.net/Services/Radar/ValueLists/ValueListListOptions.cs b/src/Stripe.net/Services/Radar/ValueLists/ValueListListOptions.cs index 05cb4a6205..401f15b086 100644 --- a/src/Stripe.net/Services/Radar/ValueLists/ValueListListOptions.cs +++ b/src/Stripe.net/Services/Radar/ValueLists/ValueListListOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Radar { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ValueListListOptions : ListOptionsWithCreated { @@ -9,12 +12,18 @@ public class ValueListListOptions : ListOptionsWithCreated /// The alias used to reference the value list when writing rules. /// [JsonProperty("alias")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("alias")] +#endif public string Alias { get; set; } /// /// A value contained within a value list - returns all value lists containing this value. /// [JsonProperty("contains")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("contains")] +#endif public string Contains { get; set; } } } diff --git a/src/Stripe.net/Services/Radar/ValueLists/ValueListUpdateOptions.cs b/src/Stripe.net/Services/Radar/ValueLists/ValueListUpdateOptions.cs index 2e53f108f2..0ed4912cc5 100644 --- a/src/Stripe.net/Services/Radar/ValueLists/ValueListUpdateOptions.cs +++ b/src/Stripe.net/Services/Radar/ValueLists/ValueListUpdateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.Radar { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ValueListUpdateOptions : BaseOptions, IHasMetadata { @@ -10,6 +13,9 @@ public class ValueListUpdateOptions : BaseOptions, IHasMetadata /// The name of the value list for use in rules. /// [JsonProperty("alias")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("alias")] +#endif public string Alias { get; set; } /// @@ -19,12 +25,18 @@ public class ValueListUpdateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// The human-readable name of the value list. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } } } diff --git a/src/Stripe.net/Services/Refunds/RefundCreateOptions.cs b/src/Stripe.net/Services/Refunds/RefundCreateOptions.cs index f291b9a360..b5abcecbd7 100644 --- a/src/Stripe.net/Services/Refunds/RefundCreateOptions.cs +++ b/src/Stripe.net/Services/Refunds/RefundCreateOptions.cs @@ -3,16 +3,25 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RefundCreateOptions : BaseOptions, IHasMetadata { [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long? Amount { get; set; } /// /// The identifier of the charge to refund. /// [JsonProperty("charge")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("charge")] +#endif public string Charge { get; set; } /// @@ -21,12 +30,18 @@ public class RefundCreateOptions : BaseOptions, IHasMetadata /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// /// Customer whose customer balance to refund from. /// [JsonProperty("customer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] +#endif public string Customer { get; set; } /// @@ -34,6 +49,9 @@ public class RefundCreateOptions : BaseOptions, IHasMetadata /// email from the customer to receive refund instructions. /// [JsonProperty("instructions_email")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("instructions_email")] +#endif public string InstructionsEmail { get; set; } /// @@ -43,18 +61,27 @@ public class RefundCreateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// Origin of the refund. /// [JsonProperty("origin")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("origin")] +#endif public string Origin { get; set; } /// /// The identifier of the PaymentIntent to refund. /// [JsonProperty("payment_intent")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_intent")] +#endif public string PaymentIntent { get; set; } /// @@ -66,6 +93,9 @@ public class RefundCreateOptions : BaseOptions, IHasMetadata /// One of: duplicate, fraudulent, or requested_by_customer. /// [JsonProperty("reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reason")] +#endif public string Reason { get; set; } /// @@ -76,6 +106,9 @@ public class RefundCreateOptions : BaseOptions, IHasMetadata /// created the charge. /// [JsonProperty("refund_application_fee")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("refund_application_fee")] +#endif public bool? RefundApplicationFee { get; set; } /// @@ -85,6 +118,9 @@ public class RefundCreateOptions : BaseOptions, IHasMetadata /// that created the charge. /// [JsonProperty("reverse_transfer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reverse_transfer")] +#endif public bool? ReverseTransfer { get; set; } } } diff --git a/src/Stripe.net/Services/Refunds/RefundListOptions.cs b/src/Stripe.net/Services/Refunds/RefundListOptions.cs index a2f09bdf3a..4b765c864d 100644 --- a/src/Stripe.net/Services/Refunds/RefundListOptions.cs +++ b/src/Stripe.net/Services/Refunds/RefundListOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RefundListOptions : ListOptionsWithCreated { @@ -9,12 +12,18 @@ public class RefundListOptions : ListOptionsWithCreated /// Only return refunds for the charge specified by this charge ID. /// [JsonProperty("charge")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("charge")] +#endif public string Charge { get; set; } /// /// Only return refunds for the PaymentIntent specified by this ID. /// [JsonProperty("payment_intent")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_intent")] +#endif public string PaymentIntent { get; set; } } } diff --git a/src/Stripe.net/Services/Refunds/RefundUpdateOptions.cs b/src/Stripe.net/Services/Refunds/RefundUpdateOptions.cs index c090fa8598..620b86c753 100644 --- a/src/Stripe.net/Services/Refunds/RefundUpdateOptions.cs +++ b/src/Stripe.net/Services/Refunds/RefundUpdateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RefundUpdateOptions : BaseOptions, IHasMetadata { @@ -13,6 +16,9 @@ public class RefundUpdateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } } } diff --git a/src/Stripe.net/Services/Reporting/ReportRuns/ReportRunCreateOptions.cs b/src/Stripe.net/Services/Reporting/ReportRuns/ReportRunCreateOptions.cs index f6d66e23c9..8d1ce641b1 100644 --- a/src/Stripe.net/Services/Reporting/ReportRuns/ReportRunCreateOptions.cs +++ b/src/Stripe.net/Services/Reporting/ReportRuns/ReportRunCreateOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Reporting { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ReportRunCreateOptions : BaseOptions { @@ -12,6 +15,9 @@ public class ReportRunCreateOptions : BaseOptions /// documentation. /// [JsonProperty("parameters")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("parameters")] +#endif public ReportRunParametersOptions Parameters { get; set; } /// @@ -20,6 +26,9 @@ public class ReportRunCreateOptions : BaseOptions /// run, such as "balance.summary.1". /// [JsonProperty("report_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("report_type")] +#endif public string ReportType { get; set; } } } diff --git a/src/Stripe.net/Services/Reporting/ReportRuns/ReportRunParametersOptions.cs b/src/Stripe.net/Services/Reporting/ReportRuns/ReportRunParametersOptions.cs index c10964cab2..f7a1707d0c 100644 --- a/src/Stripe.net/Services/Reporting/ReportRuns/ReportRunParametersOptions.cs +++ b/src/Stripe.net/Services/Reporting/ReportRuns/ReportRunParametersOptions.cs @@ -5,6 +5,9 @@ namespace Stripe.Reporting using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ReportRunParametersOptions : INestedOptions { @@ -13,18 +16,27 @@ public class ReportRunParametersOptions : INestedOptions /// is run with its default column set. /// [JsonProperty("columns")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("columns")] +#endif public List Columns { get; set; } /// /// Connected account ID to filter for in the report run. /// [JsonProperty("connected_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("connected_account")] +#endif public string ConnectedAccount { get; set; } /// /// Currency of objects to be included in the report run. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// @@ -32,6 +44,10 @@ public class ReportRunParametersOptions : INestedOptions /// [JsonProperty("interval_end")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interval_end")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? IntervalEnd { get; set; } /// @@ -39,12 +55,19 @@ public class ReportRunParametersOptions : INestedOptions /// [JsonProperty("interval_start")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interval_start")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? IntervalStart { get; set; } /// /// Payout ID by which to filter the report run. /// [JsonProperty("payout")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payout")] +#endif public string Payout { get; set; } /// @@ -65,6 +88,9 @@ public class ReportRunParametersOptions : INestedOptions /// unreconciled_customer_funds. /// [JsonProperty("reporting_category")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reporting_category")] +#endif public string ReportingCategory { get; set; } /// @@ -257,6 +283,9 @@ public class ReportRunParametersOptions : INestedOptions /// US/Samoa, UTC, Universal, W-SU, WET, or Zulu. /// [JsonProperty("timezone")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("timezone")] +#endif public string Timezone { get; set; } } } diff --git a/src/Stripe.net/Services/SetupAttempts/SetupAttemptListOptions.cs b/src/Stripe.net/Services/SetupAttempts/SetupAttemptListOptions.cs index 738397aa00..be5b950fe0 100644 --- a/src/Stripe.net/Services/SetupAttempts/SetupAttemptListOptions.cs +++ b/src/Stripe.net/Services/SetupAttempts/SetupAttemptListOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SetupAttemptListOptions : ListOptionsWithCreated { @@ -9,6 +12,9 @@ public class SetupAttemptListOptions : ListOptionsWithCreated /// Only return SetupAttempts created by the SetupIntent specified by this ID. /// [JsonProperty("setup_intent")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_intent")] +#endif public string SetupIntent { get; set; } } } diff --git a/src/Stripe.net/Services/SetupIntents/SetupIntentAutomaticPaymentMethodsOptions.cs b/src/Stripe.net/Services/SetupIntents/SetupIntentAutomaticPaymentMethodsOptions.cs index 4862e06d83..4d55ba22f9 100644 --- a/src/Stripe.net/Services/SetupIntents/SetupIntentAutomaticPaymentMethodsOptions.cs +++ b/src/Stripe.net/Services/SetupIntents/SetupIntentAutomaticPaymentMethodsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SetupIntentAutomaticPaymentMethodsOptions : INestedOptions { @@ -16,12 +19,18 @@ public class SetupIntentAutomaticPaymentMethodsOptions : INestedOptions /// One of: always, or never. /// [JsonProperty("allow_redirects")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("allow_redirects")] +#endif public string AllowRedirects { get; set; } /// /// Whether this feature is enabled. /// [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool? Enabled { get; set; } } } diff --git a/src/Stripe.net/Services/SetupIntents/SetupIntentCancelOptions.cs b/src/Stripe.net/Services/SetupIntents/SetupIntentCancelOptions.cs index 9390502d6e..db430d3e89 100644 --- a/src/Stripe.net/Services/SetupIntents/SetupIntentCancelOptions.cs +++ b/src/Stripe.net/Services/SetupIntents/SetupIntentCancelOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SetupIntentCancelOptions : BaseOptions { @@ -11,6 +14,9 @@ public class SetupIntentCancelOptions : BaseOptions /// One of: abandoned, duplicate, or requested_by_customer. /// [JsonProperty("cancellation_reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cancellation_reason")] +#endif public string CancellationReason { get; set; } } } diff --git a/src/Stripe.net/Services/SetupIntents/SetupIntentConfirmOptions.cs b/src/Stripe.net/Services/SetupIntents/SetupIntentConfirmOptions.cs index fe6d0af5ba..d959d03cd3 100644 --- a/src/Stripe.net/Services/SetupIntents/SetupIntentConfirmOptions.cs +++ b/src/Stripe.net/Services/SetupIntents/SetupIntentConfirmOptions.cs @@ -2,10 +2,16 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SetupIntentConfirmOptions : BaseOptions { [JsonProperty("client_secret")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("client_secret")] +#endif public string ClientSecret { get; set; } /// @@ -16,9 +22,15 @@ public class SetupIntentConfirmOptions : BaseOptions /// precedence. /// [JsonProperty("confirmation_token")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("confirmation_token")] +#endif public string ConfirmationToken { get; set; } [JsonProperty("mandate_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mandate_data")] +#endif public SetupIntentMandateDataOptions MandateData { get; set; } /// @@ -26,6 +38,9 @@ public class SetupIntentConfirmOptions : BaseOptions /// this SetupIntent. /// [JsonProperty("payment_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method")] +#endif public string PaymentMethod { get; set; } /// @@ -34,12 +49,18 @@ public class SetupIntentConfirmOptions : BaseOptions /// value in the SetupIntent. /// [JsonProperty("payment_method_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_data")] +#endif public SetupIntentPaymentMethodDataOptions PaymentMethodData { get; set; } /// /// Payment method-specific configuration for this SetupIntent. /// [JsonProperty("payment_method_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_options")] +#endif public SetupIntentPaymentMethodOptionsOptions PaymentMethodOptions { get; set; } /// @@ -49,6 +70,9 @@ public class SetupIntentConfirmOptions : BaseOptions /// and other redirect-based payment methods. /// [JsonProperty("return_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("return_url")] +#endif public string ReturnUrl { get; set; } /// @@ -56,6 +80,9 @@ public class SetupIntentConfirmOptions : BaseOptions /// client-side SDKs to handle the next actions. /// [JsonProperty("use_stripe_sdk")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("use_stripe_sdk")] +#endif public bool? UseStripeSdk { get; set; } } } diff --git a/src/Stripe.net/Services/SetupIntents/SetupIntentCreateOptions.cs b/src/Stripe.net/Services/SetupIntents/SetupIntentCreateOptions.cs index 5f301f18b4..638843e87a 100644 --- a/src/Stripe.net/Services/SetupIntents/SetupIntentCreateOptions.cs +++ b/src/Stripe.net/Services/SetupIntents/SetupIntentCreateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SetupIntentCreateOptions : BaseOptions, IHasMetadata { @@ -16,6 +19,9 @@ public class SetupIntentCreateOptions : BaseOptions, IHasMetadata /// Customer. /// [JsonProperty("attach_to_self")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("attach_to_self")] +#endif public bool? AttachToSelf { get; set; } /// @@ -23,6 +29,9 @@ public class SetupIntentCreateOptions : BaseOptions, IHasMetadata /// in the Dashboard and that are compatible with its other parameters. /// [JsonProperty("automatic_payment_methods")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("automatic_payment_methods")] +#endif public SetupIntentAutomaticPaymentMethodsOptions AutomaticPaymentMethods { get; set; } /// @@ -31,6 +40,9 @@ public class SetupIntentCreateOptions : BaseOptions, IHasMetadata /// return_url in case further authentication is necessary. /// [JsonProperty("confirm")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("confirm")] +#endif public bool? Confirm { get; set; } /// @@ -41,6 +53,9 @@ public class SetupIntentCreateOptions : BaseOptions, IHasMetadata /// precedence. /// [JsonProperty("confirmation_token")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("confirmation_token")] +#endif public string ConfirmationToken { get; set; } /// @@ -51,12 +66,18 @@ public class SetupIntentCreateOptions : BaseOptions, IHasMetadata /// SetupIntent. /// [JsonProperty("customer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] +#endif public string Customer { get; set; } /// /// An arbitrary string attached to the object. Often useful for displaying to users. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// @@ -70,6 +91,9 @@ public class SetupIntentCreateOptions : BaseOptions, IHasMetadata /// One of: inbound, or outbound. /// [JsonProperty("flow_directions")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("flow_directions")] +#endif public List FlowDirections { get; set; } /// @@ -78,6 +102,9 @@ public class SetupIntentCreateOptions : BaseOptions, IHasMetadata /// href="https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm">confirm=true. /// [JsonProperty("mandate_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mandate_data")] +#endif public SetupIntentMandateDataOptions MandateData { get; set; } /// @@ -87,12 +114,18 @@ public class SetupIntentCreateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// The Stripe account ID created for this SetupIntent. /// [JsonProperty("on_behalf_of")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("on_behalf_of")] +#endif public string OnBehalfOf { get; set; } /// @@ -100,6 +133,9 @@ public class SetupIntentCreateOptions : BaseOptions, IHasMetadata /// this SetupIntent. /// [JsonProperty("payment_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method")] +#endif public string PaymentMethod { get; set; } /// @@ -108,6 +144,9 @@ public class SetupIntentCreateOptions : BaseOptions, IHasMetadata /// configuration to use with this SetupIntent. /// [JsonProperty("payment_method_configuration")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_configuration")] +#endif public string PaymentMethodConfiguration { get; set; } /// @@ -116,12 +155,18 @@ public class SetupIntentCreateOptions : BaseOptions, IHasMetadata /// value in the SetupIntent. /// [JsonProperty("payment_method_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_data")] +#endif public SetupIntentPaymentMethodDataOptions PaymentMethodData { get; set; } /// /// Payment method-specific configuration for this SetupIntent. /// [JsonProperty("payment_method_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_options")] +#endif public SetupIntentPaymentMethodOptionsOptions PaymentMethodOptions { get; set; } /// @@ -131,6 +176,9 @@ public class SetupIntentCreateOptions : BaseOptions, IHasMetadata /// settings. /// [JsonProperty("payment_method_types")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_types")] +#endif public List PaymentMethodTypes { get; set; } /// @@ -141,6 +189,9 @@ public class SetupIntentCreateOptions : BaseOptions, IHasMetadata /// href="https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm">confirm=true. /// [JsonProperty("return_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("return_url")] +#endif public string ReturnUrl { get; set; } /// @@ -148,6 +199,9 @@ public class SetupIntentCreateOptions : BaseOptions, IHasMetadata /// successful completion. /// [JsonProperty("single_use")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("single_use")] +#endif public SetupIntentSingleUseOptions SingleUse { get; set; } /// @@ -156,6 +210,9 @@ public class SetupIntentCreateOptions : BaseOptions, IHasMetadata /// One of: off_session, or on_session. /// [JsonProperty("usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("usage")] +#endif public string Usage { get; set; } /// @@ -163,6 +220,9 @@ public class SetupIntentCreateOptions : BaseOptions, IHasMetadata /// client-side SDKs to handle the next actions. /// [JsonProperty("use_stripe_sdk")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("use_stripe_sdk")] +#endif public bool? UseStripeSdk { get; set; } } } diff --git a/src/Stripe.net/Services/SetupIntents/SetupIntentGetOptions.cs b/src/Stripe.net/Services/SetupIntents/SetupIntentGetOptions.cs index 95e0900400..6c2eec9690 100644 --- a/src/Stripe.net/Services/SetupIntents/SetupIntentGetOptions.cs +++ b/src/Stripe.net/Services/SetupIntents/SetupIntentGetOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SetupIntentGetOptions : BaseOptions { @@ -10,6 +13,9 @@ public class SetupIntentGetOptions : BaseOptions /// key to retrieve the SetupIntent. /// [JsonProperty("client_secret")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("client_secret")] +#endif public string ClientSecret { get; set; } } } diff --git a/src/Stripe.net/Services/SetupIntents/SetupIntentListOptions.cs b/src/Stripe.net/Services/SetupIntents/SetupIntentListOptions.cs index f3c38dd64c..2232ea09b5 100644 --- a/src/Stripe.net/Services/SetupIntents/SetupIntentListOptions.cs +++ b/src/Stripe.net/Services/SetupIntents/SetupIntentListOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SetupIntentListOptions : ListOptionsWithCreated { @@ -15,18 +18,27 @@ public class SetupIntentListOptions : ListOptionsWithCreated /// Customer. /// [JsonProperty("attach_to_self")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("attach_to_self")] +#endif public bool? AttachToSelf { get; set; } /// /// Only return SetupIntents for the customer specified by this customer ID. /// [JsonProperty("customer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] +#endif public string Customer { get; set; } /// /// Only return SetupIntents that associate with the specified payment method. /// [JsonProperty("payment_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method")] +#endif public string PaymentMethod { get; set; } } } diff --git a/src/Stripe.net/Services/SetupIntents/SetupIntentMandateDataCustomerAcceptanceOnlineOptions.cs b/src/Stripe.net/Services/SetupIntents/SetupIntentMandateDataCustomerAcceptanceOnlineOptions.cs index cb6bab6a39..329e4a3e3e 100644 --- a/src/Stripe.net/Services/SetupIntents/SetupIntentMandateDataCustomerAcceptanceOnlineOptions.cs +++ b/src/Stripe.net/Services/SetupIntents/SetupIntentMandateDataCustomerAcceptanceOnlineOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SetupIntentMandateDataCustomerAcceptanceOnlineOptions : INestedOptions { @@ -9,12 +12,18 @@ public class SetupIntentMandateDataCustomerAcceptanceOnlineOptions : INestedOpti /// The IP address from which the Mandate was accepted by the customer. /// [JsonProperty("ip_address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ip_address")] +#endif public string IpAddress { get; set; } /// /// The user agent of the browser from which the Mandate was accepted by the customer. /// [JsonProperty("user_agent")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("user_agent")] +#endif public string UserAgent { get; set; } } } diff --git a/src/Stripe.net/Services/SetupIntents/SetupIntentMandateDataCustomerAcceptanceOptions.cs b/src/Stripe.net/Services/SetupIntents/SetupIntentMandateDataCustomerAcceptanceOptions.cs index 5586e714cc..aba2091636 100644 --- a/src/Stripe.net/Services/SetupIntents/SetupIntentMandateDataCustomerAcceptanceOptions.cs +++ b/src/Stripe.net/Services/SetupIntents/SetupIntentMandateDataCustomerAcceptanceOptions.cs @@ -4,6 +4,9 @@ namespace Stripe using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SetupIntentMandateDataCustomerAcceptanceOptions : INestedOptions { @@ -12,6 +15,10 @@ public class SetupIntentMandateDataCustomerAcceptanceOptions : INestedOptions /// [JsonProperty("accepted_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("accepted_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? AcceptedAt { get; set; } /// @@ -19,6 +26,9 @@ public class SetupIntentMandateDataCustomerAcceptanceOptions : INestedOptions /// acceptance. /// [JsonProperty("offline")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("offline")] +#endif public SetupIntentMandateDataCustomerAcceptanceOfflineOptions Offline { get; set; } /// @@ -26,6 +36,9 @@ public class SetupIntentMandateDataCustomerAcceptanceOptions : INestedOptions /// acceptance. /// [JsonProperty("online")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("online")] +#endif public SetupIntentMandateDataCustomerAcceptanceOnlineOptions Online { get; set; } /// @@ -34,6 +47,9 @@ public class SetupIntentMandateDataCustomerAcceptanceOptions : INestedOptions /// One of: offline, or online. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/SetupIntents/SetupIntentMandateDataOptions.cs b/src/Stripe.net/Services/SetupIntents/SetupIntentMandateDataOptions.cs index 5661891c77..31c5724712 100644 --- a/src/Stripe.net/Services/SetupIntents/SetupIntentMandateDataOptions.cs +++ b/src/Stripe.net/Services/SetupIntents/SetupIntentMandateDataOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SetupIntentMandateDataOptions : INestedOptions { @@ -9,6 +12,9 @@ public class SetupIntentMandateDataOptions : INestedOptions /// This hash contains details about the customer acceptance of the Mandate. /// [JsonProperty("customer_acceptance")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_acceptance")] +#endif public SetupIntentMandateDataCustomerAcceptanceOptions CustomerAcceptance { get; set; } } } diff --git a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataAcssDebitOptions.cs b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataAcssDebitOptions.cs index 008754b89d..f9aa197d3b 100644 --- a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataAcssDebitOptions.cs +++ b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataAcssDebitOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SetupIntentPaymentMethodDataAcssDebitOptions : INestedOptions { @@ -9,18 +12,27 @@ public class SetupIntentPaymentMethodDataAcssDebitOptions : INestedOptions /// Customer's bank account number. /// [JsonProperty("account_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_number")] +#endif public string AccountNumber { get; set; } /// /// Institution number of the customer's bank. /// [JsonProperty("institution_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("institution_number")] +#endif public string InstitutionNumber { get; set; } /// /// Transit number of the customer's bank. /// [JsonProperty("transit_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transit_number")] +#endif public string TransitNumber { get; set; } } } diff --git a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataAuBecsDebitOptions.cs b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataAuBecsDebitOptions.cs index 34a8749561..613b3bfde9 100644 --- a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataAuBecsDebitOptions.cs +++ b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataAuBecsDebitOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SetupIntentPaymentMethodDataAuBecsDebitOptions : INestedOptions { @@ -9,12 +12,18 @@ public class SetupIntentPaymentMethodDataAuBecsDebitOptions : INestedOptions /// The account number for the bank account. /// [JsonProperty("account_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_number")] +#endif public string AccountNumber { get; set; } /// /// Bank-State-Branch number of the bank account. /// [JsonProperty("bsb_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bsb_number")] +#endif public string BsbNumber { get; set; } } } diff --git a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataBacsDebitOptions.cs b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataBacsDebitOptions.cs index be89a803b0..5007b389e1 100644 --- a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataBacsDebitOptions.cs +++ b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataBacsDebitOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SetupIntentPaymentMethodDataBacsDebitOptions : INestedOptions { @@ -9,12 +12,18 @@ public class SetupIntentPaymentMethodDataBacsDebitOptions : INestedOptions /// Account number of the bank account that the funds will be debited from. /// [JsonProperty("account_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_number")] +#endif public string AccountNumber { get; set; } /// /// Sort code of the bank account. (e.g., 10-20-30). /// [JsonProperty("sort_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sort_code")] +#endif public string SortCode { get; set; } } } diff --git a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataBillingDetailsOptions.cs b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataBillingDetailsOptions.cs index 551029b8a8..ba04be64eb 100644 --- a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataBillingDetailsOptions.cs +++ b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataBillingDetailsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SetupIntentPaymentMethodDataBillingDetailsOptions : INestedOptions { @@ -9,24 +12,36 @@ public class SetupIntentPaymentMethodDataBillingDetailsOptions : INestedOptions /// Billing address. /// [JsonProperty("address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address")] +#endif public AddressOptions Address { get; set; } /// /// Email address. /// [JsonProperty("email")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("email")] +#endif public string Email { get; set; } /// /// Full name. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } /// /// Billing phone number (including extension). /// [JsonProperty("phone")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("phone")] +#endif public string Phone { get; set; } } } diff --git a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataBoletoOptions.cs b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataBoletoOptions.cs index 48f7aa9f2d..388b9a7087 100644 --- a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataBoletoOptions.cs +++ b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataBoletoOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SetupIntentPaymentMethodDataBoletoOptions : INestedOptions { @@ -10,6 +13,9 @@ public class SetupIntentPaymentMethodDataBoletoOptions : INestedOptions /// consumers). /// [JsonProperty("tax_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_id")] +#endif public string TaxId { get; set; } } } diff --git a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataEpsOptions.cs b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataEpsOptions.cs index b13c3e3f12..e620d56ede 100644 --- a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataEpsOptions.cs +++ b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataEpsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SetupIntentPaymentMethodDataEpsOptions : INestedOptions { @@ -23,6 +26,9 @@ public class SetupIntentPaymentMethodDataEpsOptions : INestedOptions /// vr_bank_braunau. /// [JsonProperty("bank")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank")] +#endif public string Bank { get; set; } } } diff --git a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataFpxOptions.cs b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataFpxOptions.cs index 64018b0c0b..108b10a6d9 100644 --- a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataFpxOptions.cs +++ b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataFpxOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SetupIntentPaymentMethodDataFpxOptions : INestedOptions { @@ -10,6 +13,9 @@ public class SetupIntentPaymentMethodDataFpxOptions : INestedOptions /// One of: company, or individual. /// [JsonProperty("account_holder_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_holder_type")] +#endif public string AccountHolderType { get; set; } /// @@ -21,6 +27,9 @@ public class SetupIntentPaymentMethodDataFpxOptions : INestedOptions /// public_bank, rhb, standard_chartered, or uob. /// [JsonProperty("bank")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank")] +#endif public string Bank { get; set; } } } diff --git a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataIdealOptions.cs b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataIdealOptions.cs index 5195f5758d..fd7a77c338 100644 --- a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataIdealOptions.cs +++ b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataIdealOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SetupIntentPaymentMethodDataIdealOptions : INestedOptions { @@ -14,6 +17,9 @@ public class SetupIntentPaymentMethodDataIdealOptions : INestedOptions /// yoursafe. /// [JsonProperty("bank")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank")] +#endif public string Bank { get; set; } } } diff --git a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataKlarnaDobOptions.cs b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataKlarnaDobOptions.cs index 99176c523c..f4be38647a 100644 --- a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataKlarnaDobOptions.cs +++ b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataKlarnaDobOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SetupIntentPaymentMethodDataKlarnaDobOptions : INestedOptions { @@ -9,18 +12,27 @@ public class SetupIntentPaymentMethodDataKlarnaDobOptions : INestedOptions /// The day of birth, between 1 and 31. /// [JsonProperty("day")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("day")] +#endif public long? Day { get; set; } /// /// The month of birth, between 1 and 12. /// [JsonProperty("month")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("month")] +#endif public long? Month { get; set; } /// /// The four-digit year of birth. /// [JsonProperty("year")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("year")] +#endif public long? Year { get; set; } } } diff --git a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataKlarnaOptions.cs b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataKlarnaOptions.cs index d5105f2436..ba209e2286 100644 --- a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataKlarnaOptions.cs +++ b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataKlarnaOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SetupIntentPaymentMethodDataKlarnaOptions : INestedOptions { @@ -9,6 +12,9 @@ public class SetupIntentPaymentMethodDataKlarnaOptions : INestedOptions /// Customer's date of birth. /// [JsonProperty("dob")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("dob")] +#endif public SetupIntentPaymentMethodDataKlarnaDobOptions Dob { get; set; } } } diff --git a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataNaverPayOptions.cs b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataNaverPayOptions.cs index 1fe71ca886..8a965c4382 100644 --- a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataNaverPayOptions.cs +++ b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataNaverPayOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SetupIntentPaymentMethodDataNaverPayOptions : INestedOptions { @@ -11,6 +14,9 @@ public class SetupIntentPaymentMethodDataNaverPayOptions : INestedOptions /// One of: card, or points. /// [JsonProperty("funding")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("funding")] +#endif public string Funding { get; set; } } } diff --git a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataOptions.cs b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataOptions.cs index f8a8fd2459..ce2dd71d32 100644 --- a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataOptions.cs +++ b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SetupIntentPaymentMethodDataOptions : INestedOptions, IHasMetadata { @@ -11,6 +14,9 @@ public class SetupIntentPaymentMethodDataOptions : INestedOptions, IHasMetadata /// Debit payment method. /// [JsonProperty("acss_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("acss_debit")] +#endif public SetupIntentPaymentMethodDataAcssDebitOptions AcssDebit { get; set; } /// @@ -18,6 +24,9 @@ public class SetupIntentPaymentMethodDataOptions : INestedOptions, IHasMetadata /// payment method. /// [JsonProperty("affirm")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("affirm")] +#endif public SetupIntentPaymentMethodDataAffirmOptions Affirm { get; set; } /// @@ -25,6 +34,9 @@ public class SetupIntentPaymentMethodDataOptions : INestedOptions, IHasMetadata /// the AfterpayClearpay payment method. /// [JsonProperty("afterpay_clearpay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("afterpay_clearpay")] +#endif public SetupIntentPaymentMethodDataAfterpayClearpayOptions AfterpayClearpay { get; set; } /// @@ -32,6 +44,9 @@ public class SetupIntentPaymentMethodDataOptions : INestedOptions, IHasMetadata /// payment method. /// [JsonProperty("alipay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("alipay")] +#endif public SetupIntentPaymentMethodDataAlipayOptions Alipay { get; set; } /// @@ -42,6 +57,9 @@ public class SetupIntentPaymentMethodDataOptions : INestedOptions, IHasMetadata /// One of: always, limited, or unspecified. /// [JsonProperty("allow_redisplay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("allow_redisplay")] +#endif public string AllowRedisplay { get; set; } /// @@ -49,6 +67,9 @@ public class SetupIntentPaymentMethodDataOptions : INestedOptions, IHasMetadata /// method. /// [JsonProperty("alma")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("alma")] +#endif public SetupIntentPaymentMethodDataAlmaOptions Alma { get; set; } /// @@ -56,6 +77,9 @@ public class SetupIntentPaymentMethodDataOptions : INestedOptions, IHasMetadata /// payment method. /// [JsonProperty("amazon_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amazon_pay")] +#endif public SetupIntentPaymentMethodDataAmazonPayOptions AmazonPay { get; set; } /// @@ -63,6 +87,9 @@ public class SetupIntentPaymentMethodDataOptions : INestedOptions, IHasMetadata /// bank account. /// [JsonProperty("au_becs_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("au_becs_debit")] +#endif public SetupIntentPaymentMethodDataAuBecsDebitOptions AuBecsDebit { get; set; } /// @@ -70,6 +97,9 @@ public class SetupIntentPaymentMethodDataOptions : INestedOptions, IHasMetadata /// Direct Debit bank account. /// [JsonProperty("bacs_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bacs_debit")] +#endif public SetupIntentPaymentMethodDataBacsDebitOptions BacsDebit { get; set; } /// @@ -77,6 +107,9 @@ public class SetupIntentPaymentMethodDataOptions : INestedOptions, IHasMetadata /// Bancontact payment method. /// [JsonProperty("bancontact")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bancontact")] +#endif public SetupIntentPaymentMethodDataBancontactOptions Bancontact { get; set; } /// @@ -84,6 +117,9 @@ public class SetupIntentPaymentMethodDataOptions : INestedOptions, IHasMetadata /// particular types of payment methods. /// [JsonProperty("billing_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_details")] +#endif public SetupIntentPaymentMethodDataBillingDetailsOptions BillingDetails { get; set; } /// @@ -91,6 +127,9 @@ public class SetupIntentPaymentMethodDataOptions : INestedOptions, IHasMetadata /// payment method. /// [JsonProperty("blik")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("blik")] +#endif public SetupIntentPaymentMethodDataBlikOptions Blik { get; set; } /// @@ -98,6 +137,9 @@ public class SetupIntentPaymentMethodDataOptions : INestedOptions, IHasMetadata /// payment method. /// [JsonProperty("boleto")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("boleto")] +#endif public SetupIntentPaymentMethodDataBoletoOptions Boleto { get; set; } /// @@ -105,6 +147,9 @@ public class SetupIntentPaymentMethodDataOptions : INestedOptions, IHasMetadata /// Pay payment method. /// [JsonProperty("cashapp")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cashapp")] +#endif public SetupIntentPaymentMethodDataCashappOptions Cashapp { get; set; } /// @@ -112,6 +157,9 @@ public class SetupIntentPaymentMethodDataOptions : INestedOptions, IHasMetadata /// CustomerBalance payment method. /// [JsonProperty("customer_balance")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_balance")] +#endif public SetupIntentPaymentMethodDataCustomerBalanceOptions CustomerBalance { get; set; } /// @@ -119,6 +167,9 @@ public class SetupIntentPaymentMethodDataOptions : INestedOptions, IHasMetadata /// method. /// [JsonProperty("eps")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("eps")] +#endif public SetupIntentPaymentMethodDataEpsOptions Eps { get; set; } /// @@ -126,6 +177,9 @@ public class SetupIntentPaymentMethodDataOptions : INestedOptions, IHasMetadata /// method. /// [JsonProperty("fpx")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fpx")] +#endif public SetupIntentPaymentMethodDataFpxOptions Fpx { get; set; } /// @@ -133,6 +187,9 @@ public class SetupIntentPaymentMethodDataOptions : INestedOptions, IHasMetadata /// payment method. /// [JsonProperty("giropay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("giropay")] +#endif public SetupIntentPaymentMethodDataGiropayOptions Giropay { get; set; } /// @@ -140,6 +197,9 @@ public class SetupIntentPaymentMethodDataOptions : INestedOptions, IHasMetadata /// payment method. /// [JsonProperty("grabpay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("grabpay")] +#endif public SetupIntentPaymentMethodDataGrabpayOptions Grabpay { get; set; } /// @@ -147,6 +207,9 @@ public class SetupIntentPaymentMethodDataOptions : INestedOptions, IHasMetadata /// payment method. /// [JsonProperty("ideal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ideal")] +#endif public SetupIntentPaymentMethodDataIdealOptions Ideal { get; set; } /// @@ -154,6 +217,9 @@ public class SetupIntentPaymentMethodDataOptions : INestedOptions, IHasMetadata /// Interac Present payment method. /// [JsonProperty("interac_present")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interac_present")] +#endif public SetupIntentPaymentMethodDataInteracPresentOptions InteracPresent { get; set; } /// @@ -161,6 +227,9 @@ public class SetupIntentPaymentMethodDataOptions : INestedOptions, IHasMetadata /// Pay payment method. /// [JsonProperty("kakao_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("kakao_pay")] +#endif public SetupIntentPaymentMethodDataKakaoPayOptions KakaoPay { get; set; } /// @@ -168,6 +237,9 @@ public class SetupIntentPaymentMethodDataOptions : INestedOptions, IHasMetadata /// payment method. /// [JsonProperty("klarna")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("klarna")] +#endif public SetupIntentPaymentMethodDataKlarnaOptions Klarna { get; set; } /// @@ -175,6 +247,9 @@ public class SetupIntentPaymentMethodDataOptions : INestedOptions, IHasMetadata /// payment method. /// [JsonProperty("konbini")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("konbini")] +#endif public SetupIntentPaymentMethodDataKonbiniOptions Konbini { get; set; } /// @@ -182,6 +257,9 @@ public class SetupIntentPaymentMethodDataOptions : INestedOptions, IHasMetadata /// Card payment method. /// [JsonProperty("kr_card")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("kr_card")] +#endif public SetupIntentPaymentMethodDataKrCardOptions KrCard { get; set; } /// @@ -189,6 +267,9 @@ public class SetupIntentPaymentMethodDataOptions : INestedOptions, IHasMetadata /// payment method. /// [JsonProperty("link")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("link")] +#endif public SetupIntentPaymentMethodDataLinkOptions Link { get; set; } /// @@ -198,6 +279,9 @@ public class SetupIntentPaymentMethodDataOptions : INestedOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -205,6 +289,9 @@ public class SetupIntentPaymentMethodDataOptions : INestedOptions, IHasMetadata /// MobilePay payment method. /// [JsonProperty("mobilepay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mobilepay")] +#endif public SetupIntentPaymentMethodDataMobilepayOptions Mobilepay { get; set; } /// @@ -212,6 +299,9 @@ public class SetupIntentPaymentMethodDataOptions : INestedOptions, IHasMetadata /// Multibanco payment method. /// [JsonProperty("multibanco")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("multibanco")] +#endif public SetupIntentPaymentMethodDataMultibancoOptions Multibanco { get; set; } /// @@ -219,6 +309,9 @@ public class SetupIntentPaymentMethodDataOptions : INestedOptions, IHasMetadata /// Pay payment method. /// [JsonProperty("naver_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("naver_pay")] +#endif public SetupIntentPaymentMethodDataNaverPayOptions NaverPay { get; set; } /// @@ -226,6 +319,9 @@ public class SetupIntentPaymentMethodDataOptions : INestedOptions, IHasMetadata /// payment method. /// [JsonProperty("oxxo")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("oxxo")] +#endif public SetupIntentPaymentMethodDataOxxoOptions Oxxo { get; set; } /// @@ -233,6 +329,9 @@ public class SetupIntentPaymentMethodDataOptions : INestedOptions, IHasMetadata /// method. /// [JsonProperty("p24")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("p24")] +#endif public SetupIntentPaymentMethodDataP24Options P24 { get; set; } /// @@ -240,6 +339,9 @@ public class SetupIntentPaymentMethodDataOptions : INestedOptions, IHasMetadata /// payment method. /// [JsonProperty("payco")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payco")] +#endif public SetupIntentPaymentMethodDataPaycoOptions Payco { get; set; } /// @@ -247,6 +349,9 @@ public class SetupIntentPaymentMethodDataOptions : INestedOptions, IHasMetadata /// payment method. /// [JsonProperty("paynow")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("paynow")] +#endif public SetupIntentPaymentMethodDataPaynowOptions Paynow { get; set; } /// @@ -254,6 +359,9 @@ public class SetupIntentPaymentMethodDataOptions : INestedOptions, IHasMetadata /// payment method. /// [JsonProperty("paypal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("paypal")] +#endif public SetupIntentPaymentMethodDataPaypalOptions Paypal { get; set; } /// @@ -261,6 +369,9 @@ public class SetupIntentPaymentMethodDataOptions : INestedOptions, IHasMetadata /// method. /// [JsonProperty("pix")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("pix")] +#endif public SetupIntentPaymentMethodDataPixOptions Pix { get; set; } /// @@ -268,6 +379,9 @@ public class SetupIntentPaymentMethodDataOptions : INestedOptions, IHasMetadata /// PromptPay payment method. /// [JsonProperty("promptpay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("promptpay")] +#endif public SetupIntentPaymentMethodDataPromptpayOptions Promptpay { get; set; } /// @@ -276,6 +390,9 @@ public class SetupIntentPaymentMethodDataOptions : INestedOptions, IHasMetadata /// information. /// [JsonProperty("radar_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("radar_options")] +#endif public SetupIntentPaymentMethodDataRadarOptionsOptions RadarOptions { get; set; } /// @@ -283,6 +400,9 @@ public class SetupIntentPaymentMethodDataOptions : INestedOptions, IHasMetadata /// Revolut Pay payment method. /// [JsonProperty("revolut_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("revolut_pay")] +#endif public SetupIntentPaymentMethodDataRevolutPayOptions RevolutPay { get; set; } /// @@ -290,6 +410,9 @@ public class SetupIntentPaymentMethodDataOptions : INestedOptions, IHasMetadata /// SamsungPay payment method. /// [JsonProperty("samsung_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("samsung_pay")] +#endif public SetupIntentPaymentMethodDataSamsungPayOptions SamsungPay { get; set; } /// @@ -297,6 +420,9 @@ public class SetupIntentPaymentMethodDataOptions : INestedOptions, IHasMetadata /// debit bank account. /// [JsonProperty("sepa_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sepa_debit")] +#endif public SetupIntentPaymentMethodDataSepaDebitOptions SepaDebit { get; set; } /// @@ -304,6 +430,9 @@ public class SetupIntentPaymentMethodDataOptions : INestedOptions, IHasMetadata /// payment method. /// [JsonProperty("sofort")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sofort")] +#endif public SetupIntentPaymentMethodDataSofortOptions Sofort { get; set; } /// @@ -311,6 +440,9 @@ public class SetupIntentPaymentMethodDataOptions : INestedOptions, IHasMetadata /// payment method. /// [JsonProperty("swish")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("swish")] +#endif public SetupIntentPaymentMethodDataSwishOptions Swish { get; set; } /// @@ -318,6 +450,9 @@ public class SetupIntentPaymentMethodDataOptions : INestedOptions, IHasMetadata /// method. /// [JsonProperty("twint")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("twint")] +#endif public SetupIntentPaymentMethodDataTwintOptions Twint { get; set; } /// @@ -335,6 +470,9 @@ public class SetupIntentPaymentMethodDataOptions : INestedOptions, IHasMetadata /// us_bank_account, wechat_pay, or zip. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } /// @@ -342,6 +480,9 @@ public class SetupIntentPaymentMethodDataOptions : INestedOptions, IHasMetadata /// US bank account payment method. /// [JsonProperty("us_bank_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("us_bank_account")] +#endif public SetupIntentPaymentMethodDataUsBankAccountOptions UsBankAccount { get; set; } /// @@ -349,6 +490,9 @@ public class SetupIntentPaymentMethodDataOptions : INestedOptions, IHasMetadata /// wechat_pay payment method. /// [JsonProperty("wechat_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("wechat_pay")] +#endif public SetupIntentPaymentMethodDataWechatPayOptions WechatPay { get; set; } /// @@ -356,6 +500,9 @@ public class SetupIntentPaymentMethodDataOptions : INestedOptions, IHasMetadata /// method. /// [JsonProperty("zip")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("zip")] +#endif public SetupIntentPaymentMethodDataZipOptions Zip { get; set; } } } diff --git a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataP24Options.cs b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataP24Options.cs index d3da70e468..14506f6de8 100644 --- a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataP24Options.cs +++ b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataP24Options.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SetupIntentPaymentMethodDataP24Options : INestedOptions { @@ -17,6 +20,9 @@ public class SetupIntentPaymentMethodDataP24Options : INestedOptions /// volkswagen_bank. /// [JsonProperty("bank")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank")] +#endif public string Bank { get; set; } } } diff --git a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataRadarOptionsOptions.cs b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataRadarOptionsOptions.cs index 196bb59c44..16473fdfbf 100644 --- a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataRadarOptionsOptions.cs +++ b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataRadarOptionsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SetupIntentPaymentMethodDataRadarOptionsOptions : INestedOptions { @@ -11,6 +14,9 @@ public class SetupIntentPaymentMethodDataRadarOptionsOptions : INestedOptions /// predictions on your payments. /// [JsonProperty("session")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("session")] +#endif public string Session { get; set; } } } diff --git a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataSepaDebitOptions.cs b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataSepaDebitOptions.cs index 1ffffa295f..bdeea1554a 100644 --- a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataSepaDebitOptions.cs +++ b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataSepaDebitOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SetupIntentPaymentMethodDataSepaDebitOptions : INestedOptions { @@ -9,6 +12,9 @@ public class SetupIntentPaymentMethodDataSepaDebitOptions : INestedOptions /// IBAN of the bank account. /// [JsonProperty("iban")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("iban")] +#endif public string Iban { get; set; } } } diff --git a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataSofortOptions.cs b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataSofortOptions.cs index 191a2b6b5b..387082ab80 100644 --- a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataSofortOptions.cs +++ b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataSofortOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SetupIntentPaymentMethodDataSofortOptions : INestedOptions { @@ -10,6 +13,9 @@ public class SetupIntentPaymentMethodDataSofortOptions : INestedOptions /// One of: AT, BE, DE, ES, IT, or NL. /// [JsonProperty("country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country")] +#endif public string Country { get; set; } } } diff --git a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataUsBankAccountOptions.cs b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataUsBankAccountOptions.cs index d42ce4c261..6919c07c6e 100644 --- a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataUsBankAccountOptions.cs +++ b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataUsBankAccountOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SetupIntentPaymentMethodDataUsBankAccountOptions : INestedOptions { @@ -10,12 +13,18 @@ public class SetupIntentPaymentMethodDataUsBankAccountOptions : INestedOptions /// One of: company, or individual. /// [JsonProperty("account_holder_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_holder_type")] +#endif public string AccountHolderType { get; set; } /// /// Account number of the bank account. /// [JsonProperty("account_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_number")] +#endif public string AccountNumber { get; set; } /// @@ -23,18 +32,27 @@ public class SetupIntentPaymentMethodDataUsBankAccountOptions : INestedOptions /// One of: checking, or savings. /// [JsonProperty("account_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_type")] +#endif public string AccountType { get; set; } /// /// The ID of a Financial Connections Account to use as a payment method. /// [JsonProperty("financial_connections_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("financial_connections_account")] +#endif public string FinancialConnectionsAccount { get; set; } /// /// Routing number of the bank account. /// [JsonProperty("routing_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("routing_number")] +#endif public string RoutingNumber { get; set; } } } diff --git a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsAcssDebitMandateOptionsOptions.cs b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsAcssDebitMandateOptionsOptions.cs index a8ffe8f75f..f3b326dc11 100644 --- a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsAcssDebitMandateOptionsOptions.cs +++ b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsAcssDebitMandateOptionsOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SetupIntentPaymentMethodOptionsAcssDebitMandateOptionsOptions : INestedOptions { @@ -14,6 +17,9 @@ public class SetupIntentPaymentMethodOptionsAcssDebitMandateOptionsOptions : INe /// Intent. /// [JsonProperty("custom_mandate_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("custom_mandate_url")] +#endif public string CustomMandateUrl { get; set; } /// @@ -21,6 +27,9 @@ public class SetupIntentPaymentMethodOptionsAcssDebitMandateOptionsOptions : INe /// One of: invoice, or subscription. /// [JsonProperty("default_for")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("default_for")] +#endif public List DefaultFor { get; set; } /// @@ -28,6 +37,9 @@ public class SetupIntentPaymentMethodOptionsAcssDebitMandateOptionsOptions : INe /// 'interval' or 'combined'. /// [JsonProperty("interval_description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interval_description")] +#endif public string IntervalDescription { get; set; } /// @@ -35,6 +47,9 @@ public class SetupIntentPaymentMethodOptionsAcssDebitMandateOptionsOptions : INe /// One of: combined, interval, or sporadic. /// [JsonProperty("payment_schedule")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_schedule")] +#endif public string PaymentSchedule { get; set; } /// @@ -42,6 +57,9 @@ public class SetupIntentPaymentMethodOptionsAcssDebitMandateOptionsOptions : INe /// One of: business, or personal. /// [JsonProperty("transaction_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transaction_type")] +#endif public string TransactionType { get; set; } } } diff --git a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsAcssDebitOptions.cs b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsAcssDebitOptions.cs index 225ecfb7f5..dcbda5c48a 100644 --- a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsAcssDebitOptions.cs +++ b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsAcssDebitOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SetupIntentPaymentMethodOptionsAcssDebitOptions : INestedOptions { @@ -12,12 +15,18 @@ public class SetupIntentPaymentMethodOptionsAcssDebitOptions : INestedOptions /// One of: cad, or usd. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// /// Additional fields for Mandate creation. /// [JsonProperty("mandate_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mandate_options")] +#endif public SetupIntentPaymentMethodOptionsAcssDebitMandateOptionsOptions MandateOptions { get; set; } /// @@ -25,6 +34,9 @@ public class SetupIntentPaymentMethodOptionsAcssDebitOptions : INestedOptions /// One of: automatic, instant, or microdeposits. /// [JsonProperty("verification_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("verification_method")] +#endif public string VerificationMethod { get; set; } } } diff --git a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsBacsDebitOptions.cs b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsBacsDebitOptions.cs index 7de61ce110..c149ba4679 100644 --- a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsBacsDebitOptions.cs +++ b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsBacsDebitOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SetupIntentPaymentMethodOptionsBacsDebitOptions : INestedOptions { @@ -9,6 +12,9 @@ public class SetupIntentPaymentMethodOptionsBacsDebitOptions : INestedOptions /// Additional fields for Mandate creation. /// [JsonProperty("mandate_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mandate_options")] +#endif public SetupIntentPaymentMethodOptionsBacsDebitMandateOptionsOptions MandateOptions { get; set; } } } diff --git a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsCardMandateOptionsOptions.cs b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsCardMandateOptionsOptions.cs index 73d4abccc9..3396d4fcf2 100644 --- a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsCardMandateOptionsOptions.cs +++ b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsCardMandateOptionsOptions.cs @@ -5,6 +5,9 @@ namespace Stripe using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SetupIntentPaymentMethodOptionsCardMandateOptionsOptions : INestedOptions { @@ -12,6 +15,9 @@ public class SetupIntentPaymentMethodOptionsCardMandateOptionsOptions : INestedO /// Amount to be charged for future payments. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long? Amount { get; set; } /// @@ -21,6 +27,9 @@ public class SetupIntentPaymentMethodOptionsCardMandateOptionsOptions : INestedO /// One of: fixed, or maximum. /// [JsonProperty("amount_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_type")] +#endif public string AmountType { get; set; } /// @@ -30,6 +39,9 @@ public class SetupIntentPaymentMethodOptionsCardMandateOptionsOptions : INestedO /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// @@ -37,6 +49,9 @@ public class SetupIntentPaymentMethodOptionsCardMandateOptionsOptions : INestedO /// customer. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// @@ -45,6 +60,10 @@ public class SetupIntentPaymentMethodOptionsCardMandateOptionsOptions : INestedO /// [JsonProperty("end_date")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("end_date")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? EndDate { get; set; } /// @@ -53,6 +72,9 @@ public class SetupIntentPaymentMethodOptionsCardMandateOptionsOptions : INestedO /// One of: day, month, sporadic, week, or year. /// [JsonProperty("interval")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interval")] +#endif public string Interval { get; set; } /// @@ -62,12 +84,18 @@ public class SetupIntentPaymentMethodOptionsCardMandateOptionsOptions : INestedO /// interval=sporadic. /// [JsonProperty("interval_count")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interval_count")] +#endif public long? IntervalCount { get; set; } /// /// Unique identifier for the mandate or subscription. /// [JsonProperty("reference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reference")] +#endif public string Reference { get; set; } /// @@ -76,12 +104,19 @@ public class SetupIntentPaymentMethodOptionsCardMandateOptionsOptions : INestedO /// [JsonProperty("start_date")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("start_date")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? StartDate { get; set; } /// /// Specifies the type of mandates supported. Possible values are india. /// [JsonProperty("supported_types")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("supported_types")] +#endif public List SupportedTypes { get; set; } } } diff --git a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsCardOptions.cs b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsCardOptions.cs index 0f3ce4fa45..cfb956acb4 100644 --- a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsCardOptions.cs +++ b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsCardOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SetupIntentPaymentMethodOptionsCardOptions : INestedOptions { @@ -9,6 +12,9 @@ public class SetupIntentPaymentMethodOptionsCardOptions : INestedOptions /// Configuration options for setting up an eMandate for cards issued in India. /// [JsonProperty("mandate_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mandate_options")] +#endif public SetupIntentPaymentMethodOptionsCardMandateOptionsOptions MandateOptions { get; set; } /// @@ -17,6 +23,9 @@ public class SetupIntentPaymentMethodOptionsCardOptions : INestedOptions /// provided during confirmation. /// [JsonProperty("moto")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("moto")] +#endif public bool? Moto { get; set; } /// @@ -27,6 +36,9 @@ public class SetupIntentPaymentMethodOptionsCardOptions : INestedOptions /// mastercard, unionpay, unknown, or visa. /// [JsonProperty("network")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("network")] +#endif public string Network { get; set; } /// @@ -42,6 +54,9 @@ public class SetupIntentPaymentMethodOptionsCardOptions : INestedOptions /// One of: any, automatic, or challenge. /// [JsonProperty("request_three_d_secure")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("request_three_d_secure")] +#endif public string RequestThreeDSecure { get; set; } /// @@ -49,6 +64,9 @@ public class SetupIntentPaymentMethodOptionsCardOptions : INestedOptions /// authentication details to use for this setup. /// [JsonProperty("three_d_secure")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("three_d_secure")] +#endif public SetupIntentPaymentMethodOptionsCardThreeDSecureOptions ThreeDSecure { get; set; } } } diff --git a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesOptions.cs b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesOptions.cs index da5360a5ba..441e5b9ab2 100644 --- a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesOptions.cs +++ b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesOptions : INestedOptions { @@ -12,6 +15,9 @@ public class SetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartes /// One of: 0, 1, 2, 3, 4, or A. /// [JsonProperty("cb_avalgo")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cb_avalgo")] +#endif public string CbAvalgo { get; set; } /// @@ -20,6 +26,9 @@ public class SetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartes /// and most significant bit first) that has been Base64 encoded. /// [JsonProperty("cb_exemption")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cb_exemption")] +#endif public string CbExemption { get; set; } /// @@ -27,6 +36,9 @@ public class SetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartes /// numeric value 0-99. /// [JsonProperty("cb_score")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cb_score")] +#endif public long? CbScore { get; set; } } } diff --git a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsOptions.cs b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsOptions.cs index 0c9eb4d0df..4e7ecc5d13 100644 --- a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsOptions.cs +++ b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsOptions : INestedOptions { @@ -9,6 +12,9 @@ public class SetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsOption /// Cartes Bancaires-specific 3DS fields. /// [JsonProperty("cartes_bancaires")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cartes_bancaires")] +#endif public SetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesOptions CartesBancaires { get; set; } } } diff --git a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsCardThreeDSecureOptions.cs b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsCardThreeDSecureOptions.cs index d068214421..a376d08c37 100644 --- a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsCardThreeDSecureOptions.cs +++ b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsCardThreeDSecureOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SetupIntentPaymentMethodOptionsCardThreeDSecureOptions : INestedOptions { @@ -10,6 +13,9 @@ public class SetupIntentPaymentMethodOptionsCardThreeDSecureOptions : INestedOpt /// One of: A, C, I, N, R, U, or Y. /// [JsonProperty("ares_trans_status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ares_trans_status")] +#endif public string AresTransStatus { get; set; } /// @@ -18,6 +24,9 @@ public class SetupIntentPaymentMethodOptionsCardThreeDSecureOptions : INestedOpt /// return the base64-encoded version, which is what you should specify here.). /// [JsonProperty("cryptogram")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cryptogram")] +#endif public string Cryptogram { get; set; } /// @@ -26,6 +35,9 @@ public class SetupIntentPaymentMethodOptionsCardThreeDSecureOptions : INestedOpt /// One of: 01, 02, 05, 06, or 07. /// [JsonProperty("electronic_commerce_indicator")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("electronic_commerce_indicator")] +#endif public string ElectronicCommerceIndicator { get; set; } /// @@ -34,6 +46,9 @@ public class SetupIntentPaymentMethodOptionsCardThreeDSecureOptions : INestedOpt /// accordingly. /// [JsonProperty("network_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("network_options")] +#endif public SetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsOptions NetworkOptions { get; set; } /// @@ -41,6 +56,9 @@ public class SetupIntentPaymentMethodOptionsCardThreeDSecureOptions : INestedOpt /// AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99. /// [JsonProperty("requestor_challenge_indicator")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requestor_challenge_indicator")] +#endif public string RequestorChallengeIndicator { get; set; } /// @@ -48,6 +66,9 @@ public class SetupIntentPaymentMethodOptionsCardThreeDSecureOptions : INestedOpt /// (dsTransID). /// [JsonProperty("transaction_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transaction_id")] +#endif public string TransactionId { get; set; } /// @@ -55,6 +76,9 @@ public class SetupIntentPaymentMethodOptionsCardThreeDSecureOptions : INestedOpt /// One of: 1.0.2, 2.1.0, or 2.2.0. /// [JsonProperty("version")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("version")] +#endif public string Version { get; set; } } } diff --git a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsLinkOptions.cs b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsLinkOptions.cs index 3cb9812958..02ecf16560 100644 --- a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsLinkOptions.cs +++ b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsLinkOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SetupIntentPaymentMethodOptionsLinkOptions : INestedOptions { @@ -11,6 +14,9 @@ public class SetupIntentPaymentMethodOptionsLinkOptions : INestedOptions /// [Obsolete("This property is deprecated, please refer to the description for details.")] [JsonProperty("persistent_token")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("persistent_token")] +#endif public string PersistentToken { get; set; } } } diff --git a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsOptions.cs b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsOptions.cs index d80c14a0ab..8148a40a56 100644 --- a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsOptions.cs +++ b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SetupIntentPaymentMethodOptionsOptions : INestedOptions { @@ -10,6 +13,9 @@ public class SetupIntentPaymentMethodOptionsOptions : INestedOptions /// ACSS Debit payment method options. /// [JsonProperty("acss_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("acss_debit")] +#endif public SetupIntentPaymentMethodOptionsAcssDebitOptions AcssDebit { get; set; } /// @@ -17,6 +23,9 @@ public class SetupIntentPaymentMethodOptionsOptions : INestedOptions /// AmazonPay payment method options. /// [JsonProperty("amazon_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amazon_pay")] +#endif public SetupIntentPaymentMethodOptionsAmazonPayOptions AmazonPay { get; set; } /// @@ -24,12 +33,18 @@ public class SetupIntentPaymentMethodOptionsOptions : INestedOptions /// Bacs Debit payment method options. /// [JsonProperty("bacs_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bacs_debit")] +#endif public SetupIntentPaymentMethodOptionsBacsDebitOptions BacsDebit { get; set; } /// /// Configuration for any card setup attempted on this SetupIntent. /// [JsonProperty("card")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card")] +#endif public SetupIntentPaymentMethodOptionsCardOptions Card { get; set; } /// @@ -37,6 +52,9 @@ public class SetupIntentPaymentMethodOptionsOptions : INestedOptions /// card-present payment method options. /// [JsonProperty("card_present")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card_present")] +#endif public SetupIntentPaymentMethodOptionsCardPresentOptions CardPresent { get; set; } /// @@ -44,6 +62,9 @@ public class SetupIntentPaymentMethodOptionsOptions : INestedOptions /// payment method options. /// [JsonProperty("link")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("link")] +#endif public SetupIntentPaymentMethodOptionsLinkOptions Link { get; set; } /// @@ -51,6 +72,9 @@ public class SetupIntentPaymentMethodOptionsOptions : INestedOptions /// PayPal payment method options. /// [JsonProperty("paypal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("paypal")] +#endif public SetupIntentPaymentMethodOptionsPaypalOptions Paypal { get; set; } /// @@ -58,6 +82,9 @@ public class SetupIntentPaymentMethodOptionsOptions : INestedOptions /// SEPA Debit payment method options. /// [JsonProperty("sepa_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sepa_debit")] +#endif public SetupIntentPaymentMethodOptionsSepaDebitOptions SepaDebit { get; set; } /// @@ -65,6 +92,9 @@ public class SetupIntentPaymentMethodOptionsOptions : INestedOptions /// the US bank account payment method options. /// [JsonProperty("us_bank_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("us_bank_account")] +#endif public SetupIntentPaymentMethodOptionsUsBankAccountOptions UsBankAccount { get; set; } } } diff --git a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsPaypalOptions.cs b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsPaypalOptions.cs index 331ccaa09e..0d06eb201f 100644 --- a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsPaypalOptions.cs +++ b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsPaypalOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SetupIntentPaymentMethodOptionsPaypalOptions : INestedOptions { @@ -10,6 +13,9 @@ public class SetupIntentPaymentMethodOptionsPaypalOptions : INestedOptions /// represents the mandate between the merchant and the customer. /// [JsonProperty("billing_agreement_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_agreement_id")] +#endif public string BillingAgreementId { get; set; } } } diff --git a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsSepaDebitOptions.cs b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsSepaDebitOptions.cs index 988846278a..786b63c130 100644 --- a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsSepaDebitOptions.cs +++ b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsSepaDebitOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SetupIntentPaymentMethodOptionsSepaDebitOptions : INestedOptions { @@ -9,6 +12,9 @@ public class SetupIntentPaymentMethodOptionsSepaDebitOptions : INestedOptions /// Additional fields for Mandate creation. /// [JsonProperty("mandate_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mandate_options")] +#endif public SetupIntentPaymentMethodOptionsSepaDebitMandateOptionsOptions MandateOptions { get; set; } } } diff --git a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsFiltersOptions.cs b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsFiltersOptions.cs index 4d9be1f2bd..443feb89d2 100644 --- a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsFiltersOptions.cs +++ b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsFiltersOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsFiltersOptions : INestedOptions { @@ -12,6 +15,9 @@ public class SetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsFil /// One of: checking, or savings. /// [JsonProperty("account_subcategories")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_subcategories")] +#endif public List AccountSubcategories { get; set; } } } diff --git a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsOptions.cs b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsOptions.cs index 831823bf82..238db8eab8 100644 --- a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsOptions.cs +++ b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsOptions : INestedOptions { @@ -11,6 +14,9 @@ public class SetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsOpt /// method. /// [JsonProperty("filters")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("filters")] +#endif public SetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsFiltersOptions Filters { get; set; } /// @@ -21,6 +27,9 @@ public class SetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsOpt /// transactions. /// [JsonProperty("permissions")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("permissions")] +#endif public List Permissions { get; set; } /// @@ -28,6 +37,9 @@ public class SetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsOpt /// One of: balances, ownership, or transactions. /// [JsonProperty("prefetch")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("prefetch")] +#endif public List Prefetch { get; set; } /// @@ -35,6 +47,9 @@ public class SetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsOpt /// user will be redirected to this URL to return to your app. /// [JsonProperty("return_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("return_url")] +#endif public string ReturnUrl { get; set; } } } diff --git a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsUsBankAccountMandateOptionsOptions.cs b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsUsBankAccountMandateOptionsOptions.cs index 7adb1a54b4..bb45e10fcc 100644 --- a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsUsBankAccountMandateOptionsOptions.cs +++ b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsUsBankAccountMandateOptionsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SetupIntentPaymentMethodOptionsUsBankAccountMandateOptionsOptions : INestedOptions { @@ -9,6 +12,9 @@ public class SetupIntentPaymentMethodOptionsUsBankAccountMandateOptionsOptions : /// The method used to collect offline mandate customer acceptance. /// [JsonProperty("collection_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("collection_method")] +#endif public string CollectionMethod { get; set; } } } diff --git a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsUsBankAccountNetworksOptions.cs b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsUsBankAccountNetworksOptions.cs index 981cd9ddd3..62932475fb 100644 --- a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsUsBankAccountNetworksOptions.cs +++ b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsUsBankAccountNetworksOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SetupIntentPaymentMethodOptionsUsBankAccountNetworksOptions : INestedOptions { @@ -11,6 +14,9 @@ public class SetupIntentPaymentMethodOptionsUsBankAccountNetworksOptions : INest /// One of: ach, or us_domestic_wire. /// [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif public List Requested { get; set; } } } diff --git a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsUsBankAccountOptions.cs b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsUsBankAccountOptions.cs index e75b96b91c..90588446a6 100644 --- a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsUsBankAccountOptions.cs +++ b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsUsBankAccountOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SetupIntentPaymentMethodOptionsUsBankAccountOptions : INestedOptions { @@ -9,18 +12,27 @@ public class SetupIntentPaymentMethodOptionsUsBankAccountOptions : INestedOption /// Additional fields for Financial Connections Session creation. /// [JsonProperty("financial_connections")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("financial_connections")] +#endif public SetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsOptions FinancialConnections { get; set; } /// /// Additional fields for Mandate creation. /// [JsonProperty("mandate_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mandate_options")] +#endif public SetupIntentPaymentMethodOptionsUsBankAccountMandateOptionsOptions MandateOptions { get; set; } /// /// Additional fields for network related functions. /// [JsonProperty("networks")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("networks")] +#endif public SetupIntentPaymentMethodOptionsUsBankAccountNetworksOptions Networks { get; set; } /// @@ -28,6 +40,9 @@ public class SetupIntentPaymentMethodOptionsUsBankAccountOptions : INestedOption /// One of: automatic, instant, or microdeposits. /// [JsonProperty("verification_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("verification_method")] +#endif public string VerificationMethod { get; set; } } } diff --git a/src/Stripe.net/Services/SetupIntents/SetupIntentSingleUseOptions.cs b/src/Stripe.net/Services/SetupIntents/SetupIntentSingleUseOptions.cs index 8920df40ef..9c331d5797 100644 --- a/src/Stripe.net/Services/SetupIntents/SetupIntentSingleUseOptions.cs +++ b/src/Stripe.net/Services/SetupIntents/SetupIntentSingleUseOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SetupIntentSingleUseOptions : INestedOptions { @@ -16,6 +19,9 @@ public class SetupIntentSingleUseOptions : INestedOptions /// 99999999 for a USD charge of $999,999.99). /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long? Amount { get; set; } /// @@ -24,6 +30,9 @@ public class SetupIntentSingleUseOptions : INestedOptions /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } } } diff --git a/src/Stripe.net/Services/SetupIntents/SetupIntentUpdateOptions.cs b/src/Stripe.net/Services/SetupIntents/SetupIntentUpdateOptions.cs index 20f870509e..8473f30dff 100644 --- a/src/Stripe.net/Services/SetupIntents/SetupIntentUpdateOptions.cs +++ b/src/Stripe.net/Services/SetupIntents/SetupIntentUpdateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SetupIntentUpdateOptions : BaseOptions, IHasMetadata { @@ -16,6 +19,9 @@ public class SetupIntentUpdateOptions : BaseOptions, IHasMetadata /// Customer. /// [JsonProperty("attach_to_self")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("attach_to_self")] +#endif public bool? AttachToSelf { get; set; } /// @@ -26,12 +32,18 @@ public class SetupIntentUpdateOptions : BaseOptions, IHasMetadata /// SetupIntent. /// [JsonProperty("customer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] +#endif public string Customer { get; set; } /// /// An arbitrary string attached to the object. Often useful for displaying to users. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// @@ -45,6 +57,9 @@ public class SetupIntentUpdateOptions : BaseOptions, IHasMetadata /// One of: inbound, or outbound. /// [JsonProperty("flow_directions")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("flow_directions")] +#endif public List FlowDirections { get; set; } /// @@ -54,6 +69,9 @@ public class SetupIntentUpdateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -61,6 +79,9 @@ public class SetupIntentUpdateOptions : BaseOptions, IHasMetadata /// this SetupIntent. To unset this field to null, pass in an empty string. /// [JsonProperty("payment_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method")] +#endif public string PaymentMethod { get; set; } /// @@ -69,6 +90,9 @@ public class SetupIntentUpdateOptions : BaseOptions, IHasMetadata /// configuration to use with this SetupIntent. /// [JsonProperty("payment_method_configuration")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_configuration")] +#endif public string PaymentMethodConfiguration { get; set; } /// @@ -77,12 +101,18 @@ public class SetupIntentUpdateOptions : BaseOptions, IHasMetadata /// value in the SetupIntent. /// [JsonProperty("payment_method_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_data")] +#endif public SetupIntentPaymentMethodDataOptions PaymentMethodData { get; set; } /// /// Payment method-specific configuration for this SetupIntent. /// [JsonProperty("payment_method_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_options")] +#endif public SetupIntentPaymentMethodOptionsOptions PaymentMethodOptions { get; set; } /// @@ -92,6 +122,9 @@ public class SetupIntentUpdateOptions : BaseOptions, IHasMetadata /// settings. /// [JsonProperty("payment_method_types")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_types")] +#endif public List PaymentMethodTypes { get; set; } } } diff --git a/src/Stripe.net/Services/SetupIntents/SetupIntentVerifyMicrodepositsOptions.cs b/src/Stripe.net/Services/SetupIntents/SetupIntentVerifyMicrodepositsOptions.cs index cdd299c972..a179e12c4b 100644 --- a/src/Stripe.net/Services/SetupIntents/SetupIntentVerifyMicrodepositsOptions.cs +++ b/src/Stripe.net/Services/SetupIntents/SetupIntentVerifyMicrodepositsOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SetupIntentVerifyMicrodepositsOptions : BaseOptions { @@ -11,6 +14,9 @@ public class SetupIntentVerifyMicrodepositsOptions : BaseOptions /// to the bank account. /// [JsonProperty("amounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amounts")] +#endif public List Amounts { get; set; } /// @@ -18,6 +24,9 @@ public class SetupIntentVerifyMicrodepositsOptions : BaseOptions /// account. /// [JsonProperty("descriptor_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("descriptor_code")] +#endif public string DescriptorCode { get; set; } } } diff --git a/src/Stripe.net/Services/ShippingRates/ShippingRateCreateOptions.cs b/src/Stripe.net/Services/ShippingRates/ShippingRateCreateOptions.cs index 8e4adc8c10..946f0deb9d 100644 --- a/src/Stripe.net/Services/ShippingRates/ShippingRateCreateOptions.cs +++ b/src/Stripe.net/Services/ShippingRates/ShippingRateCreateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ShippingRateCreateOptions : BaseOptions, IHasMetadata { @@ -11,6 +14,9 @@ public class ShippingRateCreateOptions : BaseOptions, IHasMetadata /// customer. This will appear on CheckoutSessions. /// [JsonProperty("delivery_estimate")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("delivery_estimate")] +#endif public ShippingRateDeliveryEstimateOptions DeliveryEstimate { get; set; } /// @@ -18,6 +24,9 @@ public class ShippingRateCreateOptions : BaseOptions, IHasMetadata /// on CheckoutSessions. /// [JsonProperty("display_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_name")] +#endif public string DisplayName { get; set; } /// @@ -25,6 +34,9 @@ public class ShippingRateCreateOptions : BaseOptions, IHasMetadata /// fixed_amount. /// [JsonProperty("fixed_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fixed_amount")] +#endif public ShippingRateFixedAmountOptions FixedAmount { get; set; } /// @@ -34,6 +46,9 @@ public class ShippingRateCreateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -42,6 +57,9 @@ public class ShippingRateCreateOptions : BaseOptions, IHasMetadata /// One of: exclusive, inclusive, or unspecified. /// [JsonProperty("tax_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_behavior")] +#endif public string TaxBehavior { get; set; } /// @@ -49,12 +67,18 @@ public class ShippingRateCreateOptions : BaseOptions, IHasMetadata /// code is txcd_92010001. /// [JsonProperty("tax_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_code")] +#endif public string TaxCode { get; set; } /// /// The type of calculation to use on the shipping rate. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/ShippingRates/ShippingRateDeliveryEstimateMaximumOptions.cs b/src/Stripe.net/Services/ShippingRates/ShippingRateDeliveryEstimateMaximumOptions.cs index 96f9de12a2..17b51dd371 100644 --- a/src/Stripe.net/Services/ShippingRates/ShippingRateDeliveryEstimateMaximumOptions.cs +++ b/src/Stripe.net/Services/ShippingRates/ShippingRateDeliveryEstimateMaximumOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ShippingRateDeliveryEstimateMaximumOptions : INestedOptions { @@ -10,12 +13,18 @@ public class ShippingRateDeliveryEstimateMaximumOptions : INestedOptions /// One of: business_day, day, hour, month, or week. /// [JsonProperty("unit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit")] +#endif public string Unit { get; set; } /// /// Must be greater than 0. /// [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public long? Value { get; set; } } } diff --git a/src/Stripe.net/Services/ShippingRates/ShippingRateDeliveryEstimateMinimumOptions.cs b/src/Stripe.net/Services/ShippingRates/ShippingRateDeliveryEstimateMinimumOptions.cs index 21a4cac7bb..28ac20c28b 100644 --- a/src/Stripe.net/Services/ShippingRates/ShippingRateDeliveryEstimateMinimumOptions.cs +++ b/src/Stripe.net/Services/ShippingRates/ShippingRateDeliveryEstimateMinimumOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ShippingRateDeliveryEstimateMinimumOptions : INestedOptions { @@ -10,12 +13,18 @@ public class ShippingRateDeliveryEstimateMinimumOptions : INestedOptions /// One of: business_day, day, hour, month, or week. /// [JsonProperty("unit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit")] +#endif public string Unit { get; set; } /// /// Must be greater than 0. /// [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public long? Value { get; set; } } } diff --git a/src/Stripe.net/Services/ShippingRates/ShippingRateDeliveryEstimateOptions.cs b/src/Stripe.net/Services/ShippingRates/ShippingRateDeliveryEstimateOptions.cs index c812b6862d..facdb70465 100644 --- a/src/Stripe.net/Services/ShippingRates/ShippingRateDeliveryEstimateOptions.cs +++ b/src/Stripe.net/Services/ShippingRates/ShippingRateDeliveryEstimateOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ShippingRateDeliveryEstimateOptions : INestedOptions { @@ -10,12 +13,18 @@ public class ShippingRateDeliveryEstimateOptions : INestedOptions /// infinite. /// [JsonProperty("maximum")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("maximum")] +#endif public ShippingRateDeliveryEstimateMaximumOptions Maximum { get; set; } /// /// The lower bound of the estimated range. If empty, represents no lower bound. /// [JsonProperty("minimum")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("minimum")] +#endif public ShippingRateDeliveryEstimateMinimumOptions Minimum { get; set; } } } diff --git a/src/Stripe.net/Services/ShippingRates/ShippingRateFixedAmountCurrencyOptionsOptions.cs b/src/Stripe.net/Services/ShippingRates/ShippingRateFixedAmountCurrencyOptionsOptions.cs index 4042854e03..7fea014f5f 100644 --- a/src/Stripe.net/Services/ShippingRates/ShippingRateFixedAmountCurrencyOptionsOptions.cs +++ b/src/Stripe.net/Services/ShippingRates/ShippingRateFixedAmountCurrencyOptionsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ShippingRateFixedAmountCurrencyOptionsOptions : INestedOptions { @@ -9,6 +12,9 @@ public class ShippingRateFixedAmountCurrencyOptionsOptions : INestedOptions /// A non-negative integer in cents representing how much to charge. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long? Amount { get; set; } /// @@ -17,6 +23,9 @@ public class ShippingRateFixedAmountCurrencyOptionsOptions : INestedOptions /// One of: exclusive, inclusive, or unspecified. /// [JsonProperty("tax_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_behavior")] +#endif public string TaxBehavior { get; set; } } } diff --git a/src/Stripe.net/Services/ShippingRates/ShippingRateFixedAmountOptions.cs b/src/Stripe.net/Services/ShippingRates/ShippingRateFixedAmountOptions.cs index b251ec86cf..8a466c9fd4 100644 --- a/src/Stripe.net/Services/ShippingRates/ShippingRateFixedAmountOptions.cs +++ b/src/Stripe.net/Services/ShippingRates/ShippingRateFixedAmountOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ShippingRateFixedAmountOptions : INestedOptions { @@ -10,6 +13,9 @@ public class ShippingRateFixedAmountOptions : INestedOptions /// A non-negative integer in cents representing how much to charge. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long? Amount { get; set; } /// @@ -18,6 +24,9 @@ public class ShippingRateFixedAmountOptions : INestedOptions /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// @@ -26,6 +35,9 @@ public class ShippingRateFixedAmountOptions : INestedOptions /// code and a supported currency. /// [JsonProperty("currency_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency_options")] +#endif public Dictionary CurrencyOptions { get; set; } } } diff --git a/src/Stripe.net/Services/ShippingRates/ShippingRateListOptions.cs b/src/Stripe.net/Services/ShippingRates/ShippingRateListOptions.cs index 2c53d6c7bc..1e6eed3276 100644 --- a/src/Stripe.net/Services/ShippingRates/ShippingRateListOptions.cs +++ b/src/Stripe.net/Services/ShippingRates/ShippingRateListOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ShippingRateListOptions : ListOptionsWithCreated { @@ -9,12 +12,18 @@ public class ShippingRateListOptions : ListOptionsWithCreated /// Only return shipping rates that are active or inactive. /// [JsonProperty("active")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("active")] +#endif public bool? Active { get; set; } /// /// Only return shipping rates for the given currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } } } diff --git a/src/Stripe.net/Services/ShippingRates/ShippingRateUpdateOptions.cs b/src/Stripe.net/Services/ShippingRates/ShippingRateUpdateOptions.cs index af2d2598cb..d3cf5f4e5b 100644 --- a/src/Stripe.net/Services/ShippingRates/ShippingRateUpdateOptions.cs +++ b/src/Stripe.net/Services/ShippingRates/ShippingRateUpdateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ShippingRateUpdateOptions : BaseOptions, IHasMetadata { @@ -10,6 +13,9 @@ public class ShippingRateUpdateOptions : BaseOptions, IHasMetadata /// Whether the shipping rate can be used for new purchases. Defaults to true. /// [JsonProperty("active")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("active")] +#endif public bool? Active { get; set; } /// @@ -17,6 +23,9 @@ public class ShippingRateUpdateOptions : BaseOptions, IHasMetadata /// fixed_amount. /// [JsonProperty("fixed_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fixed_amount")] +#endif public ShippingRateFixedAmountOptions FixedAmount { get; set; } /// @@ -26,6 +35,9 @@ public class ShippingRateUpdateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -34,6 +46,9 @@ public class ShippingRateUpdateOptions : BaseOptions, IHasMetadata /// One of: exclusive, inclusive, or unspecified. /// [JsonProperty("tax_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_behavior")] +#endif public string TaxBehavior { get; set; } } } diff --git a/src/Stripe.net/Services/Sources/SourceCardOptions.cs b/src/Stripe.net/Services/Sources/SourceCardOptions.cs index 025bea68a2..785d2f0364 100644 --- a/src/Stripe.net/Services/Sources/SourceCardOptions.cs +++ b/src/Stripe.net/Services/Sources/SourceCardOptions.cs @@ -3,43 +3,82 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SourceCardOptions : INestedOptions, IHasMetadata { [JsonProperty("address_city")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_city")] +#endif public string AddressCity { get; set; } [JsonProperty("address_country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_country")] +#endif public string AddressCountry { get; set; } [JsonProperty("address_line1")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_line1")] +#endif public string AddressLine1 { get; set; } [JsonProperty("address_line2")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_line2")] +#endif public string AddressLine2 { get; set; } [JsonProperty("address_state")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_state")] +#endif public string AddressState { get; set; } [JsonProperty("address_zip")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_zip")] +#endif public string AddressZip { get; set; } [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } [JsonProperty("cvc")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cvc")] +#endif public string Cvc { get; set; } [JsonProperty("exp_month")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("exp_month")] +#endif public long? ExpMonth { get; set; } [JsonProperty("exp_year")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("exp_year")] +#endif public long? ExpYear { get; set; } [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } [JsonProperty("number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("number")] +#endif public string Number { get; set; } /// @@ -48,6 +87,9 @@ public class SourceCardOptions : INestedOptions, IHasMetadata /// object in a structured format. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } } } diff --git a/src/Stripe.net/Services/Sources/SourceGetOptions.cs b/src/Stripe.net/Services/Sources/SourceGetOptions.cs index 9d30e75423..a9fd018ebf 100644 --- a/src/Stripe.net/Services/Sources/SourceGetOptions.cs +++ b/src/Stripe.net/Services/Sources/SourceGetOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SourceGetOptions : BaseOptions { @@ -10,6 +13,9 @@ public class SourceGetOptions : BaseOptions /// source. /// [JsonProperty("client_secret")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("client_secret")] +#endif public string ClientSecret { get; set; } } } diff --git a/src/Stripe.net/Services/Sources/SourceMandateAcceptanceOfflineOptions.cs b/src/Stripe.net/Services/Sources/SourceMandateAcceptanceOfflineOptions.cs index 5355797c13..dab6524cfc 100644 --- a/src/Stripe.net/Services/Sources/SourceMandateAcceptanceOfflineOptions.cs +++ b/src/Stripe.net/Services/Sources/SourceMandateAcceptanceOfflineOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SourceMandateAcceptanceOfflineOptions : INestedOptions { @@ -10,6 +13,9 @@ public class SourceMandateAcceptanceOfflineOptions : INestedOptions /// type is offline. /// [JsonProperty("contact_email")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("contact_email")] +#endif public string ContactEmail { get; set; } } } diff --git a/src/Stripe.net/Services/Sources/SourceMandateAcceptanceOnlineOptions.cs b/src/Stripe.net/Services/Sources/SourceMandateAcceptanceOnlineOptions.cs index d7a13bed2f..ef2af8afb8 100644 --- a/src/Stripe.net/Services/Sources/SourceMandateAcceptanceOnlineOptions.cs +++ b/src/Stripe.net/Services/Sources/SourceMandateAcceptanceOnlineOptions.cs @@ -4,6 +4,9 @@ namespace Stripe using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SourceMandateAcceptanceOnlineOptions : INestedOptions { @@ -13,12 +16,19 @@ public class SourceMandateAcceptanceOnlineOptions : INestedOptions /// [JsonProperty("date")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("date")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? Date { get; set; } /// /// The IP address from which the mandate was accepted or refused by the customer. /// [JsonProperty("ip")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ip")] +#endif public string Ip { get; set; } /// @@ -26,6 +36,9 @@ public class SourceMandateAcceptanceOnlineOptions : INestedOptions /// customer. /// [JsonProperty("user_agent")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("user_agent")] +#endif public string UserAgent { get; set; } } } diff --git a/src/Stripe.net/Services/Sources/SourceMandateAcceptanceOptions.cs b/src/Stripe.net/Services/Sources/SourceMandateAcceptanceOptions.cs index 1a233d5ab8..6e599f32b7 100644 --- a/src/Stripe.net/Services/Sources/SourceMandateAcceptanceOptions.cs +++ b/src/Stripe.net/Services/Sources/SourceMandateAcceptanceOptions.cs @@ -4,6 +4,9 @@ namespace Stripe using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SourceMandateAcceptanceOptions : INestedOptions { @@ -13,12 +16,19 @@ public class SourceMandateAcceptanceOptions : INestedOptions /// [JsonProperty("date")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("date")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? Date { get; set; } /// /// The IP address from which the mandate was accepted or refused by the customer. /// [JsonProperty("ip")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ip")] +#endif public string Ip { get; set; } /// @@ -26,6 +36,9 @@ public class SourceMandateAcceptanceOptions : INestedOptions /// mandate[type] is offline. /// [JsonProperty("offline")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("offline")] +#endif public SourceMandateAcceptanceOfflineOptions Offline { get; set; } /// @@ -33,6 +46,9 @@ public class SourceMandateAcceptanceOptions : INestedOptions /// mandate[type] is online. /// [JsonProperty("online")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("online")] +#endif public SourceMandateAcceptanceOnlineOptions Online { get; set; } /// @@ -41,6 +57,9 @@ public class SourceMandateAcceptanceOptions : INestedOptions /// One of: accepted, pending, refused, or revoked. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } /// @@ -49,6 +68,9 @@ public class SourceMandateAcceptanceOptions : INestedOptions /// One of: offline, or online. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } /// @@ -56,6 +78,9 @@ public class SourceMandateAcceptanceOptions : INestedOptions /// customer. /// [JsonProperty("user_agent")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("user_agent")] +#endif public string UserAgent { get; set; } } } diff --git a/src/Stripe.net/Services/Sources/SourceMandateOptions.cs b/src/Stripe.net/Services/Sources/SourceMandateOptions.cs index 1b631ad158..28a77e839a 100644 --- a/src/Stripe.net/Services/Sources/SourceMandateOptions.cs +++ b/src/Stripe.net/Services/Sources/SourceMandateOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SourceMandateOptions : INestedOptions { @@ -10,18 +13,27 @@ public class SourceMandateOptions : INestedOptions /// customer. /// [JsonProperty("acceptance")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("acceptance")] +#endif public SourceMandateAcceptanceOptions Acceptance { get; set; } /// /// The amount specified by the mandate. (Leave null for a mandate covering all amounts). /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long? Amount { get; set; } /// /// The currency specified by the mandate. (Must match currency of the source). /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// @@ -31,6 +43,9 @@ public class SourceMandateOptions : INestedOptions /// One of: one_time, scheduled, or variable. /// [JsonProperty("interval")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interval")] +#endif public string Interval { get; set; } /// @@ -44,6 +59,9 @@ public class SourceMandateOptions : INestedOptions /// stripe_email. /// [JsonProperty("notification_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("notification_method")] +#endif public string NotificationMethod { get; set; } } } diff --git a/src/Stripe.net/Services/Sources/SourceOwnerOptions.cs b/src/Stripe.net/Services/Sources/SourceOwnerOptions.cs index 817b0b3874..22b42dfab6 100644 --- a/src/Stripe.net/Services/Sources/SourceOwnerOptions.cs +++ b/src/Stripe.net/Services/Sources/SourceOwnerOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SourceOwnerOptions : INestedOptions { @@ -9,24 +12,36 @@ public class SourceOwnerOptions : INestedOptions /// Owner's address. /// [JsonProperty("address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address")] +#endif public AddressOptions Address { get; set; } /// /// Owner's email address. /// [JsonProperty("email")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("email")] +#endif public string Email { get; set; } /// /// Owner's full name. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } /// /// Owner's phone number. /// [JsonProperty("phone")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("phone")] +#endif public string Phone { get; set; } } } diff --git a/src/Stripe.net/Services/Sources/SourceReceiverOptions.cs b/src/Stripe.net/Services/Sources/SourceReceiverOptions.cs index 55db04afd7..ed19fa1539 100644 --- a/src/Stripe.net/Services/Sources/SourceReceiverOptions.cs +++ b/src/Stripe.net/Services/Sources/SourceReceiverOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SourceReceiverOptions : INestedOptions { @@ -14,6 +17,9 @@ public class SourceReceiverOptions : INestedOptions /// One of: email, manual, or none. /// [JsonProperty("refund_attributes_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("refund_attributes_method")] +#endif public string RefundAttributesMethod { get; set; } } } diff --git a/src/Stripe.net/Services/Sources/SourceRedirectOptions.cs b/src/Stripe.net/Services/Sources/SourceRedirectOptions.cs index 6ecc8a170d..1e0b9080f2 100644 --- a/src/Stripe.net/Services/Sources/SourceRedirectOptions.cs +++ b/src/Stripe.net/Services/Sources/SourceRedirectOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SourceRedirectOptions : INestedOptions { @@ -10,6 +13,9 @@ public class SourceRedirectOptions : INestedOptions /// payment. It can use your application URI scheme in the context of a mobile application. /// [JsonProperty("return_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("return_url")] +#endif public string ReturnUrl { get; set; } } } diff --git a/src/Stripe.net/Services/Sources/SourceSourceOrderItemOptions.cs b/src/Stripe.net/Services/Sources/SourceSourceOrderItemOptions.cs index 43996884d8..020c156b46 100644 --- a/src/Stripe.net/Services/Sources/SourceSourceOrderItemOptions.cs +++ b/src/Stripe.net/Services/Sources/SourceSourceOrderItemOptions.cs @@ -2,22 +2,37 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SourceSourceOrderItemOptions : INestedOptions { [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long? Amount { get; set; } [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// /// The ID of the SKU being ordered. /// [JsonProperty("parent")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("parent")] +#endif public string Parent { get; set; } /// @@ -25,12 +40,18 @@ public class SourceSourceOrderItemOptions : INestedOptions /// instances of the SKU to be ordered. /// [JsonProperty("quantity")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("quantity")] +#endif public long? Quantity { get; set; } /// /// One of: discount, shipping, sku, or tax. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Sources/SourceSourceOrderOptions.cs b/src/Stripe.net/Services/Sources/SourceSourceOrderOptions.cs index 7aa53b361d..ec9cdcd719 100644 --- a/src/Stripe.net/Services/Sources/SourceSourceOrderOptions.cs +++ b/src/Stripe.net/Services/Sources/SourceSourceOrderOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SourceSourceOrderOptions : INestedOptions { @@ -10,6 +13,9 @@ public class SourceSourceOrderOptions : INestedOptions /// List of items constituting the order. /// [JsonProperty("items")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("items")] +#endif public List Items { get; set; } /// @@ -17,6 +23,9 @@ public class SourceSourceOrderOptions : INestedOptions /// shippable set to true. /// [JsonProperty("shipping")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping")] +#endif public ChargeShippingOptions Shipping { get; set; } } } diff --git a/src/Stripe.net/Services/Sources/SourceUpdateOptions.cs b/src/Stripe.net/Services/Sources/SourceUpdateOptions.cs index fb4962bfbe..a647c469d5 100644 --- a/src/Stripe.net/Services/Sources/SourceUpdateOptions.cs +++ b/src/Stripe.net/Services/Sources/SourceUpdateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SourceUpdateOptions : BaseOptions, IHasMetadata { @@ -10,9 +13,15 @@ public class SourceUpdateOptions : BaseOptions, IHasMetadata /// Amount associated with the source. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long? Amount { get; set; } [JsonProperty("card")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card")] +#endif public SourceCardOptions Card { get; set; } /// @@ -20,6 +29,9 @@ public class SourceUpdateOptions : BaseOptions, IHasMetadata /// debits) as well as its acceptance status. /// [JsonProperty("mandate")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mandate")] +#endif public SourceMandateOptions Mandate { get; set; } /// @@ -29,6 +41,9 @@ public class SourceUpdateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -36,6 +51,9 @@ public class SourceUpdateOptions : BaseOptions, IHasMetadata /// particular source types. /// [JsonProperty("owner")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("owner")] +#endif public SourceOwnerOptions Owner { get; set; } /// @@ -43,6 +61,9 @@ public class SourceUpdateOptions : BaseOptions, IHasMetadata /// transactional credit (for example Klarna) sources before you can charge it. /// [JsonProperty("source_order")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("source_order")] +#endif public SourceSourceOrderOptions SourceOrder { get; set; } } } diff --git a/src/Stripe.net/Services/Sources/SourceVerifyOptions.cs b/src/Stripe.net/Services/Sources/SourceVerifyOptions.cs index c8a86c7570..dd385ca220 100644 --- a/src/Stripe.net/Services/Sources/SourceVerifyOptions.cs +++ b/src/Stripe.net/Services/Sources/SourceVerifyOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SourceVerifyOptions : BaseOptions { @@ -10,6 +13,9 @@ public class SourceVerifyOptions : BaseOptions /// The values needed to verify the source. /// [JsonProperty("values")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("values")] +#endif public List Values { get; set; } } } diff --git a/src/Stripe.net/Services/SubscriptionItemUsageRecords/SubscriptionItemUsageRecordCreateOptions.cs b/src/Stripe.net/Services/SubscriptionItemUsageRecords/SubscriptionItemUsageRecordCreateOptions.cs index a5875e0906..51983474ed 100644 --- a/src/Stripe.net/Services/SubscriptionItemUsageRecords/SubscriptionItemUsageRecordCreateOptions.cs +++ b/src/Stripe.net/Services/SubscriptionItemUsageRecords/SubscriptionItemUsageRecordCreateOptions.cs @@ -4,6 +4,9 @@ namespace Stripe using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionItemUsageRecordCreateOptions : BaseOptions { @@ -17,12 +20,18 @@ public class SubscriptionItemUsageRecordCreateOptions : BaseOptions /// One of: increment, or set. /// [JsonProperty("action")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("action")] +#endif public string Action { get; set; } /// /// The usage quantity for the specified timestamp. /// [JsonProperty("quantity")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("quantity")] +#endif public long? Quantity { get; set; } /// @@ -33,6 +42,10 @@ public class SubscriptionItemUsageRecordCreateOptions : BaseOptions /// [JsonProperty("timestamp")] [JsonConverter(typeof(AnyOfConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("timestamp")] + [STJS.JsonConverter(typeof(STJAnyOfConverter))] +#endif public AnyOf Timestamp { get; set; } } } diff --git a/src/Stripe.net/Services/SubscriptionItems/SubscriptionItemCreateOptions.cs b/src/Stripe.net/Services/SubscriptionItems/SubscriptionItemCreateOptions.cs index b96fe9afe3..fa79fe592f 100644 --- a/src/Stripe.net/Services/SubscriptionItems/SubscriptionItemCreateOptions.cs +++ b/src/Stripe.net/Services/SubscriptionItems/SubscriptionItemCreateOptions.cs @@ -5,6 +5,9 @@ namespace Stripe using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionItemCreateOptions : BaseOptions, IHasMetadata { @@ -14,12 +17,18 @@ public class SubscriptionItemCreateOptions : BaseOptions, IHasMetadata /// thresholds. /// [JsonProperty("billing_thresholds")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_thresholds")] +#endif public SubscriptionItemBillingThresholdsOptions BillingThresholds { get; set; } /// /// The coupons to redeem into discounts for the subscription item. /// [JsonProperty("discounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discounts")] +#endif public List Discounts { get; set; } /// @@ -29,6 +38,9 @@ public class SubscriptionItemCreateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -63,18 +75,27 @@ public class SubscriptionItemCreateOptions : BaseOptions, IHasMetadata /// or pending_if_incomplete. /// [JsonProperty("payment_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_behavior")] +#endif public string PaymentBehavior { get; set; } /// /// The identifier of the plan to add to the subscription. /// [JsonProperty("plan")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("plan")] +#endif public string Plan { get; set; } /// /// The ID of the price object. /// [JsonProperty("price")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("price")] +#endif public string Price { get; set; } /// @@ -82,6 +103,9 @@ public class SubscriptionItemCreateOptions : BaseOptions, IHasMetadata /// object inline. /// [JsonProperty("price_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("price_data")] +#endif public SubscriptionItemPriceDataOptions PriceData { get; set; } /// @@ -93,6 +117,9 @@ public class SubscriptionItemCreateOptions : BaseOptions, IHasMetadata /// One of: always_invoice, create_prorations, or none. /// [JsonProperty("proration_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("proration_behavior")] +#endif public string ProrationBehavior { get; set; } /// @@ -103,18 +130,28 @@ public class SubscriptionItemCreateOptions : BaseOptions, IHasMetadata /// [JsonProperty("proration_date")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("proration_date")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? ProrationDate { get; set; } /// /// The quantity you'd like to apply to the subscription item you're creating. /// [JsonProperty("quantity")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("quantity")] +#endif public long? Quantity { get; set; } /// /// The identifier of the subscription to modify. /// [JsonProperty("subscription")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("subscription")] +#endif public string Subscription { get; set; } /// @@ -125,6 +162,9 @@ public class SubscriptionItemCreateOptions : BaseOptions, IHasMetadata /// tax rates. /// [JsonProperty("tax_rates")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_rates")] +#endif public List TaxRates { get; set; } } } diff --git a/src/Stripe.net/Services/SubscriptionItems/SubscriptionItemDeleteOptions.cs b/src/Stripe.net/Services/SubscriptionItems/SubscriptionItemDeleteOptions.cs index b100f53255..68fa91b190 100644 --- a/src/Stripe.net/Services/SubscriptionItems/SubscriptionItemDeleteOptions.cs +++ b/src/Stripe.net/Services/SubscriptionItems/SubscriptionItemDeleteOptions.cs @@ -4,6 +4,9 @@ namespace Stripe using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionItemDeleteOptions : BaseOptions { @@ -12,6 +15,9 @@ public class SubscriptionItemDeleteOptions : BaseOptions /// usage_type is metered. /// [JsonProperty("clear_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("clear_usage")] +#endif public bool? ClearUsage { get; set; } /// @@ -23,6 +29,9 @@ public class SubscriptionItemDeleteOptions : BaseOptions /// One of: always_invoice, create_prorations, or none. /// [JsonProperty("proration_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("proration_behavior")] +#endif public string ProrationBehavior { get; set; } /// @@ -33,6 +42,10 @@ public class SubscriptionItemDeleteOptions : BaseOptions /// [JsonProperty("proration_date")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("proration_date")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? ProrationDate { get; set; } } } diff --git a/src/Stripe.net/Services/SubscriptionItems/SubscriptionItemListOptions.cs b/src/Stripe.net/Services/SubscriptionItems/SubscriptionItemListOptions.cs index 0abbac1fa1..8289ae9e93 100644 --- a/src/Stripe.net/Services/SubscriptionItems/SubscriptionItemListOptions.cs +++ b/src/Stripe.net/Services/SubscriptionItems/SubscriptionItemListOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionItemListOptions : ListOptions { @@ -9,6 +12,9 @@ public class SubscriptionItemListOptions : ListOptions /// The ID of the subscription whose items will be retrieved. /// [JsonProperty("subscription")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("subscription")] +#endif public string Subscription { get; set; } } } diff --git a/src/Stripe.net/Services/SubscriptionItems/SubscriptionItemUpdateOptions.cs b/src/Stripe.net/Services/SubscriptionItems/SubscriptionItemUpdateOptions.cs index 808fab0968..1c0e364795 100644 --- a/src/Stripe.net/Services/SubscriptionItems/SubscriptionItemUpdateOptions.cs +++ b/src/Stripe.net/Services/SubscriptionItems/SubscriptionItemUpdateOptions.cs @@ -5,6 +5,9 @@ namespace Stripe using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionItemUpdateOptions : BaseOptions, IHasMetadata { @@ -14,12 +17,18 @@ public class SubscriptionItemUpdateOptions : BaseOptions, IHasMetadata /// thresholds. /// [JsonProperty("billing_thresholds")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_thresholds")] +#endif public SubscriptionItemBillingThresholdsOptions BillingThresholds { get; set; } /// /// The coupons to redeem into discounts for the subscription item. /// [JsonProperty("discounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discounts")] +#endif public List Discounts { get; set; } /// @@ -29,6 +38,9 @@ public class SubscriptionItemUpdateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -36,6 +48,9 @@ public class SubscriptionItemUpdateOptions : BaseOptions, IHasMetadata /// Defaults to false (on-session). /// [JsonProperty("off_session")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("off_session")] +#endif public bool? OffSession { get; set; } /// @@ -70,12 +85,18 @@ public class SubscriptionItemUpdateOptions : BaseOptions, IHasMetadata /// or pending_if_incomplete. /// [JsonProperty("payment_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_behavior")] +#endif public string PaymentBehavior { get; set; } /// /// The identifier of the new plan for this subscription item. /// [JsonProperty("plan")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("plan")] +#endif public string Plan { get; set; } /// @@ -84,6 +105,9 @@ public class SubscriptionItemUpdateOptions : BaseOptions, IHasMetadata /// quantity parameter is provided. /// [JsonProperty("price")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("price")] +#endif public string Price { get; set; } /// @@ -91,6 +115,9 @@ public class SubscriptionItemUpdateOptions : BaseOptions, IHasMetadata /// object inline. One of price or price_data is required. /// [JsonProperty("price_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("price_data")] +#endif public SubscriptionItemPriceDataOptions PriceData { get; set; } /// @@ -102,6 +129,9 @@ public class SubscriptionItemUpdateOptions : BaseOptions, IHasMetadata /// One of: always_invoice, create_prorations, or none. /// [JsonProperty("proration_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("proration_behavior")] +#endif public string ProrationBehavior { get; set; } /// @@ -112,12 +142,19 @@ public class SubscriptionItemUpdateOptions : BaseOptions, IHasMetadata /// [JsonProperty("proration_date")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("proration_date")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? ProrationDate { get; set; } /// /// The quantity you'd like to apply to the subscription item you're creating. /// [JsonProperty("quantity")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("quantity")] +#endif public long? Quantity { get; set; } /// @@ -128,6 +165,9 @@ public class SubscriptionItemUpdateOptions : BaseOptions, IHasMetadata /// tax rates. /// [JsonProperty("tax_rates")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_rates")] +#endif public List TaxRates { get; set; } } } diff --git a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleCancelOptions.cs b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleCancelOptions.cs index 017bb6f097..b82230ef27 100644 --- a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleCancelOptions.cs +++ b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleCancelOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionScheduleCancelOptions : BaseOptions { @@ -11,6 +14,9 @@ public class SubscriptionScheduleCancelOptions : BaseOptions /// items. Defaults to true. /// [JsonProperty("invoice_now")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("invoice_now")] +#endif public bool? InvoiceNow { get; set; } /// @@ -18,6 +24,9 @@ public class SubscriptionScheduleCancelOptions : BaseOptions /// prorated. Defaults to true. /// [JsonProperty("prorate")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("prorate")] +#endif public bool? Prorate { get; set; } } } diff --git a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleCreateOptions.cs b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleCreateOptions.cs index e9d93dcbec..b3a333dc31 100644 --- a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleCreateOptions.cs +++ b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleCreateOptions.cs @@ -5,6 +5,9 @@ namespace Stripe using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionScheduleCreateOptions : BaseOptions, IHasMetadata { @@ -12,12 +15,18 @@ public class SubscriptionScheduleCreateOptions : BaseOptions, IHasMetadata /// The identifier of the customer to create the subscription schedule for. /// [JsonProperty("customer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] +#endif public string Customer { get; set; } /// /// Object representing the subscription schedule's default settings. /// [JsonProperty("default_settings")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("default_settings")] +#endif public SubscriptionScheduleDefaultSettingsOptions DefaultSettings { get; set; } /// @@ -29,6 +38,9 @@ public class SubscriptionScheduleCreateOptions : BaseOptions, IHasMetadata /// One of: cancel, none, release, or renew. /// [JsonProperty("end_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("end_behavior")] +#endif public string EndBehavior { get; set; } /// @@ -39,6 +51,9 @@ public class SubscriptionScheduleCreateOptions : BaseOptions, IHasMetadata /// with other modifications, we recommend making two separate API calls. /// [JsonProperty("from_subscription")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("from_subscription")] +#endif public string FromSubscription { get; set; } /// @@ -48,6 +63,9 @@ public class SubscriptionScheduleCreateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -56,6 +74,9 @@ public class SubscriptionScheduleCreateOptions : BaseOptions, IHasMetadata /// end_date of one phase will always equal the start_date of the next phase. /// [JsonProperty("phases")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("phases")] +#endif public List Phases { get; set; } /// @@ -66,6 +87,10 @@ public class SubscriptionScheduleCreateOptions : BaseOptions, IHasMetadata /// [JsonProperty("start_date")] [JsonConverter(typeof(AnyOfConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("start_date")] + [STJS.JsonConverter(typeof(STJAnyOfConverter))] +#endif public AnyOf StartDate { get; set; } } } diff --git a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleDefaultSettingsAutomaticTaxLiabilityOptions.cs b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleDefaultSettingsAutomaticTaxLiabilityOptions.cs index 2334d2a79e..8db2cdaed0 100644 --- a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleDefaultSettingsAutomaticTaxLiabilityOptions.cs +++ b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleDefaultSettingsAutomaticTaxLiabilityOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionScheduleDefaultSettingsAutomaticTaxLiabilityOptions : INestedOptions { @@ -9,6 +12,9 @@ public class SubscriptionScheduleDefaultSettingsAutomaticTaxLiabilityOptions : I /// The connected account being referenced when type is account. /// [JsonProperty("account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account")] +#endif public string Account { get; set; } /// @@ -16,6 +22,9 @@ public class SubscriptionScheduleDefaultSettingsAutomaticTaxLiabilityOptions : I /// One of: account, or self. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleDefaultSettingsAutomaticTaxOptions.cs b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleDefaultSettingsAutomaticTaxOptions.cs index 8a57380138..73f1ae2092 100644 --- a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleDefaultSettingsAutomaticTaxOptions.cs +++ b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleDefaultSettingsAutomaticTaxOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionScheduleDefaultSettingsAutomaticTaxOptions : INestedOptions { @@ -10,6 +13,9 @@ public class SubscriptionScheduleDefaultSettingsAutomaticTaxOptions : INestedOpt /// invoices generated by the subscription. /// [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool? Enabled { get; set; } /// @@ -18,6 +24,9 @@ public class SubscriptionScheduleDefaultSettingsAutomaticTaxOptions : INestedOpt /// transaction is returned in the report of the connected account. /// [JsonProperty("liability")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("liability")] +#endif public SubscriptionScheduleDefaultSettingsAutomaticTaxLiabilityOptions Liability { get; set; } } } diff --git a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleDefaultSettingsBillingThresholdsOptions.cs b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleDefaultSettingsBillingThresholdsOptions.cs index 7a3d54e805..79b5304646 100644 --- a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleDefaultSettingsBillingThresholdsOptions.cs +++ b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleDefaultSettingsBillingThresholdsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionScheduleDefaultSettingsBillingThresholdsOptions : INestedOptions { @@ -9,6 +12,9 @@ public class SubscriptionScheduleDefaultSettingsBillingThresholdsOptions : INest /// Monetary threshold that triggers the subscription to advance to a new billing period. /// [JsonProperty("amount_gte")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_gte")] +#endif public long? AmountGte { get; set; } /// @@ -17,6 +23,9 @@ public class SubscriptionScheduleDefaultSettingsBillingThresholdsOptions : INest /// threshold was last reached; otherwise, the value will remain unchanged. /// [JsonProperty("reset_billing_cycle_anchor")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reset_billing_cycle_anchor")] +#endif public bool? ResetBillingCycleAnchor { get; set; } } } diff --git a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleDefaultSettingsInvoiceSettingsIssuerOptions.cs b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleDefaultSettingsInvoiceSettingsIssuerOptions.cs index 867d77000f..1b991d3618 100644 --- a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleDefaultSettingsInvoiceSettingsIssuerOptions.cs +++ b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleDefaultSettingsInvoiceSettingsIssuerOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionScheduleDefaultSettingsInvoiceSettingsIssuerOptions : INestedOptions { @@ -9,6 +12,9 @@ public class SubscriptionScheduleDefaultSettingsInvoiceSettingsIssuerOptions : I /// The connected account being referenced when type is account. /// [JsonProperty("account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account")] +#endif public string Account { get; set; } /// @@ -16,6 +22,9 @@ public class SubscriptionScheduleDefaultSettingsInvoiceSettingsIssuerOptions : I /// One of: account, or self. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleDefaultSettingsInvoiceSettingsOptions.cs b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleDefaultSettingsInvoiceSettingsOptions.cs index bf8196307a..3edcfa9856 100644 --- a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleDefaultSettingsInvoiceSettingsOptions.cs +++ b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleDefaultSettingsInvoiceSettingsOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionScheduleDefaultSettingsInvoiceSettingsOptions : INestedOptions { @@ -11,6 +14,9 @@ public class SubscriptionScheduleDefaultSettingsInvoiceSettingsOptions : INested /// generated by the subscription schedule. /// [JsonProperty("account_tax_ids")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_tax_ids")] +#endif public List AccountTaxIds { get; set; } /// @@ -19,6 +25,9 @@ public class SubscriptionScheduleDefaultSettingsInvoiceSettingsOptions : INested /// collection_method=charge_automatically. /// [JsonProperty("days_until_due")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("days_until_due")] +#endif public long? DaysUntilDue { get; set; } /// @@ -26,6 +35,9 @@ public class SubscriptionScheduleDefaultSettingsInvoiceSettingsOptions : INested /// branding and support information of the specified account. /// [JsonProperty("issuer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("issuer")] +#endif public SubscriptionScheduleDefaultSettingsInvoiceSettingsIssuerOptions Issuer { get; set; } } } diff --git a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleDefaultSettingsOptions.cs b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleDefaultSettingsOptions.cs index acc6a2b9e6..5f2fb642dc 100644 --- a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleDefaultSettingsOptions.cs +++ b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleDefaultSettingsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionScheduleDefaultSettingsOptions : INestedOptions { @@ -14,12 +17,18 @@ public class SubscriptionScheduleDefaultSettingsOptions : INestedOptions /// href="https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions">documentation. /// [JsonProperty("application_fee_percent")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("application_fee_percent")] +#endif public decimal? ApplicationFeePercent { get; set; } /// /// Default settings for automatic tax computation. /// [JsonProperty("automatic_tax")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("automatic_tax")] +#endif public SubscriptionScheduleDefaultSettingsAutomaticTaxOptions AutomaticTax { get; set; } /// @@ -31,6 +40,9 @@ public class SubscriptionScheduleDefaultSettingsOptions : INestedOptions /// One of: automatic, or phase_start. /// [JsonProperty("billing_cycle_anchor")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_cycle_anchor")] +#endif public string BillingCycleAnchor { get; set; } /// @@ -38,6 +50,9 @@ public class SubscriptionScheduleDefaultSettingsOptions : INestedOptions /// new billing period. Pass an empty string to remove previously-defined thresholds. /// [JsonProperty("billing_thresholds")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_thresholds")] +#endif public SubscriptionScheduleDefaultSettingsBillingThresholdsOptions BillingThresholds { get; set; } /// @@ -49,6 +64,9 @@ public class SubscriptionScheduleDefaultSettingsOptions : INestedOptions /// One of: charge_automatically, or send_invoice. /// [JsonProperty("collection_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("collection_method")] +#endif public string CollectionMethod { get; set; } /// @@ -57,6 +75,9 @@ public class SubscriptionScheduleDefaultSettingsOptions : INestedOptions /// default payment method in the customer's invoice settings. /// [JsonProperty("default_payment_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("default_payment_method")] +#endif public string DefaultPaymentMethod { get; set; } /// @@ -65,12 +86,18 @@ public class SubscriptionScheduleDefaultSettingsOptions : INestedOptions /// certain local payment methods UIs. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// /// All invoices will be billed using the specified settings. /// [JsonProperty("invoice_settings")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("invoice_settings")] +#endif public SubscriptionScheduleDefaultSettingsInvoiceSettingsOptions InvoiceSettings { get; set; } /// @@ -78,6 +105,9 @@ public class SubscriptionScheduleDefaultSettingsOptions : INestedOptions /// invoices. /// [JsonProperty("on_behalf_of")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("on_behalf_of")] +#endif public string OnBehalfOf { get; set; } /// @@ -85,6 +115,9 @@ public class SubscriptionScheduleDefaultSettingsOptions : INestedOptions /// subscription's invoices. /// [JsonProperty("transfer_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transfer_data")] +#endif public SubscriptionScheduleDefaultSettingsTransferDataOptions TransferData { get; set; } } } diff --git a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleDefaultSettingsTransferDataOptions.cs b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleDefaultSettingsTransferDataOptions.cs index 37cbfbda80..064a19a5af 100644 --- a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleDefaultSettingsTransferDataOptions.cs +++ b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleDefaultSettingsTransferDataOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionScheduleDefaultSettingsTransferDataOptions : INestedOptions { @@ -12,12 +15,18 @@ public class SubscriptionScheduleDefaultSettingsTransferDataOptions : INestedOpt /// destination. /// [JsonProperty("amount_percent")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_percent")] +#endif public decimal? AmountPercent { get; set; } /// /// ID of an existing, connected Stripe account. /// [JsonProperty("destination")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("destination")] +#endif public string Destination { get; set; } } } diff --git a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleListOptions.cs b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleListOptions.cs index d590f30c7f..4c0d8a825e 100644 --- a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleListOptions.cs +++ b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleListOptions.cs @@ -4,6 +4,9 @@ namespace Stripe using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionScheduleListOptions : ListOptionsWithCreated { @@ -12,6 +15,10 @@ public class SubscriptionScheduleListOptions : ListOptionsWithCreated /// [JsonProperty("canceled_at")] [JsonConverter(typeof(AnyOfConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("canceled_at")] + [STJS.JsonConverter(typeof(STJAnyOfConverter))] +#endif public AnyOf CanceledAt { get; set; } /// @@ -19,12 +26,19 @@ public class SubscriptionScheduleListOptions : ListOptionsWithCreated /// [JsonProperty("completed_at")] [JsonConverter(typeof(AnyOfConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("completed_at")] + [STJS.JsonConverter(typeof(STJAnyOfConverter))] +#endif public AnyOf CompletedAt { get; set; } /// /// Only return subscription schedules for the given customer. /// [JsonProperty("customer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] +#endif public string Customer { get; set; } /// @@ -32,12 +46,19 @@ public class SubscriptionScheduleListOptions : ListOptionsWithCreated /// [JsonProperty("released_at")] [JsonConverter(typeof(AnyOfConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("released_at")] + [STJS.JsonConverter(typeof(STJAnyOfConverter))] +#endif public AnyOf ReleasedAt { get; set; } /// /// Only return subscription schedules that have not started yet. /// [JsonProperty("scheduled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("scheduled")] +#endif public bool? Scheduled { get; set; } } } diff --git a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseAddInvoiceItemDiscountOptions.cs b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseAddInvoiceItemDiscountOptions.cs index e60c11d0f0..dad8d19b9e 100644 --- a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseAddInvoiceItemDiscountOptions.cs +++ b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseAddInvoiceItemDiscountOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionSchedulePhaseAddInvoiceItemDiscountOptions : INestedOptions { @@ -9,18 +12,27 @@ public class SubscriptionSchedulePhaseAddInvoiceItemDiscountOptions : INestedOpt /// ID of the coupon to create a new discount for. /// [JsonProperty("coupon")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("coupon")] +#endif public string Coupon { get; set; } /// /// ID of an existing discount on the object (or one of its ancestors) to reuse. /// [JsonProperty("discount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discount")] +#endif public string Discount { get; set; } /// /// ID of the promotion code to create a new discount for. /// [JsonProperty("promotion_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("promotion_code")] +#endif public string PromotionCode { get; set; } } } diff --git a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseAddInvoiceItemOptions.cs b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseAddInvoiceItemOptions.cs index 16a59244c0..b782d922e2 100644 --- a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseAddInvoiceItemOptions.cs +++ b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseAddInvoiceItemOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionSchedulePhaseAddInvoiceItemOptions : INestedOptions { @@ -10,12 +13,18 @@ public class SubscriptionSchedulePhaseAddInvoiceItemOptions : INestedOptions /// The coupons to redeem into discounts for the item. /// [JsonProperty("discounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discounts")] +#endif public List Discounts { get; set; } /// /// The ID of the price object. One of price or price_data is required. /// [JsonProperty("price")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("price")] +#endif public string Price { get; set; } /// @@ -23,12 +32,18 @@ public class SubscriptionSchedulePhaseAddInvoiceItemOptions : INestedOptions /// object inline. One of price or price_data is required. /// [JsonProperty("price_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("price_data")] +#endif public SubscriptionSchedulePhaseAddInvoiceItemPriceDataOptions PriceData { get; set; } /// /// Quantity for this item. Defaults to 1. /// [JsonProperty("quantity")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("quantity")] +#endif public long? Quantity { get; set; } /// @@ -36,6 +51,9 @@ public class SubscriptionSchedulePhaseAddInvoiceItemOptions : INestedOptions /// apply to this item. /// [JsonProperty("tax_rates")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_rates")] +#endif public List TaxRates { get; set; } } } diff --git a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseAddInvoiceItemPriceDataOptions.cs b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseAddInvoiceItemPriceDataOptions.cs index aeaddb7b95..aefa6074a6 100644 --- a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseAddInvoiceItemPriceDataOptions.cs +++ b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseAddInvoiceItemPriceDataOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionSchedulePhaseAddInvoiceItemPriceDataOptions : INestedOptions { @@ -11,12 +14,18 @@ public class SubscriptionSchedulePhaseAddInvoiceItemPriceDataOptions : INestedOp /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// /// The ID of the product that this price will belong to. /// [JsonProperty("product")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("product")] +#endif public string Product { get; set; } /// @@ -29,6 +38,9 @@ public class SubscriptionSchedulePhaseAddInvoiceItemPriceDataOptions : INestedOp /// One of: exclusive, inclusive, or unspecified. /// [JsonProperty("tax_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_behavior")] +#endif public string TaxBehavior { get; set; } /// @@ -37,6 +49,9 @@ public class SubscriptionSchedulePhaseAddInvoiceItemPriceDataOptions : INestedOp /// customer. /// [JsonProperty("unit_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_amount")] +#endif public long? UnitAmount { get; set; } /// @@ -45,6 +60,9 @@ public class SubscriptionSchedulePhaseAddInvoiceItemPriceDataOptions : INestedOp /// unit_amount_decimal can be set. /// [JsonProperty("unit_amount_decimal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_amount_decimal")] +#endif public decimal? UnitAmountDecimal { get; set; } } } diff --git a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseAutomaticTaxLiabilityOptions.cs b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseAutomaticTaxLiabilityOptions.cs index 47725249bd..357b2e6c27 100644 --- a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseAutomaticTaxLiabilityOptions.cs +++ b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseAutomaticTaxLiabilityOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionSchedulePhaseAutomaticTaxLiabilityOptions : INestedOptions { @@ -9,6 +12,9 @@ public class SubscriptionSchedulePhaseAutomaticTaxLiabilityOptions : INestedOpti /// The connected account being referenced when type is account. /// [JsonProperty("account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account")] +#endif public string Account { get; set; } /// @@ -16,6 +22,9 @@ public class SubscriptionSchedulePhaseAutomaticTaxLiabilityOptions : INestedOpti /// One of: account, or self. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseAutomaticTaxOptions.cs b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseAutomaticTaxOptions.cs index a80a205ce4..6e0fc1ee32 100644 --- a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseAutomaticTaxOptions.cs +++ b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseAutomaticTaxOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionSchedulePhaseAutomaticTaxOptions : INestedOptions { @@ -10,6 +13,9 @@ public class SubscriptionSchedulePhaseAutomaticTaxOptions : INestedOptions /// invoices generated by the subscription. /// [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool? Enabled { get; set; } /// @@ -18,6 +24,9 @@ public class SubscriptionSchedulePhaseAutomaticTaxOptions : INestedOptions /// transaction is returned in the report of the connected account. /// [JsonProperty("liability")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("liability")] +#endif public SubscriptionSchedulePhaseAutomaticTaxLiabilityOptions Liability { get; set; } } } diff --git a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseBillingThresholdsOptions.cs b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseBillingThresholdsOptions.cs index e40fe46edc..fd6a11cb11 100644 --- a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseBillingThresholdsOptions.cs +++ b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseBillingThresholdsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionSchedulePhaseBillingThresholdsOptions : INestedOptions { @@ -9,6 +12,9 @@ public class SubscriptionSchedulePhaseBillingThresholdsOptions : INestedOptions /// Monetary threshold that triggers the subscription to advance to a new billing period. /// [JsonProperty("amount_gte")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_gte")] +#endif public long? AmountGte { get; set; } /// @@ -17,6 +23,9 @@ public class SubscriptionSchedulePhaseBillingThresholdsOptions : INestedOptions /// threshold was last reached; otherwise, the value will remain unchanged. /// [JsonProperty("reset_billing_cycle_anchor")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reset_billing_cycle_anchor")] +#endif public bool? ResetBillingCycleAnchor { get; set; } } } diff --git a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseDiscountOptions.cs b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseDiscountOptions.cs index 18d7655af4..e3d74d45fa 100644 --- a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseDiscountOptions.cs +++ b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseDiscountOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionSchedulePhaseDiscountOptions : INestedOptions { @@ -9,18 +12,27 @@ public class SubscriptionSchedulePhaseDiscountOptions : INestedOptions /// ID of the coupon to create a new discount for. /// [JsonProperty("coupon")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("coupon")] +#endif public string Coupon { get; set; } /// /// ID of an existing discount on the object (or one of its ancestors) to reuse. /// [JsonProperty("discount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discount")] +#endif public string Discount { get; set; } /// /// ID of the promotion code to create a new discount for. /// [JsonProperty("promotion_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("promotion_code")] +#endif public string PromotionCode { get; set; } } } diff --git a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseInvoiceSettingsIssuerOptions.cs b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseInvoiceSettingsIssuerOptions.cs index 88bc65aae0..b99e3da4dd 100644 --- a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseInvoiceSettingsIssuerOptions.cs +++ b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseInvoiceSettingsIssuerOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionSchedulePhaseInvoiceSettingsIssuerOptions : INestedOptions { @@ -9,6 +12,9 @@ public class SubscriptionSchedulePhaseInvoiceSettingsIssuerOptions : INestedOpti /// The connected account being referenced when type is account. /// [JsonProperty("account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account")] +#endif public string Account { get; set; } /// @@ -16,6 +22,9 @@ public class SubscriptionSchedulePhaseInvoiceSettingsIssuerOptions : INestedOpti /// One of: account, or self. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseInvoiceSettingsOptions.cs b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseInvoiceSettingsOptions.cs index 92f7ae3603..a11ddd07f8 100644 --- a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseInvoiceSettingsOptions.cs +++ b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseInvoiceSettingsOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionSchedulePhaseInvoiceSettingsOptions : INestedOptions { @@ -11,6 +14,9 @@ public class SubscriptionSchedulePhaseInvoiceSettingsOptions : INestedOptions /// on invoices generated by this phase of the subscription schedule. /// [JsonProperty("account_tax_ids")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_tax_ids")] +#endif public List AccountTaxIds { get; set; } /// @@ -19,6 +25,9 @@ public class SubscriptionSchedulePhaseInvoiceSettingsOptions : INestedOptions /// billing=charge_automatically. /// [JsonProperty("days_until_due")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("days_until_due")] +#endif public long? DaysUntilDue { get; set; } /// @@ -26,6 +35,9 @@ public class SubscriptionSchedulePhaseInvoiceSettingsOptions : INestedOptions /// branding and support information of the specified account. /// [JsonProperty("issuer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("issuer")] +#endif public SubscriptionSchedulePhaseInvoiceSettingsIssuerOptions Issuer { get; set; } } } diff --git a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseItemBillingThresholdsOptions.cs b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseItemBillingThresholdsOptions.cs index 0378f9e04a..1fb045bd3e 100644 --- a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseItemBillingThresholdsOptions.cs +++ b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseItemBillingThresholdsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionSchedulePhaseItemBillingThresholdsOptions : INestedOptions { @@ -12,6 +15,9 @@ public class SubscriptionSchedulePhaseItemBillingThresholdsOptions : INestedOpti /// threshold). /// [JsonProperty("usage_gte")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("usage_gte")] +#endif public long? UsageGte { get; set; } } } diff --git a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseItemDiscountOptions.cs b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseItemDiscountOptions.cs index 3e2f9baceb..84a77193e9 100644 --- a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseItemDiscountOptions.cs +++ b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseItemDiscountOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionSchedulePhaseItemDiscountOptions : INestedOptions { @@ -9,18 +12,27 @@ public class SubscriptionSchedulePhaseItemDiscountOptions : INestedOptions /// ID of the coupon to create a new discount for. /// [JsonProperty("coupon")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("coupon")] +#endif public string Coupon { get; set; } /// /// ID of an existing discount on the object (or one of its ancestors) to reuse. /// [JsonProperty("discount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discount")] +#endif public string Discount { get; set; } /// /// ID of the promotion code to create a new discount for. /// [JsonProperty("promotion_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("promotion_code")] +#endif public string PromotionCode { get; set; } } } diff --git a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseItemOptions.cs b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseItemOptions.cs index 0a7bb003fe..849c4323a7 100644 --- a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseItemOptions.cs +++ b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseItemOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionSchedulePhaseItemOptions : INestedOptions, IHasMetadata { @@ -12,12 +15,18 @@ public class SubscriptionSchedulePhaseItemOptions : INestedOptions, IHasMetadata /// thresholds. /// [JsonProperty("billing_thresholds")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_thresholds")] +#endif public SubscriptionSchedulePhaseItemBillingThresholdsOptions BillingThresholds { get; set; } /// /// The coupons to redeem into discounts for the subscription item. /// [JsonProperty("discounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discounts")] +#endif public List Discounts { get; set; } /// @@ -31,6 +40,9 @@ public class SubscriptionSchedulePhaseItemOptions : INestedOptions, IHasMetadata /// configuration item's metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -38,12 +50,18 @@ public class SubscriptionSchedulePhaseItemOptions : INestedOptions, IHasMetadata /// price. /// [JsonProperty("plan")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("plan")] +#endif public string Plan { get; set; } /// /// The ID of the price object. /// [JsonProperty("price")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("price")] +#endif public string Price { get; set; } /// @@ -51,6 +69,9 @@ public class SubscriptionSchedulePhaseItemOptions : INestedOptions, IHasMetadata /// object inline. /// [JsonProperty("price_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("price_data")] +#endif public SubscriptionSchedulePhaseItemPriceDataOptions PriceData { get; set; } /// @@ -58,6 +79,9 @@ public class SubscriptionSchedulePhaseItemOptions : INestedOptions, IHasMetadata /// licensed and not metered. /// [JsonProperty("quantity")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("quantity")] +#endif public long? Quantity { get; set; } /// @@ -68,6 +92,9 @@ public class SubscriptionSchedulePhaseItemOptions : INestedOptions, IHasMetadata /// tax rates. /// [JsonProperty("tax_rates")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_rates")] +#endif public List TaxRates { get; set; } } } diff --git a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseItemPriceDataOptions.cs b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseItemPriceDataOptions.cs index b7096eeadc..198e2ebc77 100644 --- a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseItemPriceDataOptions.cs +++ b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseItemPriceDataOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionSchedulePhaseItemPriceDataOptions : INestedOptions { @@ -11,18 +14,27 @@ public class SubscriptionSchedulePhaseItemPriceDataOptions : INestedOptions /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// /// The ID of the product that this price will belong to. /// [JsonProperty("product")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("product")] +#endif public string Product { get; set; } /// /// The recurring components of a price such as interval and interval_count. /// [JsonProperty("recurring")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("recurring")] +#endif public SubscriptionSchedulePhaseItemPriceDataRecurringOptions Recurring { get; set; } /// @@ -35,6 +47,9 @@ public class SubscriptionSchedulePhaseItemPriceDataOptions : INestedOptions /// One of: exclusive, inclusive, or unspecified. /// [JsonProperty("tax_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_behavior")] +#endif public string TaxBehavior { get; set; } /// @@ -42,6 +57,9 @@ public class SubscriptionSchedulePhaseItemPriceDataOptions : INestedOptions /// how much to charge. /// [JsonProperty("unit_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_amount")] +#endif public long? UnitAmount { get; set; } /// @@ -50,6 +68,9 @@ public class SubscriptionSchedulePhaseItemPriceDataOptions : INestedOptions /// unit_amount_decimal can be set. /// [JsonProperty("unit_amount_decimal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_amount_decimal")] +#endif public decimal? UnitAmountDecimal { get; set; } } } diff --git a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseItemPriceDataRecurringOptions.cs b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseItemPriceDataRecurringOptions.cs index 4ccd27db86..1f6cc551b4 100644 --- a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseItemPriceDataRecurringOptions.cs +++ b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseItemPriceDataRecurringOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionSchedulePhaseItemPriceDataRecurringOptions : INestedOptions { @@ -11,6 +14,9 @@ public class SubscriptionSchedulePhaseItemPriceDataRecurringOptions : INestedOpt /// One of: day, month, week, or year. /// [JsonProperty("interval")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interval")] +#endif public string Interval { get; set; } /// @@ -19,6 +25,9 @@ public class SubscriptionSchedulePhaseItemPriceDataRecurringOptions : INestedOpt /// years interval allowed (3 years, 36 months, or 156 weeks). /// [JsonProperty("interval_count")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interval_count")] +#endif public long? IntervalCount { get; set; } } } diff --git a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseOptions.cs b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseOptions.cs index a4901e216a..c8904c3e13 100644 --- a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseOptions.cs +++ b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseOptions.cs @@ -5,6 +5,9 @@ namespace Stripe using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionSchedulePhaseOptions : INestedOptions, IHasMetadata { @@ -13,6 +16,9 @@ public class SubscriptionSchedulePhaseOptions : INestedOptions, IHasMetadata /// invoice for this phase. You may pass up to 20 items. /// [JsonProperty("add_invoice_items")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("add_invoice_items")] +#endif public List AddInvoiceItems { get; set; } /// @@ -24,12 +30,18 @@ public class SubscriptionSchedulePhaseOptions : INestedOptions, IHasMetadata /// href="https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions">documentation. /// [JsonProperty("application_fee_percent")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("application_fee_percent")] +#endif public decimal? ApplicationFeePercent { get; set; } /// /// Automatic tax settings for this phase. /// [JsonProperty("automatic_tax")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("automatic_tax")] +#endif public SubscriptionSchedulePhaseAutomaticTaxOptions AutomaticTax { get; set; } /// @@ -41,6 +53,9 @@ public class SubscriptionSchedulePhaseOptions : INestedOptions, IHasMetadata /// One of: automatic, or phase_start. /// [JsonProperty("billing_cycle_anchor")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_cycle_anchor")] +#endif public string BillingCycleAnchor { get; set; } /// @@ -48,6 +63,9 @@ public class SubscriptionSchedulePhaseOptions : INestedOptions, IHasMetadata /// new billing period. Pass an empty string to remove previously-defined thresholds. /// [JsonProperty("billing_thresholds")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_thresholds")] +#endif public SubscriptionSchedulePhaseBillingThresholdsOptions BillingThresholds { get; set; } /// @@ -59,6 +77,9 @@ public class SubscriptionSchedulePhaseOptions : INestedOptions, IHasMetadata /// One of: charge_automatically, or send_invoice. /// [JsonProperty("collection_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("collection_method")] +#endif public string CollectionMethod { get; set; } /// @@ -67,6 +88,9 @@ public class SubscriptionSchedulePhaseOptions : INestedOptions, IHasMetadata /// instead. /// [JsonProperty("coupon")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("coupon")] +#endif public string Coupon { get; set; } /// @@ -75,6 +99,9 @@ public class SubscriptionSchedulePhaseOptions : INestedOptions, IHasMetadata /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// @@ -83,6 +110,9 @@ public class SubscriptionSchedulePhaseOptions : INestedOptions, IHasMetadata /// default payment method in the customer's invoice settings. /// [JsonProperty("default_payment_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("default_payment_method")] +#endif public string DefaultPaymentMethod { get; set; } /// @@ -94,6 +124,9 @@ public class SubscriptionSchedulePhaseOptions : INestedOptions, IHasMetadata /// for any Invoices issued by the Subscription during this Phase. /// [JsonProperty("default_tax_rates")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("default_tax_rates")] +#endif public List DefaultTaxRates { get; set; } /// @@ -102,6 +135,9 @@ public class SubscriptionSchedulePhaseOptions : INestedOptions, IHasMetadata /// certain local payment methods UIs. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// @@ -110,6 +146,9 @@ public class SubscriptionSchedulePhaseOptions : INestedOptions, IHasMetadata /// any discounts. /// [JsonProperty("discounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discounts")] +#endif public List Discounts { get; set; } /// @@ -118,12 +157,19 @@ public class SubscriptionSchedulePhaseOptions : INestedOptions, IHasMetadata /// [JsonProperty("end_date")] [JsonConverter(typeof(AnyOfConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("end_date")] + [STJS.JsonConverter(typeof(STJAnyOfConverter))] +#endif public AnyOf EndDate { get; set; } /// /// All invoices will be billed using the specified settings. /// [JsonProperty("invoice_settings")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("invoice_settings")] +#endif public SubscriptionSchedulePhaseInvoiceSettingsOptions InvoiceSettings { get; set; } /// @@ -131,6 +177,9 @@ public class SubscriptionSchedulePhaseOptions : INestedOptions, IHasMetadata /// the subscription schedule. /// [JsonProperty("items")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("items")] +#endif public List Items { get; set; } /// @@ -140,6 +189,9 @@ public class SubscriptionSchedulePhaseOptions : INestedOptions, IHasMetadata /// If set, end_date must not be set. /// [JsonProperty("iterations")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("iterations")] +#endif public long? Iterations { get; set; } /// @@ -153,6 +205,9 @@ public class SubscriptionSchedulePhaseOptions : INestedOptions, IHasMetadata /// metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -160,6 +215,9 @@ public class SubscriptionSchedulePhaseOptions : INestedOptions, IHasMetadata /// invoices. /// [JsonProperty("on_behalf_of")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("on_behalf_of")] +#endif public string OnBehalfOf { get; set; } /// @@ -174,6 +232,9 @@ public class SubscriptionSchedulePhaseOptions : INestedOptions, IHasMetadata /// One of: always_invoice, create_prorations, or none. /// [JsonProperty("proration_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("proration_behavior")] +#endif public string ProrationBehavior { get; set; } /// @@ -182,6 +243,10 @@ public class SubscriptionSchedulePhaseOptions : INestedOptions, IHasMetadata /// [JsonProperty("start_date")] [JsonConverter(typeof(AnyOfConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("start_date")] + [STJS.JsonConverter(typeof(STJAnyOfConverter))] +#endif public AnyOf StartDate { get; set; } /// @@ -189,6 +254,9 @@ public class SubscriptionSchedulePhaseOptions : INestedOptions, IHasMetadata /// subscription's invoices. /// [JsonProperty("transfer_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transfer_data")] +#endif public SubscriptionSchedulePhaseTransferDataOptions TransferData { get; set; } /// @@ -196,6 +264,9 @@ public class SubscriptionSchedulePhaseOptions : INestedOptions, IHasMetadata /// charged for any fees. /// [JsonProperty("trial")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("trial")] +#endif public bool? Trial { get; set; } /// @@ -204,6 +275,10 @@ public class SubscriptionSchedulePhaseOptions : INestedOptions, IHasMetadata /// [JsonProperty("trial_end")] [JsonConverter(typeof(AnyOfConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("trial_end")] + [STJS.JsonConverter(typeof(STJAnyOfConverter))] +#endif public AnyOf TrialEnd { get; set; } } } diff --git a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseTransferDataOptions.cs b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseTransferDataOptions.cs index a2099cad2c..3ebc699d74 100644 --- a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseTransferDataOptions.cs +++ b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseTransferDataOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionSchedulePhaseTransferDataOptions : INestedOptions { @@ -12,12 +15,18 @@ public class SubscriptionSchedulePhaseTransferDataOptions : INestedOptions /// destination. /// [JsonProperty("amount_percent")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_percent")] +#endif public decimal? AmountPercent { get; set; } /// /// ID of an existing, connected Stripe account. /// [JsonProperty("destination")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("destination")] +#endif public string Destination { get; set; } } } diff --git a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleReleaseOptions.cs b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleReleaseOptions.cs index 374ff1be91..d2c2041576 100644 --- a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleReleaseOptions.cs +++ b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleReleaseOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionScheduleReleaseOptions : BaseOptions { @@ -9,6 +12,9 @@ public class SubscriptionScheduleReleaseOptions : BaseOptions /// Keep any cancellation on the subscription that the schedule has set. /// [JsonProperty("preserve_cancel_date")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preserve_cancel_date")] +#endif public bool? PreserveCancelDate { get; set; } } } diff --git a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleUpdateOptions.cs b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleUpdateOptions.cs index 5d9417e1cc..d1c6127e42 100644 --- a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleUpdateOptions.cs +++ b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleUpdateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionScheduleUpdateOptions : BaseOptions, IHasMetadata { @@ -10,6 +13,9 @@ public class SubscriptionScheduleUpdateOptions : BaseOptions, IHasMetadata /// Object representing the subscription schedule's default settings. /// [JsonProperty("default_settings")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("default_settings")] +#endif public SubscriptionScheduleDefaultSettingsOptions DefaultSettings { get; set; } /// @@ -21,6 +27,9 @@ public class SubscriptionScheduleUpdateOptions : BaseOptions, IHasMetadata /// One of: cancel, none, release, or renew. /// [JsonProperty("end_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("end_behavior")] +#endif public string EndBehavior { get; set; } /// @@ -30,6 +39,9 @@ public class SubscriptionScheduleUpdateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -39,6 +51,9 @@ public class SubscriptionScheduleUpdateOptions : BaseOptions, IHasMetadata /// Note that past phases can be omitted. /// [JsonProperty("phases")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("phases")] +#endif public List Phases { get; set; } /// @@ -47,6 +62,9 @@ public class SubscriptionScheduleUpdateOptions : BaseOptions, IHasMetadata /// One of: always_invoice, create_prorations, or none. /// [JsonProperty("proration_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("proration_behavior")] +#endif public string ProrationBehavior { get; set; } } } diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionAddInvoiceItemDiscountOptions.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionAddInvoiceItemDiscountOptions.cs index af79d20c5e..78569c16e6 100644 --- a/src/Stripe.net/Services/Subscriptions/SubscriptionAddInvoiceItemDiscountOptions.cs +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionAddInvoiceItemDiscountOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionAddInvoiceItemDiscountOptions : INestedOptions { @@ -9,18 +12,27 @@ public class SubscriptionAddInvoiceItemDiscountOptions : INestedOptions /// ID of the coupon to create a new discount for. /// [JsonProperty("coupon")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("coupon")] +#endif public string Coupon { get; set; } /// /// ID of an existing discount on the object (or one of its ancestors) to reuse. /// [JsonProperty("discount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discount")] +#endif public string Discount { get; set; } /// /// ID of the promotion code to create a new discount for. /// [JsonProperty("promotion_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("promotion_code")] +#endif public string PromotionCode { get; set; } } } diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionAddInvoiceItemOptions.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionAddInvoiceItemOptions.cs index 16c8b0c5f3..ce52a2e42a 100644 --- a/src/Stripe.net/Services/Subscriptions/SubscriptionAddInvoiceItemOptions.cs +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionAddInvoiceItemOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionAddInvoiceItemOptions : INestedOptions { @@ -10,12 +13,18 @@ public class SubscriptionAddInvoiceItemOptions : INestedOptions /// The coupons to redeem into discounts for the item. /// [JsonProperty("discounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discounts")] +#endif public List Discounts { get; set; } /// /// The ID of the price object. One of price or price_data is required. /// [JsonProperty("price")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("price")] +#endif public string Price { get; set; } /// @@ -23,12 +32,18 @@ public class SubscriptionAddInvoiceItemOptions : INestedOptions /// object inline. One of price or price_data is required. /// [JsonProperty("price_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("price_data")] +#endif public SubscriptionAddInvoiceItemPriceDataOptions PriceData { get; set; } /// /// Quantity for this item. Defaults to 1. /// [JsonProperty("quantity")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("quantity")] +#endif public long? Quantity { get; set; } /// @@ -36,6 +51,9 @@ public class SubscriptionAddInvoiceItemOptions : INestedOptions /// apply to this item. /// [JsonProperty("tax_rates")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_rates")] +#endif public List TaxRates { get; set; } } } diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionAddInvoiceItemPriceDataOptions.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionAddInvoiceItemPriceDataOptions.cs index 969729e78a..c2be271156 100644 --- a/src/Stripe.net/Services/Subscriptions/SubscriptionAddInvoiceItemPriceDataOptions.cs +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionAddInvoiceItemPriceDataOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionAddInvoiceItemPriceDataOptions : INestedOptions { @@ -11,12 +14,18 @@ public class SubscriptionAddInvoiceItemPriceDataOptions : INestedOptions /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// /// The ID of the product that this price will belong to. /// [JsonProperty("product")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("product")] +#endif public string Product { get; set; } /// @@ -29,6 +38,9 @@ public class SubscriptionAddInvoiceItemPriceDataOptions : INestedOptions /// One of: exclusive, inclusive, or unspecified. /// [JsonProperty("tax_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_behavior")] +#endif public string TaxBehavior { get; set; } /// @@ -37,6 +49,9 @@ public class SubscriptionAddInvoiceItemPriceDataOptions : INestedOptions /// customer. /// [JsonProperty("unit_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_amount")] +#endif public long? UnitAmount { get; set; } /// @@ -45,6 +60,9 @@ public class SubscriptionAddInvoiceItemPriceDataOptions : INestedOptions /// unit_amount_decimal can be set. /// [JsonProperty("unit_amount_decimal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_amount_decimal")] +#endif public decimal? UnitAmountDecimal { get; set; } } } diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionAutomaticTaxLiabilityOptions.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionAutomaticTaxLiabilityOptions.cs index 5e869474b7..1f80e3c448 100644 --- a/src/Stripe.net/Services/Subscriptions/SubscriptionAutomaticTaxLiabilityOptions.cs +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionAutomaticTaxLiabilityOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionAutomaticTaxLiabilityOptions : INestedOptions { @@ -9,6 +12,9 @@ public class SubscriptionAutomaticTaxLiabilityOptions : INestedOptions /// The connected account being referenced when type is account. /// [JsonProperty("account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account")] +#endif public string Account { get; set; } /// @@ -16,6 +22,9 @@ public class SubscriptionAutomaticTaxLiabilityOptions : INestedOptions /// One of: account, or self. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionAutomaticTaxOptions.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionAutomaticTaxOptions.cs index 0755c19df8..60267be2b8 100644 --- a/src/Stripe.net/Services/Subscriptions/SubscriptionAutomaticTaxOptions.cs +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionAutomaticTaxOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionAutomaticTaxOptions : INestedOptions { @@ -10,6 +13,9 @@ public class SubscriptionAutomaticTaxOptions : INestedOptions /// invoices generated by the subscription. /// [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool? Enabled { get; set; } /// @@ -18,6 +24,9 @@ public class SubscriptionAutomaticTaxOptions : INestedOptions /// transaction is returned in the report of the connected account. /// [JsonProperty("liability")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("liability")] +#endif public SubscriptionAutomaticTaxLiabilityOptions Liability { get; set; } } } diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionBillingCycleAnchorConfigOptions.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionBillingCycleAnchorConfigOptions.cs index 1f73c7d484..bb08fe9f30 100644 --- a/src/Stripe.net/Services/Subscriptions/SubscriptionBillingCycleAnchorConfigOptions.cs +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionBillingCycleAnchorConfigOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionBillingCycleAnchorConfigOptions : INestedOptions { @@ -9,30 +12,45 @@ public class SubscriptionBillingCycleAnchorConfigOptions : INestedOptions /// The day of the month the billing_cycle_anchor should be. Ranges from 1 to 31. /// [JsonProperty("day_of_month")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("day_of_month")] +#endif public long? DayOfMonth { get; set; } /// /// The hour of the day the billing_cycle_anchor should be. Ranges from 0 to 23. /// [JsonProperty("hour")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("hour")] +#endif public long? Hour { get; set; } /// /// The minute of the hour the billing_cycle_anchor should be. Ranges from 0 to 59. /// [JsonProperty("minute")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("minute")] +#endif public long? Minute { get; set; } /// /// The month to start full cycle billing periods. Ranges from 1 to 12. /// [JsonProperty("month")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("month")] +#endif public long? Month { get; set; } /// /// The second of the minute the billing_cycle_anchor should be. Ranges from 0 to 59. /// [JsonProperty("second")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("second")] +#endif public long? Second { get; set; } } } diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionBillingThresholdsOptions.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionBillingThresholdsOptions.cs index 1011d28fbe..0f95b945df 100644 --- a/src/Stripe.net/Services/Subscriptions/SubscriptionBillingThresholdsOptions.cs +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionBillingThresholdsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionBillingThresholdsOptions : INestedOptions { @@ -9,6 +12,9 @@ public class SubscriptionBillingThresholdsOptions : INestedOptions /// Monetary threshold that triggers the subscription to advance to a new billing period. /// [JsonProperty("amount_gte")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_gte")] +#endif public long? AmountGte { get; set; } /// @@ -17,6 +23,9 @@ public class SubscriptionBillingThresholdsOptions : INestedOptions /// threshold was last reached; otherwise, the value will remain unchanged. /// [JsonProperty("reset_billing_cycle_anchor")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reset_billing_cycle_anchor")] +#endif public bool? ResetBillingCycleAnchor { get; set; } } } diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionCancelOptions.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionCancelOptions.cs index 49c42c7067..82d303c6a8 100644 --- a/src/Stripe.net/Services/Subscriptions/SubscriptionCancelOptions.cs +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionCancelOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionCancelOptions : BaseOptions { @@ -9,6 +12,9 @@ public class SubscriptionCancelOptions : BaseOptions /// Details about why this subscription was cancelled. /// [JsonProperty("cancellation_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cancellation_details")] +#endif public SubscriptionCancellationDetailsOptions CancellationDetails { get; set; } /// @@ -16,6 +22,9 @@ public class SubscriptionCancelOptions : BaseOptions /// new/pending proration invoice items. Defaults to false. /// [JsonProperty("invoice_now")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("invoice_now")] +#endif public bool? InvoiceNow { get; set; } /// @@ -23,6 +32,9 @@ public class SubscriptionCancelOptions : BaseOptions /// subscription period end. Defaults to false. /// [JsonProperty("prorate")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("prorate")] +#endif public bool? Prorate { get; set; } } } diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionCancellationDetailsOptions.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionCancellationDetailsOptions.cs index fdd237fb28..f9a51f1a12 100644 --- a/src/Stripe.net/Services/Subscriptions/SubscriptionCancellationDetailsOptions.cs +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionCancellationDetailsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionCancellationDetailsOptions : INestedOptions { @@ -10,6 +13,9 @@ public class SubscriptionCancellationDetailsOptions : INestedOptions /// was canceled explicitly by the user. /// [JsonProperty("comment")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("comment")] +#endif public string Comment { get; set; } /// @@ -20,6 +26,9 @@ public class SubscriptionCancellationDetailsOptions : INestedOptions /// unused. /// [JsonProperty("feedback")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("feedback")] +#endif public string Feedback { get; set; } } } diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionCreateOptions.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionCreateOptions.cs index 684772caba..c847237508 100644 --- a/src/Stripe.net/Services/Subscriptions/SubscriptionCreateOptions.cs +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionCreateOptions.cs @@ -5,6 +5,9 @@ namespace Stripe using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionCreateOptions : BaseOptions, IHasMetadata { @@ -13,6 +16,9 @@ public class SubscriptionCreateOptions : BaseOptions, IHasMetadata /// invoice for this subscription. You may pass up to 20 items. /// [JsonProperty("add_invoice_items")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("add_invoice_items")] +#endif public List AddInvoiceItems { get; set; } /// @@ -24,6 +30,9 @@ public class SubscriptionCreateOptions : BaseOptions, IHasMetadata /// href="https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions">documentation. /// [JsonProperty("application_fee_percent")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("application_fee_percent")] +#endif public decimal? ApplicationFeePercent { get; set; } /// @@ -31,6 +40,9 @@ public class SubscriptionCreateOptions : BaseOptions, IHasMetadata /// parameter when the existing value is being changed. /// [JsonProperty("automatic_tax")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("automatic_tax")] +#endif public SubscriptionAutomaticTaxOptions AutomaticTax { get; set; } /// @@ -40,6 +52,10 @@ public class SubscriptionCreateOptions : BaseOptions, IHasMetadata /// [JsonProperty("backdate_start_date")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("backdate_start_date")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? BackdateStartDate { get; set; } /// @@ -51,6 +67,10 @@ public class SubscriptionCreateOptions : BaseOptions, IHasMetadata /// [JsonProperty("billing_cycle_anchor")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_cycle_anchor")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? BillingCycleAnchor { get; set; } /// @@ -59,6 +79,9 @@ public class SubscriptionCreateOptions : BaseOptions, IHasMetadata /// the day_of_month at the hour, minute, and second UTC. /// [JsonProperty("billing_cycle_anchor_config")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_cycle_anchor_config")] +#endif public SubscriptionBillingCycleAnchorConfigOptions BillingCycleAnchorConfig { get; set; } /// @@ -66,6 +89,9 @@ public class SubscriptionCreateOptions : BaseOptions, IHasMetadata /// new billing period. Pass an empty string to remove previously-defined thresholds. /// [JsonProperty("billing_thresholds")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_thresholds")] +#endif public SubscriptionBillingThresholdsOptions BillingThresholds { get; set; } /// @@ -76,6 +102,10 @@ public class SubscriptionCreateOptions : BaseOptions, IHasMetadata /// [JsonProperty("cancel_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cancel_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? CancelAt { get; set; } /// @@ -83,6 +113,9 @@ public class SubscriptionCreateOptions : BaseOptions, IHasMetadata /// (current_period_end). Defaults to false. /// [JsonProperty("cancel_at_period_end")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cancel_at_period_end")] +#endif public bool? CancelAtPeriodEnd { get; set; } /// @@ -94,6 +127,9 @@ public class SubscriptionCreateOptions : BaseOptions, IHasMetadata /// One of: charge_automatically, or send_invoice. /// [JsonProperty("collection_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("collection_method")] +#endif public string CollectionMethod { get; set; } /// @@ -102,6 +138,9 @@ public class SubscriptionCreateOptions : BaseOptions, IHasMetadata /// deprecated and will be removed in a future API version. Use discounts instead. /// [JsonProperty("coupon")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("coupon")] +#endif public string Coupon { get; set; } /// @@ -110,12 +149,18 @@ public class SubscriptionCreateOptions : BaseOptions, IHasMetadata /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// /// The identifier of the customer to subscribe. /// [JsonProperty("customer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] +#endif public string Customer { get; set; } /// @@ -123,6 +168,9 @@ public class SubscriptionCreateOptions : BaseOptions, IHasMetadata /// for subscriptions where collection_method is set to send_invoice. /// [JsonProperty("days_until_due")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("days_until_due")] +#endif public long? DaysUntilDue { get; set; } /// @@ -134,6 +182,9 @@ public class SubscriptionCreateOptions : BaseOptions, IHasMetadata /// href="https://stripe.com/docs/api/customers/object#customer_object-default_source">default_source. /// [JsonProperty("default_payment_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("default_payment_method")] +#endif public string DefaultPaymentMethod { get; set; } /// @@ -146,6 +197,9 @@ public class SubscriptionCreateOptions : BaseOptions, IHasMetadata /// href="https://stripe.com/docs/api/customers/object#customer_object-default_source">default_source. /// [JsonProperty("default_source")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("default_source")] +#endif public string DefaultSource { get; set; } /// @@ -154,6 +208,9 @@ public class SubscriptionCreateOptions : BaseOptions, IHasMetadata /// populated from the subscription. /// [JsonProperty("default_tax_rates")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("default_tax_rates")] +#endif public List DefaultTaxRates { get; set; } /// @@ -162,6 +219,9 @@ public class SubscriptionCreateOptions : BaseOptions, IHasMetadata /// and certain local payment methods UIs. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// @@ -169,18 +229,27 @@ public class SubscriptionCreateOptions : BaseOptions, IHasMetadata /// inherits the discount from the subscription's customer. /// [JsonProperty("discounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discounts")] +#endif public List Discounts { get; set; } /// /// All invoices will be billed using the specified settings. /// [JsonProperty("invoice_settings")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("invoice_settings")] +#endif public SubscriptionInvoiceSettingsOptions InvoiceSettings { get; set; } /// /// A list of up to 20 subscription items, each with an attached price. /// [JsonProperty("items")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("items")] +#endif public List Items { get; set; } /// @@ -190,6 +259,9 @@ public class SubscriptionCreateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -197,12 +269,18 @@ public class SubscriptionCreateOptions : BaseOptions, IHasMetadata /// Defaults to false (on-session). /// [JsonProperty("off_session")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("off_session")] +#endif public bool? OffSession { get; set; } /// /// The account on behalf of which to charge, for each of the subscription's invoices. /// [JsonProperty("on_behalf_of")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("on_behalf_of")] +#endif public string OnBehalfOf { get; set; } /// @@ -242,12 +320,18 @@ public class SubscriptionCreateOptions : BaseOptions, IHasMetadata /// or pending_if_incomplete. /// [JsonProperty("payment_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_behavior")] +#endif public string PaymentBehavior { get; set; } /// /// Payment settings to pass to invoices created by the subscription. /// [JsonProperty("payment_settings")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_settings")] +#endif public SubscriptionPaymentSettingsOptions PaymentSettings { get; set; } /// @@ -256,6 +340,9 @@ public class SubscriptionCreateOptions : BaseOptions, IHasMetadata /// invoice for the given subscription at the specified interval. /// [JsonProperty("pending_invoice_item_interval")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("pending_invoice_item_interval")] +#endif public SubscriptionPendingInvoiceItemIntervalOptions PendingInvoiceItemInterval { get; set; } /// @@ -265,6 +352,9 @@ public class SubscriptionCreateOptions : BaseOptions, IHasMetadata /// discounts instead. /// [JsonProperty("promotion_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("promotion_code")] +#endif public string PromotionCode { get; set; } /// @@ -275,6 +365,9 @@ public class SubscriptionCreateOptions : BaseOptions, IHasMetadata /// One of: always_invoice, create_prorations, or none. /// [JsonProperty("proration_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("proration_behavior")] +#endif public string ProrationBehavior { get; set; } /// @@ -283,6 +376,9 @@ public class SubscriptionCreateOptions : BaseOptions, IHasMetadata /// charges. /// [JsonProperty("transfer_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transfer_data")] +#endif public SubscriptionTransferDataOptions TransferData { get; set; } /// @@ -296,6 +392,10 @@ public class SubscriptionCreateOptions : BaseOptions, IHasMetadata /// [JsonProperty("trial_end")] [JsonConverter(typeof(AnyOfConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("trial_end")] + [STJS.JsonConverter(typeof(STJAnyOfConverter))] +#endif public AnyOf TrialEnd { get; set; } /// @@ -306,6 +406,9 @@ public class SubscriptionCreateOptions : BaseOptions, IHasMetadata /// periods on subscriptions to learn more. /// [JsonProperty("trial_from_plan")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("trial_from_plan")] +#endif public bool? TrialFromPlan { get; set; } /// @@ -315,12 +418,18 @@ public class SubscriptionCreateOptions : BaseOptions, IHasMetadata /// periods on subscriptions to learn more. /// [JsonProperty("trial_period_days")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("trial_period_days")] +#endif public long? TrialPeriodDays { get; set; } /// /// Settings related to subscription trials. /// [JsonProperty("trial_settings")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("trial_settings")] +#endif public SubscriptionTrialSettingsOptions TrialSettings { get; set; } } } diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionDiscountOptions.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionDiscountOptions.cs index 00b86dc86b..ea3a73005a 100644 --- a/src/Stripe.net/Services/Subscriptions/SubscriptionDiscountOptions.cs +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionDiscountOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionDiscountOptions : INestedOptions { @@ -9,18 +12,27 @@ public class SubscriptionDiscountOptions : INestedOptions /// ID of the coupon to create a new discount for. /// [JsonProperty("coupon")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("coupon")] +#endif public string Coupon { get; set; } /// /// ID of an existing discount on the object (or one of its ancestors) to reuse. /// [JsonProperty("discount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discount")] +#endif public string Discount { get; set; } /// /// ID of the promotion code to create a new discount for. /// [JsonProperty("promotion_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("promotion_code")] +#endif public string PromotionCode { get; set; } } } diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionInvoiceSettingsIssuerOptions.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionInvoiceSettingsIssuerOptions.cs index eca67798fe..ea25a32025 100644 --- a/src/Stripe.net/Services/Subscriptions/SubscriptionInvoiceSettingsIssuerOptions.cs +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionInvoiceSettingsIssuerOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionInvoiceSettingsIssuerOptions : INestedOptions { @@ -9,6 +12,9 @@ public class SubscriptionInvoiceSettingsIssuerOptions : INestedOptions /// The connected account being referenced when type is account. /// [JsonProperty("account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account")] +#endif public string Account { get; set; } /// @@ -16,6 +22,9 @@ public class SubscriptionInvoiceSettingsIssuerOptions : INestedOptions /// One of: account, or self. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionInvoiceSettingsOptions.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionInvoiceSettingsOptions.cs index 335993d153..55fa6d858d 100644 --- a/src/Stripe.net/Services/Subscriptions/SubscriptionInvoiceSettingsOptions.cs +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionInvoiceSettingsOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionInvoiceSettingsOptions : INestedOptions { @@ -11,6 +14,9 @@ public class SubscriptionInvoiceSettingsOptions : INestedOptions /// by the subscription. /// [JsonProperty("account_tax_ids")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_tax_ids")] +#endif public List AccountTaxIds { get; set; } /// @@ -18,6 +24,9 @@ public class SubscriptionInvoiceSettingsOptions : INestedOptions /// branding and support information of the specified account. /// [JsonProperty("issuer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("issuer")] +#endif public SubscriptionInvoiceSettingsIssuerOptions Issuer { get; set; } } } diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionItemBillingThresholdsOptions.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionItemBillingThresholdsOptions.cs index 192027161f..54ed79ee07 100644 --- a/src/Stripe.net/Services/Subscriptions/SubscriptionItemBillingThresholdsOptions.cs +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionItemBillingThresholdsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionItemBillingThresholdsOptions : INestedOptions { @@ -12,6 +15,9 @@ public class SubscriptionItemBillingThresholdsOptions : INestedOptions /// threshold). /// [JsonProperty("usage_gte")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("usage_gte")] +#endif public long? UsageGte { get; set; } } } diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionItemDiscountOptions.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionItemDiscountOptions.cs index af81eb0e6c..5172271f95 100644 --- a/src/Stripe.net/Services/Subscriptions/SubscriptionItemDiscountOptions.cs +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionItemDiscountOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionItemDiscountOptions : INestedOptions { @@ -9,18 +12,27 @@ public class SubscriptionItemDiscountOptions : INestedOptions /// ID of the coupon to create a new discount for. /// [JsonProperty("coupon")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("coupon")] +#endif public string Coupon { get; set; } /// /// ID of an existing discount on the object (or one of its ancestors) to reuse. /// [JsonProperty("discount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discount")] +#endif public string Discount { get; set; } /// /// ID of the promotion code to create a new discount for. /// [JsonProperty("promotion_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("promotion_code")] +#endif public string PromotionCode { get; set; } } } diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionItemOptions.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionItemOptions.cs index 1c6aa0e8bc..557f8b8a2e 100644 --- a/src/Stripe.net/Services/Subscriptions/SubscriptionItemOptions.cs +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionItemOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionItemOptions : INestedOptions, IHasId, IHasMetadata { @@ -12,6 +15,9 @@ public class SubscriptionItemOptions : INestedOptions, IHasId, IHasMetadata /// thresholds. /// [JsonProperty("billing_thresholds")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_thresholds")] +#endif public SubscriptionItemBillingThresholdsOptions BillingThresholds { get; set; } /// @@ -19,24 +25,36 @@ public class SubscriptionItemOptions : INestedOptions, IHasId, IHasMetadata /// to true and the current plan's usage_type is metered. /// [JsonProperty("clear_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("clear_usage")] +#endif public bool? ClearUsage { get; set; } /// /// A flag that, if set to true, will delete the specified item. /// [JsonProperty("deleted")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("deleted")] +#endif public bool? Deleted { get; set; } /// /// The coupons to redeem into discounts for the subscription item. /// [JsonProperty("discounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discounts")] +#endif public List Discounts { get; set; } /// /// Subscription item to update. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public string Id { get; set; } /// @@ -46,12 +64,18 @@ public class SubscriptionItemOptions : INestedOptions, IHasId, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// Plan ID for this item, as a string. /// [JsonProperty("plan")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("plan")] +#endif public string Plan { get; set; } /// @@ -60,6 +84,9 @@ public class SubscriptionItemOptions : INestedOptions, IHasId, IHasMetadata /// quantity parameter is provided. /// [JsonProperty("price")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("price")] +#endif public string Price { get; set; } /// @@ -67,12 +94,18 @@ public class SubscriptionItemOptions : INestedOptions, IHasId, IHasMetadata /// object inline. One of price or price_data is required. /// [JsonProperty("price_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("price_data")] +#endif public SubscriptionItemPriceDataOptions PriceData { get; set; } /// /// Quantity for this item. /// [JsonProperty("quantity")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("quantity")] +#endif public long? Quantity { get; set; } /// @@ -83,6 +116,9 @@ public class SubscriptionItemOptions : INestedOptions, IHasId, IHasMetadata /// tax rates. /// [JsonProperty("tax_rates")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_rates")] +#endif public List TaxRates { get; set; } } } diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionItemPriceDataOptions.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionItemPriceDataOptions.cs index 1d12ac48fe..33a56ad348 100644 --- a/src/Stripe.net/Services/Subscriptions/SubscriptionItemPriceDataOptions.cs +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionItemPriceDataOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionItemPriceDataOptions : INestedOptions { @@ -11,18 +14,27 @@ public class SubscriptionItemPriceDataOptions : INestedOptions /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// /// The ID of the product that this price will belong to. /// [JsonProperty("product")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("product")] +#endif public string Product { get; set; } /// /// The recurring components of a price such as interval and interval_count. /// [JsonProperty("recurring")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("recurring")] +#endif public SubscriptionItemPriceDataRecurringOptions Recurring { get; set; } /// @@ -35,6 +47,9 @@ public class SubscriptionItemPriceDataOptions : INestedOptions /// One of: exclusive, inclusive, or unspecified. /// [JsonProperty("tax_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_behavior")] +#endif public string TaxBehavior { get; set; } /// @@ -42,6 +57,9 @@ public class SubscriptionItemPriceDataOptions : INestedOptions /// how much to charge. /// [JsonProperty("unit_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_amount")] +#endif public long? UnitAmount { get; set; } /// @@ -50,6 +68,9 @@ public class SubscriptionItemPriceDataOptions : INestedOptions /// unit_amount_decimal can be set. /// [JsonProperty("unit_amount_decimal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_amount_decimal")] +#endif public decimal? UnitAmountDecimal { get; set; } } } diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionItemPriceDataRecurringOptions.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionItemPriceDataRecurringOptions.cs index c3edeb7d9e..9c0c378bf6 100644 --- a/src/Stripe.net/Services/Subscriptions/SubscriptionItemPriceDataRecurringOptions.cs +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionItemPriceDataRecurringOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionItemPriceDataRecurringOptions : INestedOptions { @@ -11,6 +14,9 @@ public class SubscriptionItemPriceDataRecurringOptions : INestedOptions /// One of: day, month, week, or year. /// [JsonProperty("interval")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interval")] +#endif public string Interval { get; set; } /// @@ -19,6 +25,9 @@ public class SubscriptionItemPriceDataRecurringOptions : INestedOptions /// years interval allowed (3 years, 36 months, or 156 weeks). /// [JsonProperty("interval_count")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interval_count")] +#endif public long? IntervalCount { get; set; } } } diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionListOptions.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionListOptions.cs index 7997f37d61..f619378ba3 100644 --- a/src/Stripe.net/Services/Subscriptions/SubscriptionListOptions.cs +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionListOptions.cs @@ -4,6 +4,9 @@ namespace Stripe using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionListOptions : ListOptionsWithCreated { @@ -11,6 +14,9 @@ public class SubscriptionListOptions : ListOptionsWithCreated /// Filter subscriptions by their automatic tax settings. /// [JsonProperty("automatic_tax")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("automatic_tax")] +#endif public SubscriptionAutomaticTaxOptions AutomaticTax { get; set; } /// @@ -19,6 +25,9 @@ public class SubscriptionListOptions : ListOptionsWithCreated /// One of: charge_automatically, or send_invoice. /// [JsonProperty("collection_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("collection_method")] +#endif public string CollectionMethod { get; set; } /// @@ -26,6 +35,10 @@ public class SubscriptionListOptions : ListOptionsWithCreated /// [JsonProperty("current_period_end")] [JsonConverter(typeof(AnyOfConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("current_period_end")] + [STJS.JsonConverter(typeof(STJAnyOfConverter))] +#endif public AnyOf CurrentPeriodEnd { get; set; } /// @@ -34,24 +47,37 @@ public class SubscriptionListOptions : ListOptionsWithCreated /// [JsonProperty("current_period_start")] [JsonConverter(typeof(AnyOfConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("current_period_start")] + [STJS.JsonConverter(typeof(STJAnyOfConverter))] +#endif public AnyOf CurrentPeriodStart { get; set; } /// /// The ID of the customer whose subscriptions will be retrieved. /// [JsonProperty("customer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] +#endif public string Customer { get; set; } /// /// The ID of the plan whose subscriptions will be retrieved. /// [JsonProperty("plan")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("plan")] +#endif public string Plan { get; set; } /// /// Filter for subscriptions that contain this recurring price ID. /// [JsonProperty("price")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("price")] +#endif public string Price { get; set; } /// @@ -67,6 +93,9 @@ public class SubscriptionListOptions : ListOptionsWithCreated /// unpaid. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } /// @@ -75,6 +104,9 @@ public class SubscriptionListOptions : ListOptionsWithCreated /// not set. /// [JsonProperty("test_clock")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("test_clock")] +#endif public string TestClock { get; set; } } } diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionPauseCollectionOptions.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionPauseCollectionOptions.cs index b70cf8f2df..3256008487 100644 --- a/src/Stripe.net/Services/Subscriptions/SubscriptionPauseCollectionOptions.cs +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionPauseCollectionOptions.cs @@ -4,6 +4,9 @@ namespace Stripe using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionPauseCollectionOptions : INestedOptions { @@ -13,6 +16,9 @@ public class SubscriptionPauseCollectionOptions : INestedOptions /// One of: keep_as_draft, mark_uncollectible, or void. /// [JsonProperty("behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("behavior")] +#endif public string Behavior { get; set; } /// @@ -20,6 +26,10 @@ public class SubscriptionPauseCollectionOptions : INestedOptions /// [JsonProperty("resumes_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("resumes_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? ResumesAt { get; set; } } } diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionPaymentSettingsOptions.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionPaymentSettingsOptions.cs index ac9fbe81bc..ab7e3c7ed0 100644 --- a/src/Stripe.net/Services/Subscriptions/SubscriptionPaymentSettingsOptions.cs +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionPaymentSettingsOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionPaymentSettingsOptions : INestedOptions { @@ -11,6 +14,9 @@ public class SubscriptionPaymentSettingsOptions : INestedOptions /// subscription. /// [JsonProperty("payment_method_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_options")] +#endif public SubscriptionPaymentSettingsPaymentMethodOptionsOptions PaymentMethodOptions { get; set; } /// @@ -30,6 +36,9 @@ public class SubscriptionPaymentSettingsOptions : INestedOptions /// sofort, swish, us_bank_account, or wechat_pay. /// [JsonProperty("payment_method_types")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_types")] +#endif public List PaymentMethodTypes { get; set; } /// @@ -38,6 +47,9 @@ public class SubscriptionPaymentSettingsOptions : INestedOptions /// One of: off, or on_subscription. /// [JsonProperty("save_default_payment_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("save_default_payment_method")] +#endif public string SaveDefaultPaymentMethod { get; set; } } } diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptionsOptions.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptionsOptions.cs index 7b89878e44..3d118b421b 100644 --- a/src/Stripe.net/Services/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptionsOptions.cs +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptionsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptionsOptions : INestedOptions { @@ -10,6 +13,9 @@ public class SubscriptionPaymentSettingsPaymentMethodOptionsAcssDebitMandateOpti /// One of: business, or personal. /// [JsonProperty("transaction_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transaction_type")] +#endif public string TransactionType { get; set; } } } diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsAcssDebitOptions.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsAcssDebitOptions.cs index dbbb0505b3..e14fb3a7d9 100644 --- a/src/Stripe.net/Services/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsAcssDebitOptions.cs +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsAcssDebitOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionPaymentSettingsPaymentMethodOptionsAcssDebitOptions : INestedOptions { @@ -9,6 +12,9 @@ public class SubscriptionPaymentSettingsPaymentMethodOptionsAcssDebitOptions : I /// Additional fields for Mandate creation. /// [JsonProperty("mandate_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mandate_options")] +#endif public SubscriptionPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptionsOptions MandateOptions { get; set; } /// @@ -16,6 +22,9 @@ public class SubscriptionPaymentSettingsPaymentMethodOptionsAcssDebitOptions : I /// One of: automatic, instant, or microdeposits. /// [JsonProperty("verification_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("verification_method")] +#endif public string VerificationMethod { get; set; } } } diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsBancontactOptions.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsBancontactOptions.cs index 72b05a89fa..3ab9cd37ad 100644 --- a/src/Stripe.net/Services/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsBancontactOptions.cs +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsBancontactOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionPaymentSettingsPaymentMethodOptionsBancontactOptions : INestedOptions { @@ -11,6 +14,9 @@ public class SubscriptionPaymentSettingsPaymentMethodOptionsBancontactOptions : /// One of: de, en, fr, or nl. /// [JsonProperty("preferred_language")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preferred_language")] +#endif public string PreferredLanguage { get; set; } } } diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsCardMandateOptionsOptions.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsCardMandateOptionsOptions.cs index ca61142116..8a02191dc6 100644 --- a/src/Stripe.net/Services/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsCardMandateOptionsOptions.cs +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsCardMandateOptionsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionPaymentSettingsPaymentMethodOptionsCardMandateOptionsOptions : INestedOptions { @@ -9,6 +12,9 @@ public class SubscriptionPaymentSettingsPaymentMethodOptionsCardMandateOptionsOp /// Amount to be charged for future payments. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long? Amount { get; set; } /// @@ -18,6 +24,9 @@ public class SubscriptionPaymentSettingsPaymentMethodOptionsCardMandateOptionsOp /// One of: fixed, or maximum. /// [JsonProperty("amount_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_type")] +#endif public string AmountType { get; set; } /// @@ -25,6 +34,9 @@ public class SubscriptionPaymentSettingsPaymentMethodOptionsCardMandateOptionsOp /// customer. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } } } diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsCardOptions.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsCardOptions.cs index f9f49881d2..685c2c2810 100644 --- a/src/Stripe.net/Services/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsCardOptions.cs +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsCardOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionPaymentSettingsPaymentMethodOptionsCardOptions : INestedOptions { @@ -9,6 +12,9 @@ public class SubscriptionPaymentSettingsPaymentMethodOptionsCardOptions : INeste /// Configuration options for setting up an eMandate for cards issued in India. /// [JsonProperty("mandate_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mandate_options")] +#endif public SubscriptionPaymentSettingsPaymentMethodOptionsCardMandateOptionsOptions MandateOptions { get; set; } /// @@ -19,6 +25,9 @@ public class SubscriptionPaymentSettingsPaymentMethodOptionsCardOptions : INeste /// mastercard, unionpay, unknown, or visa. /// [JsonProperty("network")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("network")] +#endif public string Network { get; set; } /// @@ -33,6 +42,9 @@ public class SubscriptionPaymentSettingsPaymentMethodOptionsCardOptions : INeste /// One of: any, automatic, or challenge. /// [JsonProperty("request_three_d_secure")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("request_three_d_secure")] +#endif public string RequestThreeDSecure { get; set; } } } diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransferOptions.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransferOptions.cs index 265c4af986..527cd9a931 100644 --- a/src/Stripe.net/Services/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransferOptions.cs +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransferOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransferOptions : INestedOptions { @@ -10,6 +13,9 @@ public class SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceBankT /// BE, DE, ES, FR, IE, or NL. /// [JsonProperty("country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country")] +#endif public string Country { get; set; } } } diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferOptions.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferOptions.cs index 2fc44854f1..7780a91404 100644 --- a/src/Stripe.net/Services/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferOptions.cs +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferOptions : INestedOptions { @@ -9,6 +12,9 @@ public class SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceBankT /// Configuration for eu_bank_transfer funding type. /// [JsonProperty("eu_bank_transfer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("eu_bank_transfer")] +#endif public SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransferOptions EuBankTransfer { get; set; } /// @@ -17,6 +23,9 @@ public class SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceBankT /// mx_bank_transfer, or us_bank_transfer. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceOptions.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceOptions.cs index bcfea4cb4c..735e08e3cf 100644 --- a/src/Stripe.net/Services/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceOptions.cs +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceOptions : INestedOptions { @@ -10,6 +13,9 @@ public class SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceOptio /// bank_transfer. /// [JsonProperty("bank_transfer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_transfer")] +#endif public SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferOptions BankTransfer { get; set; } /// @@ -17,6 +23,9 @@ public class SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceOptio /// balance. Permitted values include: bank_transfer. /// [JsonProperty("funding_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("funding_type")] +#endif public string FundingType { get; set; } } } diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsOptions.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsOptions.cs index 60c0ae3924..d679265b5a 100644 --- a/src/Stripe.net/Services/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsOptions.cs +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionPaymentSettingsPaymentMethodOptionsOptions : INestedOptions { @@ -10,6 +13,9 @@ public class SubscriptionPaymentSettingsPaymentMethodOptionsOptions : INestedOpt /// options to pass to the invoice’s PaymentIntent. /// [JsonProperty("acss_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("acss_debit")] +#endif public SubscriptionPaymentSettingsPaymentMethodOptionsAcssDebitOptions AcssDebit { get; set; } /// @@ -17,6 +23,9 @@ public class SubscriptionPaymentSettingsPaymentMethodOptionsOptions : INestedOpt /// the invoice’s PaymentIntent. /// [JsonProperty("bancontact")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bancontact")] +#endif public SubscriptionPaymentSettingsPaymentMethodOptionsBancontactOptions Bancontact { get; set; } /// @@ -24,6 +33,9 @@ public class SubscriptionPaymentSettingsPaymentMethodOptionsOptions : INestedOpt /// invoice’s PaymentIntent. /// [JsonProperty("card")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card")] +#endif public SubscriptionPaymentSettingsPaymentMethodOptionsCardOptions Card { get; set; } /// @@ -31,6 +43,9 @@ public class SubscriptionPaymentSettingsPaymentMethodOptionsOptions : INestedOpt /// the invoice’s PaymentIntent. /// [JsonProperty("customer_balance")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_balance")] +#endif public SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceOptions CustomerBalance { get; set; } /// @@ -38,6 +53,9 @@ public class SubscriptionPaymentSettingsPaymentMethodOptionsOptions : INestedOpt /// invoice’s PaymentIntent. /// [JsonProperty("konbini")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("konbini")] +#endif public SubscriptionPaymentSettingsPaymentMethodOptionsKonbiniOptions Konbini { get; set; } /// @@ -45,6 +63,9 @@ public class SubscriptionPaymentSettingsPaymentMethodOptionsOptions : INestedOpt /// pass to the invoice’s PaymentIntent. /// [JsonProperty("sepa_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sepa_debit")] +#endif public SubscriptionPaymentSettingsPaymentMethodOptionsSepaDebitOptions SepaDebit { get; set; } /// @@ -52,6 +73,9 @@ public class SubscriptionPaymentSettingsPaymentMethodOptionsOptions : INestedOpt /// to the invoice’s PaymentIntent. /// [JsonProperty("us_bank_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("us_bank_account")] +#endif public SubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountOptions UsBankAccount { get; set; } } } diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFiltersOptions.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFiltersOptions.cs index 23afae88d7..4c14149afe 100644 --- a/src/Stripe.net/Services/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFiltersOptions.cs +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFiltersOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFiltersOptions : INestedOptions { @@ -12,6 +15,9 @@ public class SubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinanci /// One of: checking, or savings. /// [JsonProperty("account_subcategories")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_subcategories")] +#endif public List AccountSubcategories { get; set; } } } diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsOptions.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsOptions.cs index 4bc7ee0211..ca8baa8034 100644 --- a/src/Stripe.net/Services/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsOptions.cs +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsOptions : INestedOptions { @@ -11,6 +14,9 @@ public class SubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinanci /// method. /// [JsonProperty("filters")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("filters")] +#endif public SubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFiltersOptions Filters { get; set; } /// @@ -21,6 +27,9 @@ public class SubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinanci /// transactions. /// [JsonProperty("permissions")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("permissions")] +#endif public List Permissions { get; set; } /// @@ -28,6 +37,9 @@ public class SubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinanci /// One of: balances, ownership, or transactions. /// [JsonProperty("prefetch")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("prefetch")] +#endif public List Prefetch { get; set; } } } diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountOptions.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountOptions.cs index 4a785a405b..8de352fcb5 100644 --- a/src/Stripe.net/Services/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountOptions.cs +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountOptions : INestedOptions { @@ -9,6 +12,9 @@ public class SubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountOptions /// Additional fields for Financial Connections Session creation. /// [JsonProperty("financial_connections")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("financial_connections")] +#endif public SubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsOptions FinancialConnections { get; set; } /// @@ -16,6 +22,9 @@ public class SubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountOptions /// One of: automatic, instant, or microdeposits. /// [JsonProperty("verification_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("verification_method")] +#endif public string VerificationMethod { get; set; } } } diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionPendingInvoiceItemIntervalOptions.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionPendingInvoiceItemIntervalOptions.cs index 52f534f884..4a70407a9a 100644 --- a/src/Stripe.net/Services/Subscriptions/SubscriptionPendingInvoiceItemIntervalOptions.cs +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionPendingInvoiceItemIntervalOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionPendingInvoiceItemIntervalOptions : INestedOptions { @@ -11,6 +14,9 @@ public class SubscriptionPendingInvoiceItemIntervalOptions : INestedOptions /// One of: day, month, week, or year. /// [JsonProperty("interval")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interval")] +#endif public string Interval { get; set; } /// @@ -19,6 +25,9 @@ public class SubscriptionPendingInvoiceItemIntervalOptions : INestedOptions /// year, 12 months, or 52 weeks). /// [JsonProperty("interval_count")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interval_count")] +#endif public long? IntervalCount { get; set; } } } diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionResumeOptions.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionResumeOptions.cs index f2bb10e87d..fc00dbf275 100644 --- a/src/Stripe.net/Services/Subscriptions/SubscriptionResumeOptions.cs +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionResumeOptions.cs @@ -4,6 +4,9 @@ namespace Stripe using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionResumeOptions : BaseOptions { @@ -15,6 +18,9 @@ public class SubscriptionResumeOptions : BaseOptions /// One of: now, or unchanged. /// [JsonProperty("billing_cycle_anchor")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_cycle_anchor")] +#endif public SubscriptionBillingCycleAnchor BillingCycleAnchor { get; set; } /// @@ -26,6 +32,9 @@ public class SubscriptionResumeOptions : BaseOptions /// One of: always_invoice, create_prorations, or none. /// [JsonProperty("proration_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("proration_behavior")] +#endif public string ProrationBehavior { get; set; } /// @@ -36,6 +45,10 @@ public class SubscriptionResumeOptions : BaseOptions /// [JsonProperty("proration_date")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("proration_date")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? ProrationDate { get; set; } } } diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionTransferDataOptions.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionTransferDataOptions.cs index 8a6e88c26f..1863938965 100644 --- a/src/Stripe.net/Services/Subscriptions/SubscriptionTransferDataOptions.cs +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionTransferDataOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionTransferDataOptions : INestedOptions { @@ -12,12 +15,18 @@ public class SubscriptionTransferDataOptions : INestedOptions /// destination. /// [JsonProperty("amount_percent")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_percent")] +#endif public decimal? AmountPercent { get; set; } /// /// ID of an existing, connected Stripe account. /// [JsonProperty("destination")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("destination")] +#endif public string Destination { get; set; } } } diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionTrialSettingsEndBehaviorOptions.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionTrialSettingsEndBehaviorOptions.cs index d5543344d8..3d96b69716 100644 --- a/src/Stripe.net/Services/Subscriptions/SubscriptionTrialSettingsEndBehaviorOptions.cs +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionTrialSettingsEndBehaviorOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionTrialSettingsEndBehaviorOptions : INestedOptions { @@ -11,6 +14,9 @@ public class SubscriptionTrialSettingsEndBehaviorOptions : INestedOptions /// One of: cancel, create_invoice, or pause. /// [JsonProperty("missing_payment_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("missing_payment_method")] +#endif public string MissingPaymentMethod { get; set; } } } diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionTrialSettingsOptions.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionTrialSettingsOptions.cs index e81f53032e..a66cdfdb7c 100644 --- a/src/Stripe.net/Services/Subscriptions/SubscriptionTrialSettingsOptions.cs +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionTrialSettingsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionTrialSettingsOptions : INestedOptions { @@ -9,6 +12,9 @@ public class SubscriptionTrialSettingsOptions : INestedOptions /// Defines how the subscription should behave when the user's free trial ends. /// [JsonProperty("end_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("end_behavior")] +#endif public SubscriptionTrialSettingsEndBehaviorOptions EndBehavior { get; set; } } } diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionUpdateOptions.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionUpdateOptions.cs index 36e7843c88..b3d35c24cd 100644 --- a/src/Stripe.net/Services/Subscriptions/SubscriptionUpdateOptions.cs +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionUpdateOptions.cs @@ -5,6 +5,9 @@ namespace Stripe using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SubscriptionUpdateOptions : BaseOptions, IHasMetadata { @@ -13,6 +16,9 @@ public class SubscriptionUpdateOptions : BaseOptions, IHasMetadata /// invoice for this subscription. You may pass up to 20 items. /// [JsonProperty("add_invoice_items")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("add_invoice_items")] +#endif public List AddInvoiceItems { get; set; } /// @@ -24,6 +30,9 @@ public class SubscriptionUpdateOptions : BaseOptions, IHasMetadata /// href="https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions">documentation. /// [JsonProperty("application_fee_percent")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("application_fee_percent")] +#endif public decimal? ApplicationFeePercent { get; set; } /// @@ -31,6 +40,9 @@ public class SubscriptionUpdateOptions : BaseOptions, IHasMetadata /// parameter when the existing value is being changed. /// [JsonProperty("automatic_tax")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("automatic_tax")] +#endif public SubscriptionAutomaticTaxOptions AutomaticTax { get; set; } /// @@ -41,6 +53,9 @@ public class SubscriptionUpdateOptions : BaseOptions, IHasMetadata /// One of: now, or unchanged. /// [JsonProperty("billing_cycle_anchor")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_cycle_anchor")] +#endif public SubscriptionBillingCycleAnchor BillingCycleAnchor { get; set; } /// @@ -48,6 +63,9 @@ public class SubscriptionUpdateOptions : BaseOptions, IHasMetadata /// new billing period. Pass an empty string to remove previously-defined thresholds. /// [JsonProperty("billing_thresholds")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_thresholds")] +#endif public SubscriptionBillingThresholdsOptions BillingThresholds { get; set; } /// @@ -58,6 +76,10 @@ public class SubscriptionUpdateOptions : BaseOptions, IHasMetadata /// [JsonProperty("cancel_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cancel_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? CancelAt { get; set; } /// @@ -65,12 +87,18 @@ public class SubscriptionUpdateOptions : BaseOptions, IHasMetadata /// (current_period_end). Defaults to false. /// [JsonProperty("cancel_at_period_end")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cancel_at_period_end")] +#endif public bool? CancelAtPeriodEnd { get; set; } /// /// Details about why this subscription was cancelled. /// [JsonProperty("cancellation_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cancellation_details")] +#endif public SubscriptionCancellationDetailsOptions CancellationDetails { get; set; } /// @@ -82,6 +110,9 @@ public class SubscriptionUpdateOptions : BaseOptions, IHasMetadata /// One of: charge_automatically, or send_invoice. /// [JsonProperty("collection_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("collection_method")] +#endif public string CollectionMethod { get; set; } /// @@ -90,6 +121,9 @@ public class SubscriptionUpdateOptions : BaseOptions, IHasMetadata /// deprecated and will be removed in a future API version. Use discounts instead. /// [JsonProperty("coupon")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("coupon")] +#endif public string Coupon { get; set; } /// @@ -97,6 +131,9 @@ public class SubscriptionUpdateOptions : BaseOptions, IHasMetadata /// for subscriptions where collection_method is set to send_invoice. /// [JsonProperty("days_until_due")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("days_until_due")] +#endif public long? DaysUntilDue { get; set; } /// @@ -108,6 +145,9 @@ public class SubscriptionUpdateOptions : BaseOptions, IHasMetadata /// href="https://stripe.com/docs/api/customers/object#customer_object-default_source">default_source. /// [JsonProperty("default_payment_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("default_payment_method")] +#endif public string DefaultPaymentMethod { get; set; } /// @@ -120,6 +160,9 @@ public class SubscriptionUpdateOptions : BaseOptions, IHasMetadata /// href="https://stripe.com/docs/api/customers/object#customer_object-default_source">default_source. /// [JsonProperty("default_source")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("default_source")] +#endif public string DefaultSource { get; set; } /// @@ -129,6 +172,9 @@ public class SubscriptionUpdateOptions : BaseOptions, IHasMetadata /// rates. /// [JsonProperty("default_tax_rates")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("default_tax_rates")] +#endif public List DefaultTaxRates { get; set; } /// @@ -137,6 +183,9 @@ public class SubscriptionUpdateOptions : BaseOptions, IHasMetadata /// and certain local payment methods UIs. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// @@ -144,18 +193,27 @@ public class SubscriptionUpdateOptions : BaseOptions, IHasMetadata /// inherits the discount from the subscription's customer. /// [JsonProperty("discounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discounts")] +#endif public List Discounts { get; set; } /// /// All invoices will be billed using the specified settings. /// [JsonProperty("invoice_settings")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("invoice_settings")] +#endif public SubscriptionInvoiceSettingsOptions InvoiceSettings { get; set; } /// /// A list of up to 20 subscription items, each with an attached price. /// [JsonProperty("items")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("items")] +#endif public List Items { get; set; } /// @@ -165,6 +223,9 @@ public class SubscriptionUpdateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -172,12 +233,18 @@ public class SubscriptionUpdateOptions : BaseOptions, IHasMetadata /// Defaults to false (on-session). /// [JsonProperty("off_session")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("off_session")] +#endif public bool? OffSession { get; set; } /// /// The account on behalf of which to charge, for each of the subscription's invoices. /// [JsonProperty("on_behalf_of")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("on_behalf_of")] +#endif public string OnBehalfOf { get; set; } /// @@ -187,6 +254,9 @@ public class SubscriptionUpdateOptions : BaseOptions, IHasMetadata /// collection. /// [JsonProperty("pause_collection")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("pause_collection")] +#endif public SubscriptionPauseCollectionOptions PauseCollection { get; set; } /// @@ -221,12 +291,18 @@ public class SubscriptionUpdateOptions : BaseOptions, IHasMetadata /// or pending_if_incomplete. /// [JsonProperty("payment_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_behavior")] +#endif public string PaymentBehavior { get; set; } /// /// Payment settings to pass to invoices created by the subscription. /// [JsonProperty("payment_settings")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_settings")] +#endif public SubscriptionPaymentSettingsOptions PaymentSettings { get; set; } /// @@ -235,6 +311,9 @@ public class SubscriptionUpdateOptions : BaseOptions, IHasMetadata /// invoice for the given subscription at the specified interval. /// [JsonProperty("pending_invoice_item_interval")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("pending_invoice_item_interval")] +#endif public SubscriptionPendingInvoiceItemIntervalOptions PendingInvoiceItemInterval { get; set; } /// @@ -244,6 +323,9 @@ public class SubscriptionUpdateOptions : BaseOptions, IHasMetadata /// discounts instead. /// [JsonProperty("promotion_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("promotion_code")] +#endif public string PromotionCode { get; set; } /// @@ -255,6 +337,9 @@ public class SubscriptionUpdateOptions : BaseOptions, IHasMetadata /// One of: always_invoice, create_prorations, or none. /// [JsonProperty("proration_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("proration_behavior")] +#endif public string ProrationBehavior { get; set; } /// @@ -266,6 +351,10 @@ public class SubscriptionUpdateOptions : BaseOptions, IHasMetadata /// [JsonProperty("proration_date")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("proration_date")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? ProrationDate { get; set; } /// @@ -274,6 +363,9 @@ public class SubscriptionUpdateOptions : BaseOptions, IHasMetadata /// charges. This will be unset if you POST an empty value. /// [JsonProperty("transfer_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transfer_data")] +#endif public SubscriptionTransferDataOptions TransferData { get; set; } /// @@ -286,6 +378,10 @@ public class SubscriptionUpdateOptions : BaseOptions, IHasMetadata /// [JsonProperty("trial_end")] [JsonConverter(typeof(AnyOfConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("trial_end")] + [STJS.JsonConverter(typeof(STJAnyOfConverter))] +#endif public AnyOf TrialEnd { get; set; } /// @@ -296,12 +392,18 @@ public class SubscriptionUpdateOptions : BaseOptions, IHasMetadata /// periods on subscriptions to learn more. /// [JsonProperty("trial_from_plan")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("trial_from_plan")] +#endif public bool? TrialFromPlan { get; set; } /// /// Settings related to subscription trials. /// [JsonProperty("trial_settings")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("trial_settings")] +#endif public SubscriptionTrialSettingsOptions TrialSettings { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Calculations/CalculationCreateOptions.cs b/src/Stripe.net/Services/Tax/Calculations/CalculationCreateOptions.cs index b87a6e3b86..ffe74554e5 100644 --- a/src/Stripe.net/Services/Tax/Calculations/CalculationCreateOptions.cs +++ b/src/Stripe.net/Services/Tax/Calculations/CalculationCreateOptions.cs @@ -5,6 +5,9 @@ namespace Stripe.Tax using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CalculationCreateOptions : BaseOptions { @@ -14,6 +17,9 @@ public class CalculationCreateOptions : BaseOptions /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// @@ -21,30 +27,45 @@ public class CalculationCreateOptions : BaseOptions /// address and tax IDs are copied to customer_details. /// [JsonProperty("customer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] +#endif public string Customer { get; set; } /// /// Details about the customer, including address and tax IDs. /// [JsonProperty("customer_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_details")] +#endif public CalculationCustomerDetailsOptions CustomerDetails { get; set; } /// /// A list of items the customer is purchasing. /// [JsonProperty("line_items")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("line_items")] +#endif public List LineItems { get; set; } /// /// Details about the address from which the goods are being shipped. /// [JsonProperty("ship_from_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ship_from_details")] +#endif public CalculationShipFromDetailsOptions ShipFromDetails { get; set; } /// /// Shipping cost details to be used for the calculation. /// [JsonProperty("shipping_cost")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping_cost")] +#endif public CalculationShippingCostOptions ShippingCost { get; set; } /// @@ -54,6 +75,10 @@ public class CalculationCreateOptions : BaseOptions /// [JsonProperty("tax_date")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_date")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? TaxDate { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Calculations/CalculationCustomerDetailsOptions.cs b/src/Stripe.net/Services/Tax/Calculations/CalculationCustomerDetailsOptions.cs index 53b26c76a2..e2d0e6d56b 100644 --- a/src/Stripe.net/Services/Tax/Calculations/CalculationCustomerDetailsOptions.cs +++ b/src/Stripe.net/Services/Tax/Calculations/CalculationCustomerDetailsOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.Tax { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CalculationCustomerDetailsOptions : INestedOptions { @@ -10,6 +13,9 @@ public class CalculationCustomerDetailsOptions : INestedOptions /// The customer's postal address (for example, home or business location). /// [JsonProperty("address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address")] +#endif public AddressOptions Address { get; set; } /// @@ -17,12 +23,18 @@ public class CalculationCustomerDetailsOptions : INestedOptions /// One of: billing, or shipping. /// [JsonProperty("address_source")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_source")] +#endif public string AddressSource { get; set; } /// /// The customer's IP address (IPv4 or IPv6). /// [JsonProperty("ip_address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ip_address")] +#endif public string IpAddress { get; set; } /// @@ -31,6 +43,9 @@ public class CalculationCustomerDetailsOptions : INestedOptions /// tax IDs for correctness. /// [JsonProperty("tax_ids")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_ids")] +#endif public List TaxIds { get; set; } /// @@ -41,6 +56,9 @@ public class CalculationCustomerDetailsOptions : INestedOptions /// One of: customer_exempt, none, or reverse_charge. /// [JsonProperty("taxability_override")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("taxability_override")] +#endif public string TaxabilityOverride { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Calculations/CalculationCustomerDetailsTaxIdOptions.cs b/src/Stripe.net/Services/Tax/Calculations/CalculationCustomerDetailsTaxIdOptions.cs index c54a0da019..22bcf7ac49 100644 --- a/src/Stripe.net/Services/Tax/Calculations/CalculationCustomerDetailsTaxIdOptions.cs +++ b/src/Stripe.net/Services/Tax/Calculations/CalculationCustomerDetailsTaxIdOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CalculationCustomerDetailsTaxIdOptions : INestedOptions { @@ -40,12 +43,18 @@ public class CalculationCustomerDetailsTaxIdOptions : INestedOptions /// uz_tin, uz_vat, ve_rif, vn_tin, or za_vat. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } /// /// Value of the tax ID. /// [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public string Value { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Calculations/CalculationLineItemOptions.cs b/src/Stripe.net/Services/Tax/Calculations/CalculationLineItemOptions.cs index e75a5c0919..8bf978c832 100644 --- a/src/Stripe.net/Services/Tax/Calculations/CalculationLineItemOptions.cs +++ b/src/Stripe.net/Services/Tax/Calculations/CalculationLineItemOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CalculationLineItemOptions : INestedOptions { @@ -12,6 +15,9 @@ public class CalculationLineItemOptions : INestedOptions /// calculated on top of this amount. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long? Amount { get; set; } /// @@ -19,6 +25,9 @@ public class CalculationLineItemOptions : INestedOptions /// tax_code. /// [JsonProperty("product")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("product")] +#endif public string Product { get; set; } /// @@ -27,6 +36,9 @@ public class CalculationLineItemOptions : INestedOptions /// quantity=4, the calculated unit price is 25. /// [JsonProperty("quantity")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("quantity")] +#endif public long? Quantity { get; set; } /// @@ -35,6 +47,9 @@ public class CalculationLineItemOptions : INestedOptions /// href="https://stripe.com/docs/tax/reports">tax reports. /// [JsonProperty("reference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reference")] +#endif public string Reference { get; set; } /// @@ -42,6 +57,9 @@ public class CalculationLineItemOptions : INestedOptions /// One of: exclusive, or inclusive. /// [JsonProperty("tax_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_behavior")] +#endif public string TaxBehavior { get; set; } /// @@ -51,6 +69,9 @@ public class CalculationLineItemOptions : INestedOptions /// default tax code from your Tax Settings. /// [JsonProperty("tax_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_code")] +#endif public string TaxCode { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Calculations/CalculationShipFromDetailsOptions.cs b/src/Stripe.net/Services/Tax/Calculations/CalculationShipFromDetailsOptions.cs index d55c3f9364..68716b43d2 100644 --- a/src/Stripe.net/Services/Tax/Calculations/CalculationShipFromDetailsOptions.cs +++ b/src/Stripe.net/Services/Tax/Calculations/CalculationShipFromDetailsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CalculationShipFromDetailsOptions : INestedOptions { @@ -9,6 +12,9 @@ public class CalculationShipFromDetailsOptions : INestedOptions /// The address from which the goods are being shipped from. /// [JsonProperty("address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address")] +#endif public AddressOptions Address { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Calculations/CalculationShippingCostOptions.cs b/src/Stripe.net/Services/Tax/Calculations/CalculationShippingCostOptions.cs index 7c54bd8761..9106043be3 100644 --- a/src/Stripe.net/Services/Tax/Calculations/CalculationShippingCostOptions.cs +++ b/src/Stripe.net/Services/Tax/Calculations/CalculationShippingCostOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CalculationShippingCostOptions : INestedOptions { @@ -12,6 +15,9 @@ public class CalculationShippingCostOptions : INestedOptions /// includes taxes. Otherwise, taxes are calculated on top of this amount. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long? Amount { get; set; } /// @@ -21,6 +27,9 @@ public class CalculationShippingCostOptions : INestedOptions /// tax_behavior parameters. /// [JsonProperty("shipping_rate")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping_rate")] +#endif public string ShippingRate { get; set; } /// @@ -29,6 +38,9 @@ public class CalculationShippingCostOptions : INestedOptions /// One of: exclusive, or inclusive. /// [JsonProperty("tax_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_behavior")] +#endif public string TaxBehavior { get; set; } /// @@ -37,6 +49,9 @@ public class CalculationShippingCostOptions : INestedOptions /// href="https://dashboard.stripe.com/settings/tax">Tax Settings is used. /// [JsonProperty("tax_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_code")] +#endif public string TaxCode { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsAeOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsAeOptions.cs index 6bef3e3d54..e6206cfe96 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsAeOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsAeOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsAeOptions : INestedOptions { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsAeOptions : INestedOptions /// Type of registration to be created in country. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsAtOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsAtOptions.cs index 8949c345ef..c089e33e6d 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsAtOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsAtOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsAtOptions : INestedOptions { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsAtOptions : INestedOptions /// Options for the standard registration. /// [JsonProperty("standard")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("standard")] +#endif public RegistrationCountryOptionsAtStandardOptions Standard { get; set; } /// @@ -16,6 +22,9 @@ public class RegistrationCountryOptionsAtOptions : INestedOptions /// One of: ioss, oss_non_union, oss_union, or standard. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsAtStandardOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsAtStandardOptions.cs index 99094534fd..61295a02eb 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsAtStandardOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsAtStandardOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsAtStandardOptions : INestedOptions { @@ -10,6 +13,9 @@ public class RegistrationCountryOptionsAtStandardOptions : INestedOptions /// One of: small_seller, or standard. /// [JsonProperty("place_of_supply_scheme")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("place_of_supply_scheme")] +#endif public string PlaceOfSupplyScheme { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsAuOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsAuOptions.cs index bb39fa7f88..8cce32f610 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsAuOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsAuOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsAuOptions : INestedOptions { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsAuOptions : INestedOptions /// Type of registration to be created in country. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsBeOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsBeOptions.cs index 00912698aa..ad32ceaba4 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsBeOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsBeOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsBeOptions : INestedOptions { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsBeOptions : INestedOptions /// Options for the standard registration. /// [JsonProperty("standard")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("standard")] +#endif public RegistrationCountryOptionsBeStandardOptions Standard { get; set; } /// @@ -16,6 +22,9 @@ public class RegistrationCountryOptionsBeOptions : INestedOptions /// One of: ioss, oss_non_union, oss_union, or standard. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsBeStandardOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsBeStandardOptions.cs index 1c4eb69454..a1938c895f 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsBeStandardOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsBeStandardOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsBeStandardOptions : INestedOptions { @@ -10,6 +13,9 @@ public class RegistrationCountryOptionsBeStandardOptions : INestedOptions /// One of: small_seller, or standard. /// [JsonProperty("place_of_supply_scheme")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("place_of_supply_scheme")] +#endif public string PlaceOfSupplyScheme { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsBgOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsBgOptions.cs index 69573056a4..d9a2c68258 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsBgOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsBgOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsBgOptions : INestedOptions { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsBgOptions : INestedOptions /// Options for the standard registration. /// [JsonProperty("standard")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("standard")] +#endif public RegistrationCountryOptionsBgStandardOptions Standard { get; set; } /// @@ -16,6 +22,9 @@ public class RegistrationCountryOptionsBgOptions : INestedOptions /// One of: ioss, oss_non_union, oss_union, or standard. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsBgStandardOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsBgStandardOptions.cs index 0c180dc21b..d00f703def 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsBgStandardOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsBgStandardOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsBgStandardOptions : INestedOptions { @@ -10,6 +13,9 @@ public class RegistrationCountryOptionsBgStandardOptions : INestedOptions /// One of: small_seller, or standard. /// [JsonProperty("place_of_supply_scheme")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("place_of_supply_scheme")] +#endif public string PlaceOfSupplyScheme { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsBhOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsBhOptions.cs index 4a9f77672a..74c75845d5 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsBhOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsBhOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsBhOptions : INestedOptions { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsBhOptions : INestedOptions /// Type of registration to be created in country. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsByOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsByOptions.cs index 82e52ee210..5438b95597 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsByOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsByOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsByOptions : INestedOptions { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsByOptions : INestedOptions /// Type of registration to be created in country. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsCaOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsCaOptions.cs index 6c2418efa5..433fda8d97 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsCaOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsCaOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsCaOptions : INestedOptions { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsCaOptions : INestedOptions /// Options for the provincial tax registration. /// [JsonProperty("province_standard")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("province_standard")] +#endif public RegistrationCountryOptionsCaProvinceStandardOptions ProvinceStandard { get; set; } /// @@ -16,6 +22,9 @@ public class RegistrationCountryOptionsCaOptions : INestedOptions /// One of: province_standard, simplified, or standard. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsCaProvinceStandardOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsCaProvinceStandardOptions.cs index 5abe94f2f3..10ec4eb311 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsCaProvinceStandardOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsCaProvinceStandardOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsCaProvinceStandardOptions : INestedOptions { @@ -10,6 +13,9 @@ public class RegistrationCountryOptionsCaProvinceStandardOptions : INestedOption /// 3166-2). /// [JsonProperty("province")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("province")] +#endif public string Province { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsChOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsChOptions.cs index 724b79330a..b2dc331954 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsChOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsChOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsChOptions : INestedOptions { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsChOptions : INestedOptions /// Type of registration to be created in country. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsClOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsClOptions.cs index 17913c1764..d56e2f74e8 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsClOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsClOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsClOptions : INestedOptions { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsClOptions : INestedOptions /// Type of registration to be created in country. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsCoOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsCoOptions.cs index 26fce2141b..e23382124e 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsCoOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsCoOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsCoOptions : INestedOptions { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsCoOptions : INestedOptions /// Type of registration to be created in country. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsCrOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsCrOptions.cs index 316829af48..7c0a8cfef3 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsCrOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsCrOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsCrOptions : INestedOptions { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsCrOptions : INestedOptions /// Type of registration to be created in country. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsCyOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsCyOptions.cs index 32d619cf0c..6759e6d0e7 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsCyOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsCyOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsCyOptions : INestedOptions { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsCyOptions : INestedOptions /// Options for the standard registration. /// [JsonProperty("standard")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("standard")] +#endif public RegistrationCountryOptionsCyStandardOptions Standard { get; set; } /// @@ -16,6 +22,9 @@ public class RegistrationCountryOptionsCyOptions : INestedOptions /// One of: ioss, oss_non_union, oss_union, or standard. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsCyStandardOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsCyStandardOptions.cs index 03e8430e74..ba28d8bef4 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsCyStandardOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsCyStandardOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsCyStandardOptions : INestedOptions { @@ -10,6 +13,9 @@ public class RegistrationCountryOptionsCyStandardOptions : INestedOptions /// One of: small_seller, or standard. /// [JsonProperty("place_of_supply_scheme")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("place_of_supply_scheme")] +#endif public string PlaceOfSupplyScheme { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsCzOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsCzOptions.cs index c215f4c458..3399bfd325 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsCzOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsCzOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsCzOptions : INestedOptions { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsCzOptions : INestedOptions /// Options for the standard registration. /// [JsonProperty("standard")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("standard")] +#endif public RegistrationCountryOptionsCzStandardOptions Standard { get; set; } /// @@ -16,6 +22,9 @@ public class RegistrationCountryOptionsCzOptions : INestedOptions /// One of: ioss, oss_non_union, oss_union, or standard. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsCzStandardOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsCzStandardOptions.cs index 436ac24613..65f40d8477 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsCzStandardOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsCzStandardOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsCzStandardOptions : INestedOptions { @@ -10,6 +13,9 @@ public class RegistrationCountryOptionsCzStandardOptions : INestedOptions /// One of: small_seller, or standard. /// [JsonProperty("place_of_supply_scheme")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("place_of_supply_scheme")] +#endif public string PlaceOfSupplyScheme { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsDeOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsDeOptions.cs index 2cdcf5a961..1071065b40 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsDeOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsDeOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsDeOptions : INestedOptions { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsDeOptions : INestedOptions /// Options for the standard registration. /// [JsonProperty("standard")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("standard")] +#endif public RegistrationCountryOptionsDeStandardOptions Standard { get; set; } /// @@ -16,6 +22,9 @@ public class RegistrationCountryOptionsDeOptions : INestedOptions /// One of: ioss, oss_non_union, oss_union, or standard. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsDeStandardOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsDeStandardOptions.cs index b1691df88b..2325b744fe 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsDeStandardOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsDeStandardOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsDeStandardOptions : INestedOptions { @@ -10,6 +13,9 @@ public class RegistrationCountryOptionsDeStandardOptions : INestedOptions /// One of: small_seller, or standard. /// [JsonProperty("place_of_supply_scheme")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("place_of_supply_scheme")] +#endif public string PlaceOfSupplyScheme { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsDkOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsDkOptions.cs index dbd2802da2..b204505baf 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsDkOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsDkOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsDkOptions : INestedOptions { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsDkOptions : INestedOptions /// Options for the standard registration. /// [JsonProperty("standard")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("standard")] +#endif public RegistrationCountryOptionsDkStandardOptions Standard { get; set; } /// @@ -16,6 +22,9 @@ public class RegistrationCountryOptionsDkOptions : INestedOptions /// One of: ioss, oss_non_union, oss_union, or standard. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsDkStandardOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsDkStandardOptions.cs index a0de9baaf7..280d3c9dcf 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsDkStandardOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsDkStandardOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsDkStandardOptions : INestedOptions { @@ -10,6 +13,9 @@ public class RegistrationCountryOptionsDkStandardOptions : INestedOptions /// One of: small_seller, or standard. /// [JsonProperty("place_of_supply_scheme")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("place_of_supply_scheme")] +#endif public string PlaceOfSupplyScheme { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsEcOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsEcOptions.cs index d849747c56..b72bfebd60 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsEcOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsEcOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsEcOptions : INestedOptions { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsEcOptions : INestedOptions /// Type of registration to be created in country. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsEeOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsEeOptions.cs index c3616f4fa5..abd52e8a8f 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsEeOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsEeOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsEeOptions : INestedOptions { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsEeOptions : INestedOptions /// Options for the standard registration. /// [JsonProperty("standard")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("standard")] +#endif public RegistrationCountryOptionsEeStandardOptions Standard { get; set; } /// @@ -16,6 +22,9 @@ public class RegistrationCountryOptionsEeOptions : INestedOptions /// One of: ioss, oss_non_union, oss_union, or standard. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsEeStandardOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsEeStandardOptions.cs index 23e339897b..99db8aa03a 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsEeStandardOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsEeStandardOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsEeStandardOptions : INestedOptions { @@ -10,6 +13,9 @@ public class RegistrationCountryOptionsEeStandardOptions : INestedOptions /// One of: small_seller, or standard. /// [JsonProperty("place_of_supply_scheme")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("place_of_supply_scheme")] +#endif public string PlaceOfSupplyScheme { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsEgOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsEgOptions.cs index 001be2c18f..b3ef0c7aaa 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsEgOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsEgOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsEgOptions : INestedOptions { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsEgOptions : INestedOptions /// Type of registration to be created in country. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsEsOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsEsOptions.cs index 165cb29aab..a623a084b2 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsEsOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsEsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsEsOptions : INestedOptions { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsEsOptions : INestedOptions /// Options for the standard registration. /// [JsonProperty("standard")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("standard")] +#endif public RegistrationCountryOptionsEsStandardOptions Standard { get; set; } /// @@ -16,6 +22,9 @@ public class RegistrationCountryOptionsEsOptions : INestedOptions /// One of: ioss, oss_non_union, oss_union, or standard. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsEsStandardOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsEsStandardOptions.cs index af7d903d11..8d54321533 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsEsStandardOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsEsStandardOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsEsStandardOptions : INestedOptions { @@ -10,6 +13,9 @@ public class RegistrationCountryOptionsEsStandardOptions : INestedOptions /// One of: small_seller, or standard. /// [JsonProperty("place_of_supply_scheme")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("place_of_supply_scheme")] +#endif public string PlaceOfSupplyScheme { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsFiOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsFiOptions.cs index e21d2cf2b0..e6e9906cee 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsFiOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsFiOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsFiOptions : INestedOptions { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsFiOptions : INestedOptions /// Options for the standard registration. /// [JsonProperty("standard")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("standard")] +#endif public RegistrationCountryOptionsFiStandardOptions Standard { get; set; } /// @@ -16,6 +22,9 @@ public class RegistrationCountryOptionsFiOptions : INestedOptions /// One of: ioss, oss_non_union, oss_union, or standard. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsFiStandardOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsFiStandardOptions.cs index 7a8a98658d..e6f64b6202 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsFiStandardOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsFiStandardOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsFiStandardOptions : INestedOptions { @@ -10,6 +13,9 @@ public class RegistrationCountryOptionsFiStandardOptions : INestedOptions /// One of: small_seller, or standard. /// [JsonProperty("place_of_supply_scheme")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("place_of_supply_scheme")] +#endif public string PlaceOfSupplyScheme { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsFrOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsFrOptions.cs index 21610f5262..9953ab326f 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsFrOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsFrOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsFrOptions : INestedOptions { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsFrOptions : INestedOptions /// Options for the standard registration. /// [JsonProperty("standard")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("standard")] +#endif public RegistrationCountryOptionsFrStandardOptions Standard { get; set; } /// @@ -16,6 +22,9 @@ public class RegistrationCountryOptionsFrOptions : INestedOptions /// One of: ioss, oss_non_union, oss_union, or standard. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsFrStandardOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsFrStandardOptions.cs index 436f6fe4d2..74b1844a4d 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsFrStandardOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsFrStandardOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsFrStandardOptions : INestedOptions { @@ -10,6 +13,9 @@ public class RegistrationCountryOptionsFrStandardOptions : INestedOptions /// One of: small_seller, or standard. /// [JsonProperty("place_of_supply_scheme")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("place_of_supply_scheme")] +#endif public string PlaceOfSupplyScheme { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsGbOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsGbOptions.cs index e8d0793031..29ff8cdedc 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsGbOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsGbOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsGbOptions : INestedOptions { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsGbOptions : INestedOptions /// Type of registration to be created in country. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsGeOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsGeOptions.cs index 81e2a264c0..28654c81e9 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsGeOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsGeOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsGeOptions : INestedOptions { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsGeOptions : INestedOptions /// Type of registration to be created in country. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsGrOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsGrOptions.cs index fd3a2d1b12..61bd9fafb8 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsGrOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsGrOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsGrOptions : INestedOptions { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsGrOptions : INestedOptions /// Options for the standard registration. /// [JsonProperty("standard")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("standard")] +#endif public RegistrationCountryOptionsGrStandardOptions Standard { get; set; } /// @@ -16,6 +22,9 @@ public class RegistrationCountryOptionsGrOptions : INestedOptions /// One of: ioss, oss_non_union, oss_union, or standard. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsGrStandardOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsGrStandardOptions.cs index 6ea5ec58a5..13bbdb45ed 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsGrStandardOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsGrStandardOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsGrStandardOptions : INestedOptions { @@ -10,6 +13,9 @@ public class RegistrationCountryOptionsGrStandardOptions : INestedOptions /// One of: small_seller, or standard. /// [JsonProperty("place_of_supply_scheme")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("place_of_supply_scheme")] +#endif public string PlaceOfSupplyScheme { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsHrOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsHrOptions.cs index a52c4c6532..048388c445 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsHrOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsHrOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsHrOptions : INestedOptions { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsHrOptions : INestedOptions /// Options for the standard registration. /// [JsonProperty("standard")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("standard")] +#endif public RegistrationCountryOptionsHrStandardOptions Standard { get; set; } /// @@ -16,6 +22,9 @@ public class RegistrationCountryOptionsHrOptions : INestedOptions /// One of: ioss, oss_non_union, oss_union, or standard. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsHrStandardOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsHrStandardOptions.cs index 4247e9d4e7..72a3e2672e 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsHrStandardOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsHrStandardOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsHrStandardOptions : INestedOptions { @@ -10,6 +13,9 @@ public class RegistrationCountryOptionsHrStandardOptions : INestedOptions /// One of: small_seller, or standard. /// [JsonProperty("place_of_supply_scheme")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("place_of_supply_scheme")] +#endif public string PlaceOfSupplyScheme { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsHuOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsHuOptions.cs index 490cbc9a26..489b769250 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsHuOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsHuOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsHuOptions : INestedOptions { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsHuOptions : INestedOptions /// Options for the standard registration. /// [JsonProperty("standard")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("standard")] +#endif public RegistrationCountryOptionsHuStandardOptions Standard { get; set; } /// @@ -16,6 +22,9 @@ public class RegistrationCountryOptionsHuOptions : INestedOptions /// One of: ioss, oss_non_union, oss_union, or standard. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsHuStandardOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsHuStandardOptions.cs index 02c15e6cfb..7bf0b3e1ac 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsHuStandardOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsHuStandardOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsHuStandardOptions : INestedOptions { @@ -10,6 +13,9 @@ public class RegistrationCountryOptionsHuStandardOptions : INestedOptions /// One of: small_seller, or standard. /// [JsonProperty("place_of_supply_scheme")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("place_of_supply_scheme")] +#endif public string PlaceOfSupplyScheme { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsIdOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsIdOptions.cs index 8a6af9c28b..a2c6102053 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsIdOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsIdOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsIdOptions : INestedOptions { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsIdOptions : INestedOptions /// Type of registration to be created in country. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsIeOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsIeOptions.cs index 6b01251f2a..a12424f99b 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsIeOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsIeOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsIeOptions : INestedOptions { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsIeOptions : INestedOptions /// Options for the standard registration. /// [JsonProperty("standard")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("standard")] +#endif public RegistrationCountryOptionsIeStandardOptions Standard { get; set; } /// @@ -16,6 +22,9 @@ public class RegistrationCountryOptionsIeOptions : INestedOptions /// One of: ioss, oss_non_union, oss_union, or standard. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsIeStandardOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsIeStandardOptions.cs index 81028a8490..cbba198279 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsIeStandardOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsIeStandardOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsIeStandardOptions : INestedOptions { @@ -10,6 +13,9 @@ public class RegistrationCountryOptionsIeStandardOptions : INestedOptions /// One of: small_seller, or standard. /// [JsonProperty("place_of_supply_scheme")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("place_of_supply_scheme")] +#endif public string PlaceOfSupplyScheme { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsIsOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsIsOptions.cs index b72fd84522..afa2fce100 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsIsOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsIsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsIsOptions : INestedOptions { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsIsOptions : INestedOptions /// Type of registration to be created in country. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsItOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsItOptions.cs index 88dbca2a93..1fac2a458d 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsItOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsItOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsItOptions : INestedOptions { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsItOptions : INestedOptions /// Options for the standard registration. /// [JsonProperty("standard")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("standard")] +#endif public RegistrationCountryOptionsItStandardOptions Standard { get; set; } /// @@ -16,6 +22,9 @@ public class RegistrationCountryOptionsItOptions : INestedOptions /// One of: ioss, oss_non_union, oss_union, or standard. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsItStandardOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsItStandardOptions.cs index 6a9d786484..206def52aa 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsItStandardOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsItStandardOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsItStandardOptions : INestedOptions { @@ -10,6 +13,9 @@ public class RegistrationCountryOptionsItStandardOptions : INestedOptions /// One of: small_seller, or standard. /// [JsonProperty("place_of_supply_scheme")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("place_of_supply_scheme")] +#endif public string PlaceOfSupplyScheme { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsJpOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsJpOptions.cs index 8cbc2b585a..143c1c7c8c 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsJpOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsJpOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsJpOptions : INestedOptions { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsJpOptions : INestedOptions /// Type of registration to be created in country. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsKeOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsKeOptions.cs index 4625b18576..8d3a382336 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsKeOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsKeOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsKeOptions : INestedOptions { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsKeOptions : INestedOptions /// Type of registration to be created in country. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsKrOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsKrOptions.cs index d34b4cc78b..1271482704 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsKrOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsKrOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsKrOptions : INestedOptions { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsKrOptions : INestedOptions /// Type of registration to be created in country. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsKzOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsKzOptions.cs index 69dff327fd..d83b52c9fd 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsKzOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsKzOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsKzOptions : INestedOptions { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsKzOptions : INestedOptions /// Type of registration to be created in country. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsLtOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsLtOptions.cs index bc64b829e7..8de69a2e9a 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsLtOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsLtOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsLtOptions : INestedOptions { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsLtOptions : INestedOptions /// Options for the standard registration. /// [JsonProperty("standard")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("standard")] +#endif public RegistrationCountryOptionsLtStandardOptions Standard { get; set; } /// @@ -16,6 +22,9 @@ public class RegistrationCountryOptionsLtOptions : INestedOptions /// One of: ioss, oss_non_union, oss_union, or standard. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsLtStandardOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsLtStandardOptions.cs index 6bb8295caa..16a03e1ca6 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsLtStandardOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsLtStandardOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsLtStandardOptions : INestedOptions { @@ -10,6 +13,9 @@ public class RegistrationCountryOptionsLtStandardOptions : INestedOptions /// One of: small_seller, or standard. /// [JsonProperty("place_of_supply_scheme")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("place_of_supply_scheme")] +#endif public string PlaceOfSupplyScheme { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsLuOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsLuOptions.cs index c74bed0ab5..4dd6e12786 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsLuOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsLuOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsLuOptions : INestedOptions { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsLuOptions : INestedOptions /// Options for the standard registration. /// [JsonProperty("standard")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("standard")] +#endif public RegistrationCountryOptionsLuStandardOptions Standard { get; set; } /// @@ -16,6 +22,9 @@ public class RegistrationCountryOptionsLuOptions : INestedOptions /// One of: ioss, oss_non_union, oss_union, or standard. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsLuStandardOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsLuStandardOptions.cs index 9e3a5adcc4..c64b4af62a 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsLuStandardOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsLuStandardOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsLuStandardOptions : INestedOptions { @@ -10,6 +13,9 @@ public class RegistrationCountryOptionsLuStandardOptions : INestedOptions /// One of: small_seller, or standard. /// [JsonProperty("place_of_supply_scheme")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("place_of_supply_scheme")] +#endif public string PlaceOfSupplyScheme { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsLvOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsLvOptions.cs index d90e980db1..ac3a2bf2a5 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsLvOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsLvOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsLvOptions : INestedOptions { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsLvOptions : INestedOptions /// Options for the standard registration. /// [JsonProperty("standard")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("standard")] +#endif public RegistrationCountryOptionsLvStandardOptions Standard { get; set; } /// @@ -16,6 +22,9 @@ public class RegistrationCountryOptionsLvOptions : INestedOptions /// One of: ioss, oss_non_union, oss_union, or standard. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsLvStandardOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsLvStandardOptions.cs index 2343c8b41e..3727332057 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsLvStandardOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsLvStandardOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsLvStandardOptions : INestedOptions { @@ -10,6 +13,9 @@ public class RegistrationCountryOptionsLvStandardOptions : INestedOptions /// One of: small_seller, or standard. /// [JsonProperty("place_of_supply_scheme")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("place_of_supply_scheme")] +#endif public string PlaceOfSupplyScheme { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsMaOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsMaOptions.cs index 0ff7cee6d0..704048b1cb 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsMaOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsMaOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsMaOptions : INestedOptions { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsMaOptions : INestedOptions /// Type of registration to be created in country. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsMdOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsMdOptions.cs index b4044cda41..08f8c535c0 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsMdOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsMdOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsMdOptions : INestedOptions { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsMdOptions : INestedOptions /// Type of registration to be created in country. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsMtOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsMtOptions.cs index 4325cb6682..9cab44f0b4 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsMtOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsMtOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsMtOptions : INestedOptions { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsMtOptions : INestedOptions /// Options for the standard registration. /// [JsonProperty("standard")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("standard")] +#endif public RegistrationCountryOptionsMtStandardOptions Standard { get; set; } /// @@ -16,6 +22,9 @@ public class RegistrationCountryOptionsMtOptions : INestedOptions /// One of: ioss, oss_non_union, oss_union, or standard. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsMtStandardOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsMtStandardOptions.cs index ef75db376b..1260743c53 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsMtStandardOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsMtStandardOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsMtStandardOptions : INestedOptions { @@ -10,6 +13,9 @@ public class RegistrationCountryOptionsMtStandardOptions : INestedOptions /// One of: small_seller, or standard. /// [JsonProperty("place_of_supply_scheme")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("place_of_supply_scheme")] +#endif public string PlaceOfSupplyScheme { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsMxOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsMxOptions.cs index 50dbc59e9f..2f8b6e57ad 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsMxOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsMxOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsMxOptions : INestedOptions { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsMxOptions : INestedOptions /// Type of registration to be created in country. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsMyOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsMyOptions.cs index 676007e0fa..bc23795ed1 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsMyOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsMyOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsMyOptions : INestedOptions { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsMyOptions : INestedOptions /// Type of registration to be created in country. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsNgOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsNgOptions.cs index 4bb1031daf..bd87c910e9 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsNgOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsNgOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsNgOptions : INestedOptions { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsNgOptions : INestedOptions /// Type of registration to be created in country. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsNlOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsNlOptions.cs index dbbc9b85a0..0947ef6199 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsNlOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsNlOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsNlOptions : INestedOptions { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsNlOptions : INestedOptions /// Options for the standard registration. /// [JsonProperty("standard")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("standard")] +#endif public RegistrationCountryOptionsNlStandardOptions Standard { get; set; } /// @@ -16,6 +22,9 @@ public class RegistrationCountryOptionsNlOptions : INestedOptions /// One of: ioss, oss_non_union, oss_union, or standard. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsNlStandardOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsNlStandardOptions.cs index 99204bf1a8..335de6a9d2 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsNlStandardOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsNlStandardOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsNlStandardOptions : INestedOptions { @@ -10,6 +13,9 @@ public class RegistrationCountryOptionsNlStandardOptions : INestedOptions /// One of: small_seller, or standard. /// [JsonProperty("place_of_supply_scheme")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("place_of_supply_scheme")] +#endif public string PlaceOfSupplyScheme { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsNoOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsNoOptions.cs index a40ea6560a..d80c666357 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsNoOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsNoOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsNoOptions : INestedOptions { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsNoOptions : INestedOptions /// Type of registration to be created in country. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsNzOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsNzOptions.cs index 3effdce2fb..7457ab624d 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsNzOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsNzOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsNzOptions : INestedOptions { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsNzOptions : INestedOptions /// Type of registration to be created in country. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsOmOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsOmOptions.cs index cc2c665391..81f60fa11f 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsOmOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsOmOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsOmOptions : INestedOptions { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsOmOptions : INestedOptions /// Type of registration to be created in country. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsOptions.cs index 12d6ff40b5..d0e626bae2 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsOptions : INestedOptions { @@ -9,390 +12,585 @@ public class RegistrationCountryOptionsOptions : INestedOptions /// Options for the registration in AE. /// [JsonProperty("ae")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ae")] +#endif public RegistrationCountryOptionsAeOptions Ae { get; set; } /// /// Options for the registration in AT. /// [JsonProperty("at")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("at")] +#endif public RegistrationCountryOptionsAtOptions At { get; set; } /// /// Options for the registration in AU. /// [JsonProperty("au")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("au")] +#endif public RegistrationCountryOptionsAuOptions Au { get; set; } /// /// Options for the registration in BE. /// [JsonProperty("be")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("be")] +#endif public RegistrationCountryOptionsBeOptions Be { get; set; } /// /// Options for the registration in BG. /// [JsonProperty("bg")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bg")] +#endif public RegistrationCountryOptionsBgOptions Bg { get; set; } /// /// Options for the registration in BH. /// [JsonProperty("bh")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bh")] +#endif public RegistrationCountryOptionsBhOptions Bh { get; set; } /// /// Options for the registration in BY. /// [JsonProperty("by")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("by")] +#endif public RegistrationCountryOptionsByOptions By { get; set; } /// /// Options for the registration in CA. /// [JsonProperty("ca")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ca")] +#endif public RegistrationCountryOptionsCaOptions Ca { get; set; } /// /// Options for the registration in CH. /// [JsonProperty("ch")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ch")] +#endif public RegistrationCountryOptionsChOptions Ch { get; set; } /// /// Options for the registration in CL. /// [JsonProperty("cl")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cl")] +#endif public RegistrationCountryOptionsClOptions Cl { get; set; } /// /// Options for the registration in CO. /// [JsonProperty("co")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("co")] +#endif public RegistrationCountryOptionsCoOptions Co { get; set; } /// /// Options for the registration in CR. /// [JsonProperty("cr")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cr")] +#endif public RegistrationCountryOptionsCrOptions Cr { get; set; } /// /// Options for the registration in CY. /// [JsonProperty("cy")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cy")] +#endif public RegistrationCountryOptionsCyOptions Cy { get; set; } /// /// Options for the registration in CZ. /// [JsonProperty("cz")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cz")] +#endif public RegistrationCountryOptionsCzOptions Cz { get; set; } /// /// Options for the registration in DE. /// [JsonProperty("de")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("de")] +#endif public RegistrationCountryOptionsDeOptions De { get; set; } /// /// Options for the registration in DK. /// [JsonProperty("dk")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("dk")] +#endif public RegistrationCountryOptionsDkOptions Dk { get; set; } /// /// Options for the registration in EC. /// [JsonProperty("ec")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ec")] +#endif public RegistrationCountryOptionsEcOptions Ec { get; set; } /// /// Options for the registration in EE. /// [JsonProperty("ee")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ee")] +#endif public RegistrationCountryOptionsEeOptions Ee { get; set; } /// /// Options for the registration in EG. /// [JsonProperty("eg")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("eg")] +#endif public RegistrationCountryOptionsEgOptions Eg { get; set; } /// /// Options for the registration in ES. /// [JsonProperty("es")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("es")] +#endif public RegistrationCountryOptionsEsOptions Es { get; set; } /// /// Options for the registration in FI. /// [JsonProperty("fi")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fi")] +#endif public RegistrationCountryOptionsFiOptions Fi { get; set; } /// /// Options for the registration in FR. /// [JsonProperty("fr")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fr")] +#endif public RegistrationCountryOptionsFrOptions Fr { get; set; } /// /// Options for the registration in GB. /// [JsonProperty("gb")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("gb")] +#endif public RegistrationCountryOptionsGbOptions Gb { get; set; } /// /// Options for the registration in GE. /// [JsonProperty("ge")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ge")] +#endif public RegistrationCountryOptionsGeOptions Ge { get; set; } /// /// Options for the registration in GR. /// [JsonProperty("gr")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("gr")] +#endif public RegistrationCountryOptionsGrOptions Gr { get; set; } /// /// Options for the registration in HR. /// [JsonProperty("hr")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("hr")] +#endif public RegistrationCountryOptionsHrOptions Hr { get; set; } /// /// Options for the registration in HU. /// [JsonProperty("hu")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("hu")] +#endif public RegistrationCountryOptionsHuOptions Hu { get; set; } /// /// Options for the registration in ID. /// [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif public RegistrationCountryOptionsIdOptions Id { get; set; } /// /// Options for the registration in IE. /// [JsonProperty("ie")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ie")] +#endif public RegistrationCountryOptionsIeOptions Ie { get; set; } /// /// Options for the registration in IS. /// [JsonProperty("is")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("is")] +#endif public RegistrationCountryOptionsIsOptions Is { get; set; } /// /// Options for the registration in IT. /// [JsonProperty("it")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("it")] +#endif public RegistrationCountryOptionsItOptions It { get; set; } /// /// Options for the registration in JP. /// [JsonProperty("jp")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("jp")] +#endif public RegistrationCountryOptionsJpOptions Jp { get; set; } /// /// Options for the registration in KE. /// [JsonProperty("ke")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ke")] +#endif public RegistrationCountryOptionsKeOptions Ke { get; set; } /// /// Options for the registration in KR. /// [JsonProperty("kr")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("kr")] +#endif public RegistrationCountryOptionsKrOptions Kr { get; set; } /// /// Options for the registration in KZ. /// [JsonProperty("kz")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("kz")] +#endif public RegistrationCountryOptionsKzOptions Kz { get; set; } /// /// Options for the registration in LT. /// [JsonProperty("lt")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("lt")] +#endif public RegistrationCountryOptionsLtOptions Lt { get; set; } /// /// Options for the registration in LU. /// [JsonProperty("lu")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("lu")] +#endif public RegistrationCountryOptionsLuOptions Lu { get; set; } /// /// Options for the registration in LV. /// [JsonProperty("lv")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("lv")] +#endif public RegistrationCountryOptionsLvOptions Lv { get; set; } /// /// Options for the registration in MA. /// [JsonProperty("ma")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ma")] +#endif public RegistrationCountryOptionsMaOptions Ma { get; set; } /// /// Options for the registration in MD. /// [JsonProperty("md")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("md")] +#endif public RegistrationCountryOptionsMdOptions Md { get; set; } /// /// Options for the registration in MT. /// [JsonProperty("mt")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mt")] +#endif public RegistrationCountryOptionsMtOptions Mt { get; set; } /// /// Options for the registration in MX. /// [JsonProperty("mx")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mx")] +#endif public RegistrationCountryOptionsMxOptions Mx { get; set; } /// /// Options for the registration in MY. /// [JsonProperty("my")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("my")] +#endif public RegistrationCountryOptionsMyOptions My { get; set; } /// /// Options for the registration in NG. /// [JsonProperty("ng")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ng")] +#endif public RegistrationCountryOptionsNgOptions Ng { get; set; } /// /// Options for the registration in NL. /// [JsonProperty("nl")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("nl")] +#endif public RegistrationCountryOptionsNlOptions Nl { get; set; } /// /// Options for the registration in NO. /// [JsonProperty("no")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("no")] +#endif public RegistrationCountryOptionsNoOptions No { get; set; } /// /// Options for the registration in NZ. /// [JsonProperty("nz")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("nz")] +#endif public RegistrationCountryOptionsNzOptions Nz { get; set; } /// /// Options for the registration in OM. /// [JsonProperty("om")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("om")] +#endif public RegistrationCountryOptionsOmOptions Om { get; set; } /// /// Options for the registration in PL. /// [JsonProperty("pl")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("pl")] +#endif public RegistrationCountryOptionsPlOptions Pl { get; set; } /// /// Options for the registration in PT. /// [JsonProperty("pt")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("pt")] +#endif public RegistrationCountryOptionsPtOptions Pt { get; set; } /// /// Options for the registration in RO. /// [JsonProperty("ro")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ro")] +#endif public RegistrationCountryOptionsRoOptions Ro { get; set; } /// /// Options for the registration in RS. /// [JsonProperty("rs")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("rs")] +#endif public RegistrationCountryOptionsRsOptions Rs { get; set; } /// /// Options for the registration in RU. /// [JsonProperty("ru")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ru")] +#endif public RegistrationCountryOptionsRuOptions Ru { get; set; } /// /// Options for the registration in SA. /// [JsonProperty("sa")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sa")] +#endif public RegistrationCountryOptionsSaOptions Sa { get; set; } /// /// Options for the registration in SE. /// [JsonProperty("se")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("se")] +#endif public RegistrationCountryOptionsSeOptions Se { get; set; } /// /// Options for the registration in SG. /// [JsonProperty("sg")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sg")] +#endif public RegistrationCountryOptionsSgOptions Sg { get; set; } /// /// Options for the registration in SI. /// [JsonProperty("si")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("si")] +#endif public RegistrationCountryOptionsSiOptions Si { get; set; } /// /// Options for the registration in SK. /// [JsonProperty("sk")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sk")] +#endif public RegistrationCountryOptionsSkOptions Sk { get; set; } /// /// Options for the registration in TH. /// [JsonProperty("th")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("th")] +#endif public RegistrationCountryOptionsThOptions Th { get; set; } /// /// Options for the registration in TR. /// [JsonProperty("tr")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tr")] +#endif public RegistrationCountryOptionsTrOptions Tr { get; set; } /// /// Options for the registration in TZ. /// [JsonProperty("tz")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tz")] +#endif public RegistrationCountryOptionsTzOptions Tz { get; set; } /// /// Options for the registration in US. /// [JsonProperty("us")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("us")] +#endif public RegistrationCountryOptionsUsOptions Us { get; set; } /// /// Options for the registration in UZ. /// [JsonProperty("uz")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("uz")] +#endif public RegistrationCountryOptionsUzOptions Uz { get; set; } /// /// Options for the registration in VN. /// [JsonProperty("vn")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("vn")] +#endif public RegistrationCountryOptionsVnOptions Vn { get; set; } /// /// Options for the registration in ZA. /// [JsonProperty("za")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("za")] +#endif public RegistrationCountryOptionsZaOptions Za { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsPlOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsPlOptions.cs index 6799ca9690..b99064cc64 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsPlOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsPlOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsPlOptions : INestedOptions { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsPlOptions : INestedOptions /// Options for the standard registration. /// [JsonProperty("standard")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("standard")] +#endif public RegistrationCountryOptionsPlStandardOptions Standard { get; set; } /// @@ -16,6 +22,9 @@ public class RegistrationCountryOptionsPlOptions : INestedOptions /// One of: ioss, oss_non_union, oss_union, or standard. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsPlStandardOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsPlStandardOptions.cs index 2154656842..df1220d5ed 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsPlStandardOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsPlStandardOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsPlStandardOptions : INestedOptions { @@ -10,6 +13,9 @@ public class RegistrationCountryOptionsPlStandardOptions : INestedOptions /// One of: small_seller, or standard. /// [JsonProperty("place_of_supply_scheme")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("place_of_supply_scheme")] +#endif public string PlaceOfSupplyScheme { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsPtOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsPtOptions.cs index 7f8974f615..938464720c 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsPtOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsPtOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsPtOptions : INestedOptions { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsPtOptions : INestedOptions /// Options for the standard registration. /// [JsonProperty("standard")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("standard")] +#endif public RegistrationCountryOptionsPtStandardOptions Standard { get; set; } /// @@ -16,6 +22,9 @@ public class RegistrationCountryOptionsPtOptions : INestedOptions /// One of: ioss, oss_non_union, oss_union, or standard. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsPtStandardOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsPtStandardOptions.cs index 986253a745..b1ff11743b 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsPtStandardOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsPtStandardOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsPtStandardOptions : INestedOptions { @@ -10,6 +13,9 @@ public class RegistrationCountryOptionsPtStandardOptions : INestedOptions /// One of: small_seller, or standard. /// [JsonProperty("place_of_supply_scheme")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("place_of_supply_scheme")] +#endif public string PlaceOfSupplyScheme { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsRoOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsRoOptions.cs index b4dbd85829..673d334b8b 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsRoOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsRoOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsRoOptions : INestedOptions { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsRoOptions : INestedOptions /// Options for the standard registration. /// [JsonProperty("standard")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("standard")] +#endif public RegistrationCountryOptionsRoStandardOptions Standard { get; set; } /// @@ -16,6 +22,9 @@ public class RegistrationCountryOptionsRoOptions : INestedOptions /// One of: ioss, oss_non_union, oss_union, or standard. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsRoStandardOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsRoStandardOptions.cs index 8f67b2daf5..84899465bd 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsRoStandardOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsRoStandardOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsRoStandardOptions : INestedOptions { @@ -10,6 +13,9 @@ public class RegistrationCountryOptionsRoStandardOptions : INestedOptions /// One of: small_seller, or standard. /// [JsonProperty("place_of_supply_scheme")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("place_of_supply_scheme")] +#endif public string PlaceOfSupplyScheme { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsRsOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsRsOptions.cs index c716a8c31c..1e6b768249 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsRsOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsRsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsRsOptions : INestedOptions { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsRsOptions : INestedOptions /// Type of registration to be created in country. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsRuOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsRuOptions.cs index 651eb7ae48..083910b3d3 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsRuOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsRuOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsRuOptions : INestedOptions { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsRuOptions : INestedOptions /// Type of registration to be created in country. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsSaOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsSaOptions.cs index 8d09c741b1..6e5d42e517 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsSaOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsSaOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsSaOptions : INestedOptions { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsSaOptions : INestedOptions /// Type of registration to be created in country. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsSeOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsSeOptions.cs index 7989f4b1ce..a4326c928e 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsSeOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsSeOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsSeOptions : INestedOptions { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsSeOptions : INestedOptions /// Options for the standard registration. /// [JsonProperty("standard")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("standard")] +#endif public RegistrationCountryOptionsSeStandardOptions Standard { get; set; } /// @@ -16,6 +22,9 @@ public class RegistrationCountryOptionsSeOptions : INestedOptions /// One of: ioss, oss_non_union, oss_union, or standard. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsSeStandardOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsSeStandardOptions.cs index 22b44213bb..7b1ab4b9a9 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsSeStandardOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsSeStandardOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsSeStandardOptions : INestedOptions { @@ -10,6 +13,9 @@ public class RegistrationCountryOptionsSeStandardOptions : INestedOptions /// One of: small_seller, or standard. /// [JsonProperty("place_of_supply_scheme")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("place_of_supply_scheme")] +#endif public string PlaceOfSupplyScheme { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsSgOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsSgOptions.cs index 53fb172980..b8d1b52938 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsSgOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsSgOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsSgOptions : INestedOptions { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsSgOptions : INestedOptions /// Type of registration to be created in country. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsSiOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsSiOptions.cs index 4a2e057d68..086a3a1c56 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsSiOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsSiOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsSiOptions : INestedOptions { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsSiOptions : INestedOptions /// Options for the standard registration. /// [JsonProperty("standard")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("standard")] +#endif public RegistrationCountryOptionsSiStandardOptions Standard { get; set; } /// @@ -16,6 +22,9 @@ public class RegistrationCountryOptionsSiOptions : INestedOptions /// One of: ioss, oss_non_union, oss_union, or standard. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsSiStandardOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsSiStandardOptions.cs index cb6682d469..4f83c82914 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsSiStandardOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsSiStandardOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsSiStandardOptions : INestedOptions { @@ -10,6 +13,9 @@ public class RegistrationCountryOptionsSiStandardOptions : INestedOptions /// One of: small_seller, or standard. /// [JsonProperty("place_of_supply_scheme")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("place_of_supply_scheme")] +#endif public string PlaceOfSupplyScheme { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsSkOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsSkOptions.cs index d2ec7d71f7..497cb427c1 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsSkOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsSkOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsSkOptions : INestedOptions { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsSkOptions : INestedOptions /// Options for the standard registration. /// [JsonProperty("standard")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("standard")] +#endif public RegistrationCountryOptionsSkStandardOptions Standard { get; set; } /// @@ -16,6 +22,9 @@ public class RegistrationCountryOptionsSkOptions : INestedOptions /// One of: ioss, oss_non_union, oss_union, or standard. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsSkStandardOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsSkStandardOptions.cs index bcb8c6c188..30c70ced3a 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsSkStandardOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsSkStandardOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsSkStandardOptions : INestedOptions { @@ -10,6 +13,9 @@ public class RegistrationCountryOptionsSkStandardOptions : INestedOptions /// One of: small_seller, or standard. /// [JsonProperty("place_of_supply_scheme")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("place_of_supply_scheme")] +#endif public string PlaceOfSupplyScheme { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsThOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsThOptions.cs index c7e9745ca7..7dbbf2bd68 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsThOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsThOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsThOptions : INestedOptions { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsThOptions : INestedOptions /// Type of registration to be created in country. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsTrOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsTrOptions.cs index e54f563d13..ce877cd0fb 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsTrOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsTrOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsTrOptions : INestedOptions { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsTrOptions : INestedOptions /// Type of registration to be created in country. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsTzOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsTzOptions.cs index 496e28d2f8..ac30a5436e 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsTzOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsTzOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsTzOptions : INestedOptions { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsTzOptions : INestedOptions /// Type of registration to be created in country. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsUsLocalAmusementTaxOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsUsLocalAmusementTaxOptions.cs index 2baf30e47e..b1b187d02d 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsUsLocalAmusementTaxOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsUsLocalAmusementTaxOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsUsLocalAmusementTaxOptions : INestedOptions { @@ -12,6 +15,9 @@ public class RegistrationCountryOptionsUsLocalAmusementTaxOptions : INestedOptio /// 68081 (Schiller Park). /// [JsonProperty("jurisdiction")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("jurisdiction")] +#endif public string Jurisdiction { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsUsLocalLeaseTaxOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsUsLocalLeaseTaxOptions.cs index 5759e3bee4..9ac6a9b0d7 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsUsLocalLeaseTaxOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsUsLocalLeaseTaxOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsUsLocalLeaseTaxOptions : INestedOptions { @@ -10,6 +13,9 @@ public class RegistrationCountryOptionsUsLocalLeaseTaxOptions : INestedOptions /// representing the local jurisdiction. Supported FIPS codes are: 14000 (Chicago). /// [JsonProperty("jurisdiction")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("jurisdiction")] +#endif public string Jurisdiction { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsUsOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsUsOptions.cs index 2378889a71..517b961123 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsUsOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsUsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsUsOptions : INestedOptions { @@ -9,12 +12,18 @@ public class RegistrationCountryOptionsUsOptions : INestedOptions /// Options for the local amusement tax registration. /// [JsonProperty("local_amusement_tax")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("local_amusement_tax")] +#endif public RegistrationCountryOptionsUsLocalAmusementTaxOptions LocalAmusementTax { get; set; } /// /// Options for the local lease tax registration. /// [JsonProperty("local_lease_tax")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("local_lease_tax")] +#endif public RegistrationCountryOptionsUsLocalLeaseTaxOptions LocalLeaseTax { get; set; } /// @@ -22,12 +31,18 @@ public class RegistrationCountryOptionsUsOptions : INestedOptions /// 3166-2). /// [JsonProperty("state")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("state")] +#endif public string State { get; set; } /// /// Options for the state sales tax registration. /// [JsonProperty("state_sales_tax")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("state_sales_tax")] +#endif public RegistrationCountryOptionsUsStateSalesTaxOptions StateSalesTax { get; set; } /// @@ -37,6 +52,9 @@ public class RegistrationCountryOptionsUsOptions : INestedOptions /// state_sales_tax. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsUsStateSalesTaxElectionOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsUsStateSalesTaxElectionOptions.cs index 910195851c..40a318c915 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsUsStateSalesTaxElectionOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsUsStateSalesTaxElectionOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsUsStateSalesTaxElectionOptions : INestedOptions { @@ -11,6 +14,9 @@ public class RegistrationCountryOptionsUsStateSalesTaxElectionOptions : INestedO /// County) and 60000 (Philadelphia City). /// [JsonProperty("jurisdiction")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("jurisdiction")] +#endif public string Jurisdiction { get; set; } /// @@ -19,6 +25,9 @@ public class RegistrationCountryOptionsUsStateSalesTaxElectionOptions : INestedO /// single_local_use_tax. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsUsStateSalesTaxOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsUsStateSalesTaxOptions.cs index caf0657eb1..ed4c9e4972 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsUsStateSalesTaxOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsUsStateSalesTaxOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.Tax { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsUsStateSalesTaxOptions : INestedOptions { @@ -10,6 +13,9 @@ public class RegistrationCountryOptionsUsStateSalesTaxOptions : INestedOptions /// Elections for the state sales tax registration. /// [JsonProperty("elections")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("elections")] +#endif public List Elections { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsUzOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsUzOptions.cs index 5cc851194a..66ae7b7f66 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsUzOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsUzOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsUzOptions : INestedOptions { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsUzOptions : INestedOptions /// Type of registration to be created in country. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsVnOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsVnOptions.cs index 2647b68b77..dc116c4ada 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsVnOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsVnOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsVnOptions : INestedOptions { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsVnOptions : INestedOptions /// Type of registration to be created in country. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsZaOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsZaOptions.cs index 6a2913b801..63235f6414 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsZaOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsZaOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCountryOptionsZaOptions : INestedOptions { @@ -9,6 +12,9 @@ public class RegistrationCountryOptionsZaOptions : INestedOptions /// Type of registration to be created in country. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCreateOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCreateOptions.cs index 14cf2cc67a..4a8435af28 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCreateOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCreateOptions.cs @@ -4,6 +4,9 @@ namespace Stripe.Tax using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationCreateOptions : BaseOptions { @@ -14,6 +17,10 @@ public class RegistrationCreateOptions : BaseOptions /// [JsonProperty("active_from")] [JsonConverter(typeof(AnyOfConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("active_from")] + [STJS.JsonConverter(typeof(STJAnyOfConverter))] +#endif public AnyOf ActiveFrom { get; set; } /// @@ -21,12 +28,18 @@ public class RegistrationCreateOptions : BaseOptions /// 3166-1 alpha-2). /// [JsonProperty("country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country")] +#endif public string Country { get; set; } /// /// Specific options for a registration in the specified country. /// [JsonProperty("country_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country_options")] +#endif public RegistrationCountryOptionsOptions CountryOptions { get; set; } /// @@ -36,6 +49,10 @@ public class RegistrationCreateOptions : BaseOptions /// [JsonProperty("expires_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("expires_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? ExpiresAt { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationListOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationListOptions.cs index f7d8b7375c..acf4a2c9cc 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationListOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationListOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationListOptions : ListOptions { @@ -10,6 +13,9 @@ public class RegistrationListOptions : ListOptions /// One of: active, all, expired, or scheduled. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationUpdateOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationUpdateOptions.cs index a96e08418a..9495965654 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationUpdateOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationUpdateOptions.cs @@ -4,6 +4,9 @@ namespace Stripe.Tax using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class RegistrationUpdateOptions : BaseOptions { @@ -13,6 +16,10 @@ public class RegistrationUpdateOptions : BaseOptions /// [JsonProperty("active_from")] [JsonConverter(typeof(AnyOfConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("active_from")] + [STJS.JsonConverter(typeof(STJAnyOfConverter))] +#endif public AnyOf ActiveFrom { get; set; } /// @@ -22,6 +29,10 @@ public class RegistrationUpdateOptions : BaseOptions /// [JsonProperty("expires_at")] [JsonConverter(typeof(AnyOfConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("expires_at")] + [STJS.JsonConverter(typeof(STJAnyOfConverter))] +#endif public AnyOf ExpiresAt { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Settings/SettingsDefaultsOptions.cs b/src/Stripe.net/Services/Tax/Settings/SettingsDefaultsOptions.cs index 75d7d5bb00..cdf68a0ea6 100644 --- a/src/Stripe.net/Services/Tax/Settings/SettingsDefaultsOptions.cs +++ b/src/Stripe.net/Services/Tax/Settings/SettingsDefaultsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SettingsDefaultsOptions : INestedOptions { @@ -14,12 +17,18 @@ public class SettingsDefaultsOptions : INestedOptions /// One of: exclusive, inclusive, or inferred_by_currency. /// [JsonProperty("tax_behavior")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_behavior")] +#endif public string TaxBehavior { get; set; } /// /// A tax code ID. /// [JsonProperty("tax_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_code")] +#endif public string TaxCode { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Settings/SettingsHeadOfficeOptions.cs b/src/Stripe.net/Services/Tax/Settings/SettingsHeadOfficeOptions.cs index ee89755f85..abe99f650b 100644 --- a/src/Stripe.net/Services/Tax/Settings/SettingsHeadOfficeOptions.cs +++ b/src/Stripe.net/Services/Tax/Settings/SettingsHeadOfficeOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SettingsHeadOfficeOptions : INestedOptions { @@ -9,6 +12,9 @@ public class SettingsHeadOfficeOptions : INestedOptions /// The location of the business for tax purposes. /// [JsonProperty("address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address")] +#endif public AddressOptions Address { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Settings/SettingsUpdateOptions.cs b/src/Stripe.net/Services/Tax/Settings/SettingsUpdateOptions.cs index 4f6b8896be..097196b7b5 100644 --- a/src/Stripe.net/Services/Tax/Settings/SettingsUpdateOptions.cs +++ b/src/Stripe.net/Services/Tax/Settings/SettingsUpdateOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class SettingsUpdateOptions : BaseOptions { @@ -9,12 +12,18 @@ public class SettingsUpdateOptions : BaseOptions /// Default configuration to be used on Stripe Tax calculations. /// [JsonProperty("defaults")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("defaults")] +#endif public SettingsDefaultsOptions Defaults { get; set; } /// /// The place where your business is located. /// [JsonProperty("head_office")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("head_office")] +#endif public SettingsHeadOfficeOptions HeadOffice { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Transactions/TransactionCreateFromCalculationOptions.cs b/src/Stripe.net/Services/Tax/Transactions/TransactionCreateFromCalculationOptions.cs index 37ed7ff4b8..b1d83fe304 100644 --- a/src/Stripe.net/Services/Tax/Transactions/TransactionCreateFromCalculationOptions.cs +++ b/src/Stripe.net/Services/Tax/Transactions/TransactionCreateFromCalculationOptions.cs @@ -5,6 +5,9 @@ namespace Stripe.Tax using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TransactionCreateFromCalculationOptions : BaseOptions, IHasMetadata { @@ -12,6 +15,9 @@ public class TransactionCreateFromCalculationOptions : BaseOptions, IHasMetadata /// Tax Calculation ID to be used as input when creating the transaction. /// [JsonProperty("calculation")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("calculation")] +#endif public string Calculation { get; set; } /// @@ -21,6 +27,9 @@ public class TransactionCreateFromCalculationOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -31,6 +40,10 @@ public class TransactionCreateFromCalculationOptions : BaseOptions, IHasMetadata /// [JsonProperty("posted_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("posted_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? PostedAt { get; set; } /// @@ -38,6 +51,9 @@ public class TransactionCreateFromCalculationOptions : BaseOptions, IHasMetadata /// transactions, including reversals. /// [JsonProperty("reference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reference")] +#endif public string Reference { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Transactions/TransactionCreateReversalOptions.cs b/src/Stripe.net/Services/Tax/Transactions/TransactionCreateReversalOptions.cs index 22ac6db3cd..46bcb1776f 100644 --- a/src/Stripe.net/Services/Tax/Transactions/TransactionCreateReversalOptions.cs +++ b/src/Stripe.net/Services/Tax/Transactions/TransactionCreateReversalOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.Tax { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TransactionCreateReversalOptions : BaseOptions, IHasMetadata { @@ -13,12 +16,18 @@ public class TransactionCreateReversalOptions : BaseOptions, IHasMetadata /// including taxes. /// [JsonProperty("flat_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("flat_amount")] +#endif public long? FlatAmount { get; set; } /// /// The line item amounts to reverse. /// [JsonProperty("line_items")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("line_items")] +#endif public List LineItems { get; set; } /// @@ -28,6 +37,9 @@ public class TransactionCreateReversalOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -36,12 +48,18 @@ public class TransactionCreateReversalOptions : BaseOptions, IHasMetadata /// One of: full, or partial. /// [JsonProperty("mode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mode")] +#endif public string Mode { get; set; } /// /// The ID of the Transaction to partially or fully reverse. /// [JsonProperty("original_transaction")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("original_transaction")] +#endif public string OriginalTransaction { get; set; } /// @@ -50,12 +68,18 @@ public class TransactionCreateReversalOptions : BaseOptions, IHasMetadata /// transaction in exported tax reports. /// [JsonProperty("reference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reference")] +#endif public string Reference { get; set; } /// /// The shipping cost to reverse. /// [JsonProperty("shipping_cost")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping_cost")] +#endif public TransactionShippingCostOptions ShippingCost { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Transactions/TransactionLineItemOptions.cs b/src/Stripe.net/Services/Tax/Transactions/TransactionLineItemOptions.cs index b65ff95b1f..0ebc764f1d 100644 --- a/src/Stripe.net/Services/Tax/Transactions/TransactionLineItemOptions.cs +++ b/src/Stripe.net/Services/Tax/Transactions/TransactionLineItemOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.Tax { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TransactionLineItemOptions : INestedOptions, IHasMetadata { @@ -12,6 +15,9 @@ public class TransactionLineItemOptions : INestedOptions, IHasMetadata /// negative. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long? Amount { get; set; } /// @@ -20,6 +26,9 @@ public class TransactionLineItemOptions : INestedOptions, IHasMetadata /// negative. /// [JsonProperty("amount_tax")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_tax")] +#endif public long? AmountTax { get; set; } /// @@ -28,12 +37,18 @@ public class TransactionLineItemOptions : INestedOptions, IHasMetadata /// object in a structured format. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// The id of the line item to reverse in the original transaction. /// [JsonProperty("original_line_item")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("original_line_item")] +#endif public string OriginalLineItem { get; set; } /// @@ -41,12 +56,18 @@ public class TransactionLineItemOptions : INestedOptions, IHasMetadata /// exports, but does not affect the amount of tax reversed. /// [JsonProperty("quantity")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("quantity")] +#endif public long? Quantity { get; set; } /// /// A custom identifier for this line item in the reversal transaction, such as 'L1-refund'. /// [JsonProperty("reference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reference")] +#endif public string Reference { get; set; } } } diff --git a/src/Stripe.net/Services/Tax/Transactions/TransactionShippingCostOptions.cs b/src/Stripe.net/Services/Tax/Transactions/TransactionShippingCostOptions.cs index bab56f3849..b8216b8849 100644 --- a/src/Stripe.net/Services/Tax/Transactions/TransactionShippingCostOptions.cs +++ b/src/Stripe.net/Services/Tax/Transactions/TransactionShippingCostOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Tax { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TransactionShippingCostOptions : INestedOptions { @@ -11,6 +14,9 @@ public class TransactionShippingCostOptions : INestedOptions /// negative. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long? Amount { get; set; } /// @@ -19,6 +25,9 @@ public class TransactionShippingCostOptions : INestedOptions /// negative. /// [JsonProperty("amount_tax")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_tax")] +#endif public long? AmountTax { get; set; } } } diff --git a/src/Stripe.net/Services/TaxIds/TaxIdCreateOptions.cs b/src/Stripe.net/Services/TaxIds/TaxIdCreateOptions.cs index 3c1cacb726..e09d0296c3 100644 --- a/src/Stripe.net/Services/TaxIds/TaxIdCreateOptions.cs +++ b/src/Stripe.net/Services/TaxIds/TaxIdCreateOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TaxIdCreateOptions : BaseOptions { @@ -9,6 +12,9 @@ public class TaxIdCreateOptions : BaseOptions /// The account or customer the tax ID belongs to. Defaults to owner[type]=self. /// [JsonProperty("owner")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("owner")] +#endif public TaxIdOwnerOptions Owner { get; set; } /// @@ -46,12 +52,18 @@ public class TaxIdCreateOptions : BaseOptions /// uz_tin, uz_vat, ve_rif, vn_tin, or za_vat. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } /// /// Value of the tax ID. /// [JsonProperty("value")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("value")] +#endif public string Value { get; set; } } } diff --git a/src/Stripe.net/Services/TaxIds/TaxIdListOptions.cs b/src/Stripe.net/Services/TaxIds/TaxIdListOptions.cs index 310f073e2e..d6387631a8 100644 --- a/src/Stripe.net/Services/TaxIds/TaxIdListOptions.cs +++ b/src/Stripe.net/Services/TaxIds/TaxIdListOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TaxIdListOptions : ListOptions { @@ -9,6 +12,9 @@ public class TaxIdListOptions : ListOptions /// The account or customer the tax ID belongs to. Defaults to owner[type]=self. /// [JsonProperty("owner")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("owner")] +#endif public TaxIdOwnerOptions Owner { get; set; } } } diff --git a/src/Stripe.net/Services/TaxIds/TaxIdOwnerOptions.cs b/src/Stripe.net/Services/TaxIds/TaxIdOwnerOptions.cs index 07533ba3fb..e343437a6c 100644 --- a/src/Stripe.net/Services/TaxIds/TaxIdOwnerOptions.cs +++ b/src/Stripe.net/Services/TaxIds/TaxIdOwnerOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TaxIdOwnerOptions : INestedOptions { @@ -9,12 +12,18 @@ public class TaxIdOwnerOptions : INestedOptions /// Account the tax ID belongs to. Required when type=account. /// [JsonProperty("account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account")] +#endif public string Account { get; set; } /// /// Customer the tax ID belongs to. Required when type=customer. /// [JsonProperty("customer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] +#endif public string Customer { get; set; } /// @@ -22,6 +31,9 @@ public class TaxIdOwnerOptions : INestedOptions /// One of: account, application, customer, or self. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/TaxRates/TaxRateCreateOptions.cs b/src/Stripe.net/Services/TaxRates/TaxRateCreateOptions.cs index 6fd19f5800..2eaa9b4c4c 100644 --- a/src/Stripe.net/Services/TaxRates/TaxRateCreateOptions.cs +++ b/src/Stripe.net/Services/TaxRates/TaxRateCreateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TaxRateCreateOptions : BaseOptions, IHasMetadata { @@ -12,6 +15,9 @@ public class TaxRateCreateOptions : BaseOptions, IHasMetadata /// subscriptions and invoices that already have it set. /// [JsonProperty("active")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("active")] +#endif public bool? Active { get; set; } /// @@ -19,6 +25,9 @@ public class TaxRateCreateOptions : BaseOptions, IHasMetadata /// 3166-1 alpha-2). /// [JsonProperty("country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country")] +#endif public string Country { get; set; } /// @@ -26,18 +35,27 @@ public class TaxRateCreateOptions : BaseOptions, IHasMetadata /// visible to your customers. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// /// The display name of the tax rate, which will be shown to users. /// [JsonProperty("display_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_name")] +#endif public string DisplayName { get; set; } /// /// This specifies if the tax rate is inclusive or exclusive. /// [JsonProperty("inclusive")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("inclusive")] +#endif public bool? Inclusive { get; set; } /// @@ -45,6 +63,9 @@ public class TaxRateCreateOptions : BaseOptions, IHasMetadata /// purposes. It also appears on your customer’s invoice. /// [JsonProperty("jurisdiction")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("jurisdiction")] +#endif public string Jurisdiction { get; set; } /// @@ -54,12 +75,18 @@ public class TaxRateCreateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// This represents the tax rate percent out of 100. /// [JsonProperty("percentage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("percentage")] +#endif public decimal? Percentage { get; set; } /// @@ -67,6 +94,9 @@ public class TaxRateCreateOptions : BaseOptions, IHasMetadata /// without country prefix. For example, "NY" for New York, United States. /// [JsonProperty("state")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("state")] +#endif public string State { get; set; } /// @@ -77,6 +107,9 @@ public class TaxRateCreateOptions : BaseOptions, IHasMetadata /// vat. /// [JsonProperty("tax_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_type")] +#endif public string TaxType { get; set; } } } diff --git a/src/Stripe.net/Services/TaxRates/TaxRateListOptions.cs b/src/Stripe.net/Services/TaxRates/TaxRateListOptions.cs index ae5af256b1..f05aa6caad 100644 --- a/src/Stripe.net/Services/TaxRates/TaxRateListOptions.cs +++ b/src/Stripe.net/Services/TaxRates/TaxRateListOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TaxRateListOptions : ListOptionsWithCreated { @@ -9,6 +12,9 @@ public class TaxRateListOptions : ListOptionsWithCreated /// Optional flag to filter by tax rates that are either active or inactive (archived). /// [JsonProperty("active")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("active")] +#endif public bool? Active { get; set; } /// @@ -16,6 +22,9 @@ public class TaxRateListOptions : ListOptionsWithCreated /// inclusive). /// [JsonProperty("inclusive")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("inclusive")] +#endif public bool? Inclusive { get; set; } } } diff --git a/src/Stripe.net/Services/TaxRates/TaxRateUpdateOptions.cs b/src/Stripe.net/Services/TaxRates/TaxRateUpdateOptions.cs index 8629cb70d0..cf4e50f072 100644 --- a/src/Stripe.net/Services/TaxRates/TaxRateUpdateOptions.cs +++ b/src/Stripe.net/Services/TaxRates/TaxRateUpdateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TaxRateUpdateOptions : BaseOptions, IHasMetadata { @@ -12,6 +15,9 @@ public class TaxRateUpdateOptions : BaseOptions, IHasMetadata /// subscriptions and invoices that already have it set. /// [JsonProperty("active")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("active")] +#endif public bool? Active { get; set; } /// @@ -19,6 +25,9 @@ public class TaxRateUpdateOptions : BaseOptions, IHasMetadata /// 3166-1 alpha-2). /// [JsonProperty("country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country")] +#endif public string Country { get; set; } /// @@ -26,12 +35,18 @@ public class TaxRateUpdateOptions : BaseOptions, IHasMetadata /// visible to your customers. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// /// The display name of the tax rate, which will be shown to users. /// [JsonProperty("display_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_name")] +#endif public string DisplayName { get; set; } /// @@ -39,6 +54,9 @@ public class TaxRateUpdateOptions : BaseOptions, IHasMetadata /// purposes. It also appears on your customer’s invoice. /// [JsonProperty("jurisdiction")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("jurisdiction")] +#endif public string Jurisdiction { get; set; } /// @@ -48,6 +66,9 @@ public class TaxRateUpdateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -55,6 +76,9 @@ public class TaxRateUpdateOptions : BaseOptions, IHasMetadata /// without country prefix. For example, "NY" for New York, United States. /// [JsonProperty("state")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("state")] +#endif public string State { get; set; } /// @@ -65,6 +89,9 @@ public class TaxRateUpdateOptions : BaseOptions, IHasMetadata /// vat. /// [JsonProperty("tax_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_type")] +#endif public string TaxType { get; set; } } } diff --git a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationBbposWiseposEOptions.cs b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationBbposWiseposEOptions.cs index 5fe9775325..88262a9bf4 100644 --- a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationBbposWiseposEOptions.cs +++ b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationBbposWiseposEOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Terminal { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfigurationBbposWiseposEOptions : INestedOptions { @@ -9,6 +12,9 @@ public class ConfigurationBbposWiseposEOptions : INestedOptions /// A File ID representing an image you would like displayed on the reader. /// [JsonProperty("splashscreen")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("splashscreen")] +#endif public string Splashscreen { get; set; } } } diff --git a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationCreateOptions.cs b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationCreateOptions.cs index 94223ab7f1..1b688d3551 100644 --- a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationCreateOptions.cs +++ b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationCreateOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Terminal { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfigurationCreateOptions : BaseOptions { @@ -9,42 +12,63 @@ public class ConfigurationCreateOptions : BaseOptions /// An object containing device type specific settings for BBPOS WisePOS E readers. /// [JsonProperty("bbpos_wisepos_e")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bbpos_wisepos_e")] +#endif public ConfigurationBbposWiseposEOptions BbposWiseposE { get; set; } /// /// Name of the configuration. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } /// /// Configurations for collecting transactions offline. /// [JsonProperty("offline")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("offline")] +#endif public ConfigurationOfflineOptions Offline { get; set; } /// /// Reboot time settings for readers that support customized reboot time configuration. /// [JsonProperty("reboot_window")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reboot_window")] +#endif public ConfigurationRebootWindowOptions RebootWindow { get; set; } /// /// An object containing device type specific settings for Stripe S700 readers. /// [JsonProperty("stripe_s700")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("stripe_s700")] +#endif public ConfigurationStripeS700Options StripeS700 { get; set; } /// /// Tipping configurations for readers supporting on-reader tips. /// [JsonProperty("tipping")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tipping")] +#endif public ConfigurationTippingOptions Tipping { get; set; } /// /// An object containing device type specific settings for Verifone P400 readers. /// [JsonProperty("verifone_p400")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("verifone_p400")] +#endif public ConfigurationVerifoneP400Options VerifoneP400 { get; set; } } } diff --git a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationListOptions.cs b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationListOptions.cs index 5c11539389..7abd9ff897 100644 --- a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationListOptions.cs +++ b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationListOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Terminal { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfigurationListOptions : ListOptions { @@ -9,6 +12,9 @@ public class ConfigurationListOptions : ListOptions /// if present, only return the account default or non-default configurations. /// [JsonProperty("is_account_default")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("is_account_default")] +#endif public bool? IsAccountDefault { get; set; } } } diff --git a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationOfflineOptions.cs b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationOfflineOptions.cs index 414a8a666b..bec731fceb 100644 --- a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationOfflineOptions.cs +++ b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationOfflineOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Terminal { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfigurationOfflineOptions : INestedOptions { @@ -10,6 +13,9 @@ public class ConfigurationOfflineOptions : INestedOptions /// Defaults to false. /// [JsonProperty("enabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled")] +#endif public bool? Enabled { get; set; } } } diff --git a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationRebootWindowOptions.cs b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationRebootWindowOptions.cs index ec2c20c7f9..29b0c66e08 100644 --- a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationRebootWindowOptions.cs +++ b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationRebootWindowOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Terminal { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfigurationRebootWindowOptions : INestedOptions { @@ -10,12 +13,18 @@ public class ConfigurationRebootWindowOptions : INestedOptions /// value must be different than the start_hour. /// [JsonProperty("end_hour")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("end_hour")] +#endif public long? EndHour { get; set; } /// /// Integer between 0 to 23 that represents the start hour of the reboot time window. /// [JsonProperty("start_hour")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("start_hour")] +#endif public long? StartHour { get; set; } } } diff --git a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationStripeS700Options.cs b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationStripeS700Options.cs index 78947b3953..1435d3c1fd 100644 --- a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationStripeS700Options.cs +++ b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationStripeS700Options.cs @@ -2,6 +2,9 @@ namespace Stripe.Terminal { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfigurationStripeS700Options : INestedOptions { @@ -9,6 +12,9 @@ public class ConfigurationStripeS700Options : INestedOptions /// A File ID representing an image you would like displayed on the reader. /// [JsonProperty("splashscreen")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("splashscreen")] +#endif public string Splashscreen { get; set; } } } diff --git a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationTippingAudOptions.cs b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationTippingAudOptions.cs index 36338385c6..c2e654ad54 100644 --- a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationTippingAudOptions.cs +++ b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationTippingAudOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.Terminal { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfigurationTippingAudOptions : INestedOptions { @@ -10,12 +13,18 @@ public class ConfigurationTippingAudOptions : INestedOptions /// Fixed amounts displayed when collecting a tip. /// [JsonProperty("fixed_amounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fixed_amounts")] +#endif public List FixedAmounts { get; set; } /// /// Percentages displayed when collecting a tip. /// [JsonProperty("percentages")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("percentages")] +#endif public List Percentages { get; set; } /// @@ -23,6 +32,9 @@ public class ConfigurationTippingAudOptions : INestedOptions /// displayed. /// [JsonProperty("smart_tip_threshold")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("smart_tip_threshold")] +#endif public long? SmartTipThreshold { get; set; } } } diff --git a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationTippingCadOptions.cs b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationTippingCadOptions.cs index 5f3b2cc929..5ba3793976 100644 --- a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationTippingCadOptions.cs +++ b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationTippingCadOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.Terminal { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfigurationTippingCadOptions : INestedOptions { @@ -10,12 +13,18 @@ public class ConfigurationTippingCadOptions : INestedOptions /// Fixed amounts displayed when collecting a tip. /// [JsonProperty("fixed_amounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fixed_amounts")] +#endif public List FixedAmounts { get; set; } /// /// Percentages displayed when collecting a tip. /// [JsonProperty("percentages")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("percentages")] +#endif public List Percentages { get; set; } /// @@ -23,6 +32,9 @@ public class ConfigurationTippingCadOptions : INestedOptions /// displayed. /// [JsonProperty("smart_tip_threshold")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("smart_tip_threshold")] +#endif public long? SmartTipThreshold { get; set; } } } diff --git a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationTippingChfOptions.cs b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationTippingChfOptions.cs index 705bd93db7..811be448da 100644 --- a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationTippingChfOptions.cs +++ b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationTippingChfOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.Terminal { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfigurationTippingChfOptions : INestedOptions { @@ -10,12 +13,18 @@ public class ConfigurationTippingChfOptions : INestedOptions /// Fixed amounts displayed when collecting a tip. /// [JsonProperty("fixed_amounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fixed_amounts")] +#endif public List FixedAmounts { get; set; } /// /// Percentages displayed when collecting a tip. /// [JsonProperty("percentages")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("percentages")] +#endif public List Percentages { get; set; } /// @@ -23,6 +32,9 @@ public class ConfigurationTippingChfOptions : INestedOptions /// displayed. /// [JsonProperty("smart_tip_threshold")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("smart_tip_threshold")] +#endif public long? SmartTipThreshold { get; set; } } } diff --git a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationTippingCzkOptions.cs b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationTippingCzkOptions.cs index 1135ef894b..6960653bd2 100644 --- a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationTippingCzkOptions.cs +++ b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationTippingCzkOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.Terminal { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfigurationTippingCzkOptions : INestedOptions { @@ -10,12 +13,18 @@ public class ConfigurationTippingCzkOptions : INestedOptions /// Fixed amounts displayed when collecting a tip. /// [JsonProperty("fixed_amounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fixed_amounts")] +#endif public List FixedAmounts { get; set; } /// /// Percentages displayed when collecting a tip. /// [JsonProperty("percentages")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("percentages")] +#endif public List Percentages { get; set; } /// @@ -23,6 +32,9 @@ public class ConfigurationTippingCzkOptions : INestedOptions /// displayed. /// [JsonProperty("smart_tip_threshold")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("smart_tip_threshold")] +#endif public long? SmartTipThreshold { get; set; } } } diff --git a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationTippingDkkOptions.cs b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationTippingDkkOptions.cs index 1ed10146ba..b55f8c3d6b 100644 --- a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationTippingDkkOptions.cs +++ b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationTippingDkkOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.Terminal { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfigurationTippingDkkOptions : INestedOptions { @@ -10,12 +13,18 @@ public class ConfigurationTippingDkkOptions : INestedOptions /// Fixed amounts displayed when collecting a tip. /// [JsonProperty("fixed_amounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fixed_amounts")] +#endif public List FixedAmounts { get; set; } /// /// Percentages displayed when collecting a tip. /// [JsonProperty("percentages")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("percentages")] +#endif public List Percentages { get; set; } /// @@ -23,6 +32,9 @@ public class ConfigurationTippingDkkOptions : INestedOptions /// displayed. /// [JsonProperty("smart_tip_threshold")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("smart_tip_threshold")] +#endif public long? SmartTipThreshold { get; set; } } } diff --git a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationTippingEurOptions.cs b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationTippingEurOptions.cs index 26455f3235..3216d978f1 100644 --- a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationTippingEurOptions.cs +++ b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationTippingEurOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.Terminal { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfigurationTippingEurOptions : INestedOptions { @@ -10,12 +13,18 @@ public class ConfigurationTippingEurOptions : INestedOptions /// Fixed amounts displayed when collecting a tip. /// [JsonProperty("fixed_amounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fixed_amounts")] +#endif public List FixedAmounts { get; set; } /// /// Percentages displayed when collecting a tip. /// [JsonProperty("percentages")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("percentages")] +#endif public List Percentages { get; set; } /// @@ -23,6 +32,9 @@ public class ConfigurationTippingEurOptions : INestedOptions /// displayed. /// [JsonProperty("smart_tip_threshold")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("smart_tip_threshold")] +#endif public long? SmartTipThreshold { get; set; } } } diff --git a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationTippingGbpOptions.cs b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationTippingGbpOptions.cs index 3d0cdccad3..6516419309 100644 --- a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationTippingGbpOptions.cs +++ b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationTippingGbpOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.Terminal { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfigurationTippingGbpOptions : INestedOptions { @@ -10,12 +13,18 @@ public class ConfigurationTippingGbpOptions : INestedOptions /// Fixed amounts displayed when collecting a tip. /// [JsonProperty("fixed_amounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fixed_amounts")] +#endif public List FixedAmounts { get; set; } /// /// Percentages displayed when collecting a tip. /// [JsonProperty("percentages")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("percentages")] +#endif public List Percentages { get; set; } /// @@ -23,6 +32,9 @@ public class ConfigurationTippingGbpOptions : INestedOptions /// displayed. /// [JsonProperty("smart_tip_threshold")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("smart_tip_threshold")] +#endif public long? SmartTipThreshold { get; set; } } } diff --git a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationTippingHkdOptions.cs b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationTippingHkdOptions.cs index f012a05760..bcf744d4ee 100644 --- a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationTippingHkdOptions.cs +++ b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationTippingHkdOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.Terminal { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfigurationTippingHkdOptions : INestedOptions { @@ -10,12 +13,18 @@ public class ConfigurationTippingHkdOptions : INestedOptions /// Fixed amounts displayed when collecting a tip. /// [JsonProperty("fixed_amounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fixed_amounts")] +#endif public List FixedAmounts { get; set; } /// /// Percentages displayed when collecting a tip. /// [JsonProperty("percentages")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("percentages")] +#endif public List Percentages { get; set; } /// @@ -23,6 +32,9 @@ public class ConfigurationTippingHkdOptions : INestedOptions /// displayed. /// [JsonProperty("smart_tip_threshold")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("smart_tip_threshold")] +#endif public long? SmartTipThreshold { get; set; } } } diff --git a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationTippingMyrOptions.cs b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationTippingMyrOptions.cs index da1aae498e..6e186de547 100644 --- a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationTippingMyrOptions.cs +++ b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationTippingMyrOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.Terminal { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfigurationTippingMyrOptions : INestedOptions { @@ -10,12 +13,18 @@ public class ConfigurationTippingMyrOptions : INestedOptions /// Fixed amounts displayed when collecting a tip. /// [JsonProperty("fixed_amounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fixed_amounts")] +#endif public List FixedAmounts { get; set; } /// /// Percentages displayed when collecting a tip. /// [JsonProperty("percentages")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("percentages")] +#endif public List Percentages { get; set; } /// @@ -23,6 +32,9 @@ public class ConfigurationTippingMyrOptions : INestedOptions /// displayed. /// [JsonProperty("smart_tip_threshold")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("smart_tip_threshold")] +#endif public long? SmartTipThreshold { get; set; } } } diff --git a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationTippingNokOptions.cs b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationTippingNokOptions.cs index 9a28b43a6e..a8f26d6339 100644 --- a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationTippingNokOptions.cs +++ b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationTippingNokOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.Terminal { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfigurationTippingNokOptions : INestedOptions { @@ -10,12 +13,18 @@ public class ConfigurationTippingNokOptions : INestedOptions /// Fixed amounts displayed when collecting a tip. /// [JsonProperty("fixed_amounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fixed_amounts")] +#endif public List FixedAmounts { get; set; } /// /// Percentages displayed when collecting a tip. /// [JsonProperty("percentages")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("percentages")] +#endif public List Percentages { get; set; } /// @@ -23,6 +32,9 @@ public class ConfigurationTippingNokOptions : INestedOptions /// displayed. /// [JsonProperty("smart_tip_threshold")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("smart_tip_threshold")] +#endif public long? SmartTipThreshold { get; set; } } } diff --git a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationTippingNzdOptions.cs b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationTippingNzdOptions.cs index 07ff9c8376..e9d407e8c8 100644 --- a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationTippingNzdOptions.cs +++ b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationTippingNzdOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.Terminal { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfigurationTippingNzdOptions : INestedOptions { @@ -10,12 +13,18 @@ public class ConfigurationTippingNzdOptions : INestedOptions /// Fixed amounts displayed when collecting a tip. /// [JsonProperty("fixed_amounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fixed_amounts")] +#endif public List FixedAmounts { get; set; } /// /// Percentages displayed when collecting a tip. /// [JsonProperty("percentages")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("percentages")] +#endif public List Percentages { get; set; } /// @@ -23,6 +32,9 @@ public class ConfigurationTippingNzdOptions : INestedOptions /// displayed. /// [JsonProperty("smart_tip_threshold")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("smart_tip_threshold")] +#endif public long? SmartTipThreshold { get; set; } } } diff --git a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationTippingOptions.cs b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationTippingOptions.cs index c0fb05879e..1c9185661e 100644 --- a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationTippingOptions.cs +++ b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationTippingOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Terminal { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfigurationTippingOptions : INestedOptions { @@ -9,90 +12,135 @@ public class ConfigurationTippingOptions : INestedOptions /// Tipping configuration for AUD. /// [JsonProperty("aud")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("aud")] +#endif public ConfigurationTippingAudOptions Aud { get; set; } /// /// Tipping configuration for CAD. /// [JsonProperty("cad")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cad")] +#endif public ConfigurationTippingCadOptions Cad { get; set; } /// /// Tipping configuration for CHF. /// [JsonProperty("chf")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("chf")] +#endif public ConfigurationTippingChfOptions Chf { get; set; } /// /// Tipping configuration for CZK. /// [JsonProperty("czk")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("czk")] +#endif public ConfigurationTippingCzkOptions Czk { get; set; } /// /// Tipping configuration for DKK. /// [JsonProperty("dkk")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("dkk")] +#endif public ConfigurationTippingDkkOptions Dkk { get; set; } /// /// Tipping configuration for EUR. /// [JsonProperty("eur")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("eur")] +#endif public ConfigurationTippingEurOptions Eur { get; set; } /// /// Tipping configuration for GBP. /// [JsonProperty("gbp")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("gbp")] +#endif public ConfigurationTippingGbpOptions Gbp { get; set; } /// /// Tipping configuration for HKD. /// [JsonProperty("hkd")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("hkd")] +#endif public ConfigurationTippingHkdOptions Hkd { get; set; } /// /// Tipping configuration for MYR. /// [JsonProperty("myr")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("myr")] +#endif public ConfigurationTippingMyrOptions Myr { get; set; } /// /// Tipping configuration for NOK. /// [JsonProperty("nok")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("nok")] +#endif public ConfigurationTippingNokOptions Nok { get; set; } /// /// Tipping configuration for NZD. /// [JsonProperty("nzd")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("nzd")] +#endif public ConfigurationTippingNzdOptions Nzd { get; set; } /// /// Tipping configuration for PLN. /// [JsonProperty("pln")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("pln")] +#endif public ConfigurationTippingPlnOptions Pln { get; set; } /// /// Tipping configuration for SEK. /// [JsonProperty("sek")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sek")] +#endif public ConfigurationTippingSekOptions Sek { get; set; } /// /// Tipping configuration for SGD. /// [JsonProperty("sgd")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sgd")] +#endif public ConfigurationTippingSgdOptions Sgd { get; set; } /// /// Tipping configuration for USD. /// [JsonProperty("usd")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("usd")] +#endif public ConfigurationTippingUsdOptions Usd { get; set; } } } diff --git a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationTippingPlnOptions.cs b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationTippingPlnOptions.cs index 7e230cb043..d54154552e 100644 --- a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationTippingPlnOptions.cs +++ b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationTippingPlnOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.Terminal { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfigurationTippingPlnOptions : INestedOptions { @@ -10,12 +13,18 @@ public class ConfigurationTippingPlnOptions : INestedOptions /// Fixed amounts displayed when collecting a tip. /// [JsonProperty("fixed_amounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fixed_amounts")] +#endif public List FixedAmounts { get; set; } /// /// Percentages displayed when collecting a tip. /// [JsonProperty("percentages")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("percentages")] +#endif public List Percentages { get; set; } /// @@ -23,6 +32,9 @@ public class ConfigurationTippingPlnOptions : INestedOptions /// displayed. /// [JsonProperty("smart_tip_threshold")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("smart_tip_threshold")] +#endif public long? SmartTipThreshold { get; set; } } } diff --git a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationTippingSekOptions.cs b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationTippingSekOptions.cs index d2fec35aab..caf440299a 100644 --- a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationTippingSekOptions.cs +++ b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationTippingSekOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.Terminal { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfigurationTippingSekOptions : INestedOptions { @@ -10,12 +13,18 @@ public class ConfigurationTippingSekOptions : INestedOptions /// Fixed amounts displayed when collecting a tip. /// [JsonProperty("fixed_amounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fixed_amounts")] +#endif public List FixedAmounts { get; set; } /// /// Percentages displayed when collecting a tip. /// [JsonProperty("percentages")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("percentages")] +#endif public List Percentages { get; set; } /// @@ -23,6 +32,9 @@ public class ConfigurationTippingSekOptions : INestedOptions /// displayed. /// [JsonProperty("smart_tip_threshold")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("smart_tip_threshold")] +#endif public long? SmartTipThreshold { get; set; } } } diff --git a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationTippingSgdOptions.cs b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationTippingSgdOptions.cs index ea968dda22..1eab05cb64 100644 --- a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationTippingSgdOptions.cs +++ b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationTippingSgdOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.Terminal { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfigurationTippingSgdOptions : INestedOptions { @@ -10,12 +13,18 @@ public class ConfigurationTippingSgdOptions : INestedOptions /// Fixed amounts displayed when collecting a tip. /// [JsonProperty("fixed_amounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fixed_amounts")] +#endif public List FixedAmounts { get; set; } /// /// Percentages displayed when collecting a tip. /// [JsonProperty("percentages")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("percentages")] +#endif public List Percentages { get; set; } /// @@ -23,6 +32,9 @@ public class ConfigurationTippingSgdOptions : INestedOptions /// displayed. /// [JsonProperty("smart_tip_threshold")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("smart_tip_threshold")] +#endif public long? SmartTipThreshold { get; set; } } } diff --git a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationTippingUsdOptions.cs b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationTippingUsdOptions.cs index 38c3fe460c..9304fd68f4 100644 --- a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationTippingUsdOptions.cs +++ b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationTippingUsdOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.Terminal { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfigurationTippingUsdOptions : INestedOptions { @@ -10,12 +13,18 @@ public class ConfigurationTippingUsdOptions : INestedOptions /// Fixed amounts displayed when collecting a tip. /// [JsonProperty("fixed_amounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fixed_amounts")] +#endif public List FixedAmounts { get; set; } /// /// Percentages displayed when collecting a tip. /// [JsonProperty("percentages")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("percentages")] +#endif public List Percentages { get; set; } /// @@ -23,6 +32,9 @@ public class ConfigurationTippingUsdOptions : INestedOptions /// displayed. /// [JsonProperty("smart_tip_threshold")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("smart_tip_threshold")] +#endif public long? SmartTipThreshold { get; set; } } } diff --git a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationUpdateOptions.cs b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationUpdateOptions.cs index d103bc7bdc..ed5a5ed5f4 100644 --- a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationUpdateOptions.cs +++ b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationUpdateOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Terminal { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfigurationUpdateOptions : BaseOptions { @@ -9,42 +12,63 @@ public class ConfigurationUpdateOptions : BaseOptions /// An object containing device type specific settings for BBPOS WisePOS E readers. /// [JsonProperty("bbpos_wisepos_e")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bbpos_wisepos_e")] +#endif public ConfigurationBbposWiseposEOptions BbposWiseposE { get; set; } /// /// Name of the configuration. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } /// /// Configurations for collecting transactions offline. /// [JsonProperty("offline")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("offline")] +#endif public ConfigurationOfflineOptions Offline { get; set; } /// /// Reboot time settings for readers that support customized reboot time configuration. /// [JsonProperty("reboot_window")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reboot_window")] +#endif public ConfigurationRebootWindowOptions RebootWindow { get; set; } /// /// An object containing device type specific settings for Stripe S700 readers. /// [JsonProperty("stripe_s700")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("stripe_s700")] +#endif public ConfigurationStripeS700Options StripeS700 { get; set; } /// /// Tipping configurations for readers supporting on-reader tips. /// [JsonProperty("tipping")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tipping")] +#endif public ConfigurationTippingOptions Tipping { get; set; } /// /// An object containing device type specific settings for Verifone P400 readers. /// [JsonProperty("verifone_p400")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("verifone_p400")] +#endif public ConfigurationVerifoneP400Options VerifoneP400 { get; set; } } } diff --git a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationVerifoneP400Options.cs b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationVerifoneP400Options.cs index 82493ecc9c..4e9bb22b9f 100644 --- a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationVerifoneP400Options.cs +++ b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationVerifoneP400Options.cs @@ -2,6 +2,9 @@ namespace Stripe.Terminal { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfigurationVerifoneP400Options : INestedOptions { @@ -9,6 +12,9 @@ public class ConfigurationVerifoneP400Options : INestedOptions /// A File ID representing an image you would like displayed on the reader. /// [JsonProperty("splashscreen")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("splashscreen")] +#endif public string Splashscreen { get; set; } } } diff --git a/src/Stripe.net/Services/Terminal/ConnectionTokens/ConnectionTokenCreateOptions.cs b/src/Stripe.net/Services/Terminal/ConnectionTokens/ConnectionTokenCreateOptions.cs index 3cd3cfb3f7..51983e1a86 100644 --- a/src/Stripe.net/Services/Terminal/ConnectionTokens/ConnectionTokenCreateOptions.cs +++ b/src/Stripe.net/Services/Terminal/ConnectionTokens/ConnectionTokenCreateOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Terminal { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConnectionTokenCreateOptions : BaseOptions { @@ -14,6 +17,9 @@ public class ConnectionTokenCreateOptions : BaseOptions /// docs on scoping connection tokens. /// [JsonProperty("location")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("location")] +#endif public string Location { get; set; } } } diff --git a/src/Stripe.net/Services/Terminal/Locations/LocationCreateOptions.cs b/src/Stripe.net/Services/Terminal/Locations/LocationCreateOptions.cs index a9917edef2..3cbae07af0 100644 --- a/src/Stripe.net/Services/Terminal/Locations/LocationCreateOptions.cs +++ b/src/Stripe.net/Services/Terminal/Locations/LocationCreateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.Terminal { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class LocationCreateOptions : BaseOptions, IHasMetadata { @@ -10,18 +13,27 @@ public class LocationCreateOptions : BaseOptions, IHasMetadata /// The full address of the location. /// [JsonProperty("address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address")] +#endif public AddressOptions Address { get; set; } /// /// The ID of a configuration that will be used to customize all readers in this location. /// [JsonProperty("configuration_overrides")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("configuration_overrides")] +#endif public string ConfigurationOverrides { get; set; } /// /// A name for the location. Maximum length is 1000 characters. /// [JsonProperty("display_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_name")] +#endif public string DisplayName { get; set; } /// @@ -31,6 +43,9 @@ public class LocationCreateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } } } diff --git a/src/Stripe.net/Services/Terminal/Locations/LocationUpdateOptions.cs b/src/Stripe.net/Services/Terminal/Locations/LocationUpdateOptions.cs index a9cb7ba9b3..7a43abe70e 100644 --- a/src/Stripe.net/Services/Terminal/Locations/LocationUpdateOptions.cs +++ b/src/Stripe.net/Services/Terminal/Locations/LocationUpdateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.Terminal { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class LocationUpdateOptions : BaseOptions, IHasMetadata { @@ -12,18 +15,27 @@ public class LocationUpdateOptions : BaseOptions, IHasMetadata /// new Location object and re-register any existing readers to that location. /// [JsonProperty("address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address")] +#endif public AddressOptions Address { get; set; } /// /// The ID of a configuration that will be used to customize all readers in this location. /// [JsonProperty("configuration_overrides")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("configuration_overrides")] +#endif public string ConfigurationOverrides { get; set; } /// /// A name for the location. /// [JsonProperty("display_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_name")] +#endif public string DisplayName { get; set; } /// @@ -33,6 +45,9 @@ public class LocationUpdateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } } } diff --git a/src/Stripe.net/Services/Terminal/Readers/ReaderCartLineItemOptions.cs b/src/Stripe.net/Services/Terminal/Readers/ReaderCartLineItemOptions.cs index bd75e97f2b..707ec45616 100644 --- a/src/Stripe.net/Services/Terminal/Readers/ReaderCartLineItemOptions.cs +++ b/src/Stripe.net/Services/Terminal/Readers/ReaderCartLineItemOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Terminal { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ReaderCartLineItemOptions : INestedOptions { @@ -9,18 +12,27 @@ public class ReaderCartLineItemOptions : INestedOptions /// The price of the item in cents. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long? Amount { get; set; } /// /// The description or name of the item. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// /// The quantity of the line item being purchased. /// [JsonProperty("quantity")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("quantity")] +#endif public long? Quantity { get; set; } } } diff --git a/src/Stripe.net/Services/Terminal/Readers/ReaderCartOptions.cs b/src/Stripe.net/Services/Terminal/Readers/ReaderCartOptions.cs index b35977c815..6bbc865064 100644 --- a/src/Stripe.net/Services/Terminal/Readers/ReaderCartOptions.cs +++ b/src/Stripe.net/Services/Terminal/Readers/ReaderCartOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.Terminal { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ReaderCartOptions : INestedOptions { @@ -12,24 +15,36 @@ public class ReaderCartOptions : INestedOptions /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// /// Array of line items that were purchased. /// [JsonProperty("line_items")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("line_items")] +#endif public List LineItems { get; set; } /// /// The amount of tax in cents. /// [JsonProperty("tax")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax")] +#endif public long? Tax { get; set; } /// /// Total balance of cart due in cents. /// [JsonProperty("total")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("total")] +#endif public long? Total { get; set; } } } diff --git a/src/Stripe.net/Services/Terminal/Readers/ReaderCreateOptions.cs b/src/Stripe.net/Services/Terminal/Readers/ReaderCreateOptions.cs index 9166bec3ea..8c8ec2377d 100644 --- a/src/Stripe.net/Services/Terminal/Readers/ReaderCreateOptions.cs +++ b/src/Stripe.net/Services/Terminal/Readers/ReaderCreateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.Terminal { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ReaderCreateOptions : BaseOptions, IHasMetadata { @@ -11,12 +14,18 @@ public class ReaderCreateOptions : BaseOptions, IHasMetadata /// the registration code will be used. /// [JsonProperty("label")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("label")] +#endif public string Label { get; set; } /// /// The location to assign the reader to. /// [JsonProperty("location")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("location")] +#endif public string Location { get; set; } /// @@ -26,12 +35,18 @@ public class ReaderCreateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// A code generated by the reader used for registering to an account. /// [JsonProperty("registration_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("registration_code")] +#endif public string RegistrationCode { get; set; } } } diff --git a/src/Stripe.net/Services/Terminal/Readers/ReaderListOptions.cs b/src/Stripe.net/Services/Terminal/Readers/ReaderListOptions.cs index c2d42f06e5..cf9c69e725 100644 --- a/src/Stripe.net/Services/Terminal/Readers/ReaderListOptions.cs +++ b/src/Stripe.net/Services/Terminal/Readers/ReaderListOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Terminal { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ReaderListOptions : ListOptions { @@ -12,18 +15,27 @@ public class ReaderListOptions : ListOptions /// stripe_s700, or verifone_P400. /// [JsonProperty("device_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("device_type")] +#endif public string DeviceType { get; set; } /// /// A location ID to filter the response list to only readers at the specific location. /// [JsonProperty("location")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("location")] +#endif public string Location { get; set; } /// /// Filters readers by serial number. /// [JsonProperty("serial_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("serial_number")] +#endif public string SerialNumber { get; set; } /// @@ -31,6 +43,9 @@ public class ReaderListOptions : ListOptions /// One of: offline, or online. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } } } diff --git a/src/Stripe.net/Services/Terminal/Readers/ReaderProcessConfigOptions.cs b/src/Stripe.net/Services/Terminal/Readers/ReaderProcessConfigOptions.cs index b0b655b3e5..070f119434 100644 --- a/src/Stripe.net/Services/Terminal/Readers/ReaderProcessConfigOptions.cs +++ b/src/Stripe.net/Services/Terminal/Readers/ReaderProcessConfigOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Terminal { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ReaderProcessConfigOptions : INestedOptions { @@ -12,24 +15,36 @@ public class ReaderProcessConfigOptions : INestedOptions /// One of: always, limited, or unspecified. /// [JsonProperty("allow_redisplay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("allow_redisplay")] +#endif public string AllowRedisplay { get; set; } /// /// Enables cancel button on transaction screens. /// [JsonProperty("enable_customer_cancellation")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enable_customer_cancellation")] +#endif public bool? EnableCustomerCancellation { get; set; } /// /// Override showing a tipping selection screen on this transaction. /// [JsonProperty("skip_tipping")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("skip_tipping")] +#endif public bool? SkipTipping { get; set; } /// /// Tipping configuration for this transaction. /// [JsonProperty("tipping")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tipping")] +#endif public ReaderProcessConfigTippingOptions Tipping { get; set; } } } diff --git a/src/Stripe.net/Services/Terminal/Readers/ReaderProcessConfigTippingOptions.cs b/src/Stripe.net/Services/Terminal/Readers/ReaderProcessConfigTippingOptions.cs index 581bf5039a..df8ff1abaf 100644 --- a/src/Stripe.net/Services/Terminal/Readers/ReaderProcessConfigTippingOptions.cs +++ b/src/Stripe.net/Services/Terminal/Readers/ReaderProcessConfigTippingOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Terminal { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ReaderProcessConfigTippingOptions : INestedOptions { @@ -11,6 +14,9 @@ public class ReaderProcessConfigTippingOptions : INestedOptions /// to represent $1.00 or 100 to represent ¥100, a zero-decimal currency). /// [JsonProperty("amount_eligible")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_eligible")] +#endif public long? AmountEligible { get; set; } } } diff --git a/src/Stripe.net/Services/Terminal/Readers/ReaderProcessPaymentIntentOptions.cs b/src/Stripe.net/Services/Terminal/Readers/ReaderProcessPaymentIntentOptions.cs index d30e91b0ab..02d62fc787 100644 --- a/src/Stripe.net/Services/Terminal/Readers/ReaderProcessPaymentIntentOptions.cs +++ b/src/Stripe.net/Services/Terminal/Readers/ReaderProcessPaymentIntentOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Terminal { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ReaderProcessPaymentIntentOptions : BaseOptions { @@ -9,12 +12,18 @@ public class ReaderProcessPaymentIntentOptions : BaseOptions /// PaymentIntent ID. /// [JsonProperty("payment_intent")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_intent")] +#endif public string PaymentIntent { get; set; } /// /// Configuration overrides. /// [JsonProperty("process_config")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("process_config")] +#endif public ReaderProcessConfigOptions ProcessConfig { get; set; } } } diff --git a/src/Stripe.net/Services/Terminal/Readers/ReaderProcessSetupIntentOptions.cs b/src/Stripe.net/Services/Terminal/Readers/ReaderProcessSetupIntentOptions.cs index ae2142ca71..9ee775e098 100644 --- a/src/Stripe.net/Services/Terminal/Readers/ReaderProcessSetupIntentOptions.cs +++ b/src/Stripe.net/Services/Terminal/Readers/ReaderProcessSetupIntentOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Terminal { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ReaderProcessSetupIntentOptions : BaseOptions { @@ -12,18 +15,27 @@ public class ReaderProcessSetupIntentOptions : BaseOptions /// One of: always, limited, or unspecified. /// [JsonProperty("allow_redisplay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("allow_redisplay")] +#endif public string AllowRedisplay { get; set; } /// /// Configuration overrides. /// [JsonProperty("process_config")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("process_config")] +#endif public ReaderProcessConfigOptions ProcessConfig { get; set; } /// /// SetupIntent ID. /// [JsonProperty("setup_intent")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_intent")] +#endif public string SetupIntent { get; set; } } } diff --git a/src/Stripe.net/Services/Terminal/Readers/ReaderRefundPaymentConfigOptions.cs b/src/Stripe.net/Services/Terminal/Readers/ReaderRefundPaymentConfigOptions.cs index 0914551888..0c20e36f4f 100644 --- a/src/Stripe.net/Services/Terminal/Readers/ReaderRefundPaymentConfigOptions.cs +++ b/src/Stripe.net/Services/Terminal/Readers/ReaderRefundPaymentConfigOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Terminal { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ReaderRefundPaymentConfigOptions : INestedOptions { @@ -9,6 +12,9 @@ public class ReaderRefundPaymentConfigOptions : INestedOptions /// Enables cancel button on transaction screens. /// [JsonProperty("enable_customer_cancellation")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enable_customer_cancellation")] +#endif public bool? EnableCustomerCancellation { get; set; } } } diff --git a/src/Stripe.net/Services/Terminal/Readers/ReaderRefundPaymentOptions.cs b/src/Stripe.net/Services/Terminal/Readers/ReaderRefundPaymentOptions.cs index a465e3880f..4b5c25cf0e 100644 --- a/src/Stripe.net/Services/Terminal/Readers/ReaderRefundPaymentOptions.cs +++ b/src/Stripe.net/Services/Terminal/Readers/ReaderRefundPaymentOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.Terminal { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ReaderRefundPaymentOptions : BaseOptions, IHasMetadata { @@ -11,12 +14,18 @@ public class ReaderRefundPaymentOptions : BaseOptions, IHasMetadata /// refund. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long? Amount { get; set; } /// /// ID of the Charge to refund. /// [JsonProperty("charge")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("charge")] +#endif public string Charge { get; set; } /// @@ -26,12 +35,18 @@ public class ReaderRefundPaymentOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// ID of the PaymentIntent to refund. /// [JsonProperty("payment_intent")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_intent")] +#endif public string PaymentIntent { get; set; } /// @@ -42,12 +57,18 @@ public class ReaderRefundPaymentOptions : BaseOptions, IHasMetadata /// created the charge. /// [JsonProperty("refund_application_fee")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("refund_application_fee")] +#endif public bool? RefundApplicationFee { get; set; } /// /// Configuration overrides. /// [JsonProperty("refund_payment_config")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("refund_payment_config")] +#endif public ReaderRefundPaymentConfigOptions RefundPaymentConfig { get; set; } /// @@ -57,6 +78,9 @@ public class ReaderRefundPaymentOptions : BaseOptions, IHasMetadata /// created the charge. /// [JsonProperty("reverse_transfer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reverse_transfer")] +#endif public bool? ReverseTransfer { get; set; } } } diff --git a/src/Stripe.net/Services/Terminal/Readers/ReaderSetReaderDisplayOptions.cs b/src/Stripe.net/Services/Terminal/Readers/ReaderSetReaderDisplayOptions.cs index fd9a1c7fce..c7bed33a55 100644 --- a/src/Stripe.net/Services/Terminal/Readers/ReaderSetReaderDisplayOptions.cs +++ b/src/Stripe.net/Services/Terminal/Readers/ReaderSetReaderDisplayOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Terminal { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ReaderSetReaderDisplayOptions : BaseOptions { @@ -9,12 +12,18 @@ public class ReaderSetReaderDisplayOptions : BaseOptions /// Cart. /// [JsonProperty("cart")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cart")] +#endif public ReaderCartOptions Cart { get; set; } /// /// Type. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/Terminal/Readers/ReaderUpdateOptions.cs b/src/Stripe.net/Services/Terminal/Readers/ReaderUpdateOptions.cs index a7647d400a..73de028c9d 100644 --- a/src/Stripe.net/Services/Terminal/Readers/ReaderUpdateOptions.cs +++ b/src/Stripe.net/Services/Terminal/Readers/ReaderUpdateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.Terminal { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ReaderUpdateOptions : BaseOptions, IHasMetadata { @@ -10,6 +13,9 @@ public class ReaderUpdateOptions : BaseOptions, IHasMetadata /// The new label of the reader. /// [JsonProperty("label")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("label")] +#endif public string Label { get; set; } /// @@ -19,6 +25,9 @@ public class ReaderUpdateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenCreateOptions.cs b/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenCreateOptions.cs index 85be8957b3..e01df0b94b 100644 --- a/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenCreateOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenCreateOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.TestHelpers { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfirmationTokenCreateOptions : BaseOptions { @@ -9,18 +12,27 @@ public class ConfirmationTokenCreateOptions : BaseOptions /// ID of an existing PaymentMethod. /// [JsonProperty("payment_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method")] +#endif public string PaymentMethod { get; set; } /// /// If provided, this hash will be used to create a PaymentMethod. /// [JsonProperty("payment_method_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_data")] +#endif public ConfirmationTokenPaymentMethodDataOptions PaymentMethodData { get; set; } /// /// Return URL used to confirm the Intent. /// [JsonProperty("return_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("return_url")] +#endif public string ReturnUrl { get; set; } /// @@ -34,12 +46,18 @@ public class ConfirmationTokenCreateOptions : BaseOptions /// One of: off_session, or on_session. /// [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif public string SetupFutureUsage { get; set; } /// /// Shipping information for this ConfirmationToken. /// [JsonProperty("shipping")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping")] +#endif public ConfirmationTokenShippingOptions Shipping { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataAcssDebitOptions.cs b/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataAcssDebitOptions.cs index 918be88d4e..caeb7686b8 100644 --- a/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataAcssDebitOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataAcssDebitOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.TestHelpers { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfirmationTokenPaymentMethodDataAcssDebitOptions : INestedOptions { @@ -9,18 +12,27 @@ public class ConfirmationTokenPaymentMethodDataAcssDebitOptions : INestedOptions /// Customer's bank account number. /// [JsonProperty("account_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_number")] +#endif public string AccountNumber { get; set; } /// /// Institution number of the customer's bank. /// [JsonProperty("institution_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("institution_number")] +#endif public string InstitutionNumber { get; set; } /// /// Transit number of the customer's bank. /// [JsonProperty("transit_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transit_number")] +#endif public string TransitNumber { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataAuBecsDebitOptions.cs b/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataAuBecsDebitOptions.cs index 3de9b77ce8..25968abd4a 100644 --- a/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataAuBecsDebitOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataAuBecsDebitOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.TestHelpers { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfirmationTokenPaymentMethodDataAuBecsDebitOptions : INestedOptions { @@ -9,12 +12,18 @@ public class ConfirmationTokenPaymentMethodDataAuBecsDebitOptions : INestedOptio /// The account number for the bank account. /// [JsonProperty("account_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_number")] +#endif public string AccountNumber { get; set; } /// /// Bank-State-Branch number of the bank account. /// [JsonProperty("bsb_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bsb_number")] +#endif public string BsbNumber { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataBacsDebitOptions.cs b/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataBacsDebitOptions.cs index c86d877deb..74b97b3c8c 100644 --- a/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataBacsDebitOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataBacsDebitOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.TestHelpers { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfirmationTokenPaymentMethodDataBacsDebitOptions : INestedOptions { @@ -9,12 +12,18 @@ public class ConfirmationTokenPaymentMethodDataBacsDebitOptions : INestedOptions /// Account number of the bank account that the funds will be debited from. /// [JsonProperty("account_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_number")] +#endif public string AccountNumber { get; set; } /// /// Sort code of the bank account. (e.g., 10-20-30). /// [JsonProperty("sort_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sort_code")] +#endif public string SortCode { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataBillingDetailsOptions.cs b/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataBillingDetailsOptions.cs index 15d068fdfa..fa641e4ab1 100644 --- a/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataBillingDetailsOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataBillingDetailsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.TestHelpers { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfirmationTokenPaymentMethodDataBillingDetailsOptions : INestedOptions { @@ -9,24 +12,36 @@ public class ConfirmationTokenPaymentMethodDataBillingDetailsOptions : INestedOp /// Billing address. /// [JsonProperty("address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address")] +#endif public AddressOptions Address { get; set; } /// /// Email address. /// [JsonProperty("email")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("email")] +#endif public string Email { get; set; } /// /// Full name. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } /// /// Billing phone number (including extension). /// [JsonProperty("phone")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("phone")] +#endif public string Phone { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataBoletoOptions.cs b/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataBoletoOptions.cs index 58254203bc..d026112214 100644 --- a/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataBoletoOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataBoletoOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.TestHelpers { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfirmationTokenPaymentMethodDataBoletoOptions : INestedOptions { @@ -10,6 +13,9 @@ public class ConfirmationTokenPaymentMethodDataBoletoOptions : INestedOptions /// consumers). /// [JsonProperty("tax_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_id")] +#endif public string TaxId { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataEpsOptions.cs b/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataEpsOptions.cs index 10c22a6396..83cb427656 100644 --- a/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataEpsOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataEpsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.TestHelpers { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfirmationTokenPaymentMethodDataEpsOptions : INestedOptions { @@ -23,6 +26,9 @@ public class ConfirmationTokenPaymentMethodDataEpsOptions : INestedOptions /// vr_bank_braunau. /// [JsonProperty("bank")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank")] +#endif public string Bank { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataFpxOptions.cs b/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataFpxOptions.cs index 9c3fe28eb2..3e74aebd6c 100644 --- a/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataFpxOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataFpxOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.TestHelpers { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfirmationTokenPaymentMethodDataFpxOptions : INestedOptions { @@ -10,6 +13,9 @@ public class ConfirmationTokenPaymentMethodDataFpxOptions : INestedOptions /// One of: company, or individual. /// [JsonProperty("account_holder_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_holder_type")] +#endif public string AccountHolderType { get; set; } /// @@ -21,6 +27,9 @@ public class ConfirmationTokenPaymentMethodDataFpxOptions : INestedOptions /// public_bank, rhb, standard_chartered, or uob. /// [JsonProperty("bank")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank")] +#endif public string Bank { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataIdealOptions.cs b/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataIdealOptions.cs index 05a815fe5a..257ee608d3 100644 --- a/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataIdealOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataIdealOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.TestHelpers { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfirmationTokenPaymentMethodDataIdealOptions : INestedOptions { @@ -14,6 +17,9 @@ public class ConfirmationTokenPaymentMethodDataIdealOptions : INestedOptions /// yoursafe. /// [JsonProperty("bank")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank")] +#endif public string Bank { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataKlarnaDobOptions.cs b/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataKlarnaDobOptions.cs index 3b11464911..2cf979bd0d 100644 --- a/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataKlarnaDobOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataKlarnaDobOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.TestHelpers { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfirmationTokenPaymentMethodDataKlarnaDobOptions : INestedOptions { @@ -9,18 +12,27 @@ public class ConfirmationTokenPaymentMethodDataKlarnaDobOptions : INestedOptions /// The day of birth, between 1 and 31. /// [JsonProperty("day")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("day")] +#endif public long? Day { get; set; } /// /// The month of birth, between 1 and 12. /// [JsonProperty("month")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("month")] +#endif public long? Month { get; set; } /// /// The four-digit year of birth. /// [JsonProperty("year")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("year")] +#endif public long? Year { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataKlarnaOptions.cs b/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataKlarnaOptions.cs index 44cc5d43bc..4dd3401ea3 100644 --- a/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataKlarnaOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataKlarnaOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.TestHelpers { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfirmationTokenPaymentMethodDataKlarnaOptions : INestedOptions { @@ -9,6 +12,9 @@ public class ConfirmationTokenPaymentMethodDataKlarnaOptions : INestedOptions /// Customer's date of birth. /// [JsonProperty("dob")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("dob")] +#endif public ConfirmationTokenPaymentMethodDataKlarnaDobOptions Dob { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataNaverPayOptions.cs b/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataNaverPayOptions.cs index d22f26f119..04bfd96a20 100644 --- a/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataNaverPayOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataNaverPayOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.TestHelpers { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfirmationTokenPaymentMethodDataNaverPayOptions : INestedOptions { @@ -11,6 +14,9 @@ public class ConfirmationTokenPaymentMethodDataNaverPayOptions : INestedOptions /// One of: card, or points. /// [JsonProperty("funding")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("funding")] +#endif public string Funding { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataOptions.cs b/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataOptions.cs index f8c52e8aa3..8bf9bdc921 100644 --- a/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.TestHelpers { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfirmationTokenPaymentMethodDataOptions : INestedOptions, IHasMetadata { @@ -11,6 +14,9 @@ public class ConfirmationTokenPaymentMethodDataOptions : INestedOptions, IHasMet /// Debit payment method. /// [JsonProperty("acss_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("acss_debit")] +#endif public ConfirmationTokenPaymentMethodDataAcssDebitOptions AcssDebit { get; set; } /// @@ -18,6 +24,9 @@ public class ConfirmationTokenPaymentMethodDataOptions : INestedOptions, IHasMet /// payment method. /// [JsonProperty("affirm")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("affirm")] +#endif public ConfirmationTokenPaymentMethodDataAffirmOptions Affirm { get; set; } /// @@ -25,6 +34,9 @@ public class ConfirmationTokenPaymentMethodDataOptions : INestedOptions, IHasMet /// the AfterpayClearpay payment method. /// [JsonProperty("afterpay_clearpay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("afterpay_clearpay")] +#endif public ConfirmationTokenPaymentMethodDataAfterpayClearpayOptions AfterpayClearpay { get; set; } /// @@ -32,6 +44,9 @@ public class ConfirmationTokenPaymentMethodDataOptions : INestedOptions, IHasMet /// payment method. /// [JsonProperty("alipay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("alipay")] +#endif public ConfirmationTokenPaymentMethodDataAlipayOptions Alipay { get; set; } /// @@ -42,6 +57,9 @@ public class ConfirmationTokenPaymentMethodDataOptions : INestedOptions, IHasMet /// One of: always, limited, or unspecified. /// [JsonProperty("allow_redisplay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("allow_redisplay")] +#endif public string AllowRedisplay { get; set; } /// @@ -49,6 +67,9 @@ public class ConfirmationTokenPaymentMethodDataOptions : INestedOptions, IHasMet /// method. /// [JsonProperty("alma")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("alma")] +#endif public ConfirmationTokenPaymentMethodDataAlmaOptions Alma { get; set; } /// @@ -56,6 +77,9 @@ public class ConfirmationTokenPaymentMethodDataOptions : INestedOptions, IHasMet /// payment method. /// [JsonProperty("amazon_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amazon_pay")] +#endif public ConfirmationTokenPaymentMethodDataAmazonPayOptions AmazonPay { get; set; } /// @@ -63,6 +87,9 @@ public class ConfirmationTokenPaymentMethodDataOptions : INestedOptions, IHasMet /// bank account. /// [JsonProperty("au_becs_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("au_becs_debit")] +#endif public ConfirmationTokenPaymentMethodDataAuBecsDebitOptions AuBecsDebit { get; set; } /// @@ -70,6 +97,9 @@ public class ConfirmationTokenPaymentMethodDataOptions : INestedOptions, IHasMet /// Direct Debit bank account. /// [JsonProperty("bacs_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bacs_debit")] +#endif public ConfirmationTokenPaymentMethodDataBacsDebitOptions BacsDebit { get; set; } /// @@ -77,6 +107,9 @@ public class ConfirmationTokenPaymentMethodDataOptions : INestedOptions, IHasMet /// Bancontact payment method. /// [JsonProperty("bancontact")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bancontact")] +#endif public ConfirmationTokenPaymentMethodDataBancontactOptions Bancontact { get; set; } /// @@ -84,6 +117,9 @@ public class ConfirmationTokenPaymentMethodDataOptions : INestedOptions, IHasMet /// particular types of payment methods. /// [JsonProperty("billing_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_details")] +#endif public ConfirmationTokenPaymentMethodDataBillingDetailsOptions BillingDetails { get; set; } /// @@ -91,6 +127,9 @@ public class ConfirmationTokenPaymentMethodDataOptions : INestedOptions, IHasMet /// payment method. /// [JsonProperty("blik")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("blik")] +#endif public ConfirmationTokenPaymentMethodDataBlikOptions Blik { get; set; } /// @@ -98,6 +137,9 @@ public class ConfirmationTokenPaymentMethodDataOptions : INestedOptions, IHasMet /// payment method. /// [JsonProperty("boleto")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("boleto")] +#endif public ConfirmationTokenPaymentMethodDataBoletoOptions Boleto { get; set; } /// @@ -105,6 +147,9 @@ public class ConfirmationTokenPaymentMethodDataOptions : INestedOptions, IHasMet /// Pay payment method. /// [JsonProperty("cashapp")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cashapp")] +#endif public ConfirmationTokenPaymentMethodDataCashappOptions Cashapp { get; set; } /// @@ -112,6 +157,9 @@ public class ConfirmationTokenPaymentMethodDataOptions : INestedOptions, IHasMet /// CustomerBalance payment method. /// [JsonProperty("customer_balance")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_balance")] +#endif public ConfirmationTokenPaymentMethodDataCustomerBalanceOptions CustomerBalance { get; set; } /// @@ -119,6 +167,9 @@ public class ConfirmationTokenPaymentMethodDataOptions : INestedOptions, IHasMet /// method. /// [JsonProperty("eps")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("eps")] +#endif public ConfirmationTokenPaymentMethodDataEpsOptions Eps { get; set; } /// @@ -126,6 +177,9 @@ public class ConfirmationTokenPaymentMethodDataOptions : INestedOptions, IHasMet /// method. /// [JsonProperty("fpx")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fpx")] +#endif public ConfirmationTokenPaymentMethodDataFpxOptions Fpx { get; set; } /// @@ -133,6 +187,9 @@ public class ConfirmationTokenPaymentMethodDataOptions : INestedOptions, IHasMet /// payment method. /// [JsonProperty("giropay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("giropay")] +#endif public ConfirmationTokenPaymentMethodDataGiropayOptions Giropay { get; set; } /// @@ -140,6 +197,9 @@ public class ConfirmationTokenPaymentMethodDataOptions : INestedOptions, IHasMet /// payment method. /// [JsonProperty("grabpay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("grabpay")] +#endif public ConfirmationTokenPaymentMethodDataGrabpayOptions Grabpay { get; set; } /// @@ -147,6 +207,9 @@ public class ConfirmationTokenPaymentMethodDataOptions : INestedOptions, IHasMet /// payment method. /// [JsonProperty("ideal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ideal")] +#endif public ConfirmationTokenPaymentMethodDataIdealOptions Ideal { get; set; } /// @@ -154,6 +217,9 @@ public class ConfirmationTokenPaymentMethodDataOptions : INestedOptions, IHasMet /// Interac Present payment method. /// [JsonProperty("interac_present")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interac_present")] +#endif public ConfirmationTokenPaymentMethodDataInteracPresentOptions InteracPresent { get; set; } /// @@ -161,6 +227,9 @@ public class ConfirmationTokenPaymentMethodDataOptions : INestedOptions, IHasMet /// Pay payment method. /// [JsonProperty("kakao_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("kakao_pay")] +#endif public ConfirmationTokenPaymentMethodDataKakaoPayOptions KakaoPay { get; set; } /// @@ -168,6 +237,9 @@ public class ConfirmationTokenPaymentMethodDataOptions : INestedOptions, IHasMet /// payment method. /// [JsonProperty("klarna")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("klarna")] +#endif public ConfirmationTokenPaymentMethodDataKlarnaOptions Klarna { get; set; } /// @@ -175,6 +247,9 @@ public class ConfirmationTokenPaymentMethodDataOptions : INestedOptions, IHasMet /// payment method. /// [JsonProperty("konbini")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("konbini")] +#endif public ConfirmationTokenPaymentMethodDataKonbiniOptions Konbini { get; set; } /// @@ -182,6 +257,9 @@ public class ConfirmationTokenPaymentMethodDataOptions : INestedOptions, IHasMet /// Card payment method. /// [JsonProperty("kr_card")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("kr_card")] +#endif public ConfirmationTokenPaymentMethodDataKrCardOptions KrCard { get; set; } /// @@ -189,6 +267,9 @@ public class ConfirmationTokenPaymentMethodDataOptions : INestedOptions, IHasMet /// payment method. /// [JsonProperty("link")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("link")] +#endif public ConfirmationTokenPaymentMethodDataLinkOptions Link { get; set; } /// @@ -198,6 +279,9 @@ public class ConfirmationTokenPaymentMethodDataOptions : INestedOptions, IHasMet /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -205,6 +289,9 @@ public class ConfirmationTokenPaymentMethodDataOptions : INestedOptions, IHasMet /// MobilePay payment method. /// [JsonProperty("mobilepay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mobilepay")] +#endif public ConfirmationTokenPaymentMethodDataMobilepayOptions Mobilepay { get; set; } /// @@ -212,6 +299,9 @@ public class ConfirmationTokenPaymentMethodDataOptions : INestedOptions, IHasMet /// Multibanco payment method. /// [JsonProperty("multibanco")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("multibanco")] +#endif public ConfirmationTokenPaymentMethodDataMultibancoOptions Multibanco { get; set; } /// @@ -219,6 +309,9 @@ public class ConfirmationTokenPaymentMethodDataOptions : INestedOptions, IHasMet /// Pay payment method. /// [JsonProperty("naver_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("naver_pay")] +#endif public ConfirmationTokenPaymentMethodDataNaverPayOptions NaverPay { get; set; } /// @@ -226,6 +319,9 @@ public class ConfirmationTokenPaymentMethodDataOptions : INestedOptions, IHasMet /// payment method. /// [JsonProperty("oxxo")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("oxxo")] +#endif public ConfirmationTokenPaymentMethodDataOxxoOptions Oxxo { get; set; } /// @@ -233,6 +329,9 @@ public class ConfirmationTokenPaymentMethodDataOptions : INestedOptions, IHasMet /// method. /// [JsonProperty("p24")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("p24")] +#endif public ConfirmationTokenPaymentMethodDataP24Options P24 { get; set; } /// @@ -240,6 +339,9 @@ public class ConfirmationTokenPaymentMethodDataOptions : INestedOptions, IHasMet /// payment method. /// [JsonProperty("payco")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payco")] +#endif public ConfirmationTokenPaymentMethodDataPaycoOptions Payco { get; set; } /// @@ -247,6 +349,9 @@ public class ConfirmationTokenPaymentMethodDataOptions : INestedOptions, IHasMet /// payment method. /// [JsonProperty("paynow")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("paynow")] +#endif public ConfirmationTokenPaymentMethodDataPaynowOptions Paynow { get; set; } /// @@ -254,6 +359,9 @@ public class ConfirmationTokenPaymentMethodDataOptions : INestedOptions, IHasMet /// payment method. /// [JsonProperty("paypal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("paypal")] +#endif public ConfirmationTokenPaymentMethodDataPaypalOptions Paypal { get; set; } /// @@ -261,6 +369,9 @@ public class ConfirmationTokenPaymentMethodDataOptions : INestedOptions, IHasMet /// method. /// [JsonProperty("pix")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("pix")] +#endif public ConfirmationTokenPaymentMethodDataPixOptions Pix { get; set; } /// @@ -268,6 +379,9 @@ public class ConfirmationTokenPaymentMethodDataOptions : INestedOptions, IHasMet /// PromptPay payment method. /// [JsonProperty("promptpay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("promptpay")] +#endif public ConfirmationTokenPaymentMethodDataPromptpayOptions Promptpay { get; set; } /// @@ -276,6 +390,9 @@ public class ConfirmationTokenPaymentMethodDataOptions : INestedOptions, IHasMet /// information. /// [JsonProperty("radar_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("radar_options")] +#endif public ConfirmationTokenPaymentMethodDataRadarOptionsOptions RadarOptions { get; set; } /// @@ -283,6 +400,9 @@ public class ConfirmationTokenPaymentMethodDataOptions : INestedOptions, IHasMet /// Revolut Pay payment method. /// [JsonProperty("revolut_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("revolut_pay")] +#endif public ConfirmationTokenPaymentMethodDataRevolutPayOptions RevolutPay { get; set; } /// @@ -290,6 +410,9 @@ public class ConfirmationTokenPaymentMethodDataOptions : INestedOptions, IHasMet /// SamsungPay payment method. /// [JsonProperty("samsung_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("samsung_pay")] +#endif public ConfirmationTokenPaymentMethodDataSamsungPayOptions SamsungPay { get; set; } /// @@ -297,6 +420,9 @@ public class ConfirmationTokenPaymentMethodDataOptions : INestedOptions, IHasMet /// debit bank account. /// [JsonProperty("sepa_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sepa_debit")] +#endif public ConfirmationTokenPaymentMethodDataSepaDebitOptions SepaDebit { get; set; } /// @@ -304,6 +430,9 @@ public class ConfirmationTokenPaymentMethodDataOptions : INestedOptions, IHasMet /// payment method. /// [JsonProperty("sofort")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sofort")] +#endif public ConfirmationTokenPaymentMethodDataSofortOptions Sofort { get; set; } /// @@ -311,6 +440,9 @@ public class ConfirmationTokenPaymentMethodDataOptions : INestedOptions, IHasMet /// payment method. /// [JsonProperty("swish")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("swish")] +#endif public ConfirmationTokenPaymentMethodDataSwishOptions Swish { get; set; } /// @@ -318,6 +450,9 @@ public class ConfirmationTokenPaymentMethodDataOptions : INestedOptions, IHasMet /// method. /// [JsonProperty("twint")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("twint")] +#endif public ConfirmationTokenPaymentMethodDataTwintOptions Twint { get; set; } /// @@ -335,6 +470,9 @@ public class ConfirmationTokenPaymentMethodDataOptions : INestedOptions, IHasMet /// us_bank_account, wechat_pay, or zip. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } /// @@ -342,6 +480,9 @@ public class ConfirmationTokenPaymentMethodDataOptions : INestedOptions, IHasMet /// US bank account payment method. /// [JsonProperty("us_bank_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("us_bank_account")] +#endif public ConfirmationTokenPaymentMethodDataUsBankAccountOptions UsBankAccount { get; set; } /// @@ -349,6 +490,9 @@ public class ConfirmationTokenPaymentMethodDataOptions : INestedOptions, IHasMet /// wechat_pay payment method. /// [JsonProperty("wechat_pay")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("wechat_pay")] +#endif public ConfirmationTokenPaymentMethodDataWechatPayOptions WechatPay { get; set; } /// @@ -356,6 +500,9 @@ public class ConfirmationTokenPaymentMethodDataOptions : INestedOptions, IHasMet /// method. /// [JsonProperty("zip")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("zip")] +#endif public ConfirmationTokenPaymentMethodDataZipOptions Zip { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataP24Options.cs b/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataP24Options.cs index 3fb9735796..07f3ca9a7c 100644 --- a/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataP24Options.cs +++ b/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataP24Options.cs @@ -2,6 +2,9 @@ namespace Stripe.TestHelpers { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfirmationTokenPaymentMethodDataP24Options : INestedOptions { @@ -17,6 +20,9 @@ public class ConfirmationTokenPaymentMethodDataP24Options : INestedOptions /// volkswagen_bank. /// [JsonProperty("bank")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank")] +#endif public string Bank { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataRadarOptionsOptions.cs b/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataRadarOptionsOptions.cs index e5b9e6904e..85b70501f3 100644 --- a/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataRadarOptionsOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataRadarOptionsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.TestHelpers { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfirmationTokenPaymentMethodDataRadarOptionsOptions : INestedOptions { @@ -11,6 +14,9 @@ public class ConfirmationTokenPaymentMethodDataRadarOptionsOptions : INestedOpti /// predictions on your payments. /// [JsonProperty("session")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("session")] +#endif public string Session { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataSepaDebitOptions.cs b/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataSepaDebitOptions.cs index 9b2db79a02..e8a889b368 100644 --- a/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataSepaDebitOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataSepaDebitOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.TestHelpers { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfirmationTokenPaymentMethodDataSepaDebitOptions : INestedOptions { @@ -9,6 +12,9 @@ public class ConfirmationTokenPaymentMethodDataSepaDebitOptions : INestedOptions /// IBAN of the bank account. /// [JsonProperty("iban")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("iban")] +#endif public string Iban { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataSofortOptions.cs b/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataSofortOptions.cs index 55761b7c2a..4254f4cc67 100644 --- a/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataSofortOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataSofortOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.TestHelpers { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfirmationTokenPaymentMethodDataSofortOptions : INestedOptions { @@ -10,6 +13,9 @@ public class ConfirmationTokenPaymentMethodDataSofortOptions : INestedOptions /// One of: AT, BE, DE, ES, IT, or NL. /// [JsonProperty("country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country")] +#endif public string Country { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataUsBankAccountOptions.cs b/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataUsBankAccountOptions.cs index aaefe3b259..60c938cfd8 100644 --- a/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataUsBankAccountOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataUsBankAccountOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.TestHelpers { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfirmationTokenPaymentMethodDataUsBankAccountOptions : INestedOptions { @@ -10,12 +13,18 @@ public class ConfirmationTokenPaymentMethodDataUsBankAccountOptions : INestedOpt /// One of: company, or individual. /// [JsonProperty("account_holder_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_holder_type")] +#endif public string AccountHolderType { get; set; } /// /// Account number of the bank account. /// [JsonProperty("account_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_number")] +#endif public string AccountNumber { get; set; } /// @@ -23,18 +32,27 @@ public class ConfirmationTokenPaymentMethodDataUsBankAccountOptions : INestedOpt /// One of: checking, or savings. /// [JsonProperty("account_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_type")] +#endif public string AccountType { get; set; } /// /// The ID of a Financial Connections Account to use as a payment method. /// [JsonProperty("financial_connections_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("financial_connections_account")] +#endif public string FinancialConnectionsAccount { get; set; } /// /// Routing number of the bank account. /// [JsonProperty("routing_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("routing_number")] +#endif public string RoutingNumber { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenShippingOptions.cs b/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenShippingOptions.cs index cabfbbb456..91a8796406 100644 --- a/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenShippingOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenShippingOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.TestHelpers { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ConfirmationTokenShippingOptions : INestedOptions { @@ -9,18 +12,27 @@ public class ConfirmationTokenShippingOptions : INestedOptions /// Shipping address. /// [JsonProperty("address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address")] +#endif public AddressOptions Address { get; set; } /// /// Recipient name. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } /// /// Recipient phone (including extension). /// [JsonProperty("phone")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("phone")] +#endif public string Phone { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/Customers/CustomerFundCashBalanceOptions.cs b/src/Stripe.net/Services/TestHelpers/Customers/CustomerFundCashBalanceOptions.cs index b6b3c3f772..9c1b12493a 100644 --- a/src/Stripe.net/Services/TestHelpers/Customers/CustomerFundCashBalanceOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/Customers/CustomerFundCashBalanceOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.TestHelpers { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CustomerFundCashBalanceOptions : BaseOptions { @@ -12,6 +15,9 @@ public class CustomerFundCashBalanceOptions : BaseOptions /// 100 cents to fund $1.00 or 100 to fund ¥100, a zero-decimal currency). /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long? Amount { get; set; } /// @@ -20,6 +26,9 @@ public class CustomerFundCashBalanceOptions : BaseOptions /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// @@ -30,6 +39,9 @@ public class CustomerFundCashBalanceOptions : BaseOptions /// algorithm applies to different user inputs. /// [JsonProperty("reference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reference")] +#endif public string Reference { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationAmountDetailsOptions.cs b/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationAmountDetailsOptions.cs index aa3a3cba20..9b8dde81fe 100644 --- a/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationAmountDetailsOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationAmountDetailsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.TestHelpers.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AuthorizationAmountDetailsOptions : INestedOptions { @@ -9,12 +12,18 @@ public class AuthorizationAmountDetailsOptions : INestedOptions /// The ATM withdrawal fee. /// [JsonProperty("atm_fee")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("atm_fee")] +#endif public long? AtmFee { get; set; } /// /// The amount of cash requested by the cardholder. /// [JsonProperty("cashback_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cashback_amount")] +#endif public long? CashbackAmount { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationCaptureOptions.cs b/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationCaptureOptions.cs index 095a01cfb8..e335f00850 100644 --- a/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationCaptureOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationCaptureOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.TestHelpers.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AuthorizationCaptureOptions : BaseOptions { @@ -11,6 +14,9 @@ public class AuthorizationCaptureOptions : BaseOptions /// smallest currency unit. /// [JsonProperty("capture_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("capture_amount")] +#endif public long? CaptureAmount { get; set; } /// @@ -18,12 +24,18 @@ public class AuthorizationCaptureOptions : BaseOptions /// enable multi-capture flows. /// [JsonProperty("close_authorization")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("close_authorization")] +#endif public bool? CloseAuthorization { get; set; } /// /// Additional purchase information that is optionally provided by the merchant. /// [JsonProperty("purchase_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("purchase_details")] +#endif public AuthorizationPurchaseDetailsOptions PurchaseDetails { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationCreateOptions.cs b/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationCreateOptions.cs index 595664a532..4b528b0653 100644 --- a/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationCreateOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationCreateOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.TestHelpers.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AuthorizationCreateOptions : BaseOptions { @@ -11,6 +14,9 @@ public class AuthorizationCreateOptions : BaseOptions /// href="https://stripe.com/docs/currencies#zero-decimal">smallest currency unit. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long? Amount { get; set; } /// @@ -19,6 +25,9 @@ public class AuthorizationCreateOptions : BaseOptions /// href="https://stripe.com/docs/currencies#zero-decimal">smallest currency unit. /// [JsonProperty("amount_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_details")] +#endif public AuthorizationAmountDetailsOptions AmountDetails { get; set; } /// @@ -27,12 +36,18 @@ public class AuthorizationCreateOptions : BaseOptions /// swipe. /// [JsonProperty("authorization_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("authorization_method")] +#endif public string AuthorizationMethod { get; set; } /// /// Card associated with this authorization. /// [JsonProperty("card")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card")] +#endif public string Card { get; set; } /// @@ -42,18 +57,27 @@ public class AuthorizationCreateOptions : BaseOptions /// href="https://stripe.com/docs/currencies">supported currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// /// Fleet-specific information for authorizations using Fleet cards. /// [JsonProperty("fleet")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fleet")] +#endif public AuthorizationFleetOptions Fleet { get; set; } /// /// Information about fuel that was purchased with this transaction. /// [JsonProperty("fuel")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fuel")] +#endif public AuthorizationFuelOptions Fuel { get; set; } /// @@ -62,6 +86,9 @@ public class AuthorizationCreateOptions : BaseOptions /// to control how much to hold for the authorization. /// [JsonProperty("is_amount_controllable")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("is_amount_controllable")] +#endif public bool? IsAmountControllable { get; set; } /// @@ -70,6 +97,9 @@ public class AuthorizationCreateOptions : BaseOptions /// currency unit. /// [JsonProperty("merchant_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("merchant_amount")] +#endif public long? MerchantAmount { get; set; } /// @@ -79,6 +109,9 @@ public class AuthorizationCreateOptions : BaseOptions /// href="https://stripe.com/docs/currencies">supported currency. /// [JsonProperty("merchant_currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("merchant_currency")] +#endif public string MerchantCurrency { get; set; } /// @@ -86,12 +119,18 @@ public class AuthorizationCreateOptions : BaseOptions /// authorization happened. /// [JsonProperty("merchant_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("merchant_data")] +#endif public AuthorizationMerchantDataOptions MerchantData { get; set; } /// /// Details about the authorization, such as identifiers, set by the card network. /// [JsonProperty("network_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("network_data")] +#endif public AuthorizationNetworkDataOptions NetworkData { get; set; } /// @@ -99,6 +138,9 @@ public class AuthorizationCreateOptions : BaseOptions /// merchant. /// [JsonProperty("verification_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("verification_data")] +#endif public AuthorizationVerificationDataOptions VerificationData { get; set; } /// @@ -108,6 +150,9 @@ public class AuthorizationCreateOptions : BaseOptions /// One of: apple_pay, google_pay, or samsung_pay. /// [JsonProperty("wallet")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("wallet")] +#endif public string Wallet { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationFinalizeAmountOptions.cs b/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationFinalizeAmountOptions.cs index 557fb3d3c8..528f863ca4 100644 --- a/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationFinalizeAmountOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationFinalizeAmountOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.TestHelpers.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AuthorizationFinalizeAmountOptions : BaseOptions { @@ -11,18 +14,27 @@ public class AuthorizationFinalizeAmountOptions : BaseOptions /// href="https://stripe.com/docs/currencies#zero-decimal">smallest currency unit. /// [JsonProperty("final_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("final_amount")] +#endif public long? FinalAmount { get; set; } /// /// Fleet-specific information for authorizations using Fleet cards. /// [JsonProperty("fleet")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fleet")] +#endif public AuthorizationFleetOptions Fleet { get; set; } /// /// Information about fuel that was purchased with this transaction. /// [JsonProperty("fuel")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fuel")] +#endif public AuthorizationFuelOptions Fuel { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationFleetCardholderPromptDataOptions.cs b/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationFleetCardholderPromptDataOptions.cs index e7ee73dbf8..6de059b12c 100644 --- a/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationFleetCardholderPromptDataOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationFleetCardholderPromptDataOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.TestHelpers.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AuthorizationFleetCardholderPromptDataOptions : INestedOptions { @@ -9,12 +12,18 @@ public class AuthorizationFleetCardholderPromptDataOptions : INestedOptions /// Driver ID. /// [JsonProperty("driver_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("driver_id")] +#endif public string DriverId { get; set; } /// /// Odometer reading. /// [JsonProperty("odometer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("odometer")] +#endif public long? Odometer { get; set; } /// @@ -23,18 +32,27 @@ public class AuthorizationFleetCardholderPromptDataOptions : INestedOptions /// type. /// [JsonProperty("unspecified_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unspecified_id")] +#endif public string UnspecifiedId { get; set; } /// /// User ID. /// [JsonProperty("user_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("user_id")] +#endif public string UserId { get; set; } /// /// Vehicle number. /// [JsonProperty("vehicle_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("vehicle_number")] +#endif public string VehicleNumber { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationFleetOptions.cs b/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationFleetOptions.cs index 4f4dac6366..c31cbc23bf 100644 --- a/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationFleetOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationFleetOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.TestHelpers.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AuthorizationFleetOptions : INestedOptions { @@ -11,6 +14,9 @@ public class AuthorizationFleetOptions : INestedOptions /// support only numeric entry. /// [JsonProperty("cardholder_prompt_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cardholder_prompt_data")] +#endif public AuthorizationFleetCardholderPromptDataOptions CardholderPromptData { get; set; } /// @@ -20,6 +26,9 @@ public class AuthorizationFleetOptions : INestedOptions /// non_fuel_purchase. /// [JsonProperty("purchase_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("purchase_type")] +#endif public string PurchaseType { get; set; } /// @@ -27,6 +36,9 @@ public class AuthorizationFleetOptions : INestedOptions /// accurate as some merchants may provide unreliable data. /// [JsonProperty("reported_breakdown")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reported_breakdown")] +#endif public AuthorizationFleetReportedBreakdownOptions ReportedBreakdown { get; set; } /// @@ -35,6 +47,9 @@ public class AuthorizationFleetOptions : INestedOptions /// One of: full_service, non_fuel_transaction, or self_service. /// [JsonProperty("service_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("service_type")] +#endif public string ServiceType { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationFleetReportedBreakdownFuelOptions.cs b/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationFleetReportedBreakdownFuelOptions.cs index cf7c230336..d7343afeff 100644 --- a/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationFleetReportedBreakdownFuelOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationFleetReportedBreakdownFuelOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.TestHelpers.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AuthorizationFleetReportedBreakdownFuelOptions : INestedOptions { @@ -10,6 +13,9 @@ public class AuthorizationFleetReportedBreakdownFuelOptions : INestedOptions /// of taxes. /// [JsonProperty("gross_amount_decimal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("gross_amount_decimal")] +#endif public decimal? GrossAmountDecimal { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationFleetReportedBreakdownNonFuelOptions.cs b/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationFleetReportedBreakdownNonFuelOptions.cs index 21879227b3..a958a818f0 100644 --- a/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationFleetReportedBreakdownNonFuelOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationFleetReportedBreakdownNonFuelOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.TestHelpers.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AuthorizationFleetReportedBreakdownNonFuelOptions : INestedOptions { @@ -9,6 +12,9 @@ public class AuthorizationFleetReportedBreakdownNonFuelOptions : INestedOptions /// Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. /// [JsonProperty("gross_amount_decimal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("gross_amount_decimal")] +#endif public decimal? GrossAmountDecimal { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationFleetReportedBreakdownOptions.cs b/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationFleetReportedBreakdownOptions.cs index 2cd09d452f..a81a232f7c 100644 --- a/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationFleetReportedBreakdownOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationFleetReportedBreakdownOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.TestHelpers.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AuthorizationFleetReportedBreakdownOptions : INestedOptions { @@ -9,18 +12,27 @@ public class AuthorizationFleetReportedBreakdownOptions : INestedOptions /// Breakdown of fuel portion of the purchase. /// [JsonProperty("fuel")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fuel")] +#endif public AuthorizationFleetReportedBreakdownFuelOptions Fuel { get; set; } /// /// Breakdown of non-fuel portion of the purchase. /// [JsonProperty("non_fuel")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("non_fuel")] +#endif public AuthorizationFleetReportedBreakdownNonFuelOptions NonFuel { get; set; } /// /// Information about tax included in this transaction. /// [JsonProperty("tax")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax")] +#endif public AuthorizationFleetReportedBreakdownTaxOptions Tax { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationFleetReportedBreakdownTaxOptions.cs b/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationFleetReportedBreakdownTaxOptions.cs index 07912d6f19..31f3e20d49 100644 --- a/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationFleetReportedBreakdownTaxOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationFleetReportedBreakdownTaxOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.TestHelpers.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AuthorizationFleetReportedBreakdownTaxOptions : INestedOptions { @@ -10,6 +13,9 @@ public class AuthorizationFleetReportedBreakdownTaxOptions : INestedOptions /// reported by merchant or not subject to tax. /// [JsonProperty("local_amount_decimal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("local_amount_decimal")] +#endif public decimal? LocalAmountDecimal { get; set; } /// @@ -17,6 +23,9 @@ public class AuthorizationFleetReportedBreakdownTaxOptions : INestedOptions /// reported by merchant or not subject to tax. /// [JsonProperty("national_amount_decimal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("national_amount_decimal")] +#endif public decimal? NationalAmountDecimal { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationFuelOptions.cs b/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationFuelOptions.cs index 7816d04ed9..d76962e91b 100644 --- a/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationFuelOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationFuelOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.TestHelpers.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AuthorizationFuelOptions : INestedOptions { @@ -10,6 +13,9 @@ public class AuthorizationFuelOptions : INestedOptions /// Payment System Product Code identifying the primary fuel product purchased. /// [JsonProperty("industry_product_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("industry_product_code")] +#endif public string IndustryProductCode { get; set; } /// @@ -17,6 +23,9 @@ public class AuthorizationFuelOptions : INestedOptions /// with at most 12 decimal places. /// [JsonProperty("quantity_decimal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("quantity_decimal")] +#endif public decimal? QuantityDecimal { get; set; } /// @@ -26,6 +35,9 @@ public class AuthorizationFuelOptions : INestedOptions /// unleaded_super. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } /// @@ -36,6 +48,9 @@ public class AuthorizationFuelOptions : INestedOptions /// kilowatt_hour, liter, other, pound, or us_gallon. /// [JsonProperty("unit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit")] +#endif public string Unit { get; set; } /// @@ -43,6 +58,9 @@ public class AuthorizationFuelOptions : INestedOptions /// decimal places. /// [JsonProperty("unit_cost_decimal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_cost_decimal")] +#endif public decimal? UnitCostDecimal { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationIncrementOptions.cs b/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationIncrementOptions.cs index 374c7a2d6e..1670f8e4ae 100644 --- a/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationIncrementOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationIncrementOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.TestHelpers.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AuthorizationIncrementOptions : BaseOptions { @@ -11,6 +14,9 @@ public class AuthorizationIncrementOptions : BaseOptions /// currency unit. /// [JsonProperty("increment_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("increment_amount")] +#endif public long? IncrementAmount { get; set; } /// @@ -19,6 +25,9 @@ public class AuthorizationIncrementOptions : BaseOptions /// to control how much to hold for the authorization. /// [JsonProperty("is_amount_controllable")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("is_amount_controllable")] +#endif public bool? IsAmountControllable { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationMerchantDataOptions.cs b/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationMerchantDataOptions.cs index 7253a177b8..761ab5c9ab 100644 --- a/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationMerchantDataOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationMerchantDataOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.TestHelpers.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AuthorizationMerchantDataOptions : INestedOptions { @@ -156,24 +159,36 @@ public class AuthorizationMerchantDataOptions : INestedOptions /// wrecking_and_salvage_yards. /// [JsonProperty("category")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("category")] +#endif public string Category { get; set; } /// /// City where the seller is located. /// [JsonProperty("city")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("city")] +#endif public string City { get; set; } /// /// Country where the seller is located. /// [JsonProperty("country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country")] +#endif public string Country { get; set; } /// /// Name of the seller. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } /// @@ -181,30 +196,45 @@ public class AuthorizationMerchantDataOptions : INestedOptions /// assign different network_id fields to the same merchant. /// [JsonProperty("network_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("network_id")] +#endif public string NetworkId { get; set; } /// /// Postal code where the seller is located. /// [JsonProperty("postal_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("postal_code")] +#endif public string PostalCode { get; set; } /// /// State where the seller is located. /// [JsonProperty("state")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("state")] +#endif public string State { get; set; } /// /// An ID assigned by the seller to the location of the sale. /// [JsonProperty("terminal_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("terminal_id")] +#endif public string TerminalId { get; set; } /// /// URL provided by the merchant on a 3DS request. /// [JsonProperty("url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("url")] +#endif public string Url { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationNetworkDataOptions.cs b/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationNetworkDataOptions.cs index 603bb837ab..c9db7e7aff 100644 --- a/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationNetworkDataOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationNetworkDataOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.TestHelpers.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AuthorizationNetworkDataOptions : INestedOptions { @@ -9,6 +12,9 @@ public class AuthorizationNetworkDataOptions : INestedOptions /// Identifier assigned to the acquirer by the card network. /// [JsonProperty("acquiring_institution_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("acquiring_institution_id")] +#endif public string AcquiringInstitutionId { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationPurchaseDetailsFleetCardholderPromptDataOptions.cs b/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationPurchaseDetailsFleetCardholderPromptDataOptions.cs index 8972f30cf9..1a2d0359e8 100644 --- a/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationPurchaseDetailsFleetCardholderPromptDataOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationPurchaseDetailsFleetCardholderPromptDataOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.TestHelpers.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AuthorizationPurchaseDetailsFleetCardholderPromptDataOptions : INestedOptions { @@ -9,12 +12,18 @@ public class AuthorizationPurchaseDetailsFleetCardholderPromptDataOptions : INes /// Driver ID. /// [JsonProperty("driver_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("driver_id")] +#endif public string DriverId { get; set; } /// /// Odometer reading. /// [JsonProperty("odometer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("odometer")] +#endif public long? Odometer { get; set; } /// @@ -23,18 +32,27 @@ public class AuthorizationPurchaseDetailsFleetCardholderPromptDataOptions : INes /// type. /// [JsonProperty("unspecified_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unspecified_id")] +#endif public string UnspecifiedId { get; set; } /// /// User ID. /// [JsonProperty("user_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("user_id")] +#endif public string UserId { get; set; } /// /// Vehicle number. /// [JsonProperty("vehicle_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("vehicle_number")] +#endif public string VehicleNumber { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationPurchaseDetailsFleetOptions.cs b/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationPurchaseDetailsFleetOptions.cs index 7288652f1d..7268ccadb2 100644 --- a/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationPurchaseDetailsFleetOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationPurchaseDetailsFleetOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.TestHelpers.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AuthorizationPurchaseDetailsFleetOptions : INestedOptions { @@ -11,6 +14,9 @@ public class AuthorizationPurchaseDetailsFleetOptions : INestedOptions /// support only numeric entry. /// [JsonProperty("cardholder_prompt_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cardholder_prompt_data")] +#endif public AuthorizationPurchaseDetailsFleetCardholderPromptDataOptions CardholderPromptData { get; set; } /// @@ -20,6 +26,9 @@ public class AuthorizationPurchaseDetailsFleetOptions : INestedOptions /// non_fuel_purchase. /// [JsonProperty("purchase_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("purchase_type")] +#endif public string PurchaseType { get; set; } /// @@ -27,6 +36,9 @@ public class AuthorizationPurchaseDetailsFleetOptions : INestedOptions /// accurate as some merchants may provide unreliable data. /// [JsonProperty("reported_breakdown")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reported_breakdown")] +#endif public AuthorizationPurchaseDetailsFleetReportedBreakdownOptions ReportedBreakdown { get; set; } /// @@ -35,6 +47,9 @@ public class AuthorizationPurchaseDetailsFleetOptions : INestedOptions /// One of: full_service, non_fuel_transaction, or self_service. /// [JsonProperty("service_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("service_type")] +#endif public string ServiceType { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationPurchaseDetailsFleetReportedBreakdownFuelOptions.cs b/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationPurchaseDetailsFleetReportedBreakdownFuelOptions.cs index f52fb90d31..e346729552 100644 --- a/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationPurchaseDetailsFleetReportedBreakdownFuelOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationPurchaseDetailsFleetReportedBreakdownFuelOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.TestHelpers.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AuthorizationPurchaseDetailsFleetReportedBreakdownFuelOptions : INestedOptions { @@ -10,6 +13,9 @@ public class AuthorizationPurchaseDetailsFleetReportedBreakdownFuelOptions : INe /// of taxes. /// [JsonProperty("gross_amount_decimal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("gross_amount_decimal")] +#endif public decimal? GrossAmountDecimal { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationPurchaseDetailsFleetReportedBreakdownNonFuelOptions.cs b/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationPurchaseDetailsFleetReportedBreakdownNonFuelOptions.cs index 1939881a4b..064c0293c5 100644 --- a/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationPurchaseDetailsFleetReportedBreakdownNonFuelOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationPurchaseDetailsFleetReportedBreakdownNonFuelOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.TestHelpers.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AuthorizationPurchaseDetailsFleetReportedBreakdownNonFuelOptions : INestedOptions { @@ -9,6 +12,9 @@ public class AuthorizationPurchaseDetailsFleetReportedBreakdownNonFuelOptions : /// Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. /// [JsonProperty("gross_amount_decimal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("gross_amount_decimal")] +#endif public decimal? GrossAmountDecimal { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationPurchaseDetailsFleetReportedBreakdownOptions.cs b/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationPurchaseDetailsFleetReportedBreakdownOptions.cs index 1b2254e308..abd4c4cd09 100644 --- a/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationPurchaseDetailsFleetReportedBreakdownOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationPurchaseDetailsFleetReportedBreakdownOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.TestHelpers.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AuthorizationPurchaseDetailsFleetReportedBreakdownOptions : INestedOptions { @@ -9,18 +12,27 @@ public class AuthorizationPurchaseDetailsFleetReportedBreakdownOptions : INested /// Breakdown of fuel portion of the purchase. /// [JsonProperty("fuel")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fuel")] +#endif public AuthorizationPurchaseDetailsFleetReportedBreakdownFuelOptions Fuel { get; set; } /// /// Breakdown of non-fuel portion of the purchase. /// [JsonProperty("non_fuel")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("non_fuel")] +#endif public AuthorizationPurchaseDetailsFleetReportedBreakdownNonFuelOptions NonFuel { get; set; } /// /// Information about tax included in this transaction. /// [JsonProperty("tax")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax")] +#endif public AuthorizationPurchaseDetailsFleetReportedBreakdownTaxOptions Tax { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationPurchaseDetailsFleetReportedBreakdownTaxOptions.cs b/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationPurchaseDetailsFleetReportedBreakdownTaxOptions.cs index 688bcf444c..ebdfefd57b 100644 --- a/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationPurchaseDetailsFleetReportedBreakdownTaxOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationPurchaseDetailsFleetReportedBreakdownTaxOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.TestHelpers.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AuthorizationPurchaseDetailsFleetReportedBreakdownTaxOptions : INestedOptions { @@ -10,6 +13,9 @@ public class AuthorizationPurchaseDetailsFleetReportedBreakdownTaxOptions : INes /// reported by merchant or not subject to tax. /// [JsonProperty("local_amount_decimal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("local_amount_decimal")] +#endif public decimal? LocalAmountDecimal { get; set; } /// @@ -17,6 +23,9 @@ public class AuthorizationPurchaseDetailsFleetReportedBreakdownTaxOptions : INes /// reported by merchant or not subject to tax. /// [JsonProperty("national_amount_decimal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("national_amount_decimal")] +#endif public decimal? NationalAmountDecimal { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationPurchaseDetailsFlightOptions.cs b/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationPurchaseDetailsFlightOptions.cs index 3f50b45967..e88431a53a 100644 --- a/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationPurchaseDetailsFlightOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationPurchaseDetailsFlightOptions.cs @@ -5,6 +5,9 @@ namespace Stripe.TestHelpers.Issuing using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AuthorizationPurchaseDetailsFlightOptions : INestedOptions { @@ -13,30 +16,46 @@ public class AuthorizationPurchaseDetailsFlightOptions : INestedOptions /// [JsonProperty("departure_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("departure_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? DepartureAt { get; set; } /// /// The name of the passenger. /// [JsonProperty("passenger_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("passenger_name")] +#endif public string PassengerName { get; set; } /// /// Whether the ticket is refundable. /// [JsonProperty("refundable")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("refundable")] +#endif public bool? Refundable { get; set; } /// /// The legs of the trip. /// [JsonProperty("segments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("segments")] +#endif public List Segments { get; set; } /// /// The travel agency that issued the ticket. /// [JsonProperty("travel_agency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("travel_agency")] +#endif public string TravelAgency { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationPurchaseDetailsFlightSegmentOptions.cs b/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationPurchaseDetailsFlightSegmentOptions.cs index 5ce6c24e1f..c73aba3d6c 100644 --- a/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationPurchaseDetailsFlightSegmentOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationPurchaseDetailsFlightSegmentOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.TestHelpers.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AuthorizationPurchaseDetailsFlightSegmentOptions : INestedOptions { @@ -9,36 +12,54 @@ public class AuthorizationPurchaseDetailsFlightSegmentOptions : INestedOptions /// The three-letter IATA airport code of the flight's destination. /// [JsonProperty("arrival_airport_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("arrival_airport_code")] +#endif public string ArrivalAirportCode { get; set; } /// /// The airline carrier code. /// [JsonProperty("carrier")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("carrier")] +#endif public string Carrier { get; set; } /// /// The three-letter IATA airport code that the flight departed from. /// [JsonProperty("departure_airport_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("departure_airport_code")] +#endif public string DepartureAirportCode { get; set; } /// /// The flight number. /// [JsonProperty("flight_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("flight_number")] +#endif public string FlightNumber { get; set; } /// /// The flight's service class. /// [JsonProperty("service_class")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("service_class")] +#endif public string ServiceClass { get; set; } /// /// Whether a stopover is allowed on this flight. /// [JsonProperty("stopover_allowed")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("stopover_allowed")] +#endif public bool? StopoverAllowed { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationPurchaseDetailsFuelOptions.cs b/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationPurchaseDetailsFuelOptions.cs index ed559d4c05..0b19a68257 100644 --- a/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationPurchaseDetailsFuelOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationPurchaseDetailsFuelOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.TestHelpers.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AuthorizationPurchaseDetailsFuelOptions : INestedOptions { @@ -10,6 +13,9 @@ public class AuthorizationPurchaseDetailsFuelOptions : INestedOptions /// Payment System Product Code identifying the primary fuel product purchased. /// [JsonProperty("industry_product_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("industry_product_code")] +#endif public string IndustryProductCode { get; set; } /// @@ -17,6 +23,9 @@ public class AuthorizationPurchaseDetailsFuelOptions : INestedOptions /// with at most 12 decimal places. /// [JsonProperty("quantity_decimal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("quantity_decimal")] +#endif public decimal? QuantityDecimal { get; set; } /// @@ -26,6 +35,9 @@ public class AuthorizationPurchaseDetailsFuelOptions : INestedOptions /// unleaded_super. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } /// @@ -36,6 +48,9 @@ public class AuthorizationPurchaseDetailsFuelOptions : INestedOptions /// kilowatt_hour, liter, other, pound, or us_gallon. /// [JsonProperty("unit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit")] +#endif public string Unit { get; set; } /// @@ -43,6 +58,9 @@ public class AuthorizationPurchaseDetailsFuelOptions : INestedOptions /// decimal places. /// [JsonProperty("unit_cost_decimal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_cost_decimal")] +#endif public decimal? UnitCostDecimal { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationPurchaseDetailsLodgingOptions.cs b/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationPurchaseDetailsLodgingOptions.cs index 2c2016e57b..d4a429bb05 100644 --- a/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationPurchaseDetailsLodgingOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationPurchaseDetailsLodgingOptions.cs @@ -4,6 +4,9 @@ namespace Stripe.TestHelpers.Issuing using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AuthorizationPurchaseDetailsLodgingOptions : INestedOptions { @@ -12,12 +15,19 @@ public class AuthorizationPurchaseDetailsLodgingOptions : INestedOptions /// [JsonProperty("check_in_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("check_in_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? CheckInAt { get; set; } /// /// The number of nights stayed at the lodging. /// [JsonProperty("nights")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("nights")] +#endif public long? Nights { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationPurchaseDetailsOptions.cs b/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationPurchaseDetailsOptions.cs index b044e6385d..86fee52e2a 100644 --- a/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationPurchaseDetailsOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationPurchaseDetailsOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.TestHelpers.Issuing { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AuthorizationPurchaseDetailsOptions : INestedOptions { @@ -10,36 +13,54 @@ public class AuthorizationPurchaseDetailsOptions : INestedOptions /// Fleet-specific information for transactions using Fleet cards. /// [JsonProperty("fleet")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fleet")] +#endif public AuthorizationPurchaseDetailsFleetOptions Fleet { get; set; } /// /// Information about the flight that was purchased with this transaction. /// [JsonProperty("flight")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("flight")] +#endif public AuthorizationPurchaseDetailsFlightOptions Flight { get; set; } /// /// Information about fuel that was purchased with this transaction. /// [JsonProperty("fuel")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fuel")] +#endif public AuthorizationPurchaseDetailsFuelOptions Fuel { get; set; } /// /// Information about lodging that was purchased with this transaction. /// [JsonProperty("lodging")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("lodging")] +#endif public AuthorizationPurchaseDetailsLodgingOptions Lodging { get; set; } /// /// The line items in the purchase. /// [JsonProperty("receipt")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("receipt")] +#endif public List Receipt { get; set; } /// /// A merchant-specific order number. /// [JsonProperty("reference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reference")] +#endif public string Reference { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationPurchaseDetailsReceiptOptions.cs b/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationPurchaseDetailsReceiptOptions.cs index 29f195b553..5a37623ede 100644 --- a/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationPurchaseDetailsReceiptOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationPurchaseDetailsReceiptOptions.cs @@ -2,19 +2,34 @@ namespace Stripe.TestHelpers.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AuthorizationPurchaseDetailsReceiptOptions : INestedOptions { [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } [JsonProperty("quantity")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("quantity")] +#endif public decimal? Quantity { get; set; } [JsonProperty("total")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("total")] +#endif public long? Total { get; set; } [JsonProperty("unit_cost")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_cost")] +#endif public long? UnitCost { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationRespondOptions.cs b/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationRespondOptions.cs index 119b66af64..246aa5917a 100644 --- a/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationRespondOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationRespondOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.TestHelpers.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AuthorizationRespondOptions : BaseOptions { @@ -10,6 +13,9 @@ public class AuthorizationRespondOptions : BaseOptions /// telling Stripe that it was fraudulent (false). /// [JsonProperty("confirmed")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("confirmed")] +#endif public bool? Confirmed { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationReverseOptions.cs b/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationReverseOptions.cs index 1ebed36d95..4c1819ac0b 100644 --- a/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationReverseOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationReverseOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.TestHelpers.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AuthorizationReverseOptions : BaseOptions { @@ -11,6 +14,9 @@ public class AuthorizationReverseOptions : BaseOptions /// smallest currency unit. /// [JsonProperty("reverse_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reverse_amount")] +#endif public long? ReverseAmount { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationVerificationDataAuthenticationExemptionOptions.cs b/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationVerificationDataAuthenticationExemptionOptions.cs index 067afafca7..b860a56e83 100644 --- a/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationVerificationDataAuthenticationExemptionOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationVerificationDataAuthenticationExemptionOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.TestHelpers.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AuthorizationVerificationDataAuthenticationExemptionOptions : INestedOptions { @@ -11,6 +14,9 @@ public class AuthorizationVerificationDataAuthenticationExemptionOptions : INest /// One of: acquirer, or issuer. /// [JsonProperty("claimed_by")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("claimed_by")] +#endif public string ClaimedBy { get; set; } /// @@ -19,6 +25,9 @@ public class AuthorizationVerificationDataAuthenticationExemptionOptions : INest /// unknown. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationVerificationDataOptions.cs b/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationVerificationDataOptions.cs index 87223456bf..ed845b458a 100644 --- a/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationVerificationDataOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationVerificationDataOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.TestHelpers.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AuthorizationVerificationDataOptions : INestedOptions { @@ -11,6 +14,9 @@ public class AuthorizationVerificationDataOptions : INestedOptions /// One of: match, mismatch, or not_provided. /// [JsonProperty("address_line1_check")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_line1_check")] +#endif public string AddressLine1Check { get; set; } /// @@ -19,12 +25,18 @@ public class AuthorizationVerificationDataOptions : INestedOptions /// One of: match, mismatch, or not_provided. /// [JsonProperty("address_postal_code_check")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_postal_code_check")] +#endif public string AddressPostalCodeCheck { get; set; } /// /// The exemption applied to this authorization. /// [JsonProperty("authentication_exemption")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("authentication_exemption")] +#endif public AuthorizationVerificationDataAuthenticationExemptionOptions AuthenticationExemption { get; set; } /// @@ -32,6 +44,9 @@ public class AuthorizationVerificationDataOptions : INestedOptions /// One of: match, mismatch, or not_provided. /// [JsonProperty("cvc_check")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cvc_check")] +#endif public string CvcCheck { get; set; } /// @@ -39,12 +54,18 @@ public class AuthorizationVerificationDataOptions : INestedOptions /// One of: match, mismatch, or not_provided. /// [JsonProperty("expiry_check")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("expiry_check")] +#endif public string ExpiryCheck { get; set; } /// /// 3D Secure details. /// [JsonProperty("three_d_secure")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("three_d_secure")] +#endif public AuthorizationVerificationDataThreeDSecureOptions ThreeDSecure { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationVerificationDataThreeDSecureOptions.cs b/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationVerificationDataThreeDSecureOptions.cs index 58171dc976..709fe55c69 100644 --- a/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationVerificationDataThreeDSecureOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationVerificationDataThreeDSecureOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.TestHelpers.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class AuthorizationVerificationDataThreeDSecureOptions : INestedOptions { @@ -11,6 +14,9 @@ public class AuthorizationVerificationDataThreeDSecureOptions : INestedOptions /// required. /// [JsonProperty("result")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("result")] +#endif public string Result { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/Issuing/PersonalizationDesigns/PersonalizationDesignRejectOptions.cs b/src/Stripe.net/Services/TestHelpers/Issuing/PersonalizationDesigns/PersonalizationDesignRejectOptions.cs index 10c5a51548..52fdcf557f 100644 --- a/src/Stripe.net/Services/TestHelpers/Issuing/PersonalizationDesigns/PersonalizationDesignRejectOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/Issuing/PersonalizationDesigns/PersonalizationDesignRejectOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.TestHelpers.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PersonalizationDesignRejectOptions : BaseOptions { @@ -9,6 +12,9 @@ public class PersonalizationDesignRejectOptions : BaseOptions /// The reason(s) the personalization design was rejected. /// [JsonProperty("rejection_reasons")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("rejection_reasons")] +#endif public PersonalizationDesignRejectionReasonsOptions RejectionReasons { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/Issuing/PersonalizationDesigns/PersonalizationDesignRejectionReasonsOptions.cs b/src/Stripe.net/Services/TestHelpers/Issuing/PersonalizationDesigns/PersonalizationDesignRejectionReasonsOptions.cs index 25c3f1ff70..6588b51045 100644 --- a/src/Stripe.net/Services/TestHelpers/Issuing/PersonalizationDesigns/PersonalizationDesignRejectionReasonsOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/Issuing/PersonalizationDesigns/PersonalizationDesignRejectionReasonsOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.TestHelpers.Issuing { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class PersonalizationDesignRejectionReasonsOptions : INestedOptions { @@ -13,6 +16,9 @@ public class PersonalizationDesignRejectionReasonsOptions : INestedOptions /// promotional_material. /// [JsonProperty("card_logo")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card_logo")] +#endif public List CardLogo { get; set; } /// @@ -22,6 +28,9 @@ public class PersonalizationDesignRejectionReasonsOptions : INestedOptions /// promotional_material. /// [JsonProperty("carrier_text")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("carrier_text")] +#endif public List CarrierText { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/Issuing/Transactions/TransactionCreateForceCaptureOptions.cs b/src/Stripe.net/Services/TestHelpers/Issuing/Transactions/TransactionCreateForceCaptureOptions.cs index c92bf117c4..6daa346d3c 100644 --- a/src/Stripe.net/Services/TestHelpers/Issuing/Transactions/TransactionCreateForceCaptureOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/Issuing/Transactions/TransactionCreateForceCaptureOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.TestHelpers.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TransactionCreateForceCaptureOptions : BaseOptions { @@ -11,12 +14,18 @@ public class TransactionCreateForceCaptureOptions : BaseOptions /// href="https://stripe.com/docs/currencies#zero-decimal">smallest currency unit. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long? Amount { get; set; } /// /// Card associated with this transaction. /// [JsonProperty("card")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card")] +#endif public string Card { get; set; } /// @@ -26,6 +35,9 @@ public class TransactionCreateForceCaptureOptions : BaseOptions /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// @@ -33,12 +45,18 @@ public class TransactionCreateForceCaptureOptions : BaseOptions /// authorization happened. /// [JsonProperty("merchant_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("merchant_data")] +#endif public TransactionMerchantDataOptions MerchantData { get; set; } /// /// Additional purchase information that is optionally provided by the merchant. /// [JsonProperty("purchase_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("purchase_details")] +#endif public TransactionPurchaseDetailsOptions PurchaseDetails { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/Issuing/Transactions/TransactionCreateUnlinkedRefundOptions.cs b/src/Stripe.net/Services/TestHelpers/Issuing/Transactions/TransactionCreateUnlinkedRefundOptions.cs index d67c59bd54..e5bd8d6d96 100644 --- a/src/Stripe.net/Services/TestHelpers/Issuing/Transactions/TransactionCreateUnlinkedRefundOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/Issuing/Transactions/TransactionCreateUnlinkedRefundOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.TestHelpers.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TransactionCreateUnlinkedRefundOptions : BaseOptions { @@ -11,12 +14,18 @@ public class TransactionCreateUnlinkedRefundOptions : BaseOptions /// href="https://stripe.com/docs/currencies#zero-decimal">smallest currency unit. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long? Amount { get; set; } /// /// Card associated with this unlinked refund transaction. /// [JsonProperty("card")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card")] +#endif public string Card { get; set; } /// @@ -26,6 +35,9 @@ public class TransactionCreateUnlinkedRefundOptions : BaseOptions /// href="https://stripe.com/docs/currencies">supported currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// @@ -33,12 +45,18 @@ public class TransactionCreateUnlinkedRefundOptions : BaseOptions /// authorization happened. /// [JsonProperty("merchant_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("merchant_data")] +#endif public TransactionMerchantDataOptions MerchantData { get; set; } /// /// Additional purchase information that is optionally provided by the merchant. /// [JsonProperty("purchase_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("purchase_details")] +#endif public TransactionPurchaseDetailsOptions PurchaseDetails { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/Issuing/Transactions/TransactionMerchantDataOptions.cs b/src/Stripe.net/Services/TestHelpers/Issuing/Transactions/TransactionMerchantDataOptions.cs index 32ab2e59f4..c8b5db4748 100644 --- a/src/Stripe.net/Services/TestHelpers/Issuing/Transactions/TransactionMerchantDataOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/Issuing/Transactions/TransactionMerchantDataOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.TestHelpers.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TransactionMerchantDataOptions : INestedOptions { @@ -156,24 +159,36 @@ public class TransactionMerchantDataOptions : INestedOptions /// wrecking_and_salvage_yards. /// [JsonProperty("category")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("category")] +#endif public string Category { get; set; } /// /// City where the seller is located. /// [JsonProperty("city")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("city")] +#endif public string City { get; set; } /// /// Country where the seller is located. /// [JsonProperty("country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country")] +#endif public string Country { get; set; } /// /// Name of the seller. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } /// @@ -181,30 +196,45 @@ public class TransactionMerchantDataOptions : INestedOptions /// assign different network_id fields to the same merchant. /// [JsonProperty("network_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("network_id")] +#endif public string NetworkId { get; set; } /// /// Postal code where the seller is located. /// [JsonProperty("postal_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("postal_code")] +#endif public string PostalCode { get; set; } /// /// State where the seller is located. /// [JsonProperty("state")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("state")] +#endif public string State { get; set; } /// /// An ID assigned by the seller to the location of the sale. /// [JsonProperty("terminal_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("terminal_id")] +#endif public string TerminalId { get; set; } /// /// URL provided by the merchant on a 3DS request. /// [JsonProperty("url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("url")] +#endif public string Url { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/Issuing/Transactions/TransactionPurchaseDetailsFleetCardholderPromptDataOptions.cs b/src/Stripe.net/Services/TestHelpers/Issuing/Transactions/TransactionPurchaseDetailsFleetCardholderPromptDataOptions.cs index 0793c8df7e..1ce9010d3d 100644 --- a/src/Stripe.net/Services/TestHelpers/Issuing/Transactions/TransactionPurchaseDetailsFleetCardholderPromptDataOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/Issuing/Transactions/TransactionPurchaseDetailsFleetCardholderPromptDataOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.TestHelpers.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TransactionPurchaseDetailsFleetCardholderPromptDataOptions : INestedOptions { @@ -9,12 +12,18 @@ public class TransactionPurchaseDetailsFleetCardholderPromptDataOptions : INeste /// Driver ID. /// [JsonProperty("driver_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("driver_id")] +#endif public string DriverId { get; set; } /// /// Odometer reading. /// [JsonProperty("odometer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("odometer")] +#endif public long? Odometer { get; set; } /// @@ -23,18 +32,27 @@ public class TransactionPurchaseDetailsFleetCardholderPromptDataOptions : INeste /// type. /// [JsonProperty("unspecified_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unspecified_id")] +#endif public string UnspecifiedId { get; set; } /// /// User ID. /// [JsonProperty("user_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("user_id")] +#endif public string UserId { get; set; } /// /// Vehicle number. /// [JsonProperty("vehicle_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("vehicle_number")] +#endif public string VehicleNumber { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/Issuing/Transactions/TransactionPurchaseDetailsFleetOptions.cs b/src/Stripe.net/Services/TestHelpers/Issuing/Transactions/TransactionPurchaseDetailsFleetOptions.cs index 2b8048f0f3..d7afa41e1b 100644 --- a/src/Stripe.net/Services/TestHelpers/Issuing/Transactions/TransactionPurchaseDetailsFleetOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/Issuing/Transactions/TransactionPurchaseDetailsFleetOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.TestHelpers.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TransactionPurchaseDetailsFleetOptions : INestedOptions { @@ -11,6 +14,9 @@ public class TransactionPurchaseDetailsFleetOptions : INestedOptions /// support only numeric entry. /// [JsonProperty("cardholder_prompt_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cardholder_prompt_data")] +#endif public TransactionPurchaseDetailsFleetCardholderPromptDataOptions CardholderPromptData { get; set; } /// @@ -20,6 +26,9 @@ public class TransactionPurchaseDetailsFleetOptions : INestedOptions /// non_fuel_purchase. /// [JsonProperty("purchase_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("purchase_type")] +#endif public string PurchaseType { get; set; } /// @@ -27,6 +36,9 @@ public class TransactionPurchaseDetailsFleetOptions : INestedOptions /// accurate as some merchants may provide unreliable data. /// [JsonProperty("reported_breakdown")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reported_breakdown")] +#endif public TransactionPurchaseDetailsFleetReportedBreakdownOptions ReportedBreakdown { get; set; } /// @@ -35,6 +47,9 @@ public class TransactionPurchaseDetailsFleetOptions : INestedOptions /// One of: full_service, non_fuel_transaction, or self_service. /// [JsonProperty("service_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("service_type")] +#endif public string ServiceType { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/Issuing/Transactions/TransactionPurchaseDetailsFleetReportedBreakdownFuelOptions.cs b/src/Stripe.net/Services/TestHelpers/Issuing/Transactions/TransactionPurchaseDetailsFleetReportedBreakdownFuelOptions.cs index 786460b709..aac8905610 100644 --- a/src/Stripe.net/Services/TestHelpers/Issuing/Transactions/TransactionPurchaseDetailsFleetReportedBreakdownFuelOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/Issuing/Transactions/TransactionPurchaseDetailsFleetReportedBreakdownFuelOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.TestHelpers.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TransactionPurchaseDetailsFleetReportedBreakdownFuelOptions : INestedOptions { @@ -10,6 +13,9 @@ public class TransactionPurchaseDetailsFleetReportedBreakdownFuelOptions : INest /// of taxes. /// [JsonProperty("gross_amount_decimal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("gross_amount_decimal")] +#endif public decimal? GrossAmountDecimal { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/Issuing/Transactions/TransactionPurchaseDetailsFleetReportedBreakdownNonFuelOptions.cs b/src/Stripe.net/Services/TestHelpers/Issuing/Transactions/TransactionPurchaseDetailsFleetReportedBreakdownNonFuelOptions.cs index c4056dd2b1..04938ab3e5 100644 --- a/src/Stripe.net/Services/TestHelpers/Issuing/Transactions/TransactionPurchaseDetailsFleetReportedBreakdownNonFuelOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/Issuing/Transactions/TransactionPurchaseDetailsFleetReportedBreakdownNonFuelOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.TestHelpers.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TransactionPurchaseDetailsFleetReportedBreakdownNonFuelOptions : INestedOptions { @@ -9,6 +12,9 @@ public class TransactionPurchaseDetailsFleetReportedBreakdownNonFuelOptions : IN /// Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. /// [JsonProperty("gross_amount_decimal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("gross_amount_decimal")] +#endif public decimal? GrossAmountDecimal { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/Issuing/Transactions/TransactionPurchaseDetailsFleetReportedBreakdownOptions.cs b/src/Stripe.net/Services/TestHelpers/Issuing/Transactions/TransactionPurchaseDetailsFleetReportedBreakdownOptions.cs index ef18b6073e..6c1cdfc9c6 100644 --- a/src/Stripe.net/Services/TestHelpers/Issuing/Transactions/TransactionPurchaseDetailsFleetReportedBreakdownOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/Issuing/Transactions/TransactionPurchaseDetailsFleetReportedBreakdownOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.TestHelpers.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TransactionPurchaseDetailsFleetReportedBreakdownOptions : INestedOptions { @@ -9,18 +12,27 @@ public class TransactionPurchaseDetailsFleetReportedBreakdownOptions : INestedOp /// Breakdown of fuel portion of the purchase. /// [JsonProperty("fuel")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fuel")] +#endif public TransactionPurchaseDetailsFleetReportedBreakdownFuelOptions Fuel { get; set; } /// /// Breakdown of non-fuel portion of the purchase. /// [JsonProperty("non_fuel")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("non_fuel")] +#endif public TransactionPurchaseDetailsFleetReportedBreakdownNonFuelOptions NonFuel { get; set; } /// /// Information about tax included in this transaction. /// [JsonProperty("tax")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax")] +#endif public TransactionPurchaseDetailsFleetReportedBreakdownTaxOptions Tax { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/Issuing/Transactions/TransactionPurchaseDetailsFleetReportedBreakdownTaxOptions.cs b/src/Stripe.net/Services/TestHelpers/Issuing/Transactions/TransactionPurchaseDetailsFleetReportedBreakdownTaxOptions.cs index 80cab529e7..96d43b20a7 100644 --- a/src/Stripe.net/Services/TestHelpers/Issuing/Transactions/TransactionPurchaseDetailsFleetReportedBreakdownTaxOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/Issuing/Transactions/TransactionPurchaseDetailsFleetReportedBreakdownTaxOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.TestHelpers.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TransactionPurchaseDetailsFleetReportedBreakdownTaxOptions : INestedOptions { @@ -10,6 +13,9 @@ public class TransactionPurchaseDetailsFleetReportedBreakdownTaxOptions : INeste /// reported by merchant or not subject to tax. /// [JsonProperty("local_amount_decimal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("local_amount_decimal")] +#endif public decimal? LocalAmountDecimal { get; set; } /// @@ -17,6 +23,9 @@ public class TransactionPurchaseDetailsFleetReportedBreakdownTaxOptions : INeste /// reported by merchant or not subject to tax. /// [JsonProperty("national_amount_decimal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("national_amount_decimal")] +#endif public decimal? NationalAmountDecimal { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/Issuing/Transactions/TransactionPurchaseDetailsFlightOptions.cs b/src/Stripe.net/Services/TestHelpers/Issuing/Transactions/TransactionPurchaseDetailsFlightOptions.cs index f3c915275d..14e4de07cb 100644 --- a/src/Stripe.net/Services/TestHelpers/Issuing/Transactions/TransactionPurchaseDetailsFlightOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/Issuing/Transactions/TransactionPurchaseDetailsFlightOptions.cs @@ -5,6 +5,9 @@ namespace Stripe.TestHelpers.Issuing using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TransactionPurchaseDetailsFlightOptions : INestedOptions { @@ -13,30 +16,46 @@ public class TransactionPurchaseDetailsFlightOptions : INestedOptions /// [JsonProperty("departure_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("departure_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? DepartureAt { get; set; } /// /// The name of the passenger. /// [JsonProperty("passenger_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("passenger_name")] +#endif public string PassengerName { get; set; } /// /// Whether the ticket is refundable. /// [JsonProperty("refundable")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("refundable")] +#endif public bool? Refundable { get; set; } /// /// The legs of the trip. /// [JsonProperty("segments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("segments")] +#endif public List Segments { get; set; } /// /// The travel agency that issued the ticket. /// [JsonProperty("travel_agency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("travel_agency")] +#endif public string TravelAgency { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/Issuing/Transactions/TransactionPurchaseDetailsFlightSegmentOptions.cs b/src/Stripe.net/Services/TestHelpers/Issuing/Transactions/TransactionPurchaseDetailsFlightSegmentOptions.cs index f944ec339f..926778a485 100644 --- a/src/Stripe.net/Services/TestHelpers/Issuing/Transactions/TransactionPurchaseDetailsFlightSegmentOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/Issuing/Transactions/TransactionPurchaseDetailsFlightSegmentOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.TestHelpers.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TransactionPurchaseDetailsFlightSegmentOptions : INestedOptions { @@ -9,36 +12,54 @@ public class TransactionPurchaseDetailsFlightSegmentOptions : INestedOptions /// The three-letter IATA airport code of the flight's destination. /// [JsonProperty("arrival_airport_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("arrival_airport_code")] +#endif public string ArrivalAirportCode { get; set; } /// /// The airline carrier code. /// [JsonProperty("carrier")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("carrier")] +#endif public string Carrier { get; set; } /// /// The three-letter IATA airport code that the flight departed from. /// [JsonProperty("departure_airport_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("departure_airport_code")] +#endif public string DepartureAirportCode { get; set; } /// /// The flight number. /// [JsonProperty("flight_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("flight_number")] +#endif public string FlightNumber { get; set; } /// /// The flight's service class. /// [JsonProperty("service_class")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("service_class")] +#endif public string ServiceClass { get; set; } /// /// Whether a stopover is allowed on this flight. /// [JsonProperty("stopover_allowed")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("stopover_allowed")] +#endif public bool? StopoverAllowed { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/Issuing/Transactions/TransactionPurchaseDetailsFuelOptions.cs b/src/Stripe.net/Services/TestHelpers/Issuing/Transactions/TransactionPurchaseDetailsFuelOptions.cs index 6e7c86e0c5..b2a3a9aa5f 100644 --- a/src/Stripe.net/Services/TestHelpers/Issuing/Transactions/TransactionPurchaseDetailsFuelOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/Issuing/Transactions/TransactionPurchaseDetailsFuelOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.TestHelpers.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TransactionPurchaseDetailsFuelOptions : INestedOptions { @@ -10,6 +13,9 @@ public class TransactionPurchaseDetailsFuelOptions : INestedOptions /// Payment System Product Code identifying the primary fuel product purchased. /// [JsonProperty("industry_product_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("industry_product_code")] +#endif public string IndustryProductCode { get; set; } /// @@ -17,6 +23,9 @@ public class TransactionPurchaseDetailsFuelOptions : INestedOptions /// with at most 12 decimal places. /// [JsonProperty("quantity_decimal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("quantity_decimal")] +#endif public decimal? QuantityDecimal { get; set; } /// @@ -26,6 +35,9 @@ public class TransactionPurchaseDetailsFuelOptions : INestedOptions /// unleaded_super. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } /// @@ -36,6 +48,9 @@ public class TransactionPurchaseDetailsFuelOptions : INestedOptions /// kilowatt_hour, liter, other, pound, or us_gallon. /// [JsonProperty("unit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit")] +#endif public string Unit { get; set; } /// @@ -43,6 +58,9 @@ public class TransactionPurchaseDetailsFuelOptions : INestedOptions /// decimal places. /// [JsonProperty("unit_cost_decimal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_cost_decimal")] +#endif public decimal? UnitCostDecimal { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/Issuing/Transactions/TransactionPurchaseDetailsLodgingOptions.cs b/src/Stripe.net/Services/TestHelpers/Issuing/Transactions/TransactionPurchaseDetailsLodgingOptions.cs index 0f1ae25b71..c04fc70a0e 100644 --- a/src/Stripe.net/Services/TestHelpers/Issuing/Transactions/TransactionPurchaseDetailsLodgingOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/Issuing/Transactions/TransactionPurchaseDetailsLodgingOptions.cs @@ -4,6 +4,9 @@ namespace Stripe.TestHelpers.Issuing using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TransactionPurchaseDetailsLodgingOptions : INestedOptions { @@ -12,12 +15,19 @@ public class TransactionPurchaseDetailsLodgingOptions : INestedOptions /// [JsonProperty("check_in_at")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("check_in_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? CheckInAt { get; set; } /// /// The number of nights stayed at the lodging. /// [JsonProperty("nights")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("nights")] +#endif public long? Nights { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/Issuing/Transactions/TransactionPurchaseDetailsOptions.cs b/src/Stripe.net/Services/TestHelpers/Issuing/Transactions/TransactionPurchaseDetailsOptions.cs index 2db4bf3215..7001d2da86 100644 --- a/src/Stripe.net/Services/TestHelpers/Issuing/Transactions/TransactionPurchaseDetailsOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/Issuing/Transactions/TransactionPurchaseDetailsOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.TestHelpers.Issuing { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TransactionPurchaseDetailsOptions : INestedOptions { @@ -10,36 +13,54 @@ public class TransactionPurchaseDetailsOptions : INestedOptions /// Fleet-specific information for transactions using Fleet cards. /// [JsonProperty("fleet")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fleet")] +#endif public TransactionPurchaseDetailsFleetOptions Fleet { get; set; } /// /// Information about the flight that was purchased with this transaction. /// [JsonProperty("flight")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("flight")] +#endif public TransactionPurchaseDetailsFlightOptions Flight { get; set; } /// /// Information about fuel that was purchased with this transaction. /// [JsonProperty("fuel")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fuel")] +#endif public TransactionPurchaseDetailsFuelOptions Fuel { get; set; } /// /// Information about lodging that was purchased with this transaction. /// [JsonProperty("lodging")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("lodging")] +#endif public TransactionPurchaseDetailsLodgingOptions Lodging { get; set; } /// /// The line items in the purchase. /// [JsonProperty("receipt")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("receipt")] +#endif public List Receipt { get; set; } /// /// A merchant-specific order number. /// [JsonProperty("reference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reference")] +#endif public string Reference { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/Issuing/Transactions/TransactionPurchaseDetailsReceiptOptions.cs b/src/Stripe.net/Services/TestHelpers/Issuing/Transactions/TransactionPurchaseDetailsReceiptOptions.cs index 054b1d631c..eb5c9ac2d9 100644 --- a/src/Stripe.net/Services/TestHelpers/Issuing/Transactions/TransactionPurchaseDetailsReceiptOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/Issuing/Transactions/TransactionPurchaseDetailsReceiptOptions.cs @@ -2,19 +2,34 @@ namespace Stripe.TestHelpers.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TransactionPurchaseDetailsReceiptOptions : INestedOptions { [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } [JsonProperty("quantity")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("quantity")] +#endif public decimal? Quantity { get; set; } [JsonProperty("total")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("total")] +#endif public long? Total { get; set; } [JsonProperty("unit_cost")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_cost")] +#endif public long? UnitCost { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/Issuing/Transactions/TransactionRefundOptions.cs b/src/Stripe.net/Services/TestHelpers/Issuing/Transactions/TransactionRefundOptions.cs index 8c238e39b3..88b5098b5a 100644 --- a/src/Stripe.net/Services/TestHelpers/Issuing/Transactions/TransactionRefundOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/Issuing/Transactions/TransactionRefundOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.TestHelpers.Issuing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TransactionRefundOptions : BaseOptions { @@ -11,6 +14,9 @@ public class TransactionRefundOptions : BaseOptions /// href="https://stripe.com/docs/currencies#zero-decimal">smallest currency unit. /// [JsonProperty("refund_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("refund_amount")] +#endif public long? RefundAmount { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/Terminal/Readers/ReaderCardPresentOptions.cs b/src/Stripe.net/Services/TestHelpers/Terminal/Readers/ReaderCardPresentOptions.cs index 8e07bb2492..27e96c9b17 100644 --- a/src/Stripe.net/Services/TestHelpers/Terminal/Readers/ReaderCardPresentOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/Terminal/Readers/ReaderCardPresentOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.TestHelpers.Terminal { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ReaderCardPresentOptions : INestedOptions { @@ -9,6 +12,9 @@ public class ReaderCardPresentOptions : INestedOptions /// The card number, as a string without any separators. /// [JsonProperty("number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("number")] +#endif public string Number { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/Terminal/Readers/ReaderInteracPresentOptions.cs b/src/Stripe.net/Services/TestHelpers/Terminal/Readers/ReaderInteracPresentOptions.cs index 1f6a8ea3a1..c5ff2be0d5 100644 --- a/src/Stripe.net/Services/TestHelpers/Terminal/Readers/ReaderInteracPresentOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/Terminal/Readers/ReaderInteracPresentOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.TestHelpers.Terminal { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ReaderInteracPresentOptions : INestedOptions { @@ -9,6 +12,9 @@ public class ReaderInteracPresentOptions : INestedOptions /// Card Number. /// [JsonProperty("number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("number")] +#endif public string Number { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/Terminal/Readers/ReaderPresentPaymentMethodOptions.cs b/src/Stripe.net/Services/TestHelpers/Terminal/Readers/ReaderPresentPaymentMethodOptions.cs index 5bd247183a..94f1640586 100644 --- a/src/Stripe.net/Services/TestHelpers/Terminal/Readers/ReaderPresentPaymentMethodOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/Terminal/Readers/ReaderPresentPaymentMethodOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.TestHelpers.Terminal { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ReaderPresentPaymentMethodOptions : BaseOptions { @@ -9,18 +12,27 @@ public class ReaderPresentPaymentMethodOptions : BaseOptions /// Simulated on-reader tip amount. /// [JsonProperty("amount_tip")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_tip")] +#endif public long? AmountTip { get; set; } /// /// Simulated data for the card_present payment method. /// [JsonProperty("card_present")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card_present")] +#endif public ReaderCardPresentOptions CardPresent { get; set; } /// /// Simulated data for the interac_present payment method. /// [JsonProperty("interac_present")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interac_present")] +#endif public ReaderInteracPresentOptions InteracPresent { get; set; } /// @@ -28,6 +40,9 @@ public class ReaderPresentPaymentMethodOptions : BaseOptions /// One of: card_present, or interac_present. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/TestClocks/TestClockAdvanceOptions.cs b/src/Stripe.net/Services/TestHelpers/TestClocks/TestClockAdvanceOptions.cs index 21e9101b52..fabcbc527a 100644 --- a/src/Stripe.net/Services/TestHelpers/TestClocks/TestClockAdvanceOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/TestClocks/TestClockAdvanceOptions.cs @@ -4,6 +4,9 @@ namespace Stripe.TestHelpers using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TestClockAdvanceOptions : BaseOptions { @@ -15,6 +18,10 @@ public class TestClockAdvanceOptions : BaseOptions /// [JsonProperty("frozen_time")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("frozen_time")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? FrozenTime { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/TestClocks/TestClockCreateOptions.cs b/src/Stripe.net/Services/TestHelpers/TestClocks/TestClockCreateOptions.cs index 49ebfab3bb..89b9abdf1a 100644 --- a/src/Stripe.net/Services/TestHelpers/TestClocks/TestClockCreateOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/TestClocks/TestClockCreateOptions.cs @@ -4,6 +4,9 @@ namespace Stripe.TestHelpers using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TestClockCreateOptions : BaseOptions { @@ -12,12 +15,19 @@ public class TestClockCreateOptions : BaseOptions /// [JsonProperty("frozen_time")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("frozen_time")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? FrozenTime { get; set; } /// /// The name for this test clock. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/Treasury/InboundTransfers/InboundTransferFailOptions.cs b/src/Stripe.net/Services/TestHelpers/Treasury/InboundTransfers/InboundTransferFailOptions.cs index 68350fd152..1c75da48f9 100644 --- a/src/Stripe.net/Services/TestHelpers/Treasury/InboundTransfers/InboundTransferFailOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/Treasury/InboundTransfers/InboundTransferFailOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.TestHelpers.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InboundTransferFailOptions : BaseOptions { @@ -9,6 +12,9 @@ public class InboundTransferFailOptions : BaseOptions /// Details about a failed InboundTransfer. /// [JsonProperty("failure_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("failure_details")] +#endif public InboundTransferFailureDetailsOptions FailureDetails { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/Treasury/InboundTransfers/InboundTransferFailureDetailsOptions.cs b/src/Stripe.net/Services/TestHelpers/Treasury/InboundTransfers/InboundTransferFailureDetailsOptions.cs index ab8fdff42b..3b81d682aa 100644 --- a/src/Stripe.net/Services/TestHelpers/Treasury/InboundTransfers/InboundTransferFailureDetailsOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/Treasury/InboundTransfers/InboundTransferFailureDetailsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.TestHelpers.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InboundTransferFailureDetailsOptions : INestedOptions { @@ -15,6 +18,9 @@ public class InboundTransferFailureDetailsOptions : INestedOptions /// other. /// [JsonProperty("code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("code")] +#endif public string Code { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/Treasury/OutboundPayments/OutboundPaymentReturnOutboundPaymentOptions.cs b/src/Stripe.net/Services/TestHelpers/Treasury/OutboundPayments/OutboundPaymentReturnOutboundPaymentOptions.cs index abf82d96ce..cca2bf20d6 100644 --- a/src/Stripe.net/Services/TestHelpers/Treasury/OutboundPayments/OutboundPaymentReturnOutboundPaymentOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/Treasury/OutboundPayments/OutboundPaymentReturnOutboundPaymentOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.TestHelpers.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class OutboundPaymentReturnOutboundPaymentOptions : BaseOptions { @@ -9,6 +12,9 @@ public class OutboundPaymentReturnOutboundPaymentOptions : BaseOptions /// Optional hash to set the return code. /// [JsonProperty("returned_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("returned_details")] +#endif public OutboundPaymentReturnedDetailsOptions ReturnedDetails { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/Treasury/OutboundPayments/OutboundPaymentReturnedDetailsOptions.cs b/src/Stripe.net/Services/TestHelpers/Treasury/OutboundPayments/OutboundPaymentReturnedDetailsOptions.cs index 3996e7cff4..2692be8bf9 100644 --- a/src/Stripe.net/Services/TestHelpers/Treasury/OutboundPayments/OutboundPaymentReturnedDetailsOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/Treasury/OutboundPayments/OutboundPaymentReturnedDetailsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.TestHelpers.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class OutboundPaymentReturnedDetailsOptions : INestedOptions { @@ -13,6 +16,9 @@ public class OutboundPaymentReturnedDetailsOptions : INestedOptions /// other. /// [JsonProperty("code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("code")] +#endif public string Code { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/Treasury/OutboundPayments/OutboundPaymentTrackingDetailsAchOptions.cs b/src/Stripe.net/Services/TestHelpers/Treasury/OutboundPayments/OutboundPaymentTrackingDetailsAchOptions.cs index 05f1f254ce..cd5ff84280 100644 --- a/src/Stripe.net/Services/TestHelpers/Treasury/OutboundPayments/OutboundPaymentTrackingDetailsAchOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/Treasury/OutboundPayments/OutboundPaymentTrackingDetailsAchOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.TestHelpers.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class OutboundPaymentTrackingDetailsAchOptions : INestedOptions { @@ -9,6 +12,9 @@ public class OutboundPaymentTrackingDetailsAchOptions : INestedOptions /// ACH trace ID for funds sent over the ach network. /// [JsonProperty("trace_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("trace_id")] +#endif public string TraceId { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/Treasury/OutboundPayments/OutboundPaymentTrackingDetailsOptions.cs b/src/Stripe.net/Services/TestHelpers/Treasury/OutboundPayments/OutboundPaymentTrackingDetailsOptions.cs index 66dea56cf3..1bd95afcbc 100644 --- a/src/Stripe.net/Services/TestHelpers/Treasury/OutboundPayments/OutboundPaymentTrackingDetailsOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/Treasury/OutboundPayments/OutboundPaymentTrackingDetailsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.TestHelpers.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class OutboundPaymentTrackingDetailsOptions : INestedOptions { @@ -9,6 +12,9 @@ public class OutboundPaymentTrackingDetailsOptions : INestedOptions /// ACH network tracking details. /// [JsonProperty("ach")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ach")] +#endif public OutboundPaymentTrackingDetailsAchOptions Ach { get; set; } /// @@ -16,12 +22,18 @@ public class OutboundPaymentTrackingDetailsOptions : INestedOptions /// One of: ach, or us_domestic_wire. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } /// /// US domestic wire network tracking details. /// [JsonProperty("us_domestic_wire")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("us_domestic_wire")] +#endif public OutboundPaymentTrackingDetailsUsDomesticWireOptions UsDomesticWire { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/Treasury/OutboundPayments/OutboundPaymentTrackingDetailsUsDomesticWireOptions.cs b/src/Stripe.net/Services/TestHelpers/Treasury/OutboundPayments/OutboundPaymentTrackingDetailsUsDomesticWireOptions.cs index b3a0a99fbf..cefab058a0 100644 --- a/src/Stripe.net/Services/TestHelpers/Treasury/OutboundPayments/OutboundPaymentTrackingDetailsUsDomesticWireOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/Treasury/OutboundPayments/OutboundPaymentTrackingDetailsUsDomesticWireOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.TestHelpers.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class OutboundPaymentTrackingDetailsUsDomesticWireOptions : INestedOptions { @@ -10,18 +13,27 @@ public class OutboundPaymentTrackingDetailsUsDomesticWireOptions : INestedOption /// network. /// [JsonProperty("chips")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("chips")] +#endif public string Chips { get; set; } /// /// IMAD for funds sent over the us_domestic_wire network. /// [JsonProperty("imad")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("imad")] +#endif public string Imad { get; set; } /// /// OMAD for funds sent over the us_domestic_wire network. /// [JsonProperty("omad")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("omad")] +#endif public string Omad { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/Treasury/OutboundPayments/OutboundPaymentUpdateOptions.cs b/src/Stripe.net/Services/TestHelpers/Treasury/OutboundPayments/OutboundPaymentUpdateOptions.cs index c04d23c13a..ad01d4c0c8 100644 --- a/src/Stripe.net/Services/TestHelpers/Treasury/OutboundPayments/OutboundPaymentUpdateOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/Treasury/OutboundPayments/OutboundPaymentUpdateOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.TestHelpers.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class OutboundPaymentUpdateOptions : BaseOptions { @@ -9,6 +12,9 @@ public class OutboundPaymentUpdateOptions : BaseOptions /// Details about network-specific tracking information. /// [JsonProperty("tracking_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tracking_details")] +#endif public OutboundPaymentTrackingDetailsOptions TrackingDetails { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/Treasury/OutboundTransfers/OutboundTransferReturnOutboundTransferOptions.cs b/src/Stripe.net/Services/TestHelpers/Treasury/OutboundTransfers/OutboundTransferReturnOutboundTransferOptions.cs index 32558ebbab..cc5cea9b2e 100644 --- a/src/Stripe.net/Services/TestHelpers/Treasury/OutboundTransfers/OutboundTransferReturnOutboundTransferOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/Treasury/OutboundTransfers/OutboundTransferReturnOutboundTransferOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.TestHelpers.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class OutboundTransferReturnOutboundTransferOptions : BaseOptions { @@ -9,6 +12,9 @@ public class OutboundTransferReturnOutboundTransferOptions : BaseOptions /// Details about a returned OutboundTransfer. /// [JsonProperty("returned_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("returned_details")] +#endif public OutboundTransferReturnedDetailsOptions ReturnedDetails { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/Treasury/OutboundTransfers/OutboundTransferReturnedDetailsOptions.cs b/src/Stripe.net/Services/TestHelpers/Treasury/OutboundTransfers/OutboundTransferReturnedDetailsOptions.cs index c5c5e41ea3..2eb123cb3e 100644 --- a/src/Stripe.net/Services/TestHelpers/Treasury/OutboundTransfers/OutboundTransferReturnedDetailsOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/Treasury/OutboundTransfers/OutboundTransferReturnedDetailsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.TestHelpers.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class OutboundTransferReturnedDetailsOptions : INestedOptions { @@ -13,6 +16,9 @@ public class OutboundTransferReturnedDetailsOptions : INestedOptions /// other. /// [JsonProperty("code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("code")] +#endif public string Code { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/Treasury/OutboundTransfers/OutboundTransferTrackingDetailsAchOptions.cs b/src/Stripe.net/Services/TestHelpers/Treasury/OutboundTransfers/OutboundTransferTrackingDetailsAchOptions.cs index bf94ad0dcd..b96b34082a 100644 --- a/src/Stripe.net/Services/TestHelpers/Treasury/OutboundTransfers/OutboundTransferTrackingDetailsAchOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/Treasury/OutboundTransfers/OutboundTransferTrackingDetailsAchOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.TestHelpers.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class OutboundTransferTrackingDetailsAchOptions : INestedOptions { @@ -9,6 +12,9 @@ public class OutboundTransferTrackingDetailsAchOptions : INestedOptions /// ACH trace ID for funds sent over the ach network. /// [JsonProperty("trace_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("trace_id")] +#endif public string TraceId { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/Treasury/OutboundTransfers/OutboundTransferTrackingDetailsOptions.cs b/src/Stripe.net/Services/TestHelpers/Treasury/OutboundTransfers/OutboundTransferTrackingDetailsOptions.cs index 6e5c991ae5..14e893d83f 100644 --- a/src/Stripe.net/Services/TestHelpers/Treasury/OutboundTransfers/OutboundTransferTrackingDetailsOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/Treasury/OutboundTransfers/OutboundTransferTrackingDetailsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.TestHelpers.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class OutboundTransferTrackingDetailsOptions : INestedOptions { @@ -9,6 +12,9 @@ public class OutboundTransferTrackingDetailsOptions : INestedOptions /// ACH network tracking details. /// [JsonProperty("ach")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ach")] +#endif public OutboundTransferTrackingDetailsAchOptions Ach { get; set; } /// @@ -16,12 +22,18 @@ public class OutboundTransferTrackingDetailsOptions : INestedOptions /// One of: ach, or us_domestic_wire. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } /// /// US domestic wire network tracking details. /// [JsonProperty("us_domestic_wire")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("us_domestic_wire")] +#endif public OutboundTransferTrackingDetailsUsDomesticWireOptions UsDomesticWire { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/Treasury/OutboundTransfers/OutboundTransferTrackingDetailsUsDomesticWireOptions.cs b/src/Stripe.net/Services/TestHelpers/Treasury/OutboundTransfers/OutboundTransferTrackingDetailsUsDomesticWireOptions.cs index a59d91e911..5a82995b3e 100644 --- a/src/Stripe.net/Services/TestHelpers/Treasury/OutboundTransfers/OutboundTransferTrackingDetailsUsDomesticWireOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/Treasury/OutboundTransfers/OutboundTransferTrackingDetailsUsDomesticWireOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.TestHelpers.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class OutboundTransferTrackingDetailsUsDomesticWireOptions : INestedOptions { @@ -10,18 +13,27 @@ public class OutboundTransferTrackingDetailsUsDomesticWireOptions : INestedOptio /// network. /// [JsonProperty("chips")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("chips")] +#endif public string Chips { get; set; } /// /// IMAD for funds sent over the us_domestic_wire network. /// [JsonProperty("imad")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("imad")] +#endif public string Imad { get; set; } /// /// OMAD for funds sent over the us_domestic_wire network. /// [JsonProperty("omad")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("omad")] +#endif public string Omad { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/Treasury/OutboundTransfers/OutboundTransferUpdateOptions.cs b/src/Stripe.net/Services/TestHelpers/Treasury/OutboundTransfers/OutboundTransferUpdateOptions.cs index 5c3fe62ddd..5b8f62ec04 100644 --- a/src/Stripe.net/Services/TestHelpers/Treasury/OutboundTransfers/OutboundTransferUpdateOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/Treasury/OutboundTransfers/OutboundTransferUpdateOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.TestHelpers.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class OutboundTransferUpdateOptions : BaseOptions { @@ -9,6 +12,9 @@ public class OutboundTransferUpdateOptions : BaseOptions /// Details about network-specific tracking information. /// [JsonProperty("tracking_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tracking_details")] +#endif public OutboundTransferTrackingDetailsOptions TrackingDetails { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/Treasury/ReceivedCredits/ReceivedCreditCreateOptions.cs b/src/Stripe.net/Services/TestHelpers/Treasury/ReceivedCredits/ReceivedCreditCreateOptions.cs index bc2f74411d..94db0ac185 100644 --- a/src/Stripe.net/Services/TestHelpers/Treasury/ReceivedCredits/ReceivedCreditCreateOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/Treasury/ReceivedCredits/ReceivedCreditCreateOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.TestHelpers.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ReceivedCreditCreateOptions : BaseOptions { @@ -9,6 +12,9 @@ public class ReceivedCreditCreateOptions : BaseOptions /// Amount (in cents) to be transferred. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long? Amount { get; set; } /// @@ -17,24 +23,36 @@ public class ReceivedCreditCreateOptions : BaseOptions /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// /// An arbitrary string attached to the object. Often useful for displaying to users. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// /// The FinancialAccount to send funds to. /// [JsonProperty("financial_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("financial_account")] +#endif public string FinancialAccount { get; set; } /// /// Initiating payment method details for the object. /// [JsonProperty("initiating_payment_method_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("initiating_payment_method_details")] +#endif public ReceivedCreditInitiatingPaymentMethodDetailsOptions InitiatingPaymentMethodDetails { get; set; } /// @@ -45,6 +63,9 @@ public class ReceivedCreditCreateOptions : BaseOptions /// One of: ach, or us_domestic_wire. /// [JsonProperty("network")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("network")] +#endif public string Network { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/Treasury/ReceivedCredits/ReceivedCreditInitiatingPaymentMethodDetailsOptions.cs b/src/Stripe.net/Services/TestHelpers/Treasury/ReceivedCredits/ReceivedCreditInitiatingPaymentMethodDetailsOptions.cs index 5f06f85949..fde77b7dc2 100644 --- a/src/Stripe.net/Services/TestHelpers/Treasury/ReceivedCredits/ReceivedCreditInitiatingPaymentMethodDetailsOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/Treasury/ReceivedCredits/ReceivedCreditInitiatingPaymentMethodDetailsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.TestHelpers.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ReceivedCreditInitiatingPaymentMethodDetailsOptions : INestedOptions { @@ -9,12 +12,18 @@ public class ReceivedCreditInitiatingPaymentMethodDetailsOptions : INestedOption /// The source type. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } /// /// Optional fields for us_bank_account. /// [JsonProperty("us_bank_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("us_bank_account")] +#endif public ReceivedCreditInitiatingPaymentMethodDetailsUsBankAccountOptions UsBankAccount { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/Treasury/ReceivedCredits/ReceivedCreditInitiatingPaymentMethodDetailsUsBankAccountOptions.cs b/src/Stripe.net/Services/TestHelpers/Treasury/ReceivedCredits/ReceivedCreditInitiatingPaymentMethodDetailsUsBankAccountOptions.cs index cc12c0a373..42a4eb0694 100644 --- a/src/Stripe.net/Services/TestHelpers/Treasury/ReceivedCredits/ReceivedCreditInitiatingPaymentMethodDetailsUsBankAccountOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/Treasury/ReceivedCredits/ReceivedCreditInitiatingPaymentMethodDetailsUsBankAccountOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.TestHelpers.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ReceivedCreditInitiatingPaymentMethodDetailsUsBankAccountOptions : INestedOptions { @@ -9,18 +12,27 @@ public class ReceivedCreditInitiatingPaymentMethodDetailsUsBankAccountOptions : /// The bank account holder's name. /// [JsonProperty("account_holder_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_holder_name")] +#endif public string AccountHolderName { get; set; } /// /// The bank account number. /// [JsonProperty("account_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_number")] +#endif public string AccountNumber { get; set; } /// /// The bank account's routing number. /// [JsonProperty("routing_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("routing_number")] +#endif public string RoutingNumber { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/Treasury/ReceivedDebits/ReceivedDebitCreateOptions.cs b/src/Stripe.net/Services/TestHelpers/Treasury/ReceivedDebits/ReceivedDebitCreateOptions.cs index d67af9551e..85b85245da 100644 --- a/src/Stripe.net/Services/TestHelpers/Treasury/ReceivedDebits/ReceivedDebitCreateOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/Treasury/ReceivedDebits/ReceivedDebitCreateOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.TestHelpers.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ReceivedDebitCreateOptions : BaseOptions { @@ -9,6 +12,9 @@ public class ReceivedDebitCreateOptions : BaseOptions /// Amount (in cents) to be transferred. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long? Amount { get; set; } /// @@ -17,24 +23,36 @@ public class ReceivedDebitCreateOptions : BaseOptions /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// /// An arbitrary string attached to the object. Often useful for displaying to users. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// /// The FinancialAccount to pull funds from. /// [JsonProperty("financial_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("financial_account")] +#endif public string FinancialAccount { get; set; } /// /// Initiating payment method details for the object. /// [JsonProperty("initiating_payment_method_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("initiating_payment_method_details")] +#endif public ReceivedDebitInitiatingPaymentMethodDetailsOptions InitiatingPaymentMethodDetails { get; set; } /// @@ -44,6 +62,9 @@ public class ReceivedDebitCreateOptions : BaseOptions /// about money movement timelines for each network type. /// [JsonProperty("network")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("network")] +#endif public string Network { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/Treasury/ReceivedDebits/ReceivedDebitInitiatingPaymentMethodDetailsOptions.cs b/src/Stripe.net/Services/TestHelpers/Treasury/ReceivedDebits/ReceivedDebitInitiatingPaymentMethodDetailsOptions.cs index 389d98dbee..7e435022a4 100644 --- a/src/Stripe.net/Services/TestHelpers/Treasury/ReceivedDebits/ReceivedDebitInitiatingPaymentMethodDetailsOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/Treasury/ReceivedDebits/ReceivedDebitInitiatingPaymentMethodDetailsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.TestHelpers.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ReceivedDebitInitiatingPaymentMethodDetailsOptions : INestedOptions { @@ -9,12 +12,18 @@ public class ReceivedDebitInitiatingPaymentMethodDetailsOptions : INestedOptions /// The source type. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } /// /// Optional fields for us_bank_account. /// [JsonProperty("us_bank_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("us_bank_account")] +#endif public ReceivedDebitInitiatingPaymentMethodDetailsUsBankAccountOptions UsBankAccount { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/Treasury/ReceivedDebits/ReceivedDebitInitiatingPaymentMethodDetailsUsBankAccountOptions.cs b/src/Stripe.net/Services/TestHelpers/Treasury/ReceivedDebits/ReceivedDebitInitiatingPaymentMethodDetailsUsBankAccountOptions.cs index 2fd32add48..dbd9107891 100644 --- a/src/Stripe.net/Services/TestHelpers/Treasury/ReceivedDebits/ReceivedDebitInitiatingPaymentMethodDetailsUsBankAccountOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/Treasury/ReceivedDebits/ReceivedDebitInitiatingPaymentMethodDetailsUsBankAccountOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.TestHelpers.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ReceivedDebitInitiatingPaymentMethodDetailsUsBankAccountOptions : INestedOptions { @@ -9,18 +12,27 @@ public class ReceivedDebitInitiatingPaymentMethodDetailsUsBankAccountOptions : I /// The bank account holder's name. /// [JsonProperty("account_holder_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_holder_name")] +#endif public string AccountHolderName { get; set; } /// /// The bank account number. /// [JsonProperty("account_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_number")] +#endif public string AccountNumber { get; set; } /// /// The bank account's routing number. /// [JsonProperty("routing_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("routing_number")] +#endif public string RoutingNumber { get; set; } } } diff --git a/src/Stripe.net/Services/Tokens/TokenAccountCompanyOptions.cs b/src/Stripe.net/Services/Tokens/TokenAccountCompanyOptions.cs index fc29bfeae7..d971bdddc5 100644 --- a/src/Stripe.net/Services/Tokens/TokenAccountCompanyOptions.cs +++ b/src/Stripe.net/Services/Tokens/TokenAccountCompanyOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TokenAccountCompanyOptions : INestedOptions { @@ -9,18 +12,27 @@ public class TokenAccountCompanyOptions : INestedOptions /// The company's primary address. /// [JsonProperty("address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address")] +#endif public AddressOptions Address { get; set; } /// /// The Kana variation of the company's primary address (Japan only). /// [JsonProperty("address_kana")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_kana")] +#endif public AddressJapanOptions AddressKana { get; set; } /// /// The Kanji variation of the company's primary address (Japan only). /// [JsonProperty("address_kanji")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_kanji")] +#endif public AddressJapanOptions AddressKanji { get; set; } /// @@ -32,6 +44,9 @@ public class TokenAccountCompanyOptions : INestedOptions /// directors have been provided. /// [JsonProperty("directors_provided")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("directors_provided")] +#endif public bool? DirectorsProvided { get; set; } /// @@ -41,6 +56,9 @@ public class TokenAccountCompanyOptions : INestedOptions /// relationship.executive requirement. /// [JsonProperty("executives_provided")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("executives_provided")] +#endif public bool? ExecutivesProvided { get; set; } /// @@ -48,30 +66,45 @@ public class TokenAccountCompanyOptions : INestedOptions /// only). /// [JsonProperty("export_license_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("export_license_id")] +#endif public string ExportLicenseId { get; set; } /// /// The purpose code to use for export transactions (India only). /// [JsonProperty("export_purpose_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("export_purpose_code")] +#endif public string ExportPurposeCode { get; set; } /// /// The company's legal name. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } /// /// The Kana variation of the company's legal name (Japan only). /// [JsonProperty("name_kana")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name_kana")] +#endif public string NameKana { get; set; } /// /// The Kanji variation of the company's legal name (Japan only). /// [JsonProperty("name_kanji")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name_kanji")] +#endif public string NameKanji { get; set; } /// @@ -80,6 +113,9 @@ public class TokenAccountCompanyOptions : INestedOptions /// Persons API for accounts with a relationship.owner requirement. /// [JsonProperty("owners_provided")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("owners_provided")] +#endif public bool? OwnersProvided { get; set; } /// @@ -87,6 +123,9 @@ public class TokenAccountCompanyOptions : INestedOptions /// both current and correct. /// [JsonProperty("ownership_declaration")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ownership_declaration")] +#endif public TokenAccountCompanyOwnershipDeclarationOptions OwnershipDeclaration { get; set; } /// @@ -94,12 +133,18 @@ public class TokenAccountCompanyOptions : INestedOptions /// Declaration and indicated that it is correct. /// [JsonProperty("ownership_declaration_shown_and_signed")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ownership_declaration_shown_and_signed")] +#endif public bool? OwnershipDeclarationShownAndSigned { get; set; } /// /// The company's phone number (used for verification). /// [JsonProperty("phone")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("phone")] +#endif public string Phone { get; set; } /// @@ -109,6 +154,9 @@ public class TokenAccountCompanyOptions : INestedOptions /// Hong Kong). /// [JsonProperty("registration_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("registration_number")] +#endif public string RegistrationNumber { get; set; } /// @@ -127,6 +175,9 @@ public class TokenAccountCompanyOptions : INestedOptions /// unincorporated_partnership. /// [JsonProperty("structure")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("structure")] +#endif public string Structure { get; set; } /// @@ -135,6 +186,9 @@ public class TokenAccountCompanyOptions : INestedOptions /// Company Number in the UK.). /// [JsonProperty("tax_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_id")] +#endif public string TaxId { get; set; } /// @@ -142,18 +196,27 @@ public class TokenAccountCompanyOptions : INestedOptions /// only). /// [JsonProperty("tax_id_registrar")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_id_registrar")] +#endif public string TaxIdRegistrar { get; set; } /// /// The VAT number of the company. /// [JsonProperty("vat_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("vat_id")] +#endif public string VatId { get; set; } /// /// Information on the verification state of the company. /// [JsonProperty("verification")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("verification")] +#endif public TokenAccountCompanyVerificationOptions Verification { get; set; } } } diff --git a/src/Stripe.net/Services/Tokens/TokenAccountCompanyOwnershipDeclarationOptions.cs b/src/Stripe.net/Services/Tokens/TokenAccountCompanyOwnershipDeclarationOptions.cs index 3cbbb856df..ba5dc7518e 100644 --- a/src/Stripe.net/Services/Tokens/TokenAccountCompanyOwnershipDeclarationOptions.cs +++ b/src/Stripe.net/Services/Tokens/TokenAccountCompanyOwnershipDeclarationOptions.cs @@ -4,6 +4,9 @@ namespace Stripe using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TokenAccountCompanyOwnershipDeclarationOptions : INestedOptions { @@ -12,18 +15,28 @@ public class TokenAccountCompanyOwnershipDeclarationOptions : INestedOptions /// [JsonProperty("date")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("date")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? Date { get; set; } /// /// The IP address from which the beneficial owner attestation was made. /// [JsonProperty("ip")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ip")] +#endif public string Ip { get; set; } /// /// The user agent of the browser from which the beneficial owner attestation was made. /// [JsonProperty("user_agent")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("user_agent")] +#endif public string UserAgent { get; set; } } } diff --git a/src/Stripe.net/Services/Tokens/TokenAccountCompanyVerificationDocumentOptions.cs b/src/Stripe.net/Services/Tokens/TokenAccountCompanyVerificationDocumentOptions.cs index f65eccaa3c..061952a3c3 100644 --- a/src/Stripe.net/Services/Tokens/TokenAccountCompanyVerificationDocumentOptions.cs +++ b/src/Stripe.net/Services/Tokens/TokenAccountCompanyVerificationDocumentOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TokenAccountCompanyVerificationDocumentOptions : INestedOptions { @@ -13,6 +16,9 @@ public class TokenAccountCompanyVerificationDocumentOptions : INestedOptions /// size. /// [JsonProperty("back")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("back")] +#endif public string Back { get; set; } /// @@ -23,6 +29,9 @@ public class TokenAccountCompanyVerificationDocumentOptions : INestedOptions /// size. /// [JsonProperty("front")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("front")] +#endif public string Front { get; set; } } } diff --git a/src/Stripe.net/Services/Tokens/TokenAccountCompanyVerificationOptions.cs b/src/Stripe.net/Services/Tokens/TokenAccountCompanyVerificationOptions.cs index a145703fc0..cffc6ede30 100644 --- a/src/Stripe.net/Services/Tokens/TokenAccountCompanyVerificationOptions.cs +++ b/src/Stripe.net/Services/Tokens/TokenAccountCompanyVerificationOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TokenAccountCompanyVerificationOptions : INestedOptions { @@ -9,6 +12,9 @@ public class TokenAccountCompanyVerificationOptions : INestedOptions /// A document verifying the business. /// [JsonProperty("document")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("document")] +#endif public TokenAccountCompanyVerificationDocumentOptions Document { get; set; } } } diff --git a/src/Stripe.net/Services/Tokens/TokenAccountIndividualOptions.cs b/src/Stripe.net/Services/Tokens/TokenAccountIndividualOptions.cs index e03d507104..fb3daefd35 100644 --- a/src/Stripe.net/Services/Tokens/TokenAccountIndividualOptions.cs +++ b/src/Stripe.net/Services/Tokens/TokenAccountIndividualOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TokenAccountIndividualOptions : INestedOptions, IHasMetadata { @@ -10,60 +13,90 @@ public class TokenAccountIndividualOptions : INestedOptions, IHasMetadata /// The individual's primary address. /// [JsonProperty("address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address")] +#endif public AddressOptions Address { get; set; } /// /// The Kana variation of the individual's primary address (Japan only). /// [JsonProperty("address_kana")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_kana")] +#endif public AddressJapanOptions AddressKana { get; set; } /// /// The Kanji variation of the individual's primary address (Japan only). /// [JsonProperty("address_kanji")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_kanji")] +#endif public AddressJapanOptions AddressKanji { get; set; } /// /// The individual's date of birth. /// [JsonProperty("dob")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("dob")] +#endif public DobOptions Dob { get; set; } /// /// The individual's email address. /// [JsonProperty("email")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("email")] +#endif public string Email { get; set; } /// /// The individual's first name. /// [JsonProperty("first_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("first_name")] +#endif public string FirstName { get; set; } /// /// The Kana variation of the individual's first name (Japan only). /// [JsonProperty("first_name_kana")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("first_name_kana")] +#endif public string FirstNameKana { get; set; } /// /// The Kanji variation of the individual's first name (Japan only). /// [JsonProperty("first_name_kanji")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("first_name_kanji")] +#endif public string FirstNameKanji { get; set; } /// /// A list of alternate names or aliases that the individual is known by. /// [JsonProperty("full_name_aliases")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("full_name_aliases")] +#endif public List FullNameAliases { get; set; } /// /// The individual's gender. /// [JsonProperty("gender")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("gender")] +#endif public string Gender { get; set; } /// @@ -74,6 +107,9 @@ public class TokenAccountIndividualOptions : INestedOptions, IHasMetadata /// Stripe.js. /// [JsonProperty("id_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id_number")] +#endif public string IdNumber { get; set; } /// @@ -85,30 +121,45 @@ public class TokenAccountIndividualOptions : INestedOptions, IHasMetadata /// Stripe.js. /// [JsonProperty("id_number_secondary")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id_number_secondary")] +#endif public string IdNumberSecondary { get; set; } /// /// The individual's last name. /// [JsonProperty("last_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last_name")] +#endif public string LastName { get; set; } /// /// The Kana variation of the individual's last name (Japan only). /// [JsonProperty("last_name_kana")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last_name_kana")] +#endif public string LastNameKana { get; set; } /// /// The Kanji variation of the individual's last name (Japan only). /// [JsonProperty("last_name_kanji")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last_name_kanji")] +#endif public string LastNameKanji { get; set; } /// /// The individual's maiden name. /// [JsonProperty("maiden_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("maiden_name")] +#endif public string MaidenName { get; set; } /// @@ -118,12 +169,18 @@ public class TokenAccountIndividualOptions : INestedOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// The individual's phone number. /// [JsonProperty("phone")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("phone")] +#endif public string Phone { get; set; } /// @@ -133,30 +190,45 @@ public class TokenAccountIndividualOptions : INestedOptions, IHasMetadata /// One of: existing, or none. /// [JsonProperty("political_exposure")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("political_exposure")] +#endif public string PoliticalExposure { get; set; } /// /// The individual's registered address. /// [JsonProperty("registered_address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("registered_address")] +#endif public AddressOptions RegisteredAddress { get; set; } /// /// Describes the person’s relationship to the account. /// [JsonProperty("relationship")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("relationship")] +#endif public TokenAccountIndividualRelationshipOptions Relationship { get; set; } /// /// The last four digits of the individual's Social Security Number (U.S. only). /// [JsonProperty("ssn_last_4")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ssn_last_4")] +#endif public string SsnLast4 { get; set; } /// /// The individual's verification document information. /// [JsonProperty("verification")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("verification")] +#endif public TokenAccountIndividualVerificationOptions Verification { get; set; } } } diff --git a/src/Stripe.net/Services/Tokens/TokenAccountIndividualRelationshipOptions.cs b/src/Stripe.net/Services/Tokens/TokenAccountIndividualRelationshipOptions.cs index d39e64d590..c003aa4725 100644 --- a/src/Stripe.net/Services/Tokens/TokenAccountIndividualRelationshipOptions.cs +++ b/src/Stripe.net/Services/Tokens/TokenAccountIndividualRelationshipOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TokenAccountIndividualRelationshipOptions : INestedOptions { @@ -11,6 +14,9 @@ public class TokenAccountIndividualRelationshipOptions : INestedOptions /// meets its regulatory obligations. /// [JsonProperty("director")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("director")] +#endif public bool? Director { get; set; } /// @@ -18,24 +24,36 @@ public class TokenAccountIndividualRelationshipOptions : INestedOptions /// organization. /// [JsonProperty("executive")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("executive")] +#endif public bool? Executive { get; set; } /// /// Whether the person is an owner of the account’s legal entity. /// [JsonProperty("owner")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("owner")] +#endif public bool? Owner { get; set; } /// /// The percent owned by the person of the account's legal entity. /// [JsonProperty("percent_ownership")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("percent_ownership")] +#endif public decimal? PercentOwnership { get; set; } /// /// The person's title (e.g., CEO, Support Engineer). /// [JsonProperty("title")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("title")] +#endif public string Title { get; set; } } } diff --git a/src/Stripe.net/Services/Tokens/TokenAccountIndividualVerificationAdditionalDocumentOptions.cs b/src/Stripe.net/Services/Tokens/TokenAccountIndividualVerificationAdditionalDocumentOptions.cs index 9bd44e1a6c..39cd345f28 100644 --- a/src/Stripe.net/Services/Tokens/TokenAccountIndividualVerificationAdditionalDocumentOptions.cs +++ b/src/Stripe.net/Services/Tokens/TokenAccountIndividualVerificationAdditionalDocumentOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TokenAccountIndividualVerificationAdditionalDocumentOptions : INestedOptions { @@ -12,6 +15,9 @@ public class TokenAccountIndividualVerificationAdditionalDocumentOptions : INest /// and less than 10 MB in size. /// [JsonProperty("back")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("back")] +#endif public string Back { get; set; } /// @@ -21,6 +27,9 @@ public class TokenAccountIndividualVerificationAdditionalDocumentOptions : INest /// and less than 10 MB in size. /// [JsonProperty("front")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("front")] +#endif public string Front { get; set; } } } diff --git a/src/Stripe.net/Services/Tokens/TokenAccountIndividualVerificationDocumentOptions.cs b/src/Stripe.net/Services/Tokens/TokenAccountIndividualVerificationDocumentOptions.cs index fa9508b8c7..a336bd9f66 100644 --- a/src/Stripe.net/Services/Tokens/TokenAccountIndividualVerificationDocumentOptions.cs +++ b/src/Stripe.net/Services/Tokens/TokenAccountIndividualVerificationDocumentOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TokenAccountIndividualVerificationDocumentOptions : INestedOptions { @@ -12,6 +15,9 @@ public class TokenAccountIndividualVerificationDocumentOptions : INestedOptions /// and less than 10 MB in size. /// [JsonProperty("back")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("back")] +#endif public string Back { get; set; } /// @@ -21,6 +27,9 @@ public class TokenAccountIndividualVerificationDocumentOptions : INestedOptions /// and less than 10 MB in size. /// [JsonProperty("front")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("front")] +#endif public string Front { get; set; } } } diff --git a/src/Stripe.net/Services/Tokens/TokenAccountIndividualVerificationOptions.cs b/src/Stripe.net/Services/Tokens/TokenAccountIndividualVerificationOptions.cs index 4fa7e4043d..51e2872797 100644 --- a/src/Stripe.net/Services/Tokens/TokenAccountIndividualVerificationOptions.cs +++ b/src/Stripe.net/Services/Tokens/TokenAccountIndividualVerificationOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TokenAccountIndividualVerificationOptions : INestedOptions { @@ -10,12 +13,18 @@ public class TokenAccountIndividualVerificationOptions : INestedOptions /// well-known utility company. /// [JsonProperty("additional_document")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("additional_document")] +#endif public TokenAccountIndividualVerificationAdditionalDocumentOptions AdditionalDocument { get; set; } /// /// An identifying document, either a passport or local ID card. /// [JsonProperty("document")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("document")] +#endif public TokenAccountIndividualVerificationDocumentOptions Document { get; set; } } } diff --git a/src/Stripe.net/Services/Tokens/TokenAccountOptions.cs b/src/Stripe.net/Services/Tokens/TokenAccountOptions.cs index cb09e863f0..000a5f56d8 100644 --- a/src/Stripe.net/Services/Tokens/TokenAccountOptions.cs +++ b/src/Stripe.net/Services/Tokens/TokenAccountOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TokenAccountOptions : INestedOptions { @@ -11,18 +14,27 @@ public class TokenAccountOptions : INestedOptions /// non_profit. /// [JsonProperty("business_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("business_type")] +#endif public string BusinessType { get; set; } /// /// Information about the company or business. /// [JsonProperty("company")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("company")] +#endif public TokenAccountCompanyOptions Company { get; set; } /// /// Information about the person represented by the account. /// [JsonProperty("individual")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("individual")] +#endif public TokenAccountIndividualOptions Individual { get; set; } /// @@ -32,6 +44,9 @@ public class TokenAccountOptions : INestedOptions /// Connect account, this value must be true. /// [JsonProperty("tos_shown_and_accepted")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tos_shown_and_accepted")] +#endif public bool? TosShownAndAccepted { get; set; } } } diff --git a/src/Stripe.net/Services/Tokens/TokenBankAccountOptions.cs b/src/Stripe.net/Services/Tokens/TokenBankAccountOptions.cs index d2085129db..348c30603a 100644 --- a/src/Stripe.net/Services/Tokens/TokenBankAccountOptions.cs +++ b/src/Stripe.net/Services/Tokens/TokenBankAccountOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TokenBankAccountOptions : INestedOptions { @@ -10,6 +13,9 @@ public class TokenBankAccountOptions : INestedOptions /// when attaching the bank account to a Customer object. /// [JsonProperty("account_holder_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_holder_name")] +#endif public string AccountHolderName { get; set; } /// @@ -19,12 +25,18 @@ public class TokenBankAccountOptions : INestedOptions /// One of: company, or individual. /// [JsonProperty("account_holder_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_holder_type")] +#endif public string AccountHolderType { get; set; } /// /// The account number for the bank account, in string form. Must be a checking account. /// [JsonProperty("account_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_number")] +#endif public string AccountNumber { get; set; } /// @@ -33,12 +45,18 @@ public class TokenBankAccountOptions : INestedOptions /// One of: checking, futsu, savings, or toza. /// [JsonProperty("account_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_type")] +#endif public string AccountType { get; set; } /// /// The country in which the bank account is located. /// [JsonProperty("country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country")] +#endif public string Country { get; set; } /// @@ -46,6 +64,9 @@ public class TokenBankAccountOptions : INestedOptions /// href="https://stripe.com/docs/payouts">Stripe supports.. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// @@ -59,6 +80,9 @@ public class TokenBankAccountOptions : INestedOptions /// attach_to_self=true. /// [JsonProperty("payment_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method")] +#endif public string PaymentMethod { get; set; } /// @@ -68,6 +92,9 @@ public class TokenBankAccountOptions : INestedOptions /// account_number, this field is not required. /// [JsonProperty("routing_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("routing_number")] +#endif public string RoutingNumber { get; set; } } } diff --git a/src/Stripe.net/Services/Tokens/TokenCardNetworksOptions.cs b/src/Stripe.net/Services/Tokens/TokenCardNetworksOptions.cs index 893592fdae..58b1f3a9d4 100644 --- a/src/Stripe.net/Services/Tokens/TokenCardNetworksOptions.cs +++ b/src/Stripe.net/Services/Tokens/TokenCardNetworksOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TokenCardNetworksOptions : INestedOptions { @@ -12,6 +15,9 @@ public class TokenCardNetworksOptions : INestedOptions /// One of: cartes_bancaires, mastercard, or visa. /// [JsonProperty("preferred")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("preferred")] +#endif public string Preferred { get; set; } } } diff --git a/src/Stripe.net/Services/Tokens/TokenCardOptions.cs b/src/Stripe.net/Services/Tokens/TokenCardOptions.cs index 4839d720cc..a3ff3706ff 100644 --- a/src/Stripe.net/Services/Tokens/TokenCardOptions.cs +++ b/src/Stripe.net/Services/Tokens/TokenCardOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TokenCardOptions : INestedOptions { @@ -9,36 +12,54 @@ public class TokenCardOptions : INestedOptions /// City / District / Suburb / Town / Village. /// [JsonProperty("address_city")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_city")] +#endif public string AddressCity { get; set; } /// /// Billing address country, if provided. /// [JsonProperty("address_country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_country")] +#endif public string AddressCountry { get; set; } /// /// Address line 1 (Street address / PO Box / Company name). /// [JsonProperty("address_line1")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_line1")] +#endif public string AddressLine1 { get; set; } /// /// Address line 2 (Apartment / Suite / Unit / Building). /// [JsonProperty("address_line2")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_line2")] +#endif public string AddressLine2 { get; set; } /// /// State / County / Province / Region. /// [JsonProperty("address_state")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_state")] +#endif public string AddressState { get; set; } /// /// ZIP or postal code. /// [JsonProperty("address_zip")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_zip")] +#endif public string AddressZip { get; set; } /// @@ -47,42 +68,63 @@ public class TokenCardOptions : INestedOptions /// a transfer destination for funds in this currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// /// Card security code. Highly recommended to always include this value. /// [JsonProperty("cvc")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cvc")] +#endif public string Cvc { get; set; } /// /// Two-digit number representing the card's expiration month. /// [JsonProperty("exp_month")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("exp_month")] +#endif public string ExpMonth { get; set; } /// /// Two- or four-digit number representing the card's expiration year. /// [JsonProperty("exp_year")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("exp_year")] +#endif public string ExpYear { get; set; } /// /// Cardholder's full name. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } /// /// Contains information about card networks used to process the payment. /// [JsonProperty("networks")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("networks")] +#endif public TokenCardNetworksOptions Networks { get; set; } /// /// The card number, as a string without any separators. /// [JsonProperty("number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("number")] +#endif public string Number { get; set; } } } diff --git a/src/Stripe.net/Services/Tokens/TokenCreateOptions.cs b/src/Stripe.net/Services/Tokens/TokenCreateOptions.cs index 9f3c96f073..d553a0d813 100644 --- a/src/Stripe.net/Services/Tokens/TokenCreateOptions.cs +++ b/src/Stripe.net/Services/Tokens/TokenCreateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TokenCreateOptions : BaseOptions { @@ -10,6 +13,9 @@ public class TokenCreateOptions : BaseOptions /// Information for the account this token represents. /// [JsonProperty("account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account")] +#endif public TokenAccountOptions Account { get; set; } /// @@ -17,6 +23,10 @@ public class TokenCreateOptions : BaseOptions /// [JsonProperty("bank_account")] [JsonConverter(typeof(AnyOfConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_account")] + [STJS.JsonConverter(typeof(STJAnyOfConverter))] +#endif public AnyOf BankAccount { get; set; } /// @@ -27,6 +37,10 @@ public class TokenCreateOptions : BaseOptions /// [JsonProperty("card")] [JsonConverter(typeof(AnyOfConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card")] + [STJS.JsonConverter(typeof(STJAnyOfConverter))] +#endif public AnyOf Card { get; set; } /// @@ -39,24 +53,36 @@ public class TokenCreateOptions : BaseOptions /// payment methods. /// [JsonProperty("customer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] +#endif public string Customer { get; set; } /// /// The updated CVC value this token represents. /// [JsonProperty("cvc_update")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cvc_update")] +#endif public TokenCvcUpdateOptions CvcUpdate { get; set; } /// /// Information for the person this token represents. /// [JsonProperty("person")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("person")] +#endif public TokenPersonOptions Person { get; set; } /// /// The PII this token represents. /// [JsonProperty("pii")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("pii")] +#endif public TokenPiiOptions Pii { get; set; } } } diff --git a/src/Stripe.net/Services/Tokens/TokenCvcUpdateOptions.cs b/src/Stripe.net/Services/Tokens/TokenCvcUpdateOptions.cs index 3158f69356..70773ac2f9 100644 --- a/src/Stripe.net/Services/Tokens/TokenCvcUpdateOptions.cs +++ b/src/Stripe.net/Services/Tokens/TokenCvcUpdateOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TokenCvcUpdateOptions : INestedOptions { @@ -9,6 +12,9 @@ public class TokenCvcUpdateOptions : INestedOptions /// The CVC value, in string form. /// [JsonProperty("cvc")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cvc")] +#endif public string Cvc { get; set; } } } diff --git a/src/Stripe.net/Services/Tokens/TokenPersonAdditionalTosAcceptancesAccountOptions.cs b/src/Stripe.net/Services/Tokens/TokenPersonAdditionalTosAcceptancesAccountOptions.cs index 16e98ddecc..ace85ba4b2 100644 --- a/src/Stripe.net/Services/Tokens/TokenPersonAdditionalTosAcceptancesAccountOptions.cs +++ b/src/Stripe.net/Services/Tokens/TokenPersonAdditionalTosAcceptancesAccountOptions.cs @@ -4,6 +4,9 @@ namespace Stripe using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TokenPersonAdditionalTosAcceptancesAccountOptions : INestedOptions { @@ -13,12 +16,19 @@ public class TokenPersonAdditionalTosAcceptancesAccountOptions : INestedOptions /// [JsonProperty("date")] [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("date")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif public DateTime? Date { get; set; } /// /// The IP address from which the account representative accepted the service agreement. /// [JsonProperty("ip")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ip")] +#endif public string Ip { get; set; } /// @@ -26,6 +36,9 @@ public class TokenPersonAdditionalTosAcceptancesAccountOptions : INestedOptions /// agreement. /// [JsonProperty("user_agent")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("user_agent")] +#endif public string UserAgent { get; set; } } } diff --git a/src/Stripe.net/Services/Tokens/TokenPersonAdditionalTosAcceptancesOptions.cs b/src/Stripe.net/Services/Tokens/TokenPersonAdditionalTosAcceptancesOptions.cs index 66d28cd2fd..1b647cf708 100644 --- a/src/Stripe.net/Services/Tokens/TokenPersonAdditionalTosAcceptancesOptions.cs +++ b/src/Stripe.net/Services/Tokens/TokenPersonAdditionalTosAcceptancesOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TokenPersonAdditionalTosAcceptancesOptions : INestedOptions { @@ -9,6 +12,9 @@ public class TokenPersonAdditionalTosAcceptancesOptions : INestedOptions /// Details on the legal guardian's acceptance of the main Stripe service agreement. /// [JsonProperty("account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account")] +#endif public TokenPersonAdditionalTosAcceptancesAccountOptions Account { get; set; } } } diff --git a/src/Stripe.net/Services/Tokens/TokenPersonDocumentsCompanyAuthorizationOptions.cs b/src/Stripe.net/Services/Tokens/TokenPersonDocumentsCompanyAuthorizationOptions.cs index 4e682cc5c7..1655dfe2e8 100644 --- a/src/Stripe.net/Services/Tokens/TokenPersonDocumentsCompanyAuthorizationOptions.cs +++ b/src/Stripe.net/Services/Tokens/TokenPersonDocumentsCompanyAuthorizationOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TokenPersonDocumentsCompanyAuthorizationOptions : INestedOptions { @@ -12,6 +15,9 @@ public class TokenPersonDocumentsCompanyAuthorizationOptions : INestedOptions /// value of account_requirement. /// [JsonProperty("files")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("files")] +#endif public List Files { get; set; } } } diff --git a/src/Stripe.net/Services/Tokens/TokenPersonDocumentsOptions.cs b/src/Stripe.net/Services/Tokens/TokenPersonDocumentsOptions.cs index 466813571d..7ac03c7ea8 100644 --- a/src/Stripe.net/Services/Tokens/TokenPersonDocumentsOptions.cs +++ b/src/Stripe.net/Services/Tokens/TokenPersonDocumentsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TokenPersonDocumentsOptions : INestedOptions { @@ -10,12 +13,18 @@ public class TokenPersonDocumentsOptions : INestedOptions /// the company. /// [JsonProperty("company_authorization")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("company_authorization")] +#endif public TokenPersonDocumentsCompanyAuthorizationOptions CompanyAuthorization { get; set; } /// /// One or more documents showing the person's passport page with photo and personal data. /// [JsonProperty("passport")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("passport")] +#endif public TokenPersonDocumentsPassportOptions Passport { get; set; } /// @@ -23,6 +32,9 @@ public class TokenPersonDocumentsOptions : INestedOptions /// they are residing. /// [JsonProperty("visa")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("visa")] +#endif public TokenPersonDocumentsVisaOptions Visa { get; set; } } } diff --git a/src/Stripe.net/Services/Tokens/TokenPersonDocumentsPassportOptions.cs b/src/Stripe.net/Services/Tokens/TokenPersonDocumentsPassportOptions.cs index ef744f7b63..6df85d7720 100644 --- a/src/Stripe.net/Services/Tokens/TokenPersonDocumentsPassportOptions.cs +++ b/src/Stripe.net/Services/Tokens/TokenPersonDocumentsPassportOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TokenPersonDocumentsPassportOptions : INestedOptions { @@ -12,6 +15,9 @@ public class TokenPersonDocumentsPassportOptions : INestedOptions /// value of account_requirement. /// [JsonProperty("files")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("files")] +#endif public List Files { get; set; } } } diff --git a/src/Stripe.net/Services/Tokens/TokenPersonDocumentsVisaOptions.cs b/src/Stripe.net/Services/Tokens/TokenPersonDocumentsVisaOptions.cs index 936e0173c9..2f0f1f500d 100644 --- a/src/Stripe.net/Services/Tokens/TokenPersonDocumentsVisaOptions.cs +++ b/src/Stripe.net/Services/Tokens/TokenPersonDocumentsVisaOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TokenPersonDocumentsVisaOptions : INestedOptions { @@ -12,6 +15,9 @@ public class TokenPersonDocumentsVisaOptions : INestedOptions /// value of account_requirement. /// [JsonProperty("files")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("files")] +#endif public List Files { get; set; } } } diff --git a/src/Stripe.net/Services/Tokens/TokenPersonOptions.cs b/src/Stripe.net/Services/Tokens/TokenPersonOptions.cs index dffba1945f..f0dc130029 100644 --- a/src/Stripe.net/Services/Tokens/TokenPersonOptions.cs +++ b/src/Stripe.net/Services/Tokens/TokenPersonOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TokenPersonOptions : INestedOptions, IHasMetadata { @@ -11,72 +14,108 @@ public class TokenPersonOptions : INestedOptions, IHasMetadata /// agreements. /// [JsonProperty("additional_tos_acceptances")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("additional_tos_acceptances")] +#endif public TokenPersonAdditionalTosAcceptancesOptions AdditionalTosAcceptances { get; set; } /// /// The person's address. /// [JsonProperty("address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address")] +#endif public AddressOptions Address { get; set; } /// /// The Kana variation of the person's address (Japan only). /// [JsonProperty("address_kana")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_kana")] +#endif public AddressJapanOptions AddressKana { get; set; } /// /// The Kanji variation of the person's address (Japan only). /// [JsonProperty("address_kanji")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address_kanji")] +#endif public AddressJapanOptions AddressKanji { get; set; } /// /// The person's date of birth. /// [JsonProperty("dob")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("dob")] +#endif public DobOptions Dob { get; set; } /// /// Documents that may be submitted to satisfy various informational requests. /// [JsonProperty("documents")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("documents")] +#endif public TokenPersonDocumentsOptions Documents { get; set; } /// /// The person's email address. /// [JsonProperty("email")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("email")] +#endif public string Email { get; set; } /// /// The person's first name. /// [JsonProperty("first_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("first_name")] +#endif public string FirstName { get; set; } /// /// The Kana variation of the person's first name (Japan only). /// [JsonProperty("first_name_kana")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("first_name_kana")] +#endif public string FirstNameKana { get; set; } /// /// The Kanji variation of the person's first name (Japan only). /// [JsonProperty("first_name_kanji")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("first_name_kanji")] +#endif public string FirstNameKanji { get; set; } /// /// A list of alternate names or aliases that the person is known by. /// [JsonProperty("full_name_aliases")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("full_name_aliases")] +#endif public List FullNameAliases { get; set; } /// /// The person's gender (International regulations require either "male" or "female"). /// [JsonProperty("gender")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("gender")] +#endif public string Gender { get; set; } /// @@ -87,6 +126,9 @@ public class TokenPersonOptions : INestedOptions, IHasMetadata /// Stripe.js. /// [JsonProperty("id_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id_number")] +#endif public string IdNumber { get; set; } /// @@ -97,30 +139,45 @@ public class TokenPersonOptions : INestedOptions, IHasMetadata /// Stripe.js. /// [JsonProperty("id_number_secondary")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id_number_secondary")] +#endif public string IdNumberSecondary { get; set; } /// /// The person's last name. /// [JsonProperty("last_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last_name")] +#endif public string LastName { get; set; } /// /// The Kana variation of the person's last name (Japan only). /// [JsonProperty("last_name_kana")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last_name_kana")] +#endif public string LastNameKana { get; set; } /// /// The Kanji variation of the person's last name (Japan only). /// [JsonProperty("last_name_kanji")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("last_name_kanji")] +#endif public string LastNameKanji { get; set; } /// /// The person's maiden name. /// [JsonProperty("maiden_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("maiden_name")] +#endif public string MaidenName { get; set; } /// @@ -130,6 +187,9 @@ public class TokenPersonOptions : INestedOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -138,12 +198,18 @@ public class TokenPersonOptions : INestedOptions, IHasMetadata /// if unavailable. /// [JsonProperty("nationality")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("nationality")] +#endif public string Nationality { get; set; } /// /// The person's phone number. /// [JsonProperty("phone")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("phone")] +#endif public string Phone { get; set; } /// @@ -152,30 +218,45 @@ public class TokenPersonOptions : INestedOptions, IHasMetadata /// function, in any jurisdiction. /// [JsonProperty("political_exposure")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("political_exposure")] +#endif public string PoliticalExposure { get; set; } /// /// The person's registered address. /// [JsonProperty("registered_address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("registered_address")] +#endif public AddressOptions RegisteredAddress { get; set; } /// /// The relationship that this person has with the account's legal entity. /// [JsonProperty("relationship")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("relationship")] +#endif public TokenPersonRelationshipOptions Relationship { get; set; } /// /// The last four digits of the person's Social Security number (U.S. only). /// [JsonProperty("ssn_last_4")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ssn_last_4")] +#endif public string SsnLast4 { get; set; } /// /// The person's verification status. /// [JsonProperty("verification")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("verification")] +#endif public TokenPersonVerificationOptions Verification { get; set; } } } diff --git a/src/Stripe.net/Services/Tokens/TokenPersonRelationshipOptions.cs b/src/Stripe.net/Services/Tokens/TokenPersonRelationshipOptions.cs index bae8e53255..e5945720c9 100644 --- a/src/Stripe.net/Services/Tokens/TokenPersonRelationshipOptions.cs +++ b/src/Stripe.net/Services/Tokens/TokenPersonRelationshipOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TokenPersonRelationshipOptions : INestedOptions { @@ -9,6 +12,9 @@ public class TokenPersonRelationshipOptions : INestedOptions /// Whether the person is the authorizer of the account's representative. /// [JsonProperty("authorizer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("authorizer")] +#endif public bool? Authorizer { get; set; } /// @@ -17,6 +23,9 @@ public class TokenPersonRelationshipOptions : INestedOptions /// meets its regulatory obligations. /// [JsonProperty("director")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("director")] +#endif public bool? Director { get; set; } /// @@ -24,24 +33,36 @@ public class TokenPersonRelationshipOptions : INestedOptions /// organization. /// [JsonProperty("executive")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("executive")] +#endif public bool? Executive { get; set; } /// /// Whether the person is the legal guardian of the account's representative. /// [JsonProperty("legal_guardian")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("legal_guardian")] +#endif public bool? LegalGuardian { get; set; } /// /// Whether the person is an owner of the account’s legal entity. /// [JsonProperty("owner")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("owner")] +#endif public bool? Owner { get; set; } /// /// The percent owned by the person of the account's legal entity. /// [JsonProperty("percent_ownership")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("percent_ownership")] +#endif public decimal? PercentOwnership { get; set; } /// @@ -52,12 +73,18 @@ public class TokenPersonRelationshipOptions : INestedOptions /// responsible for opening the account. /// [JsonProperty("representative")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("representative")] +#endif public bool? Representative { get; set; } /// /// The person's title (e.g., CEO, Support Engineer). /// [JsonProperty("title")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("title")] +#endif public string Title { get; set; } } } diff --git a/src/Stripe.net/Services/Tokens/TokenPersonVerificationAdditionalDocumentOptions.cs b/src/Stripe.net/Services/Tokens/TokenPersonVerificationAdditionalDocumentOptions.cs index 9e5887d6cf..7e27cf2bcc 100644 --- a/src/Stripe.net/Services/Tokens/TokenPersonVerificationAdditionalDocumentOptions.cs +++ b/src/Stripe.net/Services/Tokens/TokenPersonVerificationAdditionalDocumentOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TokenPersonVerificationAdditionalDocumentOptions : INestedOptions { @@ -12,6 +15,9 @@ public class TokenPersonVerificationAdditionalDocumentOptions : INestedOptions /// and less than 10 MB in size. /// [JsonProperty("back")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("back")] +#endif public string Back { get; set; } /// @@ -21,6 +27,9 @@ public class TokenPersonVerificationAdditionalDocumentOptions : INestedOptions /// and less than 10 MB in size. /// [JsonProperty("front")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("front")] +#endif public string Front { get; set; } } } diff --git a/src/Stripe.net/Services/Tokens/TokenPersonVerificationDocumentOptions.cs b/src/Stripe.net/Services/Tokens/TokenPersonVerificationDocumentOptions.cs index 6fc927305b..77f9df7733 100644 --- a/src/Stripe.net/Services/Tokens/TokenPersonVerificationDocumentOptions.cs +++ b/src/Stripe.net/Services/Tokens/TokenPersonVerificationDocumentOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TokenPersonVerificationDocumentOptions : INestedOptions { @@ -12,6 +15,9 @@ public class TokenPersonVerificationDocumentOptions : INestedOptions /// and less than 10 MB in size. /// [JsonProperty("back")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("back")] +#endif public string Back { get; set; } /// @@ -21,6 +27,9 @@ public class TokenPersonVerificationDocumentOptions : INestedOptions /// and less than 10 MB in size. /// [JsonProperty("front")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("front")] +#endif public string Front { get; set; } } } diff --git a/src/Stripe.net/Services/Tokens/TokenPersonVerificationOptions.cs b/src/Stripe.net/Services/Tokens/TokenPersonVerificationOptions.cs index e818903ac9..f915202fbb 100644 --- a/src/Stripe.net/Services/Tokens/TokenPersonVerificationOptions.cs +++ b/src/Stripe.net/Services/Tokens/TokenPersonVerificationOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TokenPersonVerificationOptions : INestedOptions { @@ -10,12 +13,18 @@ public class TokenPersonVerificationOptions : INestedOptions /// well-known utility company. /// [JsonProperty("additional_document")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("additional_document")] +#endif public TokenPersonVerificationAdditionalDocumentOptions AdditionalDocument { get; set; } /// /// An identifying document, either a passport or local ID card. /// [JsonProperty("document")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("document")] +#endif public TokenPersonVerificationDocumentOptions Document { get; set; } } } diff --git a/src/Stripe.net/Services/Tokens/TokenPiiOptions.cs b/src/Stripe.net/Services/Tokens/TokenPiiOptions.cs index 1d072cead5..a459715e60 100644 --- a/src/Stripe.net/Services/Tokens/TokenPiiOptions.cs +++ b/src/Stripe.net/Services/Tokens/TokenPiiOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TokenPiiOptions : INestedOptions { @@ -9,6 +12,9 @@ public class TokenPiiOptions : INestedOptions /// The id_number for the PII, in string form. /// [JsonProperty("id_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id_number")] +#endif public string IdNumber { get; set; } } } diff --git a/src/Stripe.net/Services/Topups/TopupCreateOptions.cs b/src/Stripe.net/Services/Topups/TopupCreateOptions.cs index d1d9adb1c8..f595309d02 100644 --- a/src/Stripe.net/Services/Topups/TopupCreateOptions.cs +++ b/src/Stripe.net/Services/Topups/TopupCreateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TopupCreateOptions : BaseOptions, IHasMetadata { @@ -10,6 +13,9 @@ public class TopupCreateOptions : BaseOptions, IHasMetadata /// A positive integer representing how much to transfer. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long? Amount { get; set; } /// @@ -18,12 +24,18 @@ public class TopupCreateOptions : BaseOptions, IHasMetadata /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// /// An arbitrary string attached to the object. Often useful for displaying to users. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// @@ -33,6 +45,9 @@ public class TopupCreateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -42,6 +57,9 @@ public class TopupCreateOptions : BaseOptions, IHasMetadata /// href="https://stripe.com/docs/connect/testing#testing-top-ups">Testing Top-ups). /// [JsonProperty("source")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("source")] +#endif public string Source { get; set; } /// @@ -49,12 +67,18 @@ public class TopupCreateOptions : BaseOptions, IHasMetadata /// characters. /// [JsonProperty("statement_descriptor")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("statement_descriptor")] +#endif public string StatementDescriptor { get; set; } /// /// A string that identifies this top-up as part of a group. /// [JsonProperty("transfer_group")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transfer_group")] +#endif public string TransferGroup { get; set; } } } diff --git a/src/Stripe.net/Services/Topups/TopupListOptions.cs b/src/Stripe.net/Services/Topups/TopupListOptions.cs index de10f96c01..d42d56c1bf 100644 --- a/src/Stripe.net/Services/Topups/TopupListOptions.cs +++ b/src/Stripe.net/Services/Topups/TopupListOptions.cs @@ -4,6 +4,9 @@ namespace Stripe using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TopupListOptions : ListOptionsWithCreated { @@ -12,6 +15,10 @@ public class TopupListOptions : ListOptionsWithCreated /// [JsonProperty("amount")] [JsonConverter(typeof(AnyOfConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] + [STJS.JsonConverter(typeof(STJAnyOfConverter))] +#endif public AnyOf Amount { get; set; } /// @@ -20,6 +27,9 @@ public class TopupListOptions : ListOptionsWithCreated /// One of: canceled, failed, pending, or succeeded. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } } } diff --git a/src/Stripe.net/Services/Topups/TopupUpdateOptions.cs b/src/Stripe.net/Services/Topups/TopupUpdateOptions.cs index 61f88fc166..8c8e16f3e7 100644 --- a/src/Stripe.net/Services/Topups/TopupUpdateOptions.cs +++ b/src/Stripe.net/Services/Topups/TopupUpdateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TopupUpdateOptions : BaseOptions, IHasMetadata { @@ -10,6 +13,9 @@ public class TopupUpdateOptions : BaseOptions, IHasMetadata /// An arbitrary string attached to the object. Often useful for displaying to users. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// @@ -19,6 +25,9 @@ public class TopupUpdateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } } } diff --git a/src/Stripe.net/Services/TransferReversals/TransferReversalCreateOptions.cs b/src/Stripe.net/Services/TransferReversals/TransferReversalCreateOptions.cs index 670dec1c08..0208527cad 100644 --- a/src/Stripe.net/Services/TransferReversals/TransferReversalCreateOptions.cs +++ b/src/Stripe.net/Services/TransferReversals/TransferReversalCreateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TransferReversalCreateOptions : BaseOptions, IHasMetadata { @@ -13,6 +16,9 @@ public class TransferReversalCreateOptions : BaseOptions, IHasMetadata /// to the entire transfer amount. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long? Amount { get; set; } /// @@ -20,6 +26,9 @@ public class TransferReversalCreateOptions : BaseOptions, IHasMetadata /// POST an empty value. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// @@ -29,6 +38,9 @@ public class TransferReversalCreateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -38,6 +50,9 @@ public class TransferReversalCreateOptions : BaseOptions, IHasMetadata /// the amount of the transfer reversed. /// [JsonProperty("refund_application_fee")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("refund_application_fee")] +#endif public bool? RefundApplicationFee { get; set; } } } diff --git a/src/Stripe.net/Services/TransferReversals/TransferReversalUpdateOptions.cs b/src/Stripe.net/Services/TransferReversals/TransferReversalUpdateOptions.cs index 380f1d1c57..8180197067 100644 --- a/src/Stripe.net/Services/TransferReversals/TransferReversalUpdateOptions.cs +++ b/src/Stripe.net/Services/TransferReversals/TransferReversalUpdateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TransferReversalUpdateOptions : BaseOptions, IHasMetadata { @@ -13,6 +16,9 @@ public class TransferReversalUpdateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } } } diff --git a/src/Stripe.net/Services/Transfers/TransferCreateOptions.cs b/src/Stripe.net/Services/Transfers/TransferCreateOptions.cs index fce7a879c3..0c0b220abc 100644 --- a/src/Stripe.net/Services/Transfers/TransferCreateOptions.cs +++ b/src/Stripe.net/Services/Transfers/TransferCreateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TransferCreateOptions : BaseOptions, IHasMetadata { @@ -10,6 +13,9 @@ public class TransferCreateOptions : BaseOptions, IHasMetadata /// A positive integer in cents (or local equivalent) representing how much to transfer. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long? Amount { get; set; } /// @@ -18,12 +24,18 @@ public class TransferCreateOptions : BaseOptions, IHasMetadata /// href="https://docs.stripe.com/currencies">supported currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// /// An arbitrary string attached to the object. Often useful for displaying to users. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// @@ -32,6 +44,9 @@ public class TransferCreateOptions : BaseOptions, IHasMetadata /// documentation for details. /// [JsonProperty("destination")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("destination")] +#endif public string Destination { get; set; } /// @@ -41,6 +56,9 @@ public class TransferCreateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -51,6 +69,9 @@ public class TransferCreateOptions : BaseOptions, IHasMetadata /// the Connect documentation for details. /// [JsonProperty("source_transaction")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("source_transaction")] +#endif public string SourceTransaction { get; set; } /// @@ -59,6 +80,9 @@ public class TransferCreateOptions : BaseOptions, IHasMetadata /// One of: bank_account, card, or fpx. /// [JsonProperty("source_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("source_type")] +#endif public string SourceType { get; set; } /// @@ -67,6 +91,9 @@ public class TransferCreateOptions : BaseOptions, IHasMetadata /// documentation for details. /// [JsonProperty("transfer_group")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transfer_group")] +#endif public string TransferGroup { get; set; } } } diff --git a/src/Stripe.net/Services/Transfers/TransferListOptions.cs b/src/Stripe.net/Services/Transfers/TransferListOptions.cs index 162773aae8..4a2148b63f 100644 --- a/src/Stripe.net/Services/Transfers/TransferListOptions.cs +++ b/src/Stripe.net/Services/Transfers/TransferListOptions.cs @@ -2,6 +2,9 @@ namespace Stripe { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TransferListOptions : ListOptionsWithCreated { @@ -9,12 +12,18 @@ public class TransferListOptions : ListOptionsWithCreated /// Only return transfers for the destination specified by this account ID. /// [JsonProperty("destination")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("destination")] +#endif public string Destination { get; set; } /// /// Only return transfers with the specified transfer group. /// [JsonProperty("transfer_group")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transfer_group")] +#endif public string TransferGroup { get; set; } } } diff --git a/src/Stripe.net/Services/Transfers/TransferUpdateOptions.cs b/src/Stripe.net/Services/Transfers/TransferUpdateOptions.cs index 44eb176f03..862c538923 100644 --- a/src/Stripe.net/Services/Transfers/TransferUpdateOptions.cs +++ b/src/Stripe.net/Services/Transfers/TransferUpdateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TransferUpdateOptions : BaseOptions, IHasMetadata { @@ -10,6 +13,9 @@ public class TransferUpdateOptions : BaseOptions, IHasMetadata /// An arbitrary string attached to the object. Often useful for displaying to users. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// @@ -19,6 +25,9 @@ public class TransferUpdateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } } } diff --git a/src/Stripe.net/Services/Treasury/CreditReversals/CreditReversalCreateOptions.cs b/src/Stripe.net/Services/Treasury/CreditReversals/CreditReversalCreateOptions.cs index 4e7453fdf1..2977928f14 100644 --- a/src/Stripe.net/Services/Treasury/CreditReversals/CreditReversalCreateOptions.cs +++ b/src/Stripe.net/Services/Treasury/CreditReversals/CreditReversalCreateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.Treasury { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CreditReversalCreateOptions : BaseOptions, IHasMetadata { @@ -13,12 +16,18 @@ public class CreditReversalCreateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// The ReceivedCredit to reverse. /// [JsonProperty("received_credit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("received_credit")] +#endif public string ReceivedCredit { get; set; } } } diff --git a/src/Stripe.net/Services/Treasury/CreditReversals/CreditReversalListOptions.cs b/src/Stripe.net/Services/Treasury/CreditReversals/CreditReversalListOptions.cs index 0b97863042..746c45a952 100644 --- a/src/Stripe.net/Services/Treasury/CreditReversals/CreditReversalListOptions.cs +++ b/src/Stripe.net/Services/Treasury/CreditReversals/CreditReversalListOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class CreditReversalListOptions : ListOptions { @@ -9,12 +12,18 @@ public class CreditReversalListOptions : ListOptions /// Returns objects associated with this FinancialAccount. /// [JsonProperty("financial_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("financial_account")] +#endif public string FinancialAccount { get; set; } /// /// Only return CreditReversals for the ReceivedCredit ID. /// [JsonProperty("received_credit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("received_credit")] +#endif public string ReceivedCredit { get; set; } /// @@ -22,6 +31,9 @@ public class CreditReversalListOptions : ListOptions /// One of: canceled, posted, or processing. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } } } diff --git a/src/Stripe.net/Services/Treasury/DebitReversals/DebitReversalCreateOptions.cs b/src/Stripe.net/Services/Treasury/DebitReversals/DebitReversalCreateOptions.cs index 38c8147291..7ead8e4805 100644 --- a/src/Stripe.net/Services/Treasury/DebitReversals/DebitReversalCreateOptions.cs +++ b/src/Stripe.net/Services/Treasury/DebitReversals/DebitReversalCreateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.Treasury { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class DebitReversalCreateOptions : BaseOptions, IHasMetadata { @@ -13,12 +16,18 @@ public class DebitReversalCreateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// The ReceivedDebit to reverse. /// [JsonProperty("received_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("received_debit")] +#endif public string ReceivedDebit { get; set; } } } diff --git a/src/Stripe.net/Services/Treasury/DebitReversals/DebitReversalListOptions.cs b/src/Stripe.net/Services/Treasury/DebitReversals/DebitReversalListOptions.cs index 51a7d37df0..ee699b611b 100644 --- a/src/Stripe.net/Services/Treasury/DebitReversals/DebitReversalListOptions.cs +++ b/src/Stripe.net/Services/Treasury/DebitReversals/DebitReversalListOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class DebitReversalListOptions : ListOptions { @@ -9,12 +12,18 @@ public class DebitReversalListOptions : ListOptions /// Returns objects associated with this FinancialAccount. /// [JsonProperty("financial_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("financial_account")] +#endif public string FinancialAccount { get; set; } /// /// Only return DebitReversals for the ReceivedDebit ID. /// [JsonProperty("received_debit")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("received_debit")] +#endif public string ReceivedDebit { get; set; } /// @@ -22,6 +31,9 @@ public class DebitReversalListOptions : ListOptions /// One of: lost, or won. /// [JsonProperty("resolution")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("resolution")] +#endif public string Resolution { get; set; } /// @@ -29,6 +41,9 @@ public class DebitReversalListOptions : ListOptions /// One of: canceled, completed, or processing. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } } } diff --git a/src/Stripe.net/Services/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesUpdateOptions.cs b/src/Stripe.net/Services/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesUpdateOptions.cs index 64a5a12352..21fb1f9c15 100644 --- a/src/Stripe.net/Services/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesUpdateOptions.cs +++ b/src/Stripe.net/Services/Treasury/FinancialAccountFeatures/FinancialAccountFeaturesUpdateOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class FinancialAccountFeaturesUpdateOptions : BaseOptions { @@ -10,6 +13,9 @@ public class FinancialAccountFeaturesUpdateOptions : BaseOptions /// attaching cards to and drawing funds from the FinancialAccount. /// [JsonProperty("card_issuing")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card_issuing")] +#endif public FinancialAccountFeaturesCardIssuingOptions CardIssuing { get; set; } /// @@ -17,12 +23,18 @@ public class FinancialAccountFeaturesUpdateOptions : BaseOptions /// factors determine the insurance amount. /// [JsonProperty("deposit_insurance")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("deposit_insurance")] +#endif public FinancialAccountFeaturesDepositInsuranceOptions DepositInsurance { get; set; } /// /// Contains Features that add FinancialAddresses to the FinancialAccount. /// [JsonProperty("financial_addresses")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("financial_addresses")] +#endif public FinancialAccountFeaturesFinancialAddressesOptions FinancialAddresses { get; set; } /// @@ -30,6 +42,9 @@ public class FinancialAccountFeaturesUpdateOptions : BaseOptions /// with the same owner. /// [JsonProperty("inbound_transfers")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("inbound_transfers")] +#endif public FinancialAccountFeaturesInboundTransfersOptions InboundTransfers { get; set; } /// @@ -37,6 +52,9 @@ public class FinancialAccountFeaturesUpdateOptions : BaseOptions /// other FinancialAccounts (for example, via OutboundPayment). /// [JsonProperty("intra_stripe_flows")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("intra_stripe_flows")] +#endif public FinancialAccountFeaturesIntraStripeFlowsOptions IntraStripeFlows { get; set; } /// @@ -44,6 +62,9 @@ public class FinancialAccountFeaturesUpdateOptions : BaseOptions /// someone else's bucket of money. /// [JsonProperty("outbound_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("outbound_payments")] +#endif public FinancialAccountFeaturesOutboundPaymentsOptions OutboundPayments { get; set; } /// @@ -51,6 +72,9 @@ public class FinancialAccountFeaturesUpdateOptions : BaseOptions /// another Account with the same owner. /// [JsonProperty("outbound_transfers")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("outbound_transfers")] +#endif public FinancialAccountFeaturesOutboundTransfersOptions OutboundTransfers { get; set; } } } diff --git a/src/Stripe.net/Services/Treasury/FinancialAccounts/FinancialAccountCreateOptions.cs b/src/Stripe.net/Services/Treasury/FinancialAccounts/FinancialAccountCreateOptions.cs index ee3e81b00d..714e1492b0 100644 --- a/src/Stripe.net/Services/Treasury/FinancialAccounts/FinancialAccountCreateOptions.cs +++ b/src/Stripe.net/Services/Treasury/FinancialAccounts/FinancialAccountCreateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.Treasury { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class FinancialAccountCreateOptions : BaseOptions, IHasMetadata { @@ -11,6 +14,9 @@ public class FinancialAccountCreateOptions : BaseOptions, IHasMetadata /// platform can control features via the requested field. /// [JsonProperty("features")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("features")] +#endif public FinancialAccountFeaturesOptions Features { get; set; } /// @@ -20,18 +26,27 @@ public class FinancialAccountCreateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// The set of functionalities that the platform can restrict on the FinancialAccount. /// [JsonProperty("platform_restrictions")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("platform_restrictions")] +#endif public FinancialAccountPlatformRestrictionsOptions PlatformRestrictions { get; set; } /// /// The currencies the FinancialAccount can hold a balance in. /// [JsonProperty("supported_currencies")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("supported_currencies")] +#endif public List SupportedCurrencies { get; set; } } } diff --git a/src/Stripe.net/Services/Treasury/FinancialAccounts/FinancialAccountFeaturesCardIssuingOptions.cs b/src/Stripe.net/Services/Treasury/FinancialAccounts/FinancialAccountFeaturesCardIssuingOptions.cs index 88072279ab..46ad4db5d3 100644 --- a/src/Stripe.net/Services/Treasury/FinancialAccounts/FinancialAccountFeaturesCardIssuingOptions.cs +++ b/src/Stripe.net/Services/Treasury/FinancialAccounts/FinancialAccountFeaturesCardIssuingOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class FinancialAccountFeaturesCardIssuingOptions : INestedOptions { @@ -9,6 +12,9 @@ public class FinancialAccountFeaturesCardIssuingOptions : INestedOptions /// Whether the FinancialAccount should have the Feature. /// [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif public bool? Requested { get; set; } } } diff --git a/src/Stripe.net/Services/Treasury/FinancialAccounts/FinancialAccountFeaturesDepositInsuranceOptions.cs b/src/Stripe.net/Services/Treasury/FinancialAccounts/FinancialAccountFeaturesDepositInsuranceOptions.cs index 830403e120..a768868603 100644 --- a/src/Stripe.net/Services/Treasury/FinancialAccounts/FinancialAccountFeaturesDepositInsuranceOptions.cs +++ b/src/Stripe.net/Services/Treasury/FinancialAccounts/FinancialAccountFeaturesDepositInsuranceOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class FinancialAccountFeaturesDepositInsuranceOptions : INestedOptions { @@ -9,6 +12,9 @@ public class FinancialAccountFeaturesDepositInsuranceOptions : INestedOptions /// Whether the FinancialAccount should have the Feature. /// [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif public bool? Requested { get; set; } } } diff --git a/src/Stripe.net/Services/Treasury/FinancialAccounts/FinancialAccountFeaturesFinancialAddressesAbaOptions.cs b/src/Stripe.net/Services/Treasury/FinancialAccounts/FinancialAccountFeaturesFinancialAddressesAbaOptions.cs index 990cc363e8..127e910247 100644 --- a/src/Stripe.net/Services/Treasury/FinancialAccounts/FinancialAccountFeaturesFinancialAddressesAbaOptions.cs +++ b/src/Stripe.net/Services/Treasury/FinancialAccounts/FinancialAccountFeaturesFinancialAddressesAbaOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class FinancialAccountFeaturesFinancialAddressesAbaOptions : INestedOptions { @@ -9,6 +12,9 @@ public class FinancialAccountFeaturesFinancialAddressesAbaOptions : INestedOptio /// Whether the FinancialAccount should have the Feature. /// [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif public bool? Requested { get; set; } } } diff --git a/src/Stripe.net/Services/Treasury/FinancialAccounts/FinancialAccountFeaturesFinancialAddressesOptions.cs b/src/Stripe.net/Services/Treasury/FinancialAccounts/FinancialAccountFeaturesFinancialAddressesOptions.cs index b69229af83..8432dc5b08 100644 --- a/src/Stripe.net/Services/Treasury/FinancialAccounts/FinancialAccountFeaturesFinancialAddressesOptions.cs +++ b/src/Stripe.net/Services/Treasury/FinancialAccounts/FinancialAccountFeaturesFinancialAddressesOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class FinancialAccountFeaturesFinancialAddressesOptions : INestedOptions { @@ -9,6 +12,9 @@ public class FinancialAccountFeaturesFinancialAddressesOptions : INestedOptions /// Adds an ABA FinancialAddress to the FinancialAccount. /// [JsonProperty("aba")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("aba")] +#endif public FinancialAccountFeaturesFinancialAddressesAbaOptions Aba { get; set; } } } diff --git a/src/Stripe.net/Services/Treasury/FinancialAccounts/FinancialAccountFeaturesInboundTransfersAchOptions.cs b/src/Stripe.net/Services/Treasury/FinancialAccounts/FinancialAccountFeaturesInboundTransfersAchOptions.cs index b34e1b2444..bef31c721b 100644 --- a/src/Stripe.net/Services/Treasury/FinancialAccounts/FinancialAccountFeaturesInboundTransfersAchOptions.cs +++ b/src/Stripe.net/Services/Treasury/FinancialAccounts/FinancialAccountFeaturesInboundTransfersAchOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class FinancialAccountFeaturesInboundTransfersAchOptions : INestedOptions { @@ -9,6 +12,9 @@ public class FinancialAccountFeaturesInboundTransfersAchOptions : INestedOptions /// Whether the FinancialAccount should have the Feature. /// [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif public bool? Requested { get; set; } } } diff --git a/src/Stripe.net/Services/Treasury/FinancialAccounts/FinancialAccountFeaturesInboundTransfersOptions.cs b/src/Stripe.net/Services/Treasury/FinancialAccounts/FinancialAccountFeaturesInboundTransfersOptions.cs index 62c1571ada..7202f3a00c 100644 --- a/src/Stripe.net/Services/Treasury/FinancialAccounts/FinancialAccountFeaturesInboundTransfersOptions.cs +++ b/src/Stripe.net/Services/Treasury/FinancialAccounts/FinancialAccountFeaturesInboundTransfersOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class FinancialAccountFeaturesInboundTransfersOptions : INestedOptions { @@ -9,6 +12,9 @@ public class FinancialAccountFeaturesInboundTransfersOptions : INestedOptions /// Enables ACH Debits via the InboundTransfers API. /// [JsonProperty("ach")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ach")] +#endif public FinancialAccountFeaturesInboundTransfersAchOptions Ach { get; set; } } } diff --git a/src/Stripe.net/Services/Treasury/FinancialAccounts/FinancialAccountFeaturesIntraStripeFlowsOptions.cs b/src/Stripe.net/Services/Treasury/FinancialAccounts/FinancialAccountFeaturesIntraStripeFlowsOptions.cs index 50faeb4adc..7565d0b4d7 100644 --- a/src/Stripe.net/Services/Treasury/FinancialAccounts/FinancialAccountFeaturesIntraStripeFlowsOptions.cs +++ b/src/Stripe.net/Services/Treasury/FinancialAccounts/FinancialAccountFeaturesIntraStripeFlowsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class FinancialAccountFeaturesIntraStripeFlowsOptions : INestedOptions { @@ -9,6 +12,9 @@ public class FinancialAccountFeaturesIntraStripeFlowsOptions : INestedOptions /// Whether the FinancialAccount should have the Feature. /// [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif public bool? Requested { get; set; } } } diff --git a/src/Stripe.net/Services/Treasury/FinancialAccounts/FinancialAccountFeaturesOptions.cs b/src/Stripe.net/Services/Treasury/FinancialAccounts/FinancialAccountFeaturesOptions.cs index 5aa88dee99..799f9fb52d 100644 --- a/src/Stripe.net/Services/Treasury/FinancialAccounts/FinancialAccountFeaturesOptions.cs +++ b/src/Stripe.net/Services/Treasury/FinancialAccounts/FinancialAccountFeaturesOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class FinancialAccountFeaturesOptions : INestedOptions { @@ -10,6 +13,9 @@ public class FinancialAccountFeaturesOptions : INestedOptions /// attaching cards to and drawing funds from the FinancialAccount. /// [JsonProperty("card_issuing")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card_issuing")] +#endif public FinancialAccountFeaturesCardIssuingOptions CardIssuing { get; set; } /// @@ -17,12 +23,18 @@ public class FinancialAccountFeaturesOptions : INestedOptions /// factors determine the insurance amount. /// [JsonProperty("deposit_insurance")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("deposit_insurance")] +#endif public FinancialAccountFeaturesDepositInsuranceOptions DepositInsurance { get; set; } /// /// Contains Features that add FinancialAddresses to the FinancialAccount. /// [JsonProperty("financial_addresses")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("financial_addresses")] +#endif public FinancialAccountFeaturesFinancialAddressesOptions FinancialAddresses { get; set; } /// @@ -30,6 +42,9 @@ public class FinancialAccountFeaturesOptions : INestedOptions /// with the same owner. /// [JsonProperty("inbound_transfers")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("inbound_transfers")] +#endif public FinancialAccountFeaturesInboundTransfersOptions InboundTransfers { get; set; } /// @@ -37,6 +52,9 @@ public class FinancialAccountFeaturesOptions : INestedOptions /// other FinancialAccounts (for example, via OutboundPayment). /// [JsonProperty("intra_stripe_flows")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("intra_stripe_flows")] +#endif public FinancialAccountFeaturesIntraStripeFlowsOptions IntraStripeFlows { get; set; } /// @@ -44,6 +62,9 @@ public class FinancialAccountFeaturesOptions : INestedOptions /// someone else's bucket of money. /// [JsonProperty("outbound_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("outbound_payments")] +#endif public FinancialAccountFeaturesOutboundPaymentsOptions OutboundPayments { get; set; } /// @@ -51,6 +72,9 @@ public class FinancialAccountFeaturesOptions : INestedOptions /// another Account with the same owner. /// [JsonProperty("outbound_transfers")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("outbound_transfers")] +#endif public FinancialAccountFeaturesOutboundTransfersOptions OutboundTransfers { get; set; } } } diff --git a/src/Stripe.net/Services/Treasury/FinancialAccounts/FinancialAccountFeaturesOutboundPaymentsAchOptions.cs b/src/Stripe.net/Services/Treasury/FinancialAccounts/FinancialAccountFeaturesOutboundPaymentsAchOptions.cs index 714b1745d0..88b41266c0 100644 --- a/src/Stripe.net/Services/Treasury/FinancialAccounts/FinancialAccountFeaturesOutboundPaymentsAchOptions.cs +++ b/src/Stripe.net/Services/Treasury/FinancialAccounts/FinancialAccountFeaturesOutboundPaymentsAchOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class FinancialAccountFeaturesOutboundPaymentsAchOptions : INestedOptions { @@ -9,6 +12,9 @@ public class FinancialAccountFeaturesOutboundPaymentsAchOptions : INestedOptions /// Whether the FinancialAccount should have the Feature. /// [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif public bool? Requested { get; set; } } } diff --git a/src/Stripe.net/Services/Treasury/FinancialAccounts/FinancialAccountFeaturesOutboundPaymentsOptions.cs b/src/Stripe.net/Services/Treasury/FinancialAccounts/FinancialAccountFeaturesOutboundPaymentsOptions.cs index ef06af9432..0580b837b7 100644 --- a/src/Stripe.net/Services/Treasury/FinancialAccounts/FinancialAccountFeaturesOutboundPaymentsOptions.cs +++ b/src/Stripe.net/Services/Treasury/FinancialAccounts/FinancialAccountFeaturesOutboundPaymentsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class FinancialAccountFeaturesOutboundPaymentsOptions : INestedOptions { @@ -9,12 +12,18 @@ public class FinancialAccountFeaturesOutboundPaymentsOptions : INestedOptions /// Enables ACH transfers via the OutboundPayments API. /// [JsonProperty("ach")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ach")] +#endif public FinancialAccountFeaturesOutboundPaymentsAchOptions Ach { get; set; } /// /// Enables US domestic wire transfers via the OutboundPayments API. /// [JsonProperty("us_domestic_wire")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("us_domestic_wire")] +#endif public FinancialAccountFeaturesOutboundPaymentsUsDomesticWireOptions UsDomesticWire { get; set; } } } diff --git a/src/Stripe.net/Services/Treasury/FinancialAccounts/FinancialAccountFeaturesOutboundPaymentsUsDomesticWireOptions.cs b/src/Stripe.net/Services/Treasury/FinancialAccounts/FinancialAccountFeaturesOutboundPaymentsUsDomesticWireOptions.cs index 359e6ac425..055a13cd93 100644 --- a/src/Stripe.net/Services/Treasury/FinancialAccounts/FinancialAccountFeaturesOutboundPaymentsUsDomesticWireOptions.cs +++ b/src/Stripe.net/Services/Treasury/FinancialAccounts/FinancialAccountFeaturesOutboundPaymentsUsDomesticWireOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class FinancialAccountFeaturesOutboundPaymentsUsDomesticWireOptions : INestedOptions { @@ -9,6 +12,9 @@ public class FinancialAccountFeaturesOutboundPaymentsUsDomesticWireOptions : INe /// Whether the FinancialAccount should have the Feature. /// [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif public bool? Requested { get; set; } } } diff --git a/src/Stripe.net/Services/Treasury/FinancialAccounts/FinancialAccountFeaturesOutboundTransfersAchOptions.cs b/src/Stripe.net/Services/Treasury/FinancialAccounts/FinancialAccountFeaturesOutboundTransfersAchOptions.cs index 9e8432ce87..ca0ddbe2c7 100644 --- a/src/Stripe.net/Services/Treasury/FinancialAccounts/FinancialAccountFeaturesOutboundTransfersAchOptions.cs +++ b/src/Stripe.net/Services/Treasury/FinancialAccounts/FinancialAccountFeaturesOutboundTransfersAchOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class FinancialAccountFeaturesOutboundTransfersAchOptions : INestedOptions { @@ -9,6 +12,9 @@ public class FinancialAccountFeaturesOutboundTransfersAchOptions : INestedOption /// Whether the FinancialAccount should have the Feature. /// [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif public bool? Requested { get; set; } } } diff --git a/src/Stripe.net/Services/Treasury/FinancialAccounts/FinancialAccountFeaturesOutboundTransfersOptions.cs b/src/Stripe.net/Services/Treasury/FinancialAccounts/FinancialAccountFeaturesOutboundTransfersOptions.cs index 8bbe8b8294..cb7429ac17 100644 --- a/src/Stripe.net/Services/Treasury/FinancialAccounts/FinancialAccountFeaturesOutboundTransfersOptions.cs +++ b/src/Stripe.net/Services/Treasury/FinancialAccounts/FinancialAccountFeaturesOutboundTransfersOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class FinancialAccountFeaturesOutboundTransfersOptions : INestedOptions { @@ -9,12 +12,18 @@ public class FinancialAccountFeaturesOutboundTransfersOptions : INestedOptions /// Enables ACH transfers via the OutboundTransfers API. /// [JsonProperty("ach")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ach")] +#endif public FinancialAccountFeaturesOutboundTransfersAchOptions Ach { get; set; } /// /// Enables US domestic wire transfers via the OutboundTransfers API. /// [JsonProperty("us_domestic_wire")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("us_domestic_wire")] +#endif public FinancialAccountFeaturesOutboundTransfersUsDomesticWireOptions UsDomesticWire { get; set; } } } diff --git a/src/Stripe.net/Services/Treasury/FinancialAccounts/FinancialAccountFeaturesOutboundTransfersUsDomesticWireOptions.cs b/src/Stripe.net/Services/Treasury/FinancialAccounts/FinancialAccountFeaturesOutboundTransfersUsDomesticWireOptions.cs index a8155c7cd6..f266f00d89 100644 --- a/src/Stripe.net/Services/Treasury/FinancialAccounts/FinancialAccountFeaturesOutboundTransfersUsDomesticWireOptions.cs +++ b/src/Stripe.net/Services/Treasury/FinancialAccounts/FinancialAccountFeaturesOutboundTransfersUsDomesticWireOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class FinancialAccountFeaturesOutboundTransfersUsDomesticWireOptions : INestedOptions { @@ -9,6 +12,9 @@ public class FinancialAccountFeaturesOutboundTransfersUsDomesticWireOptions : IN /// Whether the FinancialAccount should have the Feature. /// [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif public bool? Requested { get; set; } } } diff --git a/src/Stripe.net/Services/Treasury/FinancialAccounts/FinancialAccountPlatformRestrictionsOptions.cs b/src/Stripe.net/Services/Treasury/FinancialAccounts/FinancialAccountPlatformRestrictionsOptions.cs index afdf264725..eab0224b8f 100644 --- a/src/Stripe.net/Services/Treasury/FinancialAccounts/FinancialAccountPlatformRestrictionsOptions.cs +++ b/src/Stripe.net/Services/Treasury/FinancialAccounts/FinancialAccountPlatformRestrictionsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class FinancialAccountPlatformRestrictionsOptions : INestedOptions { @@ -10,6 +13,9 @@ public class FinancialAccountPlatformRestrictionsOptions : INestedOptions /// One of: restricted, or unrestricted. /// [JsonProperty("inbound_flows")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("inbound_flows")] +#endif public string InboundFlows { get; set; } /// @@ -17,6 +23,9 @@ public class FinancialAccountPlatformRestrictionsOptions : INestedOptions /// One of: restricted, or unrestricted. /// [JsonProperty("outbound_flows")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("outbound_flows")] +#endif public string OutboundFlows { get; set; } } } diff --git a/src/Stripe.net/Services/Treasury/FinancialAccounts/FinancialAccountUpdateOptions.cs b/src/Stripe.net/Services/Treasury/FinancialAccounts/FinancialAccountUpdateOptions.cs index 5d03358ab6..89261aac56 100644 --- a/src/Stripe.net/Services/Treasury/FinancialAccounts/FinancialAccountUpdateOptions.cs +++ b/src/Stripe.net/Services/Treasury/FinancialAccounts/FinancialAccountUpdateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.Treasury { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class FinancialAccountUpdateOptions : BaseOptions, IHasMetadata { @@ -12,6 +15,9 @@ public class FinancialAccountUpdateOptions : BaseOptions, IHasMetadata /// via the requested field. /// [JsonProperty("features")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("features")] +#endif public FinancialAccountFeaturesOptions Features { get; set; } /// @@ -21,12 +27,18 @@ public class FinancialAccountUpdateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// The set of functionalities that the platform can restrict on the FinancialAccount. /// [JsonProperty("platform_restrictions")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("platform_restrictions")] +#endif public FinancialAccountPlatformRestrictionsOptions PlatformRestrictions { get; set; } } } diff --git a/src/Stripe.net/Services/Treasury/InboundTransfers/InboundTransferCreateOptions.cs b/src/Stripe.net/Services/Treasury/InboundTransfers/InboundTransferCreateOptions.cs index 8c06b240a1..cd490d3043 100644 --- a/src/Stripe.net/Services/Treasury/InboundTransfers/InboundTransferCreateOptions.cs +++ b/src/Stripe.net/Services/Treasury/InboundTransfers/InboundTransferCreateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.Treasury { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InboundTransferCreateOptions : BaseOptions, IHasMetadata { @@ -10,6 +13,9 @@ public class InboundTransferCreateOptions : BaseOptions, IHasMetadata /// Amount (in cents) to be transferred. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long? Amount { get; set; } /// @@ -18,18 +24,27 @@ public class InboundTransferCreateOptions : BaseOptions, IHasMetadata /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// /// An arbitrary string attached to the object. Often useful for displaying to users. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// /// The FinancialAccount to send funds to. /// [JsonProperty("financial_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("financial_account")] +#endif public string FinancialAccount { get; set; } /// @@ -39,12 +54,18 @@ public class InboundTransferCreateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// The origin payment method to be debited for the InboundTransfer. /// [JsonProperty("origin_payment_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("origin_payment_method")] +#endif public string OriginPaymentMethod { get; set; } /// @@ -52,6 +73,9 @@ public class InboundTransferCreateOptions : BaseOptions, IHasMetadata /// characters. /// [JsonProperty("statement_descriptor")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("statement_descriptor")] +#endif public string StatementDescriptor { get; set; } } } diff --git a/src/Stripe.net/Services/Treasury/InboundTransfers/InboundTransferListOptions.cs b/src/Stripe.net/Services/Treasury/InboundTransfers/InboundTransferListOptions.cs index 2e2da08296..2f48d2cc46 100644 --- a/src/Stripe.net/Services/Treasury/InboundTransfers/InboundTransferListOptions.cs +++ b/src/Stripe.net/Services/Treasury/InboundTransfers/InboundTransferListOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class InboundTransferListOptions : ListOptions { @@ -9,6 +12,9 @@ public class InboundTransferListOptions : ListOptions /// Returns objects associated with this FinancialAccount. /// [JsonProperty("financial_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("financial_account")] +#endif public string FinancialAccount { get; set; } /// @@ -17,6 +23,9 @@ public class InboundTransferListOptions : ListOptions /// One of: canceled, failed, processing, or succeeded. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } } } diff --git a/src/Stripe.net/Services/Treasury/OutboundPayments/OutboundPaymentCreateOptions.cs b/src/Stripe.net/Services/Treasury/OutboundPayments/OutboundPaymentCreateOptions.cs index 4a3f30f915..a2565c901a 100644 --- a/src/Stripe.net/Services/Treasury/OutboundPayments/OutboundPaymentCreateOptions.cs +++ b/src/Stripe.net/Services/Treasury/OutboundPayments/OutboundPaymentCreateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.Treasury { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class OutboundPaymentCreateOptions : BaseOptions, IHasMetadata { @@ -10,6 +13,9 @@ public class OutboundPaymentCreateOptions : BaseOptions, IHasMetadata /// Amount (in cents) to be transferred. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long? Amount { get; set; } /// @@ -18,6 +24,9 @@ public class OutboundPaymentCreateOptions : BaseOptions, IHasMetadata /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// @@ -25,12 +34,18 @@ public class OutboundPaymentCreateOptions : BaseOptions, IHasMetadata /// to the destination_payment_method passed in. /// [JsonProperty("customer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] +#endif public string Customer { get; set; } /// /// An arbitrary string attached to the object. Often useful for displaying to users. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// @@ -38,6 +53,9 @@ public class OutboundPaymentCreateOptions : BaseOptions, IHasMetadata /// with destination_payment_method_data. /// [JsonProperty("destination_payment_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("destination_payment_method")] +#endif public string DestinationPaymentMethod { get; set; } /// @@ -45,24 +63,36 @@ public class OutboundPaymentCreateOptions : BaseOptions, IHasMetadata /// with destination_payment_method. /// [JsonProperty("destination_payment_method_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("destination_payment_method_data")] +#endif public OutboundPaymentDestinationPaymentMethodDataOptions DestinationPaymentMethodData { get; set; } /// /// Payment method-specific configuration for this OutboundPayment. /// [JsonProperty("destination_payment_method_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("destination_payment_method_options")] +#endif public OutboundPaymentDestinationPaymentMethodOptionsOptions DestinationPaymentMethodOptions { get; set; } /// /// End user details. /// [JsonProperty("end_user_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("end_user_details")] +#endif public OutboundPaymentEndUserDetailsOptions EndUserDetails { get; set; } /// /// The FinancialAccount to pull funds from. /// [JsonProperty("financial_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("financial_account")] +#endif public string FinancialAccount { get; set; } /// @@ -72,6 +102,9 @@ public class OutboundPaymentCreateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -81,6 +114,9 @@ public class OutboundPaymentCreateOptions : BaseOptions, IHasMetadata /// stripe network transfers. The default value is "payment". /// [JsonProperty("statement_descriptor")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("statement_descriptor")] +#endif public string StatementDescriptor { get; set; } } } diff --git a/src/Stripe.net/Services/Treasury/OutboundPayments/OutboundPaymentDestinationPaymentMethodDataBillingDetailsOptions.cs b/src/Stripe.net/Services/Treasury/OutboundPayments/OutboundPaymentDestinationPaymentMethodDataBillingDetailsOptions.cs index 09b7a97452..91dad2b6bc 100644 --- a/src/Stripe.net/Services/Treasury/OutboundPayments/OutboundPaymentDestinationPaymentMethodDataBillingDetailsOptions.cs +++ b/src/Stripe.net/Services/Treasury/OutboundPayments/OutboundPaymentDestinationPaymentMethodDataBillingDetailsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class OutboundPaymentDestinationPaymentMethodDataBillingDetailsOptions : INestedOptions { @@ -9,24 +12,36 @@ public class OutboundPaymentDestinationPaymentMethodDataBillingDetailsOptions : /// Billing address. /// [JsonProperty("address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address")] +#endif public AddressOptions Address { get; set; } /// /// Email address. /// [JsonProperty("email")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("email")] +#endif public string Email { get; set; } /// /// Full name. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } /// /// Billing phone number (including extension). /// [JsonProperty("phone")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("phone")] +#endif public string Phone { get; set; } } } diff --git a/src/Stripe.net/Services/Treasury/OutboundPayments/OutboundPaymentDestinationPaymentMethodDataOptions.cs b/src/Stripe.net/Services/Treasury/OutboundPayments/OutboundPaymentDestinationPaymentMethodDataOptions.cs index 65f6506cbd..308d9b384b 100644 --- a/src/Stripe.net/Services/Treasury/OutboundPayments/OutboundPaymentDestinationPaymentMethodDataOptions.cs +++ b/src/Stripe.net/Services/Treasury/OutboundPayments/OutboundPaymentDestinationPaymentMethodDataOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.Treasury { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class OutboundPaymentDestinationPaymentMethodDataOptions : INestedOptions, IHasMetadata { @@ -11,6 +14,9 @@ public class OutboundPaymentDestinationPaymentMethodDataOptions : INestedOptions /// particular types of payment methods. /// [JsonProperty("billing_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_details")] +#endif public OutboundPaymentDestinationPaymentMethodDataBillingDetailsOptions BillingDetails { get; set; } /// @@ -18,6 +24,9 @@ public class OutboundPaymentDestinationPaymentMethodDataOptions : INestedOptions /// funds to. /// [JsonProperty("financial_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("financial_account")] +#endif public string FinancialAccount { get; set; } /// @@ -27,6 +36,9 @@ public class OutboundPaymentDestinationPaymentMethodDataOptions : INestedOptions /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -36,12 +48,18 @@ public class OutboundPaymentDestinationPaymentMethodDataOptions : INestedOptions /// One of: financial_account, or us_bank_account. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } /// /// Required hash if type is set to us_bank_account. /// [JsonProperty("us_bank_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("us_bank_account")] +#endif public OutboundPaymentDestinationPaymentMethodDataUsBankAccountOptions UsBankAccount { get; set; } } } diff --git a/src/Stripe.net/Services/Treasury/OutboundPayments/OutboundPaymentDestinationPaymentMethodDataUsBankAccountOptions.cs b/src/Stripe.net/Services/Treasury/OutboundPayments/OutboundPaymentDestinationPaymentMethodDataUsBankAccountOptions.cs index 5bf572e658..6a4506531e 100644 --- a/src/Stripe.net/Services/Treasury/OutboundPayments/OutboundPaymentDestinationPaymentMethodDataUsBankAccountOptions.cs +++ b/src/Stripe.net/Services/Treasury/OutboundPayments/OutboundPaymentDestinationPaymentMethodDataUsBankAccountOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class OutboundPaymentDestinationPaymentMethodDataUsBankAccountOptions : INestedOptions { @@ -10,12 +13,18 @@ public class OutboundPaymentDestinationPaymentMethodDataUsBankAccountOptions : I /// One of: company, or individual. /// [JsonProperty("account_holder_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_holder_type")] +#endif public string AccountHolderType { get; set; } /// /// Account number of the bank account. /// [JsonProperty("account_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_number")] +#endif public string AccountNumber { get; set; } /// @@ -23,18 +32,27 @@ public class OutboundPaymentDestinationPaymentMethodDataUsBankAccountOptions : I /// One of: checking, or savings. /// [JsonProperty("account_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_type")] +#endif public string AccountType { get; set; } /// /// The ID of a Financial Connections Account to use as a payment method. /// [JsonProperty("financial_connections_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("financial_connections_account")] +#endif public string FinancialConnectionsAccount { get; set; } /// /// Routing number of the bank account. /// [JsonProperty("routing_number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("routing_number")] +#endif public string RoutingNumber { get; set; } } } diff --git a/src/Stripe.net/Services/Treasury/OutboundPayments/OutboundPaymentDestinationPaymentMethodOptionsOptions.cs b/src/Stripe.net/Services/Treasury/OutboundPayments/OutboundPaymentDestinationPaymentMethodOptionsOptions.cs index c75344cfcf..1722c893e3 100644 --- a/src/Stripe.net/Services/Treasury/OutboundPayments/OutboundPaymentDestinationPaymentMethodOptionsOptions.cs +++ b/src/Stripe.net/Services/Treasury/OutboundPayments/OutboundPaymentDestinationPaymentMethodOptionsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class OutboundPaymentDestinationPaymentMethodOptionsOptions : INestedOptions { @@ -9,6 +12,9 @@ public class OutboundPaymentDestinationPaymentMethodOptionsOptions : INestedOpti /// Optional fields for us_bank_account. /// [JsonProperty("us_bank_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("us_bank_account")] +#endif public OutboundPaymentDestinationPaymentMethodOptionsUsBankAccountOptions UsBankAccount { get; set; } } } diff --git a/src/Stripe.net/Services/Treasury/OutboundPayments/OutboundPaymentDestinationPaymentMethodOptionsUsBankAccountOptions.cs b/src/Stripe.net/Services/Treasury/OutboundPayments/OutboundPaymentDestinationPaymentMethodOptionsUsBankAccountOptions.cs index 3fb282f112..392f79b950 100644 --- a/src/Stripe.net/Services/Treasury/OutboundPayments/OutboundPaymentDestinationPaymentMethodOptionsUsBankAccountOptions.cs +++ b/src/Stripe.net/Services/Treasury/OutboundPayments/OutboundPaymentDestinationPaymentMethodOptionsUsBankAccountOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class OutboundPaymentDestinationPaymentMethodOptionsUsBankAccountOptions : INestedOptions { @@ -13,6 +16,9 @@ public class OutboundPaymentDestinationPaymentMethodOptionsUsBankAccountOptions /// One of: ach, or us_domestic_wire. /// [JsonProperty("network")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("network")] +#endif public string Network { get; set; } } } diff --git a/src/Stripe.net/Services/Treasury/OutboundPayments/OutboundPaymentEndUserDetailsOptions.cs b/src/Stripe.net/Services/Treasury/OutboundPayments/OutboundPaymentEndUserDetailsOptions.cs index 16dc5438a0..0cda67c04e 100644 --- a/src/Stripe.net/Services/Treasury/OutboundPayments/OutboundPaymentEndUserDetailsOptions.cs +++ b/src/Stripe.net/Services/Treasury/OutboundPayments/OutboundPaymentEndUserDetailsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class OutboundPaymentEndUserDetailsOptions : INestedOptions { @@ -10,6 +13,9 @@ public class OutboundPaymentEndUserDetailsOptions : INestedOptions /// present is set to true. /// [JsonProperty("ip_address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ip_address")] +#endif public string IpAddress { get; set; } /// @@ -17,6 +23,9 @@ public class OutboundPaymentEndUserDetailsOptions : INestedOptions /// user by a platform. Otherwise, false. /// [JsonProperty("present")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("present")] +#endif public bool? Present { get; set; } } } diff --git a/src/Stripe.net/Services/Treasury/OutboundPayments/OutboundPaymentListOptions.cs b/src/Stripe.net/Services/Treasury/OutboundPayments/OutboundPaymentListOptions.cs index 6a1b64b4b2..166f7adac8 100644 --- a/src/Stripe.net/Services/Treasury/OutboundPayments/OutboundPaymentListOptions.cs +++ b/src/Stripe.net/Services/Treasury/OutboundPayments/OutboundPaymentListOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class OutboundPaymentListOptions : ListOptionsWithCreated { @@ -9,12 +12,18 @@ public class OutboundPaymentListOptions : ListOptionsWithCreated /// Only return OutboundPayments sent to this customer. /// [JsonProperty("customer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] +#endif public string Customer { get; set; } /// /// Returns objects associated with this FinancialAccount. /// [JsonProperty("financial_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("financial_account")] +#endif public string FinancialAccount { get; set; } /// @@ -24,6 +33,9 @@ public class OutboundPaymentListOptions : ListOptionsWithCreated /// returned. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } } } diff --git a/src/Stripe.net/Services/Treasury/OutboundTransfers/OutboundTransferCreateOptions.cs b/src/Stripe.net/Services/Treasury/OutboundTransfers/OutboundTransferCreateOptions.cs index a64d16cf08..ff9c4b8417 100644 --- a/src/Stripe.net/Services/Treasury/OutboundTransfers/OutboundTransferCreateOptions.cs +++ b/src/Stripe.net/Services/Treasury/OutboundTransfers/OutboundTransferCreateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.Treasury { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class OutboundTransferCreateOptions : BaseOptions, IHasMetadata { @@ -10,6 +13,9 @@ public class OutboundTransferCreateOptions : BaseOptions, IHasMetadata /// Amount (in cents) to be transferred. /// [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif public long? Amount { get; set; } /// @@ -18,30 +24,45 @@ public class OutboundTransferCreateOptions : BaseOptions, IHasMetadata /// currency. /// [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif public string Currency { get; set; } /// /// An arbitrary string attached to the object. Often useful for displaying to users. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// /// The PaymentMethod to use as the payment instrument for the OutboundTransfer. /// [JsonProperty("destination_payment_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("destination_payment_method")] +#endif public string DestinationPaymentMethod { get; set; } /// /// Hash describing payment method configuration details. /// [JsonProperty("destination_payment_method_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("destination_payment_method_options")] +#endif public OutboundTransferDestinationPaymentMethodOptionsOptions DestinationPaymentMethodOptions { get; set; } /// /// The FinancialAccount to pull funds from. /// [JsonProperty("financial_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("financial_account")] +#endif public string FinancialAccount { get; set; } /// @@ -51,6 +72,9 @@ public class OutboundTransferCreateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// @@ -59,6 +83,9 @@ public class OutboundTransferCreateOptions : BaseOptions, IHasMetadata /// transfers. The default value is "transfer". /// [JsonProperty("statement_descriptor")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("statement_descriptor")] +#endif public string StatementDescriptor { get; set; } } } diff --git a/src/Stripe.net/Services/Treasury/OutboundTransfers/OutboundTransferDestinationPaymentMethodOptionsOptions.cs b/src/Stripe.net/Services/Treasury/OutboundTransfers/OutboundTransferDestinationPaymentMethodOptionsOptions.cs index 12fd5ce614..cd8a7734f3 100644 --- a/src/Stripe.net/Services/Treasury/OutboundTransfers/OutboundTransferDestinationPaymentMethodOptionsOptions.cs +++ b/src/Stripe.net/Services/Treasury/OutboundTransfers/OutboundTransferDestinationPaymentMethodOptionsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class OutboundTransferDestinationPaymentMethodOptionsOptions : INestedOptions { @@ -9,6 +12,9 @@ public class OutboundTransferDestinationPaymentMethodOptionsOptions : INestedOpt /// Optional fields for us_bank_account. /// [JsonProperty("us_bank_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("us_bank_account")] +#endif public OutboundTransferDestinationPaymentMethodOptionsUsBankAccountOptions UsBankAccount { get; set; } } } diff --git a/src/Stripe.net/Services/Treasury/OutboundTransfers/OutboundTransferDestinationPaymentMethodOptionsUsBankAccountOptions.cs b/src/Stripe.net/Services/Treasury/OutboundTransfers/OutboundTransferDestinationPaymentMethodOptionsUsBankAccountOptions.cs index d5c1281acd..51a563c839 100644 --- a/src/Stripe.net/Services/Treasury/OutboundTransfers/OutboundTransferDestinationPaymentMethodOptionsUsBankAccountOptions.cs +++ b/src/Stripe.net/Services/Treasury/OutboundTransfers/OutboundTransferDestinationPaymentMethodOptionsUsBankAccountOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class OutboundTransferDestinationPaymentMethodOptionsUsBankAccountOptions : INestedOptions { @@ -13,6 +16,9 @@ public class OutboundTransferDestinationPaymentMethodOptionsUsBankAccountOptions /// One of: ach, or us_domestic_wire. /// [JsonProperty("network")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("network")] +#endif public string Network { get; set; } } } diff --git a/src/Stripe.net/Services/Treasury/OutboundTransfers/OutboundTransferListOptions.cs b/src/Stripe.net/Services/Treasury/OutboundTransfers/OutboundTransferListOptions.cs index 98c3b3c6f2..629f782a5f 100644 --- a/src/Stripe.net/Services/Treasury/OutboundTransfers/OutboundTransferListOptions.cs +++ b/src/Stripe.net/Services/Treasury/OutboundTransfers/OutboundTransferListOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class OutboundTransferListOptions : ListOptions { @@ -9,6 +12,9 @@ public class OutboundTransferListOptions : ListOptions /// Returns objects associated with this FinancialAccount. /// [JsonProperty("financial_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("financial_account")] +#endif public string FinancialAccount { get; set; } /// @@ -18,6 +24,9 @@ public class OutboundTransferListOptions : ListOptions /// returned. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } } } diff --git a/src/Stripe.net/Services/Treasury/ReceivedCredits/ReceivedCreditLinkedFlowsOptions.cs b/src/Stripe.net/Services/Treasury/ReceivedCredits/ReceivedCreditLinkedFlowsOptions.cs index a395824eb5..6ab64850d4 100644 --- a/src/Stripe.net/Services/Treasury/ReceivedCredits/ReceivedCreditLinkedFlowsOptions.cs +++ b/src/Stripe.net/Services/Treasury/ReceivedCredits/ReceivedCreditLinkedFlowsOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ReceivedCreditLinkedFlowsOptions : INestedOptions { @@ -10,6 +13,9 @@ public class ReceivedCreditLinkedFlowsOptions : INestedOptions /// One of: credit_reversal, other, outbound_payment, or payout. /// [JsonProperty("source_flow_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("source_flow_type")] +#endif public string SourceFlowType { get; set; } } } diff --git a/src/Stripe.net/Services/Treasury/ReceivedCredits/ReceivedCreditListOptions.cs b/src/Stripe.net/Services/Treasury/ReceivedCredits/ReceivedCreditListOptions.cs index bc14ad1673..cd6cc79a6b 100644 --- a/src/Stripe.net/Services/Treasury/ReceivedCredits/ReceivedCreditListOptions.cs +++ b/src/Stripe.net/Services/Treasury/ReceivedCredits/ReceivedCreditListOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ReceivedCreditListOptions : ListOptions { @@ -9,12 +12,18 @@ public class ReceivedCreditListOptions : ListOptions /// The FinancialAccount that received the funds. /// [JsonProperty("financial_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("financial_account")] +#endif public string FinancialAccount { get; set; } /// /// Only return ReceivedCredits described by the flow. /// [JsonProperty("linked_flows")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("linked_flows")] +#endif public ReceivedCreditLinkedFlowsOptions LinkedFlows { get; set; } /// @@ -23,6 +32,9 @@ public class ReceivedCreditListOptions : ListOptions /// One of: failed, or succeeded. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } } } diff --git a/src/Stripe.net/Services/Treasury/ReceivedDebits/ReceivedDebitListOptions.cs b/src/Stripe.net/Services/Treasury/ReceivedDebits/ReceivedDebitListOptions.cs index f918c802fd..1cc91ddd0d 100644 --- a/src/Stripe.net/Services/Treasury/ReceivedDebits/ReceivedDebitListOptions.cs +++ b/src/Stripe.net/Services/Treasury/ReceivedDebits/ReceivedDebitListOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class ReceivedDebitListOptions : ListOptions { @@ -9,6 +12,9 @@ public class ReceivedDebitListOptions : ListOptions /// The FinancialAccount that funds were pulled from. /// [JsonProperty("financial_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("financial_account")] +#endif public string FinancialAccount { get; set; } /// @@ -17,6 +23,9 @@ public class ReceivedDebitListOptions : ListOptions /// One of: failed, or succeeded. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } } } diff --git a/src/Stripe.net/Services/Treasury/TransactionEntries/TransactionEntryListOptions.cs b/src/Stripe.net/Services/Treasury/TransactionEntries/TransactionEntryListOptions.cs index 9851330184..b028838317 100644 --- a/src/Stripe.net/Services/Treasury/TransactionEntries/TransactionEntryListOptions.cs +++ b/src/Stripe.net/Services/Treasury/TransactionEntries/TransactionEntryListOptions.cs @@ -4,17 +4,27 @@ namespace Stripe.Treasury using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TransactionEntryListOptions : ListOptionsWithCreated { [JsonProperty("effective_at")] [JsonConverter(typeof(AnyOfConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("effective_at")] + [STJS.JsonConverter(typeof(STJAnyOfConverter))] +#endif public AnyOf EffectiveAt { get; set; } /// /// Returns objects associated with this FinancialAccount. /// [JsonProperty("financial_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("financial_account")] +#endif public string FinancialAccount { get; set; } /// @@ -23,12 +33,18 @@ public class TransactionEntryListOptions : ListOptionsWithCreated /// One of: created, or effective_at. /// [JsonProperty("order_by")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("order_by")] +#endif public string OrderBy { get; set; } /// /// Only return TransactionEntries associated with this Transaction. /// [JsonProperty("transaction")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transaction")] +#endif public string Transaction { get; set; } } } diff --git a/src/Stripe.net/Services/Treasury/Transactions/TransactionListOptions.cs b/src/Stripe.net/Services/Treasury/Transactions/TransactionListOptions.cs index f68b56dec2..2e47b8d46d 100644 --- a/src/Stripe.net/Services/Treasury/Transactions/TransactionListOptions.cs +++ b/src/Stripe.net/Services/Treasury/Transactions/TransactionListOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.Treasury { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TransactionListOptions : ListOptionsWithCreated { @@ -9,6 +12,9 @@ public class TransactionListOptions : ListOptionsWithCreated /// Returns objects associated with this FinancialAccount. /// [JsonProperty("financial_account")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("financial_account")] +#endif public string FinancialAccount { get; set; } /// @@ -17,6 +23,9 @@ public class TransactionListOptions : ListOptionsWithCreated /// One of: created, or posted_at. /// [JsonProperty("order_by")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("order_by")] +#endif public string OrderBy { get; set; } /// @@ -25,6 +34,9 @@ public class TransactionListOptions : ListOptionsWithCreated /// One of: open, posted, or void. /// [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif public string Status { get; set; } /// @@ -32,6 +44,9 @@ public class TransactionListOptions : ListOptionsWithCreated /// status=posted and order_by=posted_at must also be specified. /// [JsonProperty("status_transitions")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status_transitions")] +#endif public TransactionStatusTransitionsOptions StatusTransitions { get; set; } } } diff --git a/src/Stripe.net/Services/Treasury/Transactions/TransactionStatusTransitionsOptions.cs b/src/Stripe.net/Services/Treasury/Transactions/TransactionStatusTransitionsOptions.cs index 31ef21600f..3b9f49ae00 100644 --- a/src/Stripe.net/Services/Treasury/Transactions/TransactionStatusTransitionsOptions.cs +++ b/src/Stripe.net/Services/Treasury/Transactions/TransactionStatusTransitionsOptions.cs @@ -4,6 +4,9 @@ namespace Stripe.Treasury using System; using Newtonsoft.Json; using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class TransactionStatusTransitionsOptions : INestedOptions { @@ -12,6 +15,10 @@ public class TransactionStatusTransitionsOptions : INestedOptions /// [JsonProperty("posted_at")] [JsonConverter(typeof(AnyOfConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("posted_at")] + [STJS.JsonConverter(typeof(STJAnyOfConverter))] +#endif public AnyOf PostedAt { get; set; } } } diff --git a/src/Stripe.net/Services/V2/Billing/MeterEventAdjustments/MeterEventAdjustmentCreateCancelOptions.cs b/src/Stripe.net/Services/V2/Billing/MeterEventAdjustments/MeterEventAdjustmentCreateCancelOptions.cs index 087a4b1a9a..24e07a7a2d 100644 --- a/src/Stripe.net/Services/V2/Billing/MeterEventAdjustments/MeterEventAdjustmentCreateCancelOptions.cs +++ b/src/Stripe.net/Services/V2/Billing/MeterEventAdjustments/MeterEventAdjustmentCreateCancelOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.V2.Billing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class MeterEventAdjustmentCreateCancelOptions : INestedOptions { @@ -10,6 +13,9 @@ public class MeterEventAdjustmentCreateCancelOptions : INestedOptions /// receiving them. /// [JsonProperty("identifier")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("identifier")] +#endif public string Identifier { get; set; } } } diff --git a/src/Stripe.net/Services/V2/Billing/MeterEventAdjustments/MeterEventAdjustmentCreateOptions.cs b/src/Stripe.net/Services/V2/Billing/MeterEventAdjustments/MeterEventAdjustmentCreateOptions.cs index 586b25ef0a..d2a5ed62de 100644 --- a/src/Stripe.net/Services/V2/Billing/MeterEventAdjustments/MeterEventAdjustmentCreateOptions.cs +++ b/src/Stripe.net/Services/V2/Billing/MeterEventAdjustments/MeterEventAdjustmentCreateOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.V2.Billing { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class MeterEventAdjustmentCreateOptions : BaseOptions { @@ -9,12 +12,18 @@ public class MeterEventAdjustmentCreateOptions : BaseOptions /// Specifies which event to cancel. /// [JsonProperty("cancel")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cancel")] +#endif public MeterEventAdjustmentCreateCancelOptions Cancel { get; set; } /// /// The name of the meter event. Corresponds with the event_name field on a meter. /// [JsonProperty("event_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("event_name")] +#endif public string EventName { get; set; } /// @@ -22,6 +31,9 @@ public class MeterEventAdjustmentCreateOptions : BaseOptions /// period cancellation is not supported yet. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/V2/Billing/MeterEventStreams/MeterEventStreamCreateEventOptions.cs b/src/Stripe.net/Services/V2/Billing/MeterEventStreams/MeterEventStreamCreateEventOptions.cs index feb4c2f2a3..582ab7b34b 100644 --- a/src/Stripe.net/Services/V2/Billing/MeterEventStreams/MeterEventStreamCreateEventOptions.cs +++ b/src/Stripe.net/Services/V2/Billing/MeterEventStreams/MeterEventStreamCreateEventOptions.cs @@ -4,6 +4,9 @@ namespace Stripe.V2.Billing using System; using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class MeterEventStreamCreateEventOptions : INestedOptions { @@ -11,6 +14,9 @@ public class MeterEventStreamCreateEventOptions : INestedOptions /// The name of the meter event. Corresponds with the event_name field on a meter. /// [JsonProperty("event_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("event_name")] +#endif public string EventName { get; set; } /// @@ -19,6 +25,9 @@ public class MeterEventStreamCreateEventOptions : INestedOptions /// 24 hour period. /// [JsonProperty("identifier")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("identifier")] +#endif public string Identifier { get; set; } /// @@ -29,6 +38,9 @@ public class MeterEventStreamCreateEventOptions : INestedOptions /// href="https://docs.stripe.com/billing/subscriptions/usage-based/recording-usage#payload-key-overrides">payload. /// [JsonProperty("payload")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payload")] +#endif public Dictionary Payload { get; set; } /// @@ -36,6 +48,9 @@ public class MeterEventStreamCreateEventOptions : INestedOptions /// the future. Defaults to current timestamp if not specified. /// [JsonProperty("timestamp")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("timestamp")] +#endif public DateTime? Timestamp { get; set; } } } diff --git a/src/Stripe.net/Services/V2/Billing/MeterEventStreams/MeterEventStreamCreateOptions.cs b/src/Stripe.net/Services/V2/Billing/MeterEventStreams/MeterEventStreamCreateOptions.cs index 8d9c3fc445..e928d13fbd 100644 --- a/src/Stripe.net/Services/V2/Billing/MeterEventStreams/MeterEventStreamCreateOptions.cs +++ b/src/Stripe.net/Services/V2/Billing/MeterEventStreams/MeterEventStreamCreateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.V2.Billing { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class MeterEventStreamCreateOptions : BaseOptions { @@ -10,6 +13,9 @@ public class MeterEventStreamCreateOptions : BaseOptions /// List of meter events to include in the request. /// [JsonProperty("events")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("events")] +#endif public List Events { get; set; } } } diff --git a/src/Stripe.net/Services/V2/Billing/MeterEvents/MeterEventCreateOptions.cs b/src/Stripe.net/Services/V2/Billing/MeterEvents/MeterEventCreateOptions.cs index 379326bc75..8d0d267b0d 100644 --- a/src/Stripe.net/Services/V2/Billing/MeterEvents/MeterEventCreateOptions.cs +++ b/src/Stripe.net/Services/V2/Billing/MeterEvents/MeterEventCreateOptions.cs @@ -4,6 +4,9 @@ namespace Stripe.V2.Billing using System; using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class MeterEventCreateOptions : BaseOptions { @@ -11,6 +14,9 @@ public class MeterEventCreateOptions : BaseOptions /// The name of the meter event. Corresponds with the event_name field on a meter. /// [JsonProperty("event_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("event_name")] +#endif public string EventName { get; set; } /// @@ -19,6 +25,9 @@ public class MeterEventCreateOptions : BaseOptions /// 24 hour period. /// [JsonProperty("identifier")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("identifier")] +#endif public string Identifier { get; set; } /// @@ -29,6 +38,9 @@ public class MeterEventCreateOptions : BaseOptions /// href="https://docs.stripe.com/billing/subscriptions/usage-based/recording-usage#payload-key-overrides">payload. /// [JsonProperty("payload")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payload")] +#endif public Dictionary Payload { get; set; } /// @@ -36,6 +48,9 @@ public class MeterEventCreateOptions : BaseOptions /// the future. Defaults to current timestamp if not specified. /// [JsonProperty("timestamp")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("timestamp")] +#endif public DateTime? Timestamp { get; set; } } } diff --git a/src/Stripe.net/Services/V2/Core/EventDestinations/EventDestinationCreateAmazonEventbridgeOptions.cs b/src/Stripe.net/Services/V2/Core/EventDestinations/EventDestinationCreateAmazonEventbridgeOptions.cs index 6a1d4ac305..55fd764c58 100644 --- a/src/Stripe.net/Services/V2/Core/EventDestinations/EventDestinationCreateAmazonEventbridgeOptions.cs +++ b/src/Stripe.net/Services/V2/Core/EventDestinations/EventDestinationCreateAmazonEventbridgeOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.V2.Core { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class EventDestinationCreateAmazonEventbridgeOptions : INestedOptions { @@ -9,12 +12,18 @@ public class EventDestinationCreateAmazonEventbridgeOptions : INestedOptions /// The AWS account ID. /// [JsonProperty("aws_account_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("aws_account_id")] +#endif public string AwsAccountId { get; set; } /// /// The region of the AWS event source. /// [JsonProperty("aws_region")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("aws_region")] +#endif public string AwsRegion { get; set; } } } diff --git a/src/Stripe.net/Services/V2/Core/EventDestinations/EventDestinationCreateOptions.cs b/src/Stripe.net/Services/V2/Core/EventDestinations/EventDestinationCreateOptions.cs index 1141588a87..ddf1467b0e 100644 --- a/src/Stripe.net/Services/V2/Core/EventDestinations/EventDestinationCreateOptions.cs +++ b/src/Stripe.net/Services/V2/Core/EventDestinations/EventDestinationCreateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.V2.Core { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class EventDestinationCreateOptions : BaseOptions, IHasMetadata { @@ -10,18 +13,27 @@ public class EventDestinationCreateOptions : BaseOptions, IHasMetadata /// Amazon EventBridge configuration. /// [JsonProperty("amazon_eventbridge")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amazon_eventbridge")] +#endif public EventDestinationCreateAmazonEventbridgeOptions AmazonEventbridge { get; set; } /// /// An optional description of what the event destination is used for. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// /// The list of events to enable for this endpoint. /// [JsonProperty("enabled_events")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled_events")] +#endif public List EnabledEvents { get; set; } /// @@ -29,6 +41,9 @@ public class EventDestinationCreateOptions : BaseOptions, IHasMetadata /// One of: snapshot, or thin. /// [JsonProperty("event_payload")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("event_payload")] +#endif public string EventPayload { get; set; } /// @@ -36,6 +51,9 @@ public class EventDestinationCreateOptions : BaseOptions, IHasMetadata /// One of: other_accounts, or self. /// [JsonProperty("events_from")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("events_from")] +#endif public List EventsFrom { get; set; } /// @@ -43,24 +61,36 @@ public class EventDestinationCreateOptions : BaseOptions, IHasMetadata /// One of: webhook_endpoint.signing_secret, or webhook_endpoint.url. /// [JsonProperty("include")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("include")] +#endif public List Include { get; set; } /// /// Metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// Event destination name. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } /// /// If using the snapshot event payload, the API version events are rendered as. /// [JsonProperty("snapshot_api_version")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("snapshot_api_version")] +#endif public string SnapshotApiVersion { get; set; } /// @@ -68,12 +98,18 @@ public class EventDestinationCreateOptions : BaseOptions, IHasMetadata /// One of: amazon_eventbridge, or webhook_endpoint. /// [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif public string Type { get; set; } /// /// Webhook endpoint configuration. /// [JsonProperty("webhook_endpoint")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("webhook_endpoint")] +#endif public EventDestinationCreateWebhookEndpointOptions WebhookEndpoint { get; set; } } } diff --git a/src/Stripe.net/Services/V2/Core/EventDestinations/EventDestinationCreateWebhookEndpointOptions.cs b/src/Stripe.net/Services/V2/Core/EventDestinations/EventDestinationCreateWebhookEndpointOptions.cs index b26fdb706e..86ba3b92c3 100644 --- a/src/Stripe.net/Services/V2/Core/EventDestinations/EventDestinationCreateWebhookEndpointOptions.cs +++ b/src/Stripe.net/Services/V2/Core/EventDestinations/EventDestinationCreateWebhookEndpointOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.V2.Core { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class EventDestinationCreateWebhookEndpointOptions : INestedOptions { @@ -9,6 +12,9 @@ public class EventDestinationCreateWebhookEndpointOptions : INestedOptions /// The URL of the webhook endpoint. /// [JsonProperty("url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("url")] +#endif public string Url { get; set; } } } diff --git a/src/Stripe.net/Services/V2/Core/EventDestinations/EventDestinationGetOptions.cs b/src/Stripe.net/Services/V2/Core/EventDestinations/EventDestinationGetOptions.cs index d5115972b1..c4c5c6661f 100644 --- a/src/Stripe.net/Services/V2/Core/EventDestinations/EventDestinationGetOptions.cs +++ b/src/Stripe.net/Services/V2/Core/EventDestinations/EventDestinationGetOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.V2.Core { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class EventDestinationGetOptions : BaseOptions { @@ -10,6 +13,9 @@ public class EventDestinationGetOptions : BaseOptions /// Additional fields to include in the response. /// [JsonProperty("include")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("include")] +#endif public List Include { get; set; } } } diff --git a/src/Stripe.net/Services/V2/Core/EventDestinations/EventDestinationListOptions.cs b/src/Stripe.net/Services/V2/Core/EventDestinations/EventDestinationListOptions.cs index 0eefd1d6fc..ec38828739 100644 --- a/src/Stripe.net/Services/V2/Core/EventDestinations/EventDestinationListOptions.cs +++ b/src/Stripe.net/Services/V2/Core/EventDestinations/EventDestinationListOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.V2.Core { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class EventDestinationListOptions : V2.ListOptions { @@ -11,12 +14,18 @@ public class EventDestinationListOptions : V2.ListOptions /// webhook_endpoint.url. /// [JsonProperty("include")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("include")] +#endif public List Include { get; set; } /// /// The requested page. /// [JsonProperty("page")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("page")] +#endif public string Page { get; set; } } } diff --git a/src/Stripe.net/Services/V2/Core/EventDestinations/EventDestinationUpdateOptions.cs b/src/Stripe.net/Services/V2/Core/EventDestinations/EventDestinationUpdateOptions.cs index 68db86eeda..7ffee5090b 100644 --- a/src/Stripe.net/Services/V2/Core/EventDestinations/EventDestinationUpdateOptions.cs +++ b/src/Stripe.net/Services/V2/Core/EventDestinations/EventDestinationUpdateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe.V2.Core { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class EventDestinationUpdateOptions : BaseOptions, IHasMetadata { @@ -10,12 +13,18 @@ public class EventDestinationUpdateOptions : BaseOptions, IHasMetadata /// An optional description of what the event destination is used for. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// /// The list of events to enable for this endpoint. /// [JsonProperty("enabled_events")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled_events")] +#endif public List EnabledEvents { get; set; } /// @@ -23,24 +32,36 @@ public class EventDestinationUpdateOptions : BaseOptions, IHasMetadata /// webhook_endpoint.url. /// [JsonProperty("include")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("include")] +#endif public List Include { get; set; } /// /// Metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// Event destination name. /// [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif public string Name { get; set; } /// /// Webhook endpoint configuration. /// [JsonProperty("webhook_endpoint")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("webhook_endpoint")] +#endif public EventDestinationUpdateWebhookEndpointOptions WebhookEndpoint { get; set; } } } diff --git a/src/Stripe.net/Services/V2/Core/EventDestinations/EventDestinationUpdateWebhookEndpointOptions.cs b/src/Stripe.net/Services/V2/Core/EventDestinations/EventDestinationUpdateWebhookEndpointOptions.cs index afd04669e1..6530ac6c80 100644 --- a/src/Stripe.net/Services/V2/Core/EventDestinations/EventDestinationUpdateWebhookEndpointOptions.cs +++ b/src/Stripe.net/Services/V2/Core/EventDestinations/EventDestinationUpdateWebhookEndpointOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.V2.Core { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class EventDestinationUpdateWebhookEndpointOptions : INestedOptions { @@ -9,6 +12,9 @@ public class EventDestinationUpdateWebhookEndpointOptions : INestedOptions /// The URL of the webhook endpoint. /// [JsonProperty("url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("url")] +#endif public string Url { get; set; } } } diff --git a/src/Stripe.net/Services/V2/Core/Events/EventListOptions.cs b/src/Stripe.net/Services/V2/Core/Events/EventListOptions.cs index fb44221797..e6102286fa 100644 --- a/src/Stripe.net/Services/V2/Core/Events/EventListOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Events/EventListOptions.cs @@ -2,6 +2,9 @@ namespace Stripe.V2.Core { using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class EventListOptions : V2.ListOptions { @@ -9,12 +12,18 @@ public class EventListOptions : V2.ListOptions /// Primary object ID used to retrieve related events. /// [JsonProperty("object_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object_id")] +#endif public string ObjectId { get; set; } /// /// The requested page. /// [JsonProperty("page")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("page")] +#endif public string Page { get; set; } } } diff --git a/src/Stripe.net/Services/WebhookEndpoints/WebhookEndpointCreateOptions.cs b/src/Stripe.net/Services/WebhookEndpoints/WebhookEndpointCreateOptions.cs index 8be80d5990..cad03d4bf1 100644 --- a/src/Stripe.net/Services/WebhookEndpoints/WebhookEndpointCreateOptions.cs +++ b/src/Stripe.net/Services/WebhookEndpoints/WebhookEndpointCreateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class WebhookEndpointCreateOptions : BaseOptions, IHasMetadata { @@ -38,6 +41,9 @@ public class WebhookEndpointCreateOptions : BaseOptions, IHasMetadata /// 2024-10-28.acacia, or 2024-11-20.acacia. /// [JsonProperty("api_version")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("api_version")] +#endif public string ApiVersion { get; set; } /// @@ -45,12 +51,18 @@ public class WebhookEndpointCreateOptions : BaseOptions, IHasMetadata /// from your account (false). Defaults to false. /// [JsonProperty("connect")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("connect")] +#endif public bool? Connect { get; set; } /// /// An optional description of what the webhook is used for. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// @@ -180,6 +192,9 @@ public class WebhookEndpointCreateOptions : BaseOptions, IHasMetadata /// ping. /// [JsonProperty("enabled_events")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled_events")] +#endif public List EnabledEvents { get; set; } /// @@ -189,12 +204,18 @@ public class WebhookEndpointCreateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// The URL of the webhook endpoint. /// [JsonProperty("url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("url")] +#endif public string Url { get; set; } } } diff --git a/src/Stripe.net/Services/WebhookEndpoints/WebhookEndpointUpdateOptions.cs b/src/Stripe.net/Services/WebhookEndpoints/WebhookEndpointUpdateOptions.cs index c274f7ddfd..7912c7c8bf 100644 --- a/src/Stripe.net/Services/WebhookEndpoints/WebhookEndpointUpdateOptions.cs +++ b/src/Stripe.net/Services/WebhookEndpoints/WebhookEndpointUpdateOptions.cs @@ -3,6 +3,9 @@ namespace Stripe { using System.Collections.Generic; using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif public class WebhookEndpointUpdateOptions : BaseOptions, IHasMetadata { @@ -10,12 +13,18 @@ public class WebhookEndpointUpdateOptions : BaseOptions, IHasMetadata /// An optional description of what the webhook is used for. /// [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif public string Description { get; set; } /// /// Disable the webhook endpoint if set to true. /// [JsonProperty("disabled")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("disabled")] +#endif public bool? Disabled { get; set; } /// @@ -145,6 +154,9 @@ public class WebhookEndpointUpdateOptions : BaseOptions, IHasMetadata /// ping. /// [JsonProperty("enabled_events")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("enabled_events")] +#endif public List EnabledEvents { get; set; } /// @@ -154,12 +166,18 @@ public class WebhookEndpointUpdateOptions : BaseOptions, IHasMetadata /// them. All keys can be unset by posting an empty value to metadata. /// [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif public Dictionary Metadata { get; set; } /// /// The URL of the webhook endpoint. /// [JsonProperty("url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("url")] +#endif public string Url { get; set; } } }