diff --git a/src/Stripe.net/Entities/V2/Core/AccountLinks/AccountLinkUseCase.cs b/src/Stripe.net/Entities/V2/Core/AccountLinks/AccountLinkUseCase.cs index cac6aef964..f2737714d1 100644 --- a/src/Stripe.net/Entities/V2/Core/AccountLinks/AccountLinkUseCase.cs +++ b/src/Stripe.net/Entities/V2/Core/AccountLinks/AccountLinkUseCase.cs @@ -8,14 +8,6 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountLinkUseCase : StripeEntity { - /// - /// Open Enum. The type of Account Link the user is requesting. - /// One of: account_onboarding, or account_update. - /// - [JsonProperty("type")] - [STJS.JsonPropertyName("type")] - public string Type { get; set; } - /// /// Hash containing configuration options for an Account Link object that onboards a new /// account. @@ -31,5 +23,13 @@ public class AccountLinkUseCase : StripeEntity [JsonProperty("account_update")] [STJS.JsonPropertyName("account_update")] public AccountLinkUseCaseAccountUpdate AccountUpdate { get; set; } + + /// + /// Open Enum. The type of Account Link the user is requesting. + /// One of: account_onboarding, or account_update. + /// + [JsonProperty("type")] + [STJS.JsonPropertyName("type")] + public string Type { get; set; } } } diff --git a/src/Stripe.net/Entities/V2/Core/Events/EventReason.cs b/src/Stripe.net/Entities/V2/Core/Events/EventReason.cs index 432442f8bd..8e8204def8 100644 --- a/src/Stripe.net/Entities/V2/Core/Events/EventReason.cs +++ b/src/Stripe.net/Entities/V2/Core/Events/EventReason.cs @@ -8,18 +8,18 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class EventReason : StripeEntity { - /// - /// Event reason type. - /// - [JsonProperty("type")] - [STJS.JsonPropertyName("type")] - public string Type { get; set; } - /// /// Information on the API request that instigated the event. /// [JsonProperty("request")] [STJS.JsonPropertyName("request")] public EventReasonRequest Request { get; set; } + + /// + /// Event reason type. + /// + [JsonProperty("type")] + [STJS.JsonPropertyName("type")] + public string Type { get; set; } } } diff --git a/src/Stripe.net/Infrastructure/JsonConverters/STJDefaultConverter.cs b/src/Stripe.net/Infrastructure/JsonConverters/STJDefaultConverter.cs index 8e0098f7e7..e3e34119a1 100644 --- a/src/Stripe.net/Infrastructure/JsonConverters/STJDefaultConverter.cs +++ b/src/Stripe.net/Infrastructure/JsonConverters/STJDefaultConverter.cs @@ -142,17 +142,28 @@ public override void Write(Utf8JsonWriter writer, T value, JsonSerializerOptions switch (valueToSerialize) { case null: - // If this is an emptyable property that was explicitly set to null, - // write null even if the global ignore condition would skip it. - bool forceWriteNull = value is IHasSetTracking tracked - && tracked.IsPropertySet(property.PropertyInfo.Name); + var ignoreCondition = property.IgnoreCondition + ?? options.DefaultIgnoreCondition; - // Use property-level ignore condition if set, otherwise use global setting - var effectiveIgnoreCondition = property.IgnoreCondition ?? options.DefaultIgnoreCondition; + bool shouldWriteNull; + if (ignoreCondition == JsonIgnoreCondition.Always) + { + shouldWriteNull = false; + } + else if (ignoreCondition == JsonIgnoreCondition.WhenWritingNull) + { + // For emptyable properties on Options objects, + // write null only when explicitly set by the caller. + // For other types, respect the annotation and skip. + shouldWriteNull = value is IHasSetTracking tracked + && tracked.IsPropertySet(property.PropertyInfo.Name); + } + else + { + shouldWriteNull = true; + } - if (forceWriteNull || - (effectiveIgnoreCondition != JsonIgnoreCondition.WhenWritingNull && - effectiveIgnoreCondition != JsonIgnoreCondition.Always)) + if (shouldWriteNull) { writer.WritePropertyName(property.JsonPropertyName); writer.WriteNullValue(); diff --git a/src/Stripe.net/Services/AccountExternalAccounts/AccountExternalAccountCardOptions.cs b/src/Stripe.net/Services/AccountExternalAccounts/AccountExternalAccountCardOptions.cs index 0cb5a8274e..96b8f9e4c6 100644 --- a/src/Stripe.net/Services/AccountExternalAccounts/AccountExternalAccountCardOptions.cs +++ b/src/Stripe.net/Services/AccountExternalAccounts/AccountExternalAccountCardOptions.cs @@ -53,14 +53,6 @@ public class AccountExternalAccountCardOptions : INestedOptions, IHasMetadata, I [STJS.JsonPropertyName("exp_year")] public long? ExpYear { get; set; } - [JsonProperty("name")] - [STJS.JsonPropertyName("name")] - public string Name { get; set; } - - [JsonProperty("number")] - [STJS.JsonPropertyName("number")] - public string Number { get; set; } - /// /// Set of key-value pairs that you can /// attach to an object. This can be useful for storing additional information about the @@ -69,5 +61,13 @@ public class AccountExternalAccountCardOptions : INestedOptions, IHasMetadata, I [JsonProperty("metadata")] [STJS.JsonPropertyName("metadata")] public Dictionary Metadata { get; set; } + + [JsonProperty("name")] + [STJS.JsonPropertyName("name")] + public string Name { get; set; } + + [JsonProperty("number")] + [STJS.JsonPropertyName("number")] + public string Number { get; set; } } } diff --git a/src/Stripe.net/Services/AccountExternalAccounts/AccountExternalAccountUpdateOptions.cs b/src/Stripe.net/Services/AccountExternalAccounts/AccountExternalAccountUpdateOptions.cs index 6e4a7f5c84..660e2d406a 100644 --- a/src/Stripe.net/Services/AccountExternalAccounts/AccountExternalAccountUpdateOptions.cs +++ b/src/Stripe.net/Services/AccountExternalAccounts/AccountExternalAccountUpdateOptions.cs @@ -24,8 +24,9 @@ public class AccountExternalAccountUpdateOptions : BaseOptions, IHasMetadata /// company. /// One of: company, or individual. /// - [JsonProperty("account_holder_type")] + [JsonProperty("account_holder_type", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("account_holder_type")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string AccountHolderType { get => this.accountHolderType; @@ -121,8 +122,9 @@ public string AccountHolderType /// object in a structured format. Individual keys can be unset by posting an empty value to /// them. All keys can be unset by posting an empty value to metadata. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary Metadata { get => this.metadata; diff --git a/src/Stripe.net/Services/AccountPersons/AccountPersonAdditionalTosAcceptancesAccountOptions.cs b/src/Stripe.net/Services/AccountPersons/AccountPersonAdditionalTosAcceptancesAccountOptions.cs index 61026cbaee..7777e714be 100644 --- a/src/Stripe.net/Services/AccountPersons/AccountPersonAdditionalTosAcceptancesAccountOptions.cs +++ b/src/Stripe.net/Services/AccountPersons/AccountPersonAdditionalTosAcceptancesAccountOptions.cs @@ -36,8 +36,9 @@ public class AccountPersonAdditionalTosAcceptancesAccountOptions : INestedOption /// The user agent of the browser from which the account representative accepted the service /// agreement. /// - [JsonProperty("user_agent")] + [JsonProperty("user_agent", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("user_agent")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string UserAgent { get => this.userAgent; diff --git a/src/Stripe.net/Services/AccountPersons/AccountPersonCreateOptions.cs b/src/Stripe.net/Services/AccountPersons/AccountPersonCreateOptions.cs index 65a1e00821..6b494e4d2d 100644 --- a/src/Stripe.net/Services/AccountPersons/AccountPersonCreateOptions.cs +++ b/src/Stripe.net/Services/AccountPersons/AccountPersonCreateOptions.cs @@ -45,8 +45,9 @@ public class AccountPersonCreateOptions : BaseOptions, IHasMetadata /// /// The person's date of birth. /// - [JsonProperty("dob")] + [JsonProperty("dob", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("dob")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public AccountPersonDobOptions Dob { get => this.dob; @@ -95,8 +96,9 @@ public AccountPersonDobOptions Dob /// /// A list of alternate names or aliases that the person is known by. /// - [JsonProperty("full_name_aliases")] + [JsonProperty("full_name_aliases", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("full_name_aliases")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List FullNameAliases { get => this.fullNameAliases; @@ -170,8 +172,9 @@ public List FullNameAliases /// object in a structured format. Individual keys can be unset by posting an empty value to /// them. All keys can be unset by posting an empty value to metadata. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary Metadata { get => this.metadata; diff --git a/src/Stripe.net/Services/AccountPersons/AccountPersonRelationshipOptions.cs b/src/Stripe.net/Services/AccountPersons/AccountPersonRelationshipOptions.cs index 1ff0a75885..bd2f6893f0 100644 --- a/src/Stripe.net/Services/AccountPersons/AccountPersonRelationshipOptions.cs +++ b/src/Stripe.net/Services/AccountPersons/AccountPersonRelationshipOptions.cs @@ -58,8 +58,9 @@ public class AccountPersonRelationshipOptions : INestedOptions, IHasSetTracking /// /// The percent owned by the person of the account's legal entity. /// - [JsonProperty("percent_ownership")] + [JsonProperty("percent_ownership", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("percent_ownership")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public decimal? PercentOwnership { get => this.percentOwnership; diff --git a/src/Stripe.net/Services/AccountPersons/AccountPersonUpdateOptions.cs b/src/Stripe.net/Services/AccountPersons/AccountPersonUpdateOptions.cs index f8bcc5a703..029ab4f7fa 100644 --- a/src/Stripe.net/Services/AccountPersons/AccountPersonUpdateOptions.cs +++ b/src/Stripe.net/Services/AccountPersons/AccountPersonUpdateOptions.cs @@ -45,8 +45,9 @@ public class AccountPersonUpdateOptions : BaseOptions, IHasMetadata /// /// The person's date of birth. /// - [JsonProperty("dob")] + [JsonProperty("dob", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("dob")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public AccountPersonDobOptions Dob { get => this.dob; @@ -95,8 +96,9 @@ public AccountPersonDobOptions Dob /// /// A list of alternate names or aliases that the person is known by. /// - [JsonProperty("full_name_aliases")] + [JsonProperty("full_name_aliases", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("full_name_aliases")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List FullNameAliases { get => this.fullNameAliases; @@ -170,8 +172,9 @@ public List FullNameAliases /// object in a structured format. Individual keys can be unset by posting an empty value to /// them. All keys can be unset by posting an empty value to metadata. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary Metadata { get => this.metadata; diff --git a/src/Stripe.net/Services/Accounts/AccountBusinessProfileOptions.cs b/src/Stripe.net/Services/Accounts/AccountBusinessProfileOptions.cs index 9dbb3798bb..d4a97230f7 100644 --- a/src/Stripe.net/Services/Accounts/AccountBusinessProfileOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountBusinessProfileOptions.cs @@ -95,8 +95,9 @@ public class AccountBusinessProfileOptions : INestedOptions, IHasSetTracking /// /// A publicly available website for handling support issues. /// - [JsonProperty("support_url")] + [JsonProperty("support_url", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("support_url")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string SupportUrl { get => this.supportUrl; diff --git a/src/Stripe.net/Services/Accounts/AccountCompanyOptions.cs b/src/Stripe.net/Services/Accounts/AccountCompanyOptions.cs index b05ac2e0b1..a3be18ce13 100644 --- a/src/Stripe.net/Services/Accounts/AccountCompanyOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountCompanyOptions.cs @@ -130,8 +130,9 @@ public class AccountCompanyOptions : INestedOptions, IHasSetTracking /// One of: qualified_entity_exceeds_ownership_threshold, or /// qualifies_as_financial_institution. /// - [JsonProperty("ownership_exemption_reason")] + [JsonProperty("ownership_exemption_reason", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("ownership_exemption_reason")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string OwnershipExemptionReason { get => this.ownershipExemptionReason; @@ -152,8 +153,9 @@ public string OwnershipExemptionReason /// /// When the business was incorporated or registered. /// - [JsonProperty("registration_date")] + [JsonProperty("registration_date", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("registration_date")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public AccountCompanyRegistrationDateOptions RegistrationDate { get => this.registrationDate; @@ -197,8 +199,9 @@ public AccountCompanyRegistrationDateOptions RegistrationDate /// unincorporated_association, unincorporated_non_profit, or /// unincorporated_partnership. /// - [JsonProperty("structure")] + [JsonProperty("structure", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("structure")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string Structure { get => this.structure; diff --git a/src/Stripe.net/Services/Accounts/AccountCreateOptions.cs b/src/Stripe.net/Services/Accounts/AccountCreateOptions.cs index 2e80f26cb0..ea27509608 100644 --- a/src/Stripe.net/Services/Accounts/AccountCreateOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountCreateOptions.cs @@ -166,8 +166,9 @@ public class AccountCreateOptions : BaseOptions, IHasMetadata /// object in a structured format. Individual keys can be unset by posting an empty value to /// them. All keys can be unset by posting an empty value to metadata. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary Metadata { get => this.metadata; diff --git a/src/Stripe.net/Services/Accounts/AccountGroupsOptions.cs b/src/Stripe.net/Services/Accounts/AccountGroupsOptions.cs index e848bd49ab..6536bf489a 100644 --- a/src/Stripe.net/Services/Accounts/AccountGroupsOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountGroupsOptions.cs @@ -20,8 +20,9 @@ public class AccountGroupsOptions : INestedOptions, IHasSetTracking /// href="https://docs.stripe.com/connect/platform-pricing-tools">See the Platform pricing /// tool documentation for details. /// - [JsonProperty("payments_pricing")] + [JsonProperty("payments_pricing", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("payments_pricing")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string PaymentsPricing { get => this.paymentsPricing; diff --git a/src/Stripe.net/Services/Accounts/AccountIndividualOptions.cs b/src/Stripe.net/Services/Accounts/AccountIndividualOptions.cs index 65d3108d91..fb8ec4c604 100644 --- a/src/Stripe.net/Services/Accounts/AccountIndividualOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountIndividualOptions.cs @@ -41,8 +41,9 @@ public class AccountIndividualOptions : INestedOptions, IHasMetadata, IHasSetTra /// /// The individual's date of birth. /// - [JsonProperty("dob")] + [JsonProperty("dob", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("dob")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public DobOptions Dob { get => this.dob; @@ -84,8 +85,9 @@ public DobOptions Dob /// /// A list of alternate names or aliases that the individual is known by. /// - [JsonProperty("full_name_aliases")] + [JsonProperty("full_name_aliases", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("full_name_aliases")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List FullNameAliases { get => this.fullNameAliases; @@ -160,8 +162,9 @@ public List FullNameAliases /// object in a structured format. Individual keys can be unset by posting an empty value to /// them. All keys can be unset by posting an empty value to metadata. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary Metadata { get => this.metadata; diff --git a/src/Stripe.net/Services/Accounts/AccountIndividualRelationshipOptions.cs b/src/Stripe.net/Services/Accounts/AccountIndividualRelationshipOptions.cs index 6a2959990f..a099d3fadf 100644 --- a/src/Stripe.net/Services/Accounts/AccountIndividualRelationshipOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountIndividualRelationshipOptions.cs @@ -41,8 +41,9 @@ public class AccountIndividualRelationshipOptions : INestedOptions, IHasSetTrack /// /// The percent owned by the person of the account's legal entity. /// - [JsonProperty("percent_ownership")] + [JsonProperty("percent_ownership", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("percent_ownership")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public decimal? PercentOwnership { get => this.percentOwnership; diff --git a/src/Stripe.net/Services/Accounts/AccountSettingsCardIssuingTosAcceptanceOptions.cs b/src/Stripe.net/Services/Accounts/AccountSettingsCardIssuingTosAcceptanceOptions.cs index 10296d467c..719c54947c 100644 --- a/src/Stripe.net/Services/Accounts/AccountSettingsCardIssuingTosAcceptanceOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountSettingsCardIssuingTosAcceptanceOptions.cs @@ -36,8 +36,9 @@ public class AccountSettingsCardIssuingTosAcceptanceOptions : INestedOptions, IH /// The user agent of the browser from which the account representative accepted the service /// agreement. /// - [JsonProperty("user_agent")] + [JsonProperty("user_agent", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("user_agent")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string UserAgent { get => this.userAgent; diff --git a/src/Stripe.net/Services/Accounts/AccountSettingsCardPaymentsOptions.cs b/src/Stripe.net/Services/Accounts/AccountSettingsCardPaymentsOptions.cs index b7c76219e8..3269d72842 100644 --- a/src/Stripe.net/Services/Accounts/AccountSettingsCardPaymentsOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountSettingsCardPaymentsOptions.cs @@ -40,8 +40,9 @@ public class AccountSettingsCardPaymentsOptions : INestedOptions, IHasSetTrackin /// statement_descriptor_prefix_kana is useful for maximizing descriptor space for /// the dynamic portion. /// - [JsonProperty("statement_descriptor_prefix_kana")] + [JsonProperty("statement_descriptor_prefix_kana", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("statement_descriptor_prefix_kana")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string StatementDescriptorPrefixKana { get => this.statementDescriptorPrefixKana; @@ -59,8 +60,9 @@ public string StatementDescriptorPrefixKana /// statement_descriptor_prefix_kanji is useful for maximizing descriptor space for /// the dynamic portion. /// - [JsonProperty("statement_descriptor_prefix_kanji")] + [JsonProperty("statement_descriptor_prefix_kanji", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("statement_descriptor_prefix_kanji")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string StatementDescriptorPrefixKanji { get => this.statementDescriptorPrefixKanji; diff --git a/src/Stripe.net/Services/Accounts/AccountSettingsInvoicesOptions.cs b/src/Stripe.net/Services/Accounts/AccountSettingsInvoicesOptions.cs index 850130bc16..af7643f48e 100644 --- a/src/Stripe.net/Services/Accounts/AccountSettingsInvoicesOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountSettingsInvoicesOptions.cs @@ -19,8 +19,9 @@ public class AccountSettingsInvoicesOptions : INestedOptions, IHasSetTracking /// The list of default Account Tax IDs to automatically include on invoices. Account Tax /// IDs get added when an invoice is finalized. /// - [JsonProperty("default_account_tax_ids")] + [JsonProperty("default_account_tax_ids", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("default_account_tax_ids")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List DefaultAccountTaxIds { get => this.defaultAccountTaxIds; diff --git a/src/Stripe.net/Services/Accounts/AccountSettingsTreasuryTosAcceptanceOptions.cs b/src/Stripe.net/Services/Accounts/AccountSettingsTreasuryTosAcceptanceOptions.cs index 43ad70fdf9..40d6e4f0b9 100644 --- a/src/Stripe.net/Services/Accounts/AccountSettingsTreasuryTosAcceptanceOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountSettingsTreasuryTosAcceptanceOptions.cs @@ -36,8 +36,9 @@ public class AccountSettingsTreasuryTosAcceptanceOptions : INestedOptions, IHasS /// The user agent of the browser from which the account representative accepted the service /// agreement. /// - [JsonProperty("user_agent")] + [JsonProperty("user_agent", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("user_agent")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string UserAgent { get => this.userAgent; diff --git a/src/Stripe.net/Services/Accounts/AccountUpdateOptions.cs b/src/Stripe.net/Services/Accounts/AccountUpdateOptions.cs index 1962c8e2b7..4bd5127f51 100644 --- a/src/Stripe.net/Services/Accounts/AccountUpdateOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountUpdateOptions.cs @@ -113,9 +113,10 @@ public class AccountUpdateOptions : BaseOptions, IHasMetadata /// href="https://stripe.com/api/accounts/object#account_object-controller-requirement_collection">controller.requirement_collection /// is application, which includes Custom accounts. /// - [JsonProperty("external_account")] + [JsonProperty("external_account", NullValueHandling = NullValueHandling.Ignore)] [JsonConverter(typeof(AnyOfConverter))] [STJS.JsonPropertyName("external_account")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] [STJS.JsonConverter(typeof(STJAnyOfConverter))] public AnyOf ExternalAccount { @@ -154,8 +155,9 @@ public AnyOf ExternalAcco /// object in a structured format. Individual keys can be unset by posting an empty value to /// them. All keys can be unset by posting an empty value to metadata. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary Metadata { get => this.metadata; diff --git a/src/Stripe.net/Services/ApplicationFeeRefunds/ApplicationFeeRefundUpdateOptions.cs b/src/Stripe.net/Services/ApplicationFeeRefunds/ApplicationFeeRefundUpdateOptions.cs index b54174def1..581b1fa487 100644 --- a/src/Stripe.net/Services/ApplicationFeeRefunds/ApplicationFeeRefundUpdateOptions.cs +++ b/src/Stripe.net/Services/ApplicationFeeRefunds/ApplicationFeeRefundUpdateOptions.cs @@ -17,8 +17,9 @@ public class ApplicationFeeRefundUpdateOptions : BaseOptions, IHasMetadata /// object in a structured format. Individual keys can be unset by posting an empty value to /// them. All keys can be unset by posting an empty value to metadata. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary Metadata { get => this.metadata; diff --git a/src/Stripe.net/Services/BalanceSettings/BalanceSettingsPaymentsPayoutsOptions.cs b/src/Stripe.net/Services/BalanceSettings/BalanceSettingsPaymentsPayoutsOptions.cs index bceb75f8da..b64374ca85 100644 --- a/src/Stripe.net/Services/BalanceSettings/BalanceSettingsPaymentsPayoutsOptions.cs +++ b/src/Stripe.net/Services/BalanceSettings/BalanceSettingsPaymentsPayoutsOptions.cs @@ -21,8 +21,9 @@ public class BalanceSettingsPaymentsPayoutsOptions : INestedOptions, IHasSetTrac /// href="https://stripe.com/payouts/minimum-balances-for-automatic-payouts">minimum /// balances for automatic payouts. /// - [JsonProperty("minimum_balance_by_currency")] + [JsonProperty("minimum_balance_by_currency", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("minimum_balance_by_currency")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] [STJS.JsonConverter(typeof(STJNullPreservingDictionaryConverter))] public Dictionary MinimumBalanceByCurrency { diff --git a/src/Stripe.net/Services/BalanceSettings/BalanceSettingsPaymentsSettlementTimingOptions.cs b/src/Stripe.net/Services/BalanceSettings/BalanceSettingsPaymentsSettlementTimingOptions.cs index fae48b952b..e8971f8869 100644 --- a/src/Stripe.net/Services/BalanceSettings/BalanceSettingsPaymentsSettlementTimingOptions.cs +++ b/src/Stripe.net/Services/BalanceSettings/BalanceSettingsPaymentsSettlementTimingOptions.cs @@ -22,8 +22,9 @@ public class BalanceSettingsPaymentsSettlementTimingOptions : INestedOptions, IH /// href="https://stripe.com/connect/manage-payout-schedule">Learn more about controlling /// delay days. /// - [JsonProperty("delay_days_override")] + [JsonProperty("delay_days_override", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("delay_days_override")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public long? DelayDaysOverride { get => this.delayDaysOverride; diff --git a/src/Stripe.net/Services/BankAccounts/BankAccountUpdateOptions.cs b/src/Stripe.net/Services/BankAccounts/BankAccountUpdateOptions.cs index efa4a06253..bf340ad0d1 100644 --- a/src/Stripe.net/Services/BankAccounts/BankAccountUpdateOptions.cs +++ b/src/Stripe.net/Services/BankAccounts/BankAccountUpdateOptions.cs @@ -24,8 +24,9 @@ public class BankAccountUpdateOptions : BaseOptions, IHasMetadata /// company. /// One of: company, or individual. /// - [JsonProperty("account_holder_type")] + [JsonProperty("account_holder_type", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("account_holder_type")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string AccountHolderType { get => this.accountHolderType; @@ -58,8 +59,9 @@ public string AccountHolderType /// object in a structured format. Individual keys can be unset by posting an empty value to /// them. All keys can be unset by posting an empty value to metadata. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary Metadata { get => this.metadata; diff --git a/src/Stripe.net/Services/Billing/CreditGrants/CreditGrantUpdateOptions.cs b/src/Stripe.net/Services/Billing/CreditGrants/CreditGrantUpdateOptions.cs index 8d4c415a85..3ad243a610 100644 --- a/src/Stripe.net/Services/Billing/CreditGrants/CreditGrantUpdateOptions.cs +++ b/src/Stripe.net/Services/Billing/CreditGrants/CreditGrantUpdateOptions.cs @@ -16,9 +16,10 @@ public class CreditGrantUpdateOptions : BaseOptions, IHasMetadata /// The time when the billing credits created by this credit grant expire. If set to empty, /// the billing credits never expire. /// - [JsonProperty("expires_at")] + [JsonProperty("expires_at", NullValueHandling = NullValueHandling.Ignore)] [JsonConverter(typeof(UnixDateTimeConverter))] [STJS.JsonPropertyName("expires_at")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] public DateTime? ExpiresAt { diff --git a/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationBusinessProfileOptions.cs b/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationBusinessProfileOptions.cs index f28965f9cd..3bd1c7ba09 100644 --- a/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationBusinessProfileOptions.cs +++ b/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationBusinessProfileOptions.cs @@ -19,8 +19,9 @@ public class ConfigurationBusinessProfileOptions : INestedOptions, IHasSetTracki /// /// The messaging shown to customers in the portal. /// - [JsonProperty("headline")] + [JsonProperty("headline", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("headline")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string Headline { get => this.headline; @@ -34,8 +35,9 @@ public string Headline /// /// A link to the business’s publicly available privacy policy. /// - [JsonProperty("privacy_policy_url")] + [JsonProperty("privacy_policy_url", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("privacy_policy_url")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string PrivacyPolicyUrl { get => this.privacyPolicyUrl; @@ -49,8 +51,9 @@ public string PrivacyPolicyUrl /// /// A link to the business’s publicly available terms of service. /// - [JsonProperty("terms_of_service_url")] + [JsonProperty("terms_of_service_url", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("terms_of_service_url")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string TermsOfServiceUrl { get => this.termsOfServiceUrl; diff --git a/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationCreateOptions.cs b/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationCreateOptions.cs index cc780f9d1f..b2d6e08e81 100644 --- a/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationCreateOptions.cs +++ b/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationCreateOptions.cs @@ -25,8 +25,9 @@ public class ConfigurationCreateOptions : BaseOptions, IHasMetadata /// href="https://docs.stripe.com/api/customer_portal/sessions/create#create_portal_session-return_url">overriden /// when creating the session. /// - [JsonProperty("default_return_url")] + [JsonProperty("default_return_url", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("default_return_url")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string DefaultReturnUrl { get => this.defaultReturnUrl; @@ -67,8 +68,9 @@ public string DefaultReturnUrl /// /// The name of the configuration. /// - [JsonProperty("name")] + [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("name")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string Name { get => this.name; diff --git a/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationFeaturesCustomerUpdateOptions.cs b/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationFeaturesCustomerUpdateOptions.cs index f9ea5819b1..a739eabbcc 100644 --- a/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationFeaturesCustomerUpdateOptions.cs +++ b/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationFeaturesCustomerUpdateOptions.cs @@ -21,8 +21,9 @@ public class ConfigurationFeaturesCustomerUpdateOptions : INestedOptions, IHasSe /// One of: address, email, name, phone, shipping, or /// tax_id. /// - [JsonProperty("allowed_updates")] + [JsonProperty("allowed_updates", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("allowed_updates")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List AllowedUpdates { get => this.allowedUpdates; diff --git a/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationFeaturesPaymentMethodUpdateOptions.cs b/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationFeaturesPaymentMethodUpdateOptions.cs index fe953af988..e7f290fcf9 100644 --- a/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationFeaturesPaymentMethodUpdateOptions.cs +++ b/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationFeaturesPaymentMethodUpdateOptions.cs @@ -28,8 +28,9 @@ public class ConfigurationFeaturesPaymentMethodUpdateOptions : INestedOptions, I /// configuration. If not set or set to an empty string, the default payment method /// configuration is used. /// - [JsonProperty("payment_method_configuration")] + [JsonProperty("payment_method_configuration", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("payment_method_configuration")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string PaymentMethodConfiguration { get => this.paymentMethodConfiguration; diff --git a/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationFeaturesSubscriptionCancelCancellationReasonOptions.cs b/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationFeaturesSubscriptionCancelCancellationReasonOptions.cs index 054fe308b0..6efa855ff8 100644 --- a/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationFeaturesSubscriptionCancelCancellationReasonOptions.cs +++ b/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationFeaturesSubscriptionCancelCancellationReasonOptions.cs @@ -28,8 +28,9 @@ public class ConfigurationFeaturesSubscriptionCancelCancellationReasonOptions : /// other, switched_service, too_complex, too_expensive, or /// unused. /// - [JsonProperty("options")] + [JsonProperty("options", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("options")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List Options { get => this.options; diff --git a/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationFeaturesSubscriptionUpdateOptions.cs b/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationFeaturesSubscriptionUpdateOptions.cs index 82b1da99ab..bd3a93d361 100644 --- a/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationFeaturesSubscriptionUpdateOptions.cs +++ b/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationFeaturesSubscriptionUpdateOptions.cs @@ -33,8 +33,9 @@ public class ConfigurationFeaturesSubscriptionUpdateOptions : INestedOptions, IH /// updateable. /// One of: price, promotion_code, or quantity. /// - [JsonProperty("default_allowed_updates")] + [JsonProperty("default_allowed_updates", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("default_allowed_updates")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List DefaultAllowedUpdates { get => this.defaultAllowedUpdates; @@ -55,8 +56,9 @@ public List DefaultAllowedUpdates /// /// The list of up to 10 products that support subscription updates. /// - [JsonProperty("products")] + [JsonProperty("products", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("products")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List Products { get => this.products; diff --git a/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationFeaturesSubscriptionUpdateScheduleAtPeriodEndOptions.cs b/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationFeaturesSubscriptionUpdateScheduleAtPeriodEndOptions.cs index 40cd7713a7..355548a1a4 100644 --- a/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationFeaturesSubscriptionUpdateScheduleAtPeriodEndOptions.cs +++ b/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationFeaturesSubscriptionUpdateScheduleAtPeriodEndOptions.cs @@ -19,8 +19,9 @@ public class ConfigurationFeaturesSubscriptionUpdateScheduleAtPeriodEndOptions : /// List of conditions. When any condition is true, the update will be scheduled at the end /// of the current period. /// - [JsonProperty("conditions")] + [JsonProperty("conditions", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("conditions")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List Conditions { get => this.conditions; diff --git a/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationUpdateOptions.cs b/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationUpdateOptions.cs index e55cdec2ec..e359783ef1 100644 --- a/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationUpdateOptions.cs +++ b/src/Stripe.net/Services/BillingPortal/Configurations/ConfigurationUpdateOptions.cs @@ -33,8 +33,9 @@ public class ConfigurationUpdateOptions : BaseOptions, IHasMetadata /// href="https://docs.stripe.com/api/customer_portal/sessions/create#create_portal_session-return_url">overriden /// when creating the session. /// - [JsonProperty("default_return_url")] + [JsonProperty("default_return_url", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("default_return_url")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string DefaultReturnUrl { get => this.defaultReturnUrl; @@ -68,8 +69,9 @@ public string DefaultReturnUrl /// object in a structured format. Individual keys can be unset by posting an empty value to /// them. All keys can be unset by posting an empty value to metadata. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary Metadata { get => this.metadata; @@ -83,8 +85,9 @@ public Dictionary Metadata /// /// The name of the configuration. /// - [JsonProperty("name")] + [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("name")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string Name { get => this.name; diff --git a/src/Stripe.net/Services/Cards/CardUpdateOptions.cs b/src/Stripe.net/Services/Cards/CardUpdateOptions.cs index 37fc912b28..98008cbae6 100644 --- a/src/Stripe.net/Services/Cards/CardUpdateOptions.cs +++ b/src/Stripe.net/Services/Cards/CardUpdateOptions.cs @@ -89,8 +89,9 @@ public class CardUpdateOptions : BaseOptions, IHasMetadata /// object in a structured format. Individual keys can be unset by posting an empty value to /// them. All keys can be unset by posting an empty value to metadata. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary Metadata { get => this.metadata; diff --git a/src/Stripe.net/Services/Charges/ChargeCreateOptions.cs b/src/Stripe.net/Services/Charges/ChargeCreateOptions.cs index 79add5d38d..11255a83f2 100644 --- a/src/Stripe.net/Services/Charges/ChargeCreateOptions.cs +++ b/src/Stripe.net/Services/Charges/ChargeCreateOptions.cs @@ -93,8 +93,9 @@ public class ChargeCreateOptions : BaseOptions, IHasMetadata /// object in a structured format. Individual keys can be unset by posting an empty value to /// them. All keys can be unset by posting an empty value to metadata. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary Metadata { get => this.metadata; diff --git a/src/Stripe.net/Services/Charges/ChargeFraudDetailsOptions.cs b/src/Stripe.net/Services/Charges/ChargeFraudDetailsOptions.cs index 78df628e75..8bfe6c2065 100644 --- a/src/Stripe.net/Services/Charges/ChargeFraudDetailsOptions.cs +++ b/src/Stripe.net/Services/Charges/ChargeFraudDetailsOptions.cs @@ -18,8 +18,9 @@ public class ChargeFraudDetailsOptions : INestedOptions, IHasSetTracking /// Either safe or fraudulent. /// One of: fraudulent, or safe. /// - [JsonProperty("user_report")] + [JsonProperty("user_report", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("user_report")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string UserReport { get => this.userReport; diff --git a/src/Stripe.net/Services/Charges/ChargeUpdateOptions.cs b/src/Stripe.net/Services/Charges/ChargeUpdateOptions.cs index 694b7839a7..aa186bd8f8 100644 --- a/src/Stripe.net/Services/Charges/ChargeUpdateOptions.cs +++ b/src/Stripe.net/Services/Charges/ChargeUpdateOptions.cs @@ -52,8 +52,9 @@ public class ChargeUpdateOptions : BaseOptions, IHasMetadata /// object in a structured format. Individual keys can be unset by posting an empty value to /// them. All keys can be unset by posting an empty value to metadata. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary Metadata { get => this.metadata; diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionBrandingSettingsOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionBrandingSettingsOptions.cs index 271b0c7dac..2c2b9d3c2e 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionBrandingSettingsOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionBrandingSettingsOptions.cs @@ -21,8 +21,9 @@ public class SessionBrandingSettingsOptions : INestedOptions, IHasSetTracking /// A hex color value starting with # representing the background color for the /// Checkout Session. /// - [JsonProperty("background_color")] + [JsonProperty("background_color", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("background_color")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string BackgroundColor { get => this.backgroundColor; @@ -37,8 +38,9 @@ public string BackgroundColor /// The border style for the Checkout Session. /// One of: pill, rectangular, or rounded. /// - [JsonProperty("border_style")] + [JsonProperty("border_style", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("border_style")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string BorderStyle { get => this.borderStyle; @@ -53,8 +55,9 @@ public string BorderStyle /// A hex color value starting with # representing the button color for the Checkout /// Session. /// - [JsonProperty("button_color")] + [JsonProperty("button_color", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("button_color")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string ButtonColor { get => this.buttonColor; @@ -86,8 +89,9 @@ public string ButtonColor /// source_sans_pro, titillium_web, ubuntu_mono, or /// zen_maru_gothic. /// - [JsonProperty("font_family")] + [JsonProperty("font_family", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("font_family")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string FontFamily { get => this.fontFamily; diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionCustomTextOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionCustomTextOptions.cs index 5ef2b44c7e..0ba0fae700 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionCustomTextOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionCustomTextOptions.cs @@ -20,8 +20,9 @@ public class SessionCustomTextOptions : INestedOptions, IHasSetTracking /// /// Custom text that should be displayed after the payment confirmation button. /// - [JsonProperty("after_submit")] + [JsonProperty("after_submit", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("after_submit")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public SessionCustomTextAfterSubmitOptions AfterSubmit { get => this.afterSubmit; @@ -35,8 +36,9 @@ public SessionCustomTextAfterSubmitOptions AfterSubmit /// /// Custom text that should be displayed alongside shipping address collection. /// - [JsonProperty("shipping_address")] + [JsonProperty("shipping_address", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("shipping_address")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public SessionCustomTextShippingAddressOptions ShippingAddress { get => this.shippingAddress; @@ -50,8 +52,9 @@ public SessionCustomTextShippingAddressOptions ShippingAddress /// /// Custom text that should be displayed alongside the payment confirmation button. /// - [JsonProperty("submit")] + [JsonProperty("submit", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("submit")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public SessionCustomTextSubmitOptions Submit { get => this.submit; @@ -66,8 +69,9 @@ public SessionCustomTextSubmitOptions Submit /// Custom text that should be displayed in place of the default terms of service agreement /// text. /// - [JsonProperty("terms_of_service_acceptance")] + [JsonProperty("terms_of_service_acceptance", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("terms_of_service_acceptance")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public SessionCustomTextTermsOfServiceAcceptanceOptions TermsOfServiceAcceptance { get => this.termsOfServiceAcceptance; diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionInvoiceCreationInvoiceDataOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionInvoiceCreationInvoiceDataOptions.cs index 66838cda49..73d7a50d51 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionInvoiceCreationInvoiceDataOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionInvoiceCreationInvoiceDataOptions.cs @@ -20,8 +20,9 @@ public class SessionInvoiceCreationInvoiceDataOptions : INestedOptions, IHasMeta /// /// The account tax IDs associated with the invoice. /// - [JsonProperty("account_tax_ids")] + [JsonProperty("account_tax_ids", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("account_tax_ids")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List AccountTaxIds { get => this.accountTaxIds; @@ -35,8 +36,9 @@ public List AccountTaxIds /// /// Default custom fields to be displayed on invoices for this customer. /// - [JsonProperty("custom_fields")] + [JsonProperty("custom_fields", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("custom_fields")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List CustomFields { get => this.customFields; @@ -82,8 +84,9 @@ public List CustomFields /// /// Default options for invoice PDF rendering for this customer. /// - [JsonProperty("rendering_options")] + [JsonProperty("rendering_options", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("rendering_options")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public SessionInvoiceCreationInvoiceDataRenderingOptionsOptions RenderingOptions { get => this.renderingOptions; diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionInvoiceCreationInvoiceDataRenderingOptionsOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionInvoiceCreationInvoiceDataRenderingOptionsOptions.cs index 05ac1a44cc..8016e5beaa 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionInvoiceCreationInvoiceDataRenderingOptionsOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionInvoiceCreationInvoiceDataRenderingOptionsOptions.cs @@ -22,8 +22,9 @@ public class SessionInvoiceCreationInvoiceDataRenderingOptionsOptions : INestedO /// amounts. /// One of: exclude_tax, or include_inclusive_tax. /// - [JsonProperty("amount_tax_display")] + [JsonProperty("amount_tax_display", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("amount_tax_display")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string AmountTaxDisplay { get => this.amountTaxDisplay; diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionLineItemOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionLineItemOptions.cs index 2d023b900a..5002d61a59 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionLineItemOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionLineItemOptions.cs @@ -47,8 +47,9 @@ public class SessionLineItemOptions : INestedOptions, IHasMetadata, IHasId, IHas /// object in a structured format. Individual keys can be unset by posting an empty value to /// them. All keys can be unset by posting an empty value to metadata. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary Metadata { get => this.metadata; @@ -89,8 +90,9 @@ public Dictionary Metadata /// The tax rates which apply to this /// line item. /// - [JsonProperty("tax_rates")] + [JsonProperty("tax_rates", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("tax_rates")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List TaxRates { get => this.taxRates; diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsAcssDebitMandateOptionsOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsAcssDebitMandateOptionsOptions.cs index 71baddb019..5c13151de8 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsAcssDebitMandateOptionsOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsAcssDebitMandateOptionsOptions.cs @@ -22,8 +22,9 @@ public class SessionPaymentMethodOptionsAcssDebitMandateOptionsOptions : INested /// setup_intent and setup_intent_client_secret when confirming a Setup /// Intent. /// - [JsonProperty("custom_mandate_url")] + [JsonProperty("custom_mandate_url", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("custom_mandate_url")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string CustomMandateUrl { get => this.customMandateUrl; diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsBacsDebitMandateOptionsOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsBacsDebitMandateOptionsOptions.cs index d29fe16b91..df65e62f75 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsBacsDebitMandateOptionsOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsBacsDebitMandateOptionsOptions.cs @@ -19,8 +19,9 @@ public class SessionPaymentMethodOptionsBacsDebitMandateOptionsOptions : INested /// consist of only uppercase letters, numbers, spaces, or the following special characters: /// '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. /// - [JsonProperty("reference_prefix")] + [JsonProperty("reference_prefix", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("reference_prefix")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string ReferencePrefix { get => this.referencePrefix; diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsKlarnaOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsKlarnaOptions.cs index f498581efa..d7e7324162 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsKlarnaOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsKlarnaOptions.cs @@ -49,8 +49,9 @@ public class SessionPaymentMethodOptionsKlarnaOptions : INestedOptions, IHasSetT /// /// Subscription details if the Checkout Session sets up a future subscription. /// - [JsonProperty("subscriptions")] + [JsonProperty("subscriptions", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("subscriptions")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List Subscriptions { get => this.subscriptions; diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsPaypalOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsPaypalOptions.cs index cb9c0bb30b..4e4e27050d 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsPaypalOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsPaypalOptions.cs @@ -18,8 +18,9 @@ public class SessionPaymentMethodOptionsPaypalOptions : INestedOptions, IHasSetT /// /// Controls when the funds will be captured from the customer's account. /// - [JsonProperty("capture_method")] + [JsonProperty("capture_method", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("capture_method")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string CaptureMethod { get => this.captureMethod; @@ -83,8 +84,9 @@ public string CaptureMethod /// off_session. /// One of: none, or off_session. /// - [JsonProperty("setup_future_usage")] + [JsonProperty("setup_future_usage", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("setup_future_usage")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string SetupFutureUsage { get => this.setupFutureUsage; diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsPaytoMandateOptionsOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsPaytoMandateOptionsOptions.cs index 176bfbbc38..5d5cc06510 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsPaytoMandateOptionsOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsPaytoMandateOptionsOptions.cs @@ -23,8 +23,9 @@ public class SessionPaymentMethodOptionsPaytoMandateOptionsOptions : INestedOpti /// /// Amount that will be collected. It is required when amount_type is fixed. /// - [JsonProperty("amount")] + [JsonProperty("amount", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("amount")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public long? Amount { get => this.amount; @@ -41,8 +42,9 @@ public long? Amount /// Defaults to maximum. /// One of: fixed, or maximum. /// - [JsonProperty("amount_type")] + [JsonProperty("amount_type", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("amount_type")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string AmountType { get => this.amountType; @@ -57,8 +59,9 @@ public string AmountType /// Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no /// end date. /// - [JsonProperty("end_date")] + [JsonProperty("end_date", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("end_date")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string EndDate { get => this.endDate; @@ -74,8 +77,9 @@ public string EndDate /// One of: adhoc, annual, daily, fortnightly, monthly, /// quarterly, semi_annual, or weekly. /// - [JsonProperty("payment_schedule")] + [JsonProperty("payment_schedule", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("payment_schedule")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string PaymentSchedule { get => this.paymentSchedule; @@ -90,8 +94,9 @@ public string PaymentSchedule /// The number of payments that will be made during a payment period. Defaults to 1 except /// for when payment_schedule is adhoc. In that case, it defaults to no limit. /// - [JsonProperty("payments_per_period")] + [JsonProperty("payments_per_period", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("payments_per_period")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public long? PaymentsPerPeriod { get => this.paymentsPerPeriod; @@ -109,8 +114,9 @@ public long? PaymentsPerPeriod /// other, pension, personal, retail, salary, tax, /// or utility. /// - [JsonProperty("purpose")] + [JsonProperty("purpose", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("purpose")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string Purpose { get => this.purpose; @@ -125,8 +131,9 @@ public string Purpose /// Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to /// confirmation time. /// - [JsonProperty("start_date")] + [JsonProperty("start_date", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("start_date")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string StartDate { get => this.startDate; diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsSepaDebitMandateOptionsOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsSepaDebitMandateOptionsOptions.cs index 3623772143..8c51f0409d 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsSepaDebitMandateOptionsOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsSepaDebitMandateOptionsOptions.cs @@ -19,8 +19,9 @@ public class SessionPaymentMethodOptionsSepaDebitMandateOptionsOptions : INested /// consist of only uppercase letters, numbers, spaces, or the following special characters: /// '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. /// - [JsonProperty("reference_prefix")] + [JsonProperty("reference_prefix", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("reference_prefix")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string ReferencePrefix { get => this.referencePrefix; diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsUpiOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsUpiOptions.cs index 177c73eb23..306f268a2b 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsUpiOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsUpiOptions.cs @@ -24,8 +24,9 @@ public class SessionPaymentMethodOptionsUpiOptions : INestedOptions, IHasSetTrac /// /// One of: none, off_session, or on_session. /// - [JsonProperty("setup_future_usage")] + [JsonProperty("setup_future_usage", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("setup_future_usage")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string SetupFutureUsage { get => this.setupFutureUsage; diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionUpdateOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionUpdateOptions.cs index 10b078caa8..d67a882670 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionUpdateOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionUpdateOptions.cs @@ -47,8 +47,9 @@ public class SessionUpdateOptions : BaseOptions, IHasMetadata /// object in a structured format. Individual keys can be unset by posting an empty value to /// them. All keys can be unset by posting an empty value to metadata. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary Metadata { get => this.metadata; @@ -62,8 +63,9 @@ public Dictionary Metadata /// /// The shipping rate options to apply to this Session. Up to a maximum of 5. /// - [JsonProperty("shipping_options")] + [JsonProperty("shipping_options", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("shipping_options")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List ShippingOptions { get => this.shippingOptions; diff --git a/src/Stripe.net/Services/Climate/Orders/OrderBeneficiaryOptions.cs b/src/Stripe.net/Services/Climate/Orders/OrderBeneficiaryOptions.cs index 2094f96bed..07ecb3b734 100644 --- a/src/Stripe.net/Services/Climate/Orders/OrderBeneficiaryOptions.cs +++ b/src/Stripe.net/Services/Climate/Orders/OrderBeneficiaryOptions.cs @@ -17,8 +17,9 @@ public class OrderBeneficiaryOptions : INestedOptions, IHasSetTracking /// /// Publicly displayable name for the end beneficiary of carbon removal. /// - [JsonProperty("public_name")] + [JsonProperty("public_name", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("public_name")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string PublicName { get => this.publicName; diff --git a/src/Stripe.net/Services/Climate/Orders/OrderUpdateOptions.cs b/src/Stripe.net/Services/Climate/Orders/OrderUpdateOptions.cs index 53a20aed87..6bb6555d67 100644 --- a/src/Stripe.net/Services/Climate/Orders/OrderUpdateOptions.cs +++ b/src/Stripe.net/Services/Climate/Orders/OrderUpdateOptions.cs @@ -15,8 +15,9 @@ public class OrderUpdateOptions : BaseOptions, IHasMetadata /// Publicly sharable reference for the end beneficiary of carbon removal. Assumed to be the /// Stripe account if not set. /// - [JsonProperty("beneficiary")] + [JsonProperty("beneficiary", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("beneficiary")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public OrderBeneficiaryOptions Beneficiary { get => this.beneficiary; diff --git a/src/Stripe.net/Services/Coupons/CouponCreateOptions.cs b/src/Stripe.net/Services/Coupons/CouponCreateOptions.cs index 6ac685e122..5ef0973a08 100644 --- a/src/Stripe.net/Services/Coupons/CouponCreateOptions.cs +++ b/src/Stripe.net/Services/Coupons/CouponCreateOptions.cs @@ -86,8 +86,9 @@ public class CouponCreateOptions : BaseOptions, IHasId, IHasMetadata /// object in a structured format. Individual keys can be unset by posting an empty value to /// them. All keys can be unset by posting an empty value to metadata. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary Metadata { get => this.metadata; diff --git a/src/Stripe.net/Services/Coupons/CouponUpdateOptions.cs b/src/Stripe.net/Services/Coupons/CouponUpdateOptions.cs index b5244b76a6..8a398ef309 100644 --- a/src/Stripe.net/Services/Coupons/CouponUpdateOptions.cs +++ b/src/Stripe.net/Services/Coupons/CouponUpdateOptions.cs @@ -27,8 +27,9 @@ public class CouponUpdateOptions : BaseOptions, IHasMetadata /// object in a structured format. Individual keys can be unset by posting an empty value to /// them. All keys can be unset by posting an empty value to metadata. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary Metadata { get => this.metadata; diff --git a/src/Stripe.net/Services/CreditNotePreviewLines/CreditNotePreviewLinesLineOptions.cs b/src/Stripe.net/Services/CreditNotePreviewLines/CreditNotePreviewLinesLineOptions.cs index 70ed5266d4..df3e1be72a 100644 --- a/src/Stripe.net/Services/CreditNotePreviewLines/CreditNotePreviewLinesLineOptions.cs +++ b/src/Stripe.net/Services/CreditNotePreviewLines/CreditNotePreviewLinesLineOptions.cs @@ -63,8 +63,9 @@ public class CreditNotePreviewLinesLineOptions : INestedOptions, IHasMetadata, I /// tax_rates is used or if invoice is set up with /// automatic_tax[enabled]=true. /// - [JsonProperty("tax_amounts")] + [JsonProperty("tax_amounts", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("tax_amounts")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List TaxAmounts { get => this.taxAmounts; @@ -79,8 +80,9 @@ public List TaxAmounts /// The tax rates which apply to the credit note line item. Only valid when the type /// is custom_line_item and tax_amounts is not used. /// - [JsonProperty("tax_rates")] + [JsonProperty("tax_rates", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("tax_rates")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List TaxRates { get => this.taxRates; diff --git a/src/Stripe.net/Services/CreditNotes/CreditNoteLineOptions.cs b/src/Stripe.net/Services/CreditNotes/CreditNoteLineOptions.cs index 95f48f7fb5..1694583aeb 100644 --- a/src/Stripe.net/Services/CreditNotes/CreditNoteLineOptions.cs +++ b/src/Stripe.net/Services/CreditNotes/CreditNoteLineOptions.cs @@ -63,8 +63,9 @@ public class CreditNoteLineOptions : INestedOptions, IHasMetadata, IHasSetTracki /// tax_rates is used or if invoice is set up with /// automatic_tax[enabled]=true. /// - [JsonProperty("tax_amounts")] + [JsonProperty("tax_amounts", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("tax_amounts")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List TaxAmounts { get => this.taxAmounts; @@ -79,8 +80,9 @@ public List TaxAmounts /// The tax rates which apply to the credit note line item. Only valid when the type /// is custom_line_item and tax_amounts is not used. /// - [JsonProperty("tax_rates")] + [JsonProperty("tax_rates", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("tax_rates")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List TaxRates { get => this.taxRates; diff --git a/src/Stripe.net/Services/CustomerBalanceTransactions/CustomerBalanceTransactionCreateOptions.cs b/src/Stripe.net/Services/CustomerBalanceTransactions/CustomerBalanceTransactionCreateOptions.cs index 0b0c96359b..f589cfd405 100644 --- a/src/Stripe.net/Services/CustomerBalanceTransactions/CustomerBalanceTransactionCreateOptions.cs +++ b/src/Stripe.net/Services/CustomerBalanceTransactions/CustomerBalanceTransactionCreateOptions.cs @@ -44,8 +44,9 @@ public class CustomerBalanceTransactionCreateOptions : BaseOptions, IHasMetadata /// object in a structured format. Individual keys can be unset by posting an empty value to /// them. All keys can be unset by posting an empty value to metadata. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary Metadata { get => this.metadata; diff --git a/src/Stripe.net/Services/CustomerBalanceTransactions/CustomerBalanceTransactionUpdateOptions.cs b/src/Stripe.net/Services/CustomerBalanceTransactions/CustomerBalanceTransactionUpdateOptions.cs index c09691ee6a..183d608c10 100644 --- a/src/Stripe.net/Services/CustomerBalanceTransactions/CustomerBalanceTransactionUpdateOptions.cs +++ b/src/Stripe.net/Services/CustomerBalanceTransactions/CustomerBalanceTransactionUpdateOptions.cs @@ -24,8 +24,9 @@ public class CustomerBalanceTransactionUpdateOptions : BaseOptions, IHasMetadata /// object in a structured format. Individual keys can be unset by posting an empty value to /// them. All keys can be unset by posting an empty value to metadata. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary Metadata { get => this.metadata; diff --git a/src/Stripe.net/Services/CustomerPaymentSources/CustomerPaymentSourceUpdateOptions.cs b/src/Stripe.net/Services/CustomerPaymentSources/CustomerPaymentSourceUpdateOptions.cs index a0b2e783ac..1d7344ed2c 100644 --- a/src/Stripe.net/Services/CustomerPaymentSources/CustomerPaymentSourceUpdateOptions.cs +++ b/src/Stripe.net/Services/CustomerPaymentSources/CustomerPaymentSourceUpdateOptions.cs @@ -89,8 +89,9 @@ public class CustomerPaymentSourceUpdateOptions : BaseOptions, IHasMetadata /// object in a structured format. Individual keys can be unset by posting an empty value to /// them. All keys can be unset by posting an empty value to metadata. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary Metadata { get => this.metadata; diff --git a/src/Stripe.net/Services/Customers/CustomerCreateOptions.cs b/src/Stripe.net/Services/Customers/CustomerCreateOptions.cs index 2f5b202271..16f4cd880c 100644 --- a/src/Stripe.net/Services/Customers/CustomerCreateOptions.cs +++ b/src/Stripe.net/Services/Customers/CustomerCreateOptions.cs @@ -21,8 +21,9 @@ public class CustomerCreateOptions : BaseOptions, IHasMetadata /// href="https://docs.stripe.com/invoicing/taxes?dashboard-or-api=dashboard#set-up-customer">country-specific /// requirements for calculating tax. /// - [JsonProperty("address")] + [JsonProperty("address", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("address")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public AddressOptions Address { get => this.address; @@ -46,8 +47,9 @@ public AddressOptions Address /// /// The customer's business name. This may be up to 150 characters. /// - [JsonProperty("business_name")] + [JsonProperty("business_name", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("business_name")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string BusinessName { get => this.businessName; @@ -84,8 +86,9 @@ public string BusinessName /// /// The customer's full name. This may be up to 150 characters. /// - [JsonProperty("individual_name")] + [JsonProperty("individual_name", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("individual_name")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string IndividualName { get => this.individualName; @@ -117,8 +120,9 @@ public string IndividualName /// object in a structured format. Individual keys can be unset by posting an empty value to /// them. All keys can be unset by posting an empty value to metadata. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary Metadata { get => this.metadata; @@ -168,8 +172,9 @@ public Dictionary Metadata /// /// The customer's shipping information. Appears on invoices emailed to this customer. /// - [JsonProperty("shipping")] + [JsonProperty("shipping", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("shipping")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public ShippingOptions Shipping { get => this.shipping; @@ -197,8 +202,9 @@ public ShippingOptions Shipping /// The customer's tax exemption. One of none, exempt, or reverse. /// One of: exempt, none, or reverse. /// - [JsonProperty("tax_exempt")] + [JsonProperty("tax_exempt", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("tax_exempt")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string TaxExempt { get => this.taxExempt; diff --git a/src/Stripe.net/Services/Customers/CustomerInvoiceSettingsOptions.cs b/src/Stripe.net/Services/Customers/CustomerInvoiceSettingsOptions.cs index 603879c399..0f76364172 100644 --- a/src/Stripe.net/Services/Customers/CustomerInvoiceSettingsOptions.cs +++ b/src/Stripe.net/Services/Customers/CustomerInvoiceSettingsOptions.cs @@ -20,8 +20,9 @@ public class CustomerInvoiceSettingsOptions : INestedOptions, IHasSetTracking /// The list of up to 4 default custom fields to be displayed on invoices for this customer. /// When updating, pass an empty string to remove previously-defined fields. /// - [JsonProperty("custom_fields")] + [JsonProperty("custom_fields", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("custom_fields")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List CustomFields { get => this.customFields; @@ -50,8 +51,9 @@ public List CustomFields /// /// Default options for invoice PDF rendering for this customer. /// - [JsonProperty("rendering_options")] + [JsonProperty("rendering_options", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("rendering_options")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public CustomerInvoiceSettingsRenderingOptionsOptions RenderingOptions { get => this.renderingOptions; diff --git a/src/Stripe.net/Services/Customers/CustomerInvoiceSettingsRenderingOptionsOptions.cs b/src/Stripe.net/Services/Customers/CustomerInvoiceSettingsRenderingOptionsOptions.cs index 09977b8cd9..1a9007fd91 100644 --- a/src/Stripe.net/Services/Customers/CustomerInvoiceSettingsRenderingOptionsOptions.cs +++ b/src/Stripe.net/Services/Customers/CustomerInvoiceSettingsRenderingOptionsOptions.cs @@ -22,8 +22,9 @@ public class CustomerInvoiceSettingsRenderingOptionsOptions : INestedOptions, IH /// amounts. /// One of: exclude_tax, or include_inclusive_tax. /// - [JsonProperty("amount_tax_display")] + [JsonProperty("amount_tax_display", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("amount_tax_display")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string AmountTaxDisplay { get => this.amountTaxDisplay; diff --git a/src/Stripe.net/Services/Customers/CustomerTaxOptions.cs b/src/Stripe.net/Services/Customers/CustomerTaxOptions.cs index f5f410a5d5..b478a2db51 100644 --- a/src/Stripe.net/Services/Customers/CustomerTaxOptions.cs +++ b/src/Stripe.net/Services/Customers/CustomerTaxOptions.cs @@ -20,8 +20,9 @@ public class CustomerTaxOptions : INestedOptions, IHasSetTracking /// address field on the customer is updated. We recommend against updating this field more /// frequently since it could result in unexpected tax location/reporting outcomes. /// - [JsonProperty("ip_address")] + [JsonProperty("ip_address", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("ip_address")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string IpAddress { get => this.ipAddress; diff --git a/src/Stripe.net/Services/Customers/CustomerUpdateOptions.cs b/src/Stripe.net/Services/Customers/CustomerUpdateOptions.cs index 7116969829..1b0fa5c824 100644 --- a/src/Stripe.net/Services/Customers/CustomerUpdateOptions.cs +++ b/src/Stripe.net/Services/Customers/CustomerUpdateOptions.cs @@ -21,8 +21,9 @@ public class CustomerUpdateOptions : BaseOptions, IHasMetadata /// href="https://docs.stripe.com/invoicing/taxes?dashboard-or-api=dashboard#set-up-customer">country-specific /// requirements for calculating tax. /// - [JsonProperty("address")] + [JsonProperty("address", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("address")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public AddressOptions Address { get => this.address; @@ -46,8 +47,9 @@ public AddressOptions Address /// /// The customer's business name. This may be up to 150 characters. /// - [JsonProperty("business_name")] + [JsonProperty("business_name", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("business_name")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string BusinessName { get => this.businessName; @@ -100,8 +102,9 @@ public string BusinessName /// /// The customer's full name. This may be up to 150 characters. /// - [JsonProperty("individual_name")] + [JsonProperty("individual_name", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("individual_name")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string IndividualName { get => this.individualName; @@ -133,8 +136,9 @@ public string IndividualName /// object in a structured format. Individual keys can be unset by posting an empty value to /// them. All keys can be unset by posting an empty value to metadata. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary Metadata { get => this.metadata; @@ -176,8 +180,9 @@ public Dictionary Metadata /// /// The customer's shipping information. Appears on invoices emailed to this customer. /// - [JsonProperty("shipping")] + [JsonProperty("shipping", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("shipping")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public ShippingOptions Shipping { get => this.shipping; @@ -205,8 +210,9 @@ public ShippingOptions Shipping /// The customer's tax exemption. One of none, exempt, or reverse. /// One of: exempt, none, or reverse. /// - [JsonProperty("tax_exempt")] + [JsonProperty("tax_exempt", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("tax_exempt")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string TaxExempt { get => this.taxExempt; diff --git a/src/Stripe.net/Services/Disputes/DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransactionOptions.cs b/src/Stripe.net/Services/Disputes/DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransactionOptions.cs index 332182faeb..afb74c0a51 100644 --- a/src/Stripe.net/Services/Disputes/DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransactionOptions.cs +++ b/src/Stripe.net/Services/Disputes/DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransactionOptions.cs @@ -22,8 +22,9 @@ public class DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTrans /// /// User Account ID used to log into business platform. Must be recognizable by the user. /// - [JsonProperty("customer_account_id")] + [JsonProperty("customer_account_id", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("customer_account_id")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string CustomerAccountId { get => this.customerAccountId; @@ -38,8 +39,9 @@ public string CustomerAccountId /// Unique identifier of the cardholder’s device derived from a combination of at least two /// hardware and software attributes. Must be at least 20 characters. /// - [JsonProperty("customer_device_fingerprint")] + [JsonProperty("customer_device_fingerprint", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("customer_device_fingerprint")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string CustomerDeviceFingerprint { get => this.customerDeviceFingerprint; @@ -54,8 +56,9 @@ public string CustomerDeviceFingerprint /// Unique identifier of the cardholder’s device such as a device serial number (e.g., /// International Mobile Equipment Identity [IMEI]). Must be at least 15 characters. /// - [JsonProperty("customer_device_id")] + [JsonProperty("customer_device_id", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("customer_device_id")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string CustomerDeviceId { get => this.customerDeviceId; @@ -69,8 +72,9 @@ public string CustomerDeviceId /// /// The email address of the customer. /// - [JsonProperty("customer_email_address")] + [JsonProperty("customer_email_address", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("customer_email_address")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string CustomerEmailAddress { get => this.customerEmailAddress; @@ -84,8 +88,9 @@ public string CustomerEmailAddress /// /// The IP address that the customer used when making the purchase. /// - [JsonProperty("customer_purchase_ip")] + [JsonProperty("customer_purchase_ip", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("customer_purchase_ip")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string CustomerPurchaseIp { get => this.customerPurchaseIp; @@ -107,8 +112,9 @@ public string CustomerPurchaseIp /// /// A description of the product or service that was sold. /// - [JsonProperty("product_description")] + [JsonProperty("product_description", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("product_description")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string ProductDescription { get => this.productDescription; diff --git a/src/Stripe.net/Services/Disputes/DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3PriorUndisputedTransactionOptions.cs b/src/Stripe.net/Services/Disputes/DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3PriorUndisputedTransactionOptions.cs index c283e43f11..f90288443e 100644 --- a/src/Stripe.net/Services/Disputes/DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3PriorUndisputedTransactionOptions.cs +++ b/src/Stripe.net/Services/Disputes/DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3PriorUndisputedTransactionOptions.cs @@ -29,8 +29,9 @@ public class DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3PriorUndisput /// /// User Account ID used to log into business platform. Must be recognizable by the user. /// - [JsonProperty("customer_account_id")] + [JsonProperty("customer_account_id", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("customer_account_id")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string CustomerAccountId { get => this.customerAccountId; @@ -45,8 +46,9 @@ public string CustomerAccountId /// Unique identifier of the cardholder’s device derived from a combination of at least two /// hardware and software attributes. Must be at least 20 characters. /// - [JsonProperty("customer_device_fingerprint")] + [JsonProperty("customer_device_fingerprint", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("customer_device_fingerprint")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string CustomerDeviceFingerprint { get => this.customerDeviceFingerprint; @@ -61,8 +63,9 @@ public string CustomerDeviceFingerprint /// Unique identifier of the cardholder’s device such as a device serial number (e.g., /// International Mobile Equipment Identity [IMEI]). Must be at least 15 characters. /// - [JsonProperty("customer_device_id")] + [JsonProperty("customer_device_id", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("customer_device_id")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string CustomerDeviceId { get => this.customerDeviceId; @@ -76,8 +79,9 @@ public string CustomerDeviceId /// /// The email address of the customer. /// - [JsonProperty("customer_email_address")] + [JsonProperty("customer_email_address", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("customer_email_address")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string CustomerEmailAddress { get => this.customerEmailAddress; @@ -91,8 +95,9 @@ public string CustomerEmailAddress /// /// The IP address that the customer used when making the purchase. /// - [JsonProperty("customer_purchase_ip")] + [JsonProperty("customer_purchase_ip", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("customer_purchase_ip")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string CustomerPurchaseIp { get => this.customerPurchaseIp; @@ -106,8 +111,9 @@ public string CustomerPurchaseIp /// /// A description of the product or service that was sold. /// - [JsonProperty("product_description")] + [JsonProperty("product_description", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("product_description")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string ProductDescription { get => this.productDescription; diff --git a/src/Stripe.net/Services/Disputes/DisputeEvidenceOptions.cs b/src/Stripe.net/Services/Disputes/DisputeEvidenceOptions.cs index 92a25a2514..d85abcaa89 100644 --- a/src/Stripe.net/Services/Disputes/DisputeEvidenceOptions.cs +++ b/src/Stripe.net/Services/Disputes/DisputeEvidenceOptions.cs @@ -122,8 +122,9 @@ public class DisputeEvidenceOptions : INestedOptions, IHasSetTracking /// /// Additional evidence for qualifying evidence programs. /// - [JsonProperty("enhanced_evidence")] + [JsonProperty("enhanced_evidence", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("enhanced_evidence")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public DisputeEvidenceEnhancedEvidenceOptions EnhancedEvidence { get => this.enhancedEvidence; diff --git a/src/Stripe.net/Services/Disputes/DisputeUpdateOptions.cs b/src/Stripe.net/Services/Disputes/DisputeUpdateOptions.cs index b2bdf6c869..9ec78845ee 100644 --- a/src/Stripe.net/Services/Disputes/DisputeUpdateOptions.cs +++ b/src/Stripe.net/Services/Disputes/DisputeUpdateOptions.cs @@ -26,8 +26,9 @@ public class DisputeUpdateOptions : BaseOptions, IHasMetadata /// object in a structured format. Individual keys can be unset by posting an empty value to /// them. All keys can be unset by posting an empty value to metadata. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary Metadata { get => this.metadata; diff --git a/src/Stripe.net/Services/Entitlements/Features/FeatureUpdateOptions.cs b/src/Stripe.net/Services/Entitlements/Features/FeatureUpdateOptions.cs index 6eedd0358c..2ead8cd6cd 100644 --- a/src/Stripe.net/Services/Entitlements/Features/FeatureUpdateOptions.cs +++ b/src/Stripe.net/Services/Entitlements/Features/FeatureUpdateOptions.cs @@ -23,8 +23,9 @@ public class FeatureUpdateOptions : BaseOptions, IHasMetadata /// Set of key-value pairs that you can attach to an object. This can be useful for storing /// additional information about the object in a structured format. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary Metadata { get => this.metadata; diff --git a/src/Stripe.net/Services/FileLinks/FileLinkCreateOptions.cs b/src/Stripe.net/Services/FileLinks/FileLinkCreateOptions.cs index 900eb99ec1..7b5bf69fd6 100644 --- a/src/Stripe.net/Services/FileLinks/FileLinkCreateOptions.cs +++ b/src/Stripe.net/Services/FileLinks/FileLinkCreateOptions.cs @@ -40,8 +40,9 @@ public class FileLinkCreateOptions : BaseOptions, IHasMetadata /// object in a structured format. Individual keys can be unset by posting an empty value to /// them. All keys can be unset by posting an empty value to metadata. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary Metadata { get => this.metadata; diff --git a/src/Stripe.net/Services/FileLinks/FileLinkUpdateOptions.cs b/src/Stripe.net/Services/FileLinks/FileLinkUpdateOptions.cs index 4fd33e69bf..ae9af84ddf 100644 --- a/src/Stripe.net/Services/FileLinks/FileLinkUpdateOptions.cs +++ b/src/Stripe.net/Services/FileLinks/FileLinkUpdateOptions.cs @@ -28,8 +28,9 @@ public class FileLinkUpdateOptions : BaseOptions, IHasMetadata /// object in a structured format. Individual keys can be unset by posting an empty value to /// them. All keys can be unset by posting an empty value to metadata. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary Metadata { get => this.metadata; diff --git a/src/Stripe.net/Services/Files/FileFileLinkDataOptions.cs b/src/Stripe.net/Services/Files/FileFileLinkDataOptions.cs index 7cccf08d83..bd050f239d 100644 --- a/src/Stripe.net/Services/Files/FileFileLinkDataOptions.cs +++ b/src/Stripe.net/Services/Files/FileFileLinkDataOptions.cs @@ -43,8 +43,9 @@ public class FileFileLinkDataOptions : INestedOptions, IHasMetadata, IHasSetTrac /// object in a structured format. Individual keys can be unset by posting an empty value to /// them. All keys can be unset by posting an empty value to metadata. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary Metadata { get => this.metadata; diff --git a/src/Stripe.net/Services/Identity/VerificationSessions/VerificationSessionOptionsOptions.cs b/src/Stripe.net/Services/Identity/VerificationSessions/VerificationSessionOptionsOptions.cs index 571e4ae127..c79eb61045 100644 --- a/src/Stripe.net/Services/Identity/VerificationSessions/VerificationSessionOptionsOptions.cs +++ b/src/Stripe.net/Services/Identity/VerificationSessions/VerificationSessionOptionsOptions.cs @@ -19,8 +19,9 @@ public class VerificationSessionOptionsOptions : INestedOptions, IHasSetTracking /// href="https://docs.stripe.com/identity/verification-checks?type=document">document /// check. /// - [JsonProperty("document")] + [JsonProperty("document", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("document")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public VerificationSessionOptionsDocumentOptions Document { get => this.document; diff --git a/src/Stripe.net/Services/InvoiceItems/InvoiceItemCreateOptions.cs b/src/Stripe.net/Services/InvoiceItems/InvoiceItemCreateOptions.cs index 8123caec58..de52278b8a 100644 --- a/src/Stripe.net/Services/InvoiceItems/InvoiceItemCreateOptions.cs +++ b/src/Stripe.net/Services/InvoiceItems/InvoiceItemCreateOptions.cs @@ -65,8 +65,9 @@ public class InvoiceItemCreateOptions : BaseOptions, IHasMetadata /// The coupons and promotion codes to redeem into discounts for the invoice item or invoice /// line item. /// - [JsonProperty("discounts")] + [JsonProperty("discounts", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("discounts")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List Discounts { get => this.discounts; @@ -95,8 +96,9 @@ public List Discounts /// object in a structured format. Individual keys can be unset by posting an empty value to /// them. All keys can be unset by posting an empty value to metadata. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary Metadata { get => this.metadata; @@ -180,8 +182,9 @@ public Dictionary Metadata /// /// A tax code ID. /// - [JsonProperty("tax_code")] + [JsonProperty("tax_code", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("tax_code")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string TaxCode { get => this.taxCode; diff --git a/src/Stripe.net/Services/InvoiceItems/InvoiceItemUpdateOptions.cs b/src/Stripe.net/Services/InvoiceItems/InvoiceItemUpdateOptions.cs index 55178c403e..0098dd0cfd 100644 --- a/src/Stripe.net/Services/InvoiceItems/InvoiceItemUpdateOptions.cs +++ b/src/Stripe.net/Services/InvoiceItems/InvoiceItemUpdateOptions.cs @@ -45,8 +45,9 @@ public class InvoiceItemUpdateOptions : BaseOptions, IHasMetadata /// invoice line item. Item discounts are applied before invoice discounts. Pass an empty /// string to remove previously-defined discounts. /// - [JsonProperty("discounts")] + [JsonProperty("discounts", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("discounts")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List Discounts { get => this.discounts; @@ -63,8 +64,9 @@ public List Discounts /// object in a structured format. Individual keys can be unset by posting an empty value to /// them. All keys can be unset by posting an empty value to metadata. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary Metadata { get => this.metadata; @@ -137,8 +139,9 @@ public Dictionary Metadata /// /// A tax code ID. /// - [JsonProperty("tax_code")] + [JsonProperty("tax_code", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("tax_code")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string TaxCode { get => this.taxCode; @@ -154,8 +157,9 @@ public string TaxCode /// the invoice do not apply to this invoice item. Pass an empty string to remove /// previously-defined tax rates. /// - [JsonProperty("tax_rates")] + [JsonProperty("tax_rates", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("tax_rates")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List TaxRates { get => this.taxRates; diff --git a/src/Stripe.net/Services/InvoiceLineItems/InvoiceLineItemUpdateOptions.cs b/src/Stripe.net/Services/InvoiceLineItems/InvoiceLineItemUpdateOptions.cs index 3799b12070..c9881d6b29 100644 --- a/src/Stripe.net/Services/InvoiceLineItems/InvoiceLineItemUpdateOptions.cs +++ b/src/Stripe.net/Services/InvoiceLineItems/InvoiceLineItemUpdateOptions.cs @@ -45,8 +45,9 @@ public class InvoiceLineItemUpdateOptions : BaseOptions, IHasMetadata /// discounts are applied before invoice discounts. Pass an empty string to remove /// previously-defined discounts. /// - [JsonProperty("discounts")] + [JsonProperty("discounts", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("discounts")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List Discounts { get => this.discounts; @@ -68,8 +69,9 @@ public List Discounts /// line items, where any existing metadata on the invoice line is merged with the incoming /// data. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary Metadata { get => this.metadata; @@ -136,8 +138,9 @@ public Dictionary Metadata /// or uses automatic tax. Pass an empty /// string to remove previously defined tax amounts. /// - [JsonProperty("tax_amounts")] + [JsonProperty("tax_amounts", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("tax_amounts")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List TaxAmounts { get => this.taxAmounts; @@ -153,8 +156,9 @@ public List TaxAmounts /// the invoice do not apply to this line item. Pass an empty string to remove /// previously-defined tax rates. /// - [JsonProperty("tax_rates")] + [JsonProperty("tax_rates", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("tax_rates")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List TaxRates { get => this.taxRates; diff --git a/src/Stripe.net/Services/Invoices/InvoiceAddLinesOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceAddLinesOptions.cs index cdc5818d59..e052d9f592 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceAddLinesOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceAddLinesOptions.cs @@ -17,8 +17,9 @@ public class InvoiceAddLinesOptions : BaseOptions /// object in a structured format. Individual keys can be unset by posting an empty value to /// them. All keys can be unset by posting an empty value to metadata. /// - [JsonProperty("invoice_metadata")] + [JsonProperty("invoice_metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("invoice_metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary InvoiceMetadata { get => this.invoiceMetadata; diff --git a/src/Stripe.net/Services/Invoices/InvoiceCreateOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceCreateOptions.cs index f919950e18..20c60480da 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceCreateOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceCreateOptions.cs @@ -19,8 +19,9 @@ public class InvoiceCreateOptions : BaseOptions, IHasMetadata /// The account tax IDs associated with the invoice. Only editable when the invoice is a /// draft. /// - [JsonProperty("account_tax_ids")] + [JsonProperty("account_tax_ids", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("account_tax_ids")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List AccountTaxIds { get => this.accountTaxIds; @@ -91,8 +92,9 @@ public List AccountTaxIds /// /// A list of up to 4 custom fields to be displayed on the invoice. /// - [JsonProperty("custom_fields")] + [JsonProperty("custom_fields", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("custom_fields")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List CustomFields { get => this.customFields; @@ -163,8 +165,9 @@ public List CustomFields /// specified, inherits the discount from the invoice's customer. Pass an empty string to /// avoid inheriting any discounts. /// - [JsonProperty("discounts")] + [JsonProperty("discounts", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("discounts")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List Discounts { get => this.discounts; @@ -226,8 +229,9 @@ public List Discounts /// object in a structured format. Individual keys can be unset by posting an empty value to /// them. All keys can be unset by posting an empty value to metadata. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary Metadata { get => this.metadata; diff --git a/src/Stripe.net/Services/Invoices/InvoiceCreatePreviewOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceCreatePreviewOptions.cs index b47a3ab9e1..9177e651b2 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceCreatePreviewOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceCreatePreviewOptions.cs @@ -61,8 +61,9 @@ public class InvoiceCreatePreviewOptions : BaseOptions /// applied to an invoice and coupons applied to a subscription. Pass an empty string to /// avoid inheriting any discounts. /// - [JsonProperty("discounts")] + [JsonProperty("discounts", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("discounts")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List Discounts { get => this.discounts; @@ -94,8 +95,9 @@ public List Discounts /// account. See the Invoices /// with Connect documentation for details. /// - [JsonProperty("on_behalf_of")] + [JsonProperty("on_behalf_of", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("on_behalf_of")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string OnBehalfOf { get => this.onBehalfOf; diff --git a/src/Stripe.net/Services/Invoices/InvoiceCustomerDetailsOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceCustomerDetailsOptions.cs index a4de84be7b..565bd5134a 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceCustomerDetailsOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceCustomerDetailsOptions.cs @@ -22,8 +22,9 @@ public class InvoiceCustomerDetailsOptions : INestedOptions, IHasSetTracking /// href="https://stripe.com/invoicing/taxes?dashboard-or-api=dashboard#set-up-customer">country-specific /// requirements for calculating tax. /// - [JsonProperty("address")] + [JsonProperty("address", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("address")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public AddressOptions Address { get => this.address; @@ -37,8 +38,9 @@ public AddressOptions Address /// /// The customer's shipping information. Appears on invoices emailed to this customer. /// - [JsonProperty("shipping")] + [JsonProperty("shipping", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("shipping")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public ShippingOptions Shipping { get => this.shipping; @@ -60,8 +62,9 @@ public ShippingOptions Shipping /// The customer's tax exemption. One of none, exempt, or reverse. /// One of: exempt, none, or reverse. /// - [JsonProperty("tax_exempt")] + [JsonProperty("tax_exempt", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("tax_exempt")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string TaxExempt { get => this.taxExempt; diff --git a/src/Stripe.net/Services/Invoices/InvoiceCustomerDetailsTaxOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceCustomerDetailsTaxOptions.cs index 768bd587ea..4617f5b76e 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceCustomerDetailsTaxOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceCustomerDetailsTaxOptions.cs @@ -20,8 +20,9 @@ public class InvoiceCustomerDetailsTaxOptions : INestedOptions, IHasSetTracking /// address field on the customer is updated. We recommend against updating this field more /// frequently since it could result in unexpected tax location/reporting outcomes. /// - [JsonProperty("ip_address")] + [JsonProperty("ip_address", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("ip_address")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string IpAddress { get => this.ipAddress; diff --git a/src/Stripe.net/Services/Invoices/InvoiceLineOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceLineOptions.cs index 0b9954a0e3..6d8e013ec5 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceLineOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceLineOptions.cs @@ -58,8 +58,9 @@ public class InvoiceLineOptions : INestedOptions, IHasMetadata, IHasId, IHasSetT /// discounts are applied before invoice discounts. Pass an empty string to remove /// previously-defined discounts. /// - [JsonProperty("discounts")] + [JsonProperty("discounts", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("discounts")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List Discounts { get => this.discounts; @@ -96,8 +97,9 @@ public List Discounts /// href="api/invoices/line_item#invoice_line_item_object-type">type=invoiceitem line /// items, where any existing metadata on the invoice line is merged with the incoming data. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary Metadata { get => this.metadata; @@ -164,8 +166,9 @@ public Dictionary Metadata /// or uses automatic tax. Pass an empty /// string to remove previously defined tax amounts. /// - [JsonProperty("tax_amounts")] + [JsonProperty("tax_amounts", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("tax_amounts")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List TaxAmounts { get => this.taxAmounts; @@ -181,8 +184,9 @@ public List TaxAmounts /// the invoice do not apply to this line item. Pass an empty string to remove /// previously-defined tax rates. /// - [JsonProperty("tax_rates")] + [JsonProperty("tax_rates", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("tax_rates")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List TaxRates { get => this.taxRates; diff --git a/src/Stripe.net/Services/Invoices/InvoicePayOptions.cs b/src/Stripe.net/Services/Invoices/InvoicePayOptions.cs index f75d24914c..303ade9d7d 100644 --- a/src/Stripe.net/Services/Invoices/InvoicePayOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoicePayOptions.cs @@ -30,8 +30,9 @@ public class InvoicePayOptions : BaseOptions /// used to pay the invoice, including the payment_method param or the invoice's /// default_payment_method or default_source, if set. /// - [JsonProperty("mandate")] + [JsonProperty("mandate", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("mandate")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string Mandate { get => this.mandate; diff --git a/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsOptions.cs b/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsOptions.cs index 317c70c2db..dd7bf341f2 100644 --- a/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsOptions.cs @@ -21,8 +21,9 @@ public class InvoicePaymentSettingsOptions : INestedOptions, IHasSetTracking /// used to pay the invoice, including the invoice's default_payment_method or /// default_source, if set. /// - [JsonProperty("default_mandate")] + [JsonProperty("default_mandate", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("default_mandate")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string DefaultMandate { get => this.defaultMandate; @@ -58,8 +59,9 @@ public string DefaultMandate /// sepa_credit_transfer, sepa_debit, sofort, swish, /// us_bank_account, or wechat_pay. /// - [JsonProperty("payment_method_types")] + [JsonProperty("payment_method_types", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("payment_method_types")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List PaymentMethodTypes { get => this.paymentMethodTypes; diff --git a/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsPaymentMethodOptionsCardInstallmentsOptions.cs b/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsPaymentMethodOptionsCardInstallmentsOptions.cs index 1180a0351c..0a4a1fde49 100644 --- a/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsPaymentMethodOptionsCardInstallmentsOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsPaymentMethodOptionsCardInstallmentsOptions.cs @@ -25,8 +25,9 @@ public class InvoicePaymentSettingsPaymentMethodOptionsCardInstallmentsOptions : /// /// The selected installment plan to use for this invoice. /// - [JsonProperty("plan")] + [JsonProperty("plan", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("plan")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public InvoicePaymentSettingsPaymentMethodOptionsCardInstallmentsPlanOptions Plan { get => this.plan; diff --git a/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsPaymentMethodOptionsOptions.cs b/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsPaymentMethodOptionsOptions.cs index 4e76d301ed..4a07674051 100644 --- a/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsPaymentMethodOptionsOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsPaymentMethodOptionsOptions.cs @@ -25,8 +25,9 @@ public class InvoicePaymentSettingsPaymentMethodOptionsOptions : INestedOptions, /// If paying by acss_debit, this sub-hash contains details about the Canadian /// pre-authorized debit payment method options to pass to the invoice’s PaymentIntent. /// - [JsonProperty("acss_debit")] + [JsonProperty("acss_debit", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("acss_debit")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public InvoicePaymentSettingsPaymentMethodOptionsAcssDebitOptions AcssDebit { get => this.acssDebit; @@ -41,8 +42,9 @@ public InvoicePaymentSettingsPaymentMethodOptionsAcssDebitOptions AcssDebit /// If paying by bancontact, this sub-hash contains details about the Bancontact /// payment method options to pass to the invoice’s PaymentIntent. /// - [JsonProperty("bancontact")] + [JsonProperty("bancontact", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("bancontact")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public InvoicePaymentSettingsPaymentMethodOptionsBancontactOptions Bancontact { get => this.bancontact; @@ -57,8 +59,9 @@ public InvoicePaymentSettingsPaymentMethodOptionsBancontactOptions Bancontact /// If paying by card, this sub-hash contains details about the Card payment method /// options to pass to the invoice’s PaymentIntent. /// - [JsonProperty("card")] + [JsonProperty("card", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("card")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public InvoicePaymentSettingsPaymentMethodOptionsCardOptions Card { get => this.card; @@ -73,8 +76,9 @@ public InvoicePaymentSettingsPaymentMethodOptionsCardOptions Card /// If paying by customer_balance, this sub-hash contains details about the Bank /// transfer payment method options to pass to the invoice’s PaymentIntent. /// - [JsonProperty("customer_balance")] + [JsonProperty("customer_balance", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("customer_balance")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceOptions CustomerBalance { get => this.customerBalance; @@ -89,8 +93,9 @@ public InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceOptions Customer /// If paying by konbini, this sub-hash contains details about the Konbini payment /// method options to pass to the invoice’s PaymentIntent. /// - [JsonProperty("konbini")] + [JsonProperty("konbini", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("konbini")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public InvoicePaymentSettingsPaymentMethodOptionsKonbiniOptions Konbini { get => this.konbini; @@ -105,8 +110,9 @@ public InvoicePaymentSettingsPaymentMethodOptionsKonbiniOptions Konbini /// If paying by payto, this sub-hash contains details about the PayTo payment method /// options to pass to the invoice’s PaymentIntent. /// - [JsonProperty("payto")] + [JsonProperty("payto", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("payto")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public InvoicePaymentSettingsPaymentMethodOptionsPaytoOptions Payto { get => this.payto; @@ -121,8 +127,9 @@ public InvoicePaymentSettingsPaymentMethodOptionsPaytoOptions Payto /// If paying by sepa_debit, this sub-hash contains details about the SEPA Direct /// Debit payment method options to pass to the invoice’s PaymentIntent. /// - [JsonProperty("sepa_debit")] + [JsonProperty("sepa_debit", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("sepa_debit")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public InvoicePaymentSettingsPaymentMethodOptionsSepaDebitOptions SepaDebit { get => this.sepaDebit; @@ -137,8 +144,9 @@ public InvoicePaymentSettingsPaymentMethodOptionsSepaDebitOptions SepaDebit /// If paying by us_bank_account, this sub-hash contains details about the ACH direct /// debit payment method options to pass to the invoice’s PaymentIntent. /// - [JsonProperty("us_bank_account")] + [JsonProperty("us_bank_account", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("us_bank_account")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public InvoicePaymentSettingsPaymentMethodOptionsUsBankAccountOptions UsBankAccount { get => this.usBankAccount; diff --git a/src/Stripe.net/Services/Invoices/InvoiceRemoveLinesOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceRemoveLinesOptions.cs index b92e61b5cf..667003e525 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceRemoveLinesOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceRemoveLinesOptions.cs @@ -17,8 +17,9 @@ public class InvoiceRemoveLinesOptions : BaseOptions /// object in a structured format. Individual keys can be unset by posting an empty value to /// them. All keys can be unset by posting an empty value to metadata. /// - [JsonProperty("invoice_metadata")] + [JsonProperty("invoice_metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("invoice_metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary InvoiceMetadata { get => this.invoiceMetadata; diff --git a/src/Stripe.net/Services/Invoices/InvoiceRenderingOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceRenderingOptions.cs index ce30809e2b..b075c313ce 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceRenderingOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceRenderingOptions.cs @@ -23,8 +23,9 @@ public class InvoiceRenderingOptions : INestedOptions, IHasSetTracking /// amounts. /// One of: exclude_tax, or include_inclusive_tax. /// - [JsonProperty("amount_tax_display")] + [JsonProperty("amount_tax_display", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("amount_tax_display")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string AmountTaxDisplay { get => this.amountTaxDisplay; @@ -52,8 +53,9 @@ public string AmountTaxDisplay /// /// The specific version of invoice rendering template to use for this invoice. /// - [JsonProperty("template_version")] + [JsonProperty("template_version", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("template_version")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public long? TemplateVersion { get => this.templateVersion; diff --git a/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseAddInvoiceItemOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseAddInvoiceItemOptions.cs index acbfaec38c..d71fdcd42e 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseAddInvoiceItemOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseAddInvoiceItemOptions.cs @@ -67,8 +67,9 @@ public class InvoiceScheduleDetailsPhaseAddInvoiceItemOptions : INestedOptions, /// The tax rates which apply to the item. When set, the default_tax_rates do not /// apply to this item. /// - [JsonProperty("tax_rates")] + [JsonProperty("tax_rates", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("tax_rates")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List TaxRates { get => this.taxRates; diff --git a/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseInvoiceSettingsOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseInvoiceSettingsOptions.cs index 1083763b31..2ec131aaaa 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseInvoiceSettingsOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseInvoiceSettingsOptions.cs @@ -19,8 +19,9 @@ public class InvoiceScheduleDetailsPhaseInvoiceSettingsOptions : INestedOptions, /// The account tax IDs associated with this phase of the subscription schedule. Will be set /// on invoices generated by this phase of the subscription schedule. /// - [JsonProperty("account_tax_ids")] + [JsonProperty("account_tax_ids", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("account_tax_ids")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List AccountTaxIds { get => this.accountTaxIds; diff --git a/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseItemOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseItemOptions.cs index d2a550a847..0185faf027 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseItemOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseItemOptions.cs @@ -21,8 +21,9 @@ public class InvoiceScheduleDetailsPhaseItemOptions : INestedOptions, IHasMetada /// Define thresholds at which an invoice will be sent, and the subscription advanced to a /// new billing period. Pass an empty string to remove previously-defined thresholds. /// - [JsonProperty("billing_thresholds")] + [JsonProperty("billing_thresholds", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("billing_thresholds")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public InvoiceScheduleDetailsPhaseItemBillingThresholdsOptions BillingThresholds { get => this.billingThresholds; @@ -36,8 +37,9 @@ public InvoiceScheduleDetailsPhaseItemBillingThresholdsOptions BillingThresholds /// /// The coupons to redeem into discounts for the subscription item. /// - [JsonProperty("discounts")] + [JsonProperty("discounts", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("discounts")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List Discounts { get => this.discounts; @@ -100,8 +102,9 @@ public List Discounts /// on the Subscription. When updating, pass an empty string to remove previously-defined /// tax rates. /// - [JsonProperty("tax_rates")] + [JsonProperty("tax_rates", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("tax_rates")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List TaxRates { get => this.taxRates; diff --git a/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseOptions.cs index f819f7b07a..69d871fdc5 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseOptions.cs @@ -62,8 +62,9 @@ public class InvoiceScheduleDetailsPhaseOptions : INestedOptions, IHasMetadata, /// Define thresholds at which an invoice will be sent, and the subscription advanced to a /// new billing period. Pass an empty string to remove previously-defined thresholds. /// - [JsonProperty("billing_thresholds")] + [JsonProperty("billing_thresholds", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("billing_thresholds")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public InvoiceScheduleDetailsPhaseBillingThresholdsOptions BillingThresholds { get => this.billingThresholds; @@ -112,8 +113,9 @@ public InvoiceScheduleDetailsPhaseBillingThresholdsOptions BillingThresholds /// href="https://docs.stripe.com/api/invoices/create#create_invoice-default_tax_rates">default_tax_rates /// for any Invoices issued by the Subscription during this Phase. /// - [JsonProperty("default_tax_rates")] + [JsonProperty("default_tax_rates", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("default_tax_rates")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List DefaultTaxRates { get => this.defaultTaxRates; @@ -129,8 +131,9 @@ public List DefaultTaxRates /// optionally store an explanation of the subscription for rendering in Stripe surfaces and /// certain local payment methods UIs. /// - [JsonProperty("description")] + [JsonProperty("description", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("description")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string Description { get => this.description; @@ -146,8 +149,9 @@ public string Description /// the discount from the subscription's customer. Pass an empty string to avoid inheriting /// any discounts. /// - [JsonProperty("discounts")] + [JsonProperty("discounts", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("discounts")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List Discounts { get => this.discounts; diff --git a/src/Stripe.net/Services/Invoices/InvoiceShippingDetailsOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceShippingDetailsOptions.cs index b65a8dcf98..d36aedf08a 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceShippingDetailsOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceShippingDetailsOptions.cs @@ -31,8 +31,9 @@ public class InvoiceShippingDetailsOptions : INestedOptions, IHasSetTracking /// /// Recipient phone (including extension). /// - [JsonProperty("phone")] + [JsonProperty("phone", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("phone")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string Phone { get => this.phone; diff --git a/src/Stripe.net/Services/Invoices/InvoiceSubscriptionDetailsItemOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceSubscriptionDetailsItemOptions.cs index 9f949b2467..14505cb9ed 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceSubscriptionDetailsItemOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceSubscriptionDetailsItemOptions.cs @@ -22,8 +22,9 @@ public class InvoiceSubscriptionDetailsItemOptions : INestedOptions, IHasId, IHa /// Define thresholds at which an invoice will be sent, and the subscription advanced to a /// new billing period. Pass an empty string to remove previously-defined thresholds. /// - [JsonProperty("billing_thresholds")] + [JsonProperty("billing_thresholds", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("billing_thresholds")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public InvoiceSubscriptionDetailsItemBillingThresholdsOptions BillingThresholds { get => this.billingThresholds; @@ -53,8 +54,9 @@ public InvoiceSubscriptionDetailsItemBillingThresholdsOptions BillingThresholds /// /// The coupons to redeem into discounts for the subscription item. /// - [JsonProperty("discounts")] + [JsonProperty("discounts", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("discounts")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List Discounts { get => this.discounts; @@ -78,8 +80,9 @@ public List Discounts /// object in a structured format. Individual keys can be unset by posting an empty value to /// them. All keys can be unset by posting an empty value to metadata. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary Metadata { get => this.metadata; @@ -128,8 +131,9 @@ public Dictionary Metadata /// on the Subscription. When updating, pass an empty string to remove previously-defined /// tax rates. /// - [JsonProperty("tax_rates")] + [JsonProperty("tax_rates", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("tax_rates")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List TaxRates { get => this.taxRates; diff --git a/src/Stripe.net/Services/Invoices/InvoiceSubscriptionDetailsOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceSubscriptionDetailsOptions.cs index 67bd95ca27..5e23626ea7 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceSubscriptionDetailsOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceSubscriptionDetailsOptions.cs @@ -43,9 +43,10 @@ public class InvoiceSubscriptionDetailsOptions : INestedOptions, IHasSetTracking /// proration_behavior. If set during a future period, this will always cause a /// proration for that period. /// - [JsonProperty("cancel_at")] + [JsonProperty("cancel_at", NullValueHandling = NullValueHandling.Ignore)] [JsonConverter(typeof(AnyOfConverter))] [STJS.JsonPropertyName("cancel_at")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] [STJS.JsonConverter(typeof(STJAnyOfConverter))] public AnyOf CancelAt { @@ -77,8 +78,9 @@ public class InvoiceSubscriptionDetailsOptions : INestedOptions, IHasSetTracking /// these default tax rates. The default tax rates will apply to any line item that does not /// have tax_rates set. /// - [JsonProperty("default_tax_rates")] + [JsonProperty("default_tax_rates", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("default_tax_rates")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List DefaultTaxRates { get => this.defaultTaxRates; diff --git a/src/Stripe.net/Services/Invoices/InvoiceUpdateLinesOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceUpdateLinesOptions.cs index 7f53378e35..df02e745a0 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceUpdateLinesOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceUpdateLinesOptions.cs @@ -22,8 +22,9 @@ public class InvoiceUpdateLinesOptions : BaseOptions /// href="api/invoices/line_item#invoice_line_item_object-type">type=invoiceitem line /// items, where any existing metadata on the invoice line is merged with the incoming data. /// - [JsonProperty("invoice_metadata")] + [JsonProperty("invoice_metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("invoice_metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary InvoiceMetadata { get => this.invoiceMetadata; diff --git a/src/Stripe.net/Services/Invoices/InvoiceUpdateOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceUpdateOptions.cs index 99f03dfec0..29b00420af 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceUpdateOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceUpdateOptions.cs @@ -27,8 +27,9 @@ public class InvoiceUpdateOptions : BaseOptions, IHasMetadata /// The account tax IDs associated with the invoice. Only editable when the invoice is a /// draft. /// - [JsonProperty("account_tax_ids")] + [JsonProperty("account_tax_ids", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("account_tax_ids")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List AccountTaxIds { get => this.accountTaxIds; @@ -91,8 +92,9 @@ public List AccountTaxIds /// custom_fields is specified, the list specified will replace the existing custom /// field list on this invoice. Pass an empty string to remove previously-defined fields. /// - [JsonProperty("custom_fields")] + [JsonProperty("custom_fields", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("custom_fields")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List CustomFields { get => this.customFields; @@ -126,8 +128,9 @@ public List CustomFields /// associated with the invoice and be in a chargeable state. If not set, defaults to the /// subscription's default source, if any, or to the customer's default source. /// - [JsonProperty("default_source")] + [JsonProperty("default_source", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("default_source")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string DefaultSource { get => this.defaultSource; @@ -142,8 +145,9 @@ public string DefaultSource /// The tax rates that will apply to any line item that does not have tax_rates set. /// Pass an empty string to remove previously-defined tax rates. /// - [JsonProperty("default_tax_rates")] + [JsonProperty("default_tax_rates", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("default_tax_rates")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List DefaultTaxRates { get => this.defaultTaxRates; @@ -166,8 +170,9 @@ public List DefaultTaxRates /// The discounts that will apply to the invoice. Pass an empty string to remove /// previously-defined discounts. /// - [JsonProperty("discounts")] + [JsonProperty("discounts", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("discounts")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List Discounts { get => this.discounts; @@ -194,9 +199,10 @@ public List Discounts /// When defined, this value replaces the system-generated 'Date of issue' printed on the /// invoice PDF and receipt. /// - [JsonProperty("effective_at")] + [JsonProperty("effective_at", NullValueHandling = NullValueHandling.Ignore)] [JsonConverter(typeof(UnixDateTimeConverter))] [STJS.JsonPropertyName("effective_at")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] public DateTime? EffectiveAt { @@ -229,8 +235,9 @@ public DateTime? EffectiveAt /// object in a structured format. Individual keys can be unset by posting an empty value to /// them. All keys can be unset by posting an empty value to metadata. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary Metadata { get => this.metadata; @@ -249,8 +256,9 @@ public Dictionary Metadata /// invoice number using our API. If you use only Stripe for your invoices and do not change /// invoice numbers, Stripe handles this aspect of compliance for you automatically. /// - [JsonProperty("number")] + [JsonProperty("number", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("number")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string Number { get => this.number; @@ -267,8 +275,9 @@ public string Number /// account. See the Invoices /// with Connect documentation for details. /// - [JsonProperty("on_behalf_of")] + [JsonProperty("on_behalf_of", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("on_behalf_of")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string OnBehalfOf { get => this.onBehalfOf; @@ -298,8 +307,9 @@ public string OnBehalfOf /// /// Settings for the cost of shipping for this invoice. /// - [JsonProperty("shipping_cost")] + [JsonProperty("shipping_cost", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("shipping_cost")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public InvoiceShippingCostOptions ShippingCost { get => this.shippingCost; @@ -315,8 +325,9 @@ public InvoiceShippingCostOptions ShippingCost /// value if it is set, otherwise the PDF will render the shipping address from the /// customer. /// - [JsonProperty("shipping_details")] + [JsonProperty("shipping_details", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("shipping_details")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public InvoiceShippingDetailsOptions ShippingDetails { get => this.shippingDetails; @@ -342,8 +353,9 @@ public InvoiceShippingDetailsOptions ShippingDetails /// ID of the resulting transfer will be found on the invoice's charge. This will be unset /// if you POST an empty value. /// - [JsonProperty("transfer_data")] + [JsonProperty("transfer_data", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("transfer_data")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public InvoiceTransferDataOptions TransferData { get => this.transferData; diff --git a/src/Stripe.net/Services/Issuing/Authorizations/AuthorizationApproveOptions.cs b/src/Stripe.net/Services/Issuing/Authorizations/AuthorizationApproveOptions.cs index 4b9681e7e7..240748c101 100644 --- a/src/Stripe.net/Services/Issuing/Authorizations/AuthorizationApproveOptions.cs +++ b/src/Stripe.net/Services/Issuing/Authorizations/AuthorizationApproveOptions.cs @@ -28,8 +28,9 @@ public class AuthorizationApproveOptions : BaseOptions, IHasMetadata /// object in a structured format. Individual keys can be unset by posting an empty value to /// them. All keys can be unset by posting an empty value to metadata. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary Metadata { get => this.metadata; diff --git a/src/Stripe.net/Services/Issuing/Authorizations/AuthorizationDeclineOptions.cs b/src/Stripe.net/Services/Issuing/Authorizations/AuthorizationDeclineOptions.cs index 15dee8b96a..e191b542ca 100644 --- a/src/Stripe.net/Services/Issuing/Authorizations/AuthorizationDeclineOptions.cs +++ b/src/Stripe.net/Services/Issuing/Authorizations/AuthorizationDeclineOptions.cs @@ -17,8 +17,9 @@ public class AuthorizationDeclineOptions : BaseOptions, IHasMetadata /// object in a structured format. Individual keys can be unset by posting an empty value to /// them. All keys can be unset by posting an empty value to metadata. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary Metadata { get => this.metadata; diff --git a/src/Stripe.net/Services/Issuing/Authorizations/AuthorizationUpdateOptions.cs b/src/Stripe.net/Services/Issuing/Authorizations/AuthorizationUpdateOptions.cs index 9263d9eac1..4cc1539f1e 100644 --- a/src/Stripe.net/Services/Issuing/Authorizations/AuthorizationUpdateOptions.cs +++ b/src/Stripe.net/Services/Issuing/Authorizations/AuthorizationUpdateOptions.cs @@ -17,8 +17,9 @@ public class AuthorizationUpdateOptions : BaseOptions, IHasMetadata /// object in a structured format. Individual keys can be unset by posting an empty value to /// them. All keys can be unset by posting an empty value to metadata. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary Metadata { get => this.metadata; diff --git a/src/Stripe.net/Services/Issuing/Cardholders/CardholderIndividualCardIssuingUserTermsAcceptanceOptions.cs b/src/Stripe.net/Services/Issuing/Cardholders/CardholderIndividualCardIssuingUserTermsAcceptanceOptions.cs index bb09a2bfdc..3dc86c9306 100644 --- a/src/Stripe.net/Services/Issuing/Cardholders/CardholderIndividualCardIssuingUserTermsAcceptanceOptions.cs +++ b/src/Stripe.net/Services/Issuing/Cardholders/CardholderIndividualCardIssuingUserTermsAcceptanceOptions.cs @@ -35,8 +35,9 @@ public class CardholderIndividualCardIssuingUserTermsAcceptanceOptions : INested /// The user agent of the browser from which the cardholder accepted the Authorized User /// Terms. /// - [JsonProperty("user_agent")] + [JsonProperty("user_agent", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("user_agent")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string UserAgent { get => this.userAgent; diff --git a/src/Stripe.net/Services/Issuing/Cards/CardCreateOptions.cs b/src/Stripe.net/Services/Issuing/Cards/CardCreateOptions.cs index 86cc2c4419..a4b1a8ac97 100644 --- a/src/Stripe.net/Services/Issuing/Cards/CardCreateOptions.cs +++ b/src/Stripe.net/Services/Issuing/Cards/CardCreateOptions.cs @@ -104,8 +104,9 @@ public class CardCreateOptions : BaseOptions, IHasMetadata /// /// The second line to print on the card. Max length: 24 characters. /// - [JsonProperty("second_line")] + [JsonProperty("second_line", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("second_line")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string SecondLine { get => this.secondLine; diff --git a/src/Stripe.net/Services/Issuing/Cards/CardUpdateOptions.cs b/src/Stripe.net/Services/Issuing/Cards/CardUpdateOptions.cs index 4496f3bdbe..9c5f8a9b34 100644 --- a/src/Stripe.net/Services/Issuing/Cards/CardUpdateOptions.cs +++ b/src/Stripe.net/Services/Issuing/Cards/CardUpdateOptions.cs @@ -25,8 +25,9 @@ public class CardUpdateOptions : BaseOptions, IHasMetadata /// object in a structured format. Individual keys can be unset by posting an empty value to /// them. All keys can be unset by posting an empty value to metadata. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary Metadata { get => this.metadata; diff --git a/src/Stripe.net/Services/Issuing/Disputes/DisputeEvidenceCanceledOptions.cs b/src/Stripe.net/Services/Issuing/Disputes/DisputeEvidenceCanceledOptions.cs index 330cd9badc..651af800a1 100644 --- a/src/Stripe.net/Services/Issuing/Disputes/DisputeEvidenceCanceledOptions.cs +++ b/src/Stripe.net/Services/Issuing/Disputes/DisputeEvidenceCanceledOptions.cs @@ -28,8 +28,9 @@ public class DisputeEvidenceCanceledOptions : INestedOptions, IHasSetTracking /// (ID of a file upload) /// Additional documentation supporting the dispute. /// - [JsonProperty("additional_documentation")] + [JsonProperty("additional_documentation", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("additional_documentation")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string AdditionalDocumentation { get => this.additionalDocumentation; @@ -43,9 +44,10 @@ public string AdditionalDocumentation /// /// Date when order was canceled. /// - [JsonProperty("canceled_at")] + [JsonProperty("canceled_at", NullValueHandling = NullValueHandling.Ignore)] [JsonConverter(typeof(UnixDateTimeConverter))] [STJS.JsonPropertyName("canceled_at")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] public DateTime? CanceledAt { @@ -60,8 +62,9 @@ public DateTime? CanceledAt /// /// Whether the cardholder was provided with a cancellation policy. /// - [JsonProperty("cancellation_policy_provided")] + [JsonProperty("cancellation_policy_provided", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("cancellation_policy_provided")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public bool? CancellationPolicyProvided { get => this.cancellationPolicyProvided; @@ -75,8 +78,9 @@ public bool? CancellationPolicyProvided /// /// Reason for canceling the order. /// - [JsonProperty("cancellation_reason")] + [JsonProperty("cancellation_reason", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("cancellation_reason")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string CancellationReason { get => this.cancellationReason; @@ -90,9 +94,10 @@ public string CancellationReason /// /// Date when the cardholder expected to receive the product. /// - [JsonProperty("expected_at")] + [JsonProperty("expected_at", NullValueHandling = NullValueHandling.Ignore)] [JsonConverter(typeof(UnixDateTimeConverter))] [STJS.JsonPropertyName("expected_at")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] public DateTime? ExpectedAt { @@ -107,8 +112,9 @@ public DateTime? ExpectedAt /// /// Explanation of why the cardholder is disputing this transaction. /// - [JsonProperty("explanation")] + [JsonProperty("explanation", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("explanation")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string Explanation { get => this.explanation; @@ -122,8 +128,9 @@ public string Explanation /// /// Description of the merchandise or service that was purchased. /// - [JsonProperty("product_description")] + [JsonProperty("product_description", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("product_description")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string ProductDescription { get => this.productDescription; @@ -138,8 +145,9 @@ public string ProductDescription /// Whether the product was a merchandise or service. /// One of: merchandise, or service. /// - [JsonProperty("product_type")] + [JsonProperty("product_type", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("product_type")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string ProductType { get => this.productType; @@ -154,8 +162,9 @@ public string ProductType /// Result of cardholder's attempt to return the product. /// One of: merchant_rejected, or successful. /// - [JsonProperty("return_status")] + [JsonProperty("return_status", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("return_status")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string ReturnStatus { get => this.returnStatus; @@ -169,9 +178,10 @@ public string ReturnStatus /// /// Date when the product was returned or attempted to be returned. /// - [JsonProperty("returned_at")] + [JsonProperty("returned_at", NullValueHandling = NullValueHandling.Ignore)] [JsonConverter(typeof(UnixDateTimeConverter))] [STJS.JsonPropertyName("returned_at")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] public DateTime? ReturnedAt { diff --git a/src/Stripe.net/Services/Issuing/Disputes/DisputeEvidenceDuplicateOptions.cs b/src/Stripe.net/Services/Issuing/Disputes/DisputeEvidenceDuplicateOptions.cs index 596195436f..cc22327efa 100644 --- a/src/Stripe.net/Services/Issuing/Disputes/DisputeEvidenceDuplicateOptions.cs +++ b/src/Stripe.net/Services/Issuing/Disputes/DisputeEvidenceDuplicateOptions.cs @@ -22,8 +22,9 @@ public class DisputeEvidenceDuplicateOptions : INestedOptions, IHasSetTracking /// (ID of a file upload) /// Additional documentation supporting the dispute. /// - [JsonProperty("additional_documentation")] + [JsonProperty("additional_documentation", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("additional_documentation")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string AdditionalDocumentation { get => this.additionalDocumentation; @@ -38,8 +39,9 @@ public string AdditionalDocumentation /// (ID of a file upload) Copy of /// the card statement showing that the product had already been paid for. /// - [JsonProperty("card_statement")] + [JsonProperty("card_statement", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("card_statement")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string CardStatement { get => this.cardStatement; @@ -54,8 +56,9 @@ public string CardStatement /// (ID of a file upload) Copy of /// the receipt showing that the product had been paid for in cash. /// - [JsonProperty("cash_receipt")] + [JsonProperty("cash_receipt", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("cash_receipt")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string CashReceipt { get => this.cashReceipt; @@ -70,8 +73,9 @@ public string CashReceipt /// (ID of a file upload) Image of /// the front and back of the check that was used to pay for the product. /// - [JsonProperty("check_image")] + [JsonProperty("check_image", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("check_image")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string CheckImage { get => this.checkImage; @@ -85,8 +89,9 @@ public string CheckImage /// /// Explanation of why the cardholder is disputing this transaction. /// - [JsonProperty("explanation")] + [JsonProperty("explanation", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("explanation")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string Explanation { get => this.explanation; diff --git a/src/Stripe.net/Services/Issuing/Disputes/DisputeEvidenceFraudulentOptions.cs b/src/Stripe.net/Services/Issuing/Disputes/DisputeEvidenceFraudulentOptions.cs index 574c5ff898..11bdcdce11 100644 --- a/src/Stripe.net/Services/Issuing/Disputes/DisputeEvidenceFraudulentOptions.cs +++ b/src/Stripe.net/Services/Issuing/Disputes/DisputeEvidenceFraudulentOptions.cs @@ -19,8 +19,9 @@ public class DisputeEvidenceFraudulentOptions : INestedOptions, IHasSetTracking /// (ID of a file upload) /// Additional documentation supporting the dispute. /// - [JsonProperty("additional_documentation")] + [JsonProperty("additional_documentation", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("additional_documentation")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string AdditionalDocumentation { get => this.additionalDocumentation; @@ -34,8 +35,9 @@ public string AdditionalDocumentation /// /// Explanation of why the cardholder is disputing this transaction. /// - [JsonProperty("explanation")] + [JsonProperty("explanation", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("explanation")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string Explanation { get => this.explanation; diff --git a/src/Stripe.net/Services/Issuing/Disputes/DisputeEvidenceMerchandiseNotAsDescribedOptions.cs b/src/Stripe.net/Services/Issuing/Disputes/DisputeEvidenceMerchandiseNotAsDescribedOptions.cs index 6741fc23cb..1b342ee884 100644 --- a/src/Stripe.net/Services/Issuing/Disputes/DisputeEvidenceMerchandiseNotAsDescribedOptions.cs +++ b/src/Stripe.net/Services/Issuing/Disputes/DisputeEvidenceMerchandiseNotAsDescribedOptions.cs @@ -24,8 +24,9 @@ public class DisputeEvidenceMerchandiseNotAsDescribedOptions : INestedOptions, I /// (ID of a file upload) /// Additional documentation supporting the dispute. /// - [JsonProperty("additional_documentation")] + [JsonProperty("additional_documentation", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("additional_documentation")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string AdditionalDocumentation { get => this.additionalDocumentation; @@ -39,8 +40,9 @@ public string AdditionalDocumentation /// /// Explanation of why the cardholder is disputing this transaction. /// - [JsonProperty("explanation")] + [JsonProperty("explanation", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("explanation")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string Explanation { get => this.explanation; @@ -54,9 +56,10 @@ public string Explanation /// /// Date when the product was received. /// - [JsonProperty("received_at")] + [JsonProperty("received_at", NullValueHandling = NullValueHandling.Ignore)] [JsonConverter(typeof(UnixDateTimeConverter))] [STJS.JsonPropertyName("received_at")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] public DateTime? ReceivedAt { @@ -71,8 +74,9 @@ public DateTime? ReceivedAt /// /// Description of the cardholder's attempt to return the product. /// - [JsonProperty("return_description")] + [JsonProperty("return_description", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("return_description")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string ReturnDescription { get => this.returnDescription; @@ -87,8 +91,9 @@ public string ReturnDescription /// Result of cardholder's attempt to return the product. /// One of: merchant_rejected, or successful. /// - [JsonProperty("return_status")] + [JsonProperty("return_status", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("return_status")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string ReturnStatus { get => this.returnStatus; @@ -102,9 +107,10 @@ public string ReturnStatus /// /// Date when the product was returned or attempted to be returned. /// - [JsonProperty("returned_at")] + [JsonProperty("returned_at", NullValueHandling = NullValueHandling.Ignore)] [JsonConverter(typeof(UnixDateTimeConverter))] [STJS.JsonPropertyName("returned_at")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] public DateTime? ReturnedAt { diff --git a/src/Stripe.net/Services/Issuing/Disputes/DisputeEvidenceNoValidAuthorizationOptions.cs b/src/Stripe.net/Services/Issuing/Disputes/DisputeEvidenceNoValidAuthorizationOptions.cs index 54f263a33d..e33ee0cac5 100644 --- a/src/Stripe.net/Services/Issuing/Disputes/DisputeEvidenceNoValidAuthorizationOptions.cs +++ b/src/Stripe.net/Services/Issuing/Disputes/DisputeEvidenceNoValidAuthorizationOptions.cs @@ -19,8 +19,9 @@ public class DisputeEvidenceNoValidAuthorizationOptions : INestedOptions, IHasSe /// (ID of a file upload) /// Additional documentation supporting the dispute. /// - [JsonProperty("additional_documentation")] + [JsonProperty("additional_documentation", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("additional_documentation")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string AdditionalDocumentation { get => this.additionalDocumentation; @@ -34,8 +35,9 @@ public string AdditionalDocumentation /// /// Explanation of why the cardholder is disputing this transaction. /// - [JsonProperty("explanation")] + [JsonProperty("explanation", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("explanation")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string Explanation { get => this.explanation; diff --git a/src/Stripe.net/Services/Issuing/Disputes/DisputeEvidenceNotReceivedOptions.cs b/src/Stripe.net/Services/Issuing/Disputes/DisputeEvidenceNotReceivedOptions.cs index f48ad8dbdf..67885fda32 100644 --- a/src/Stripe.net/Services/Issuing/Disputes/DisputeEvidenceNotReceivedOptions.cs +++ b/src/Stripe.net/Services/Issuing/Disputes/DisputeEvidenceNotReceivedOptions.cs @@ -23,8 +23,9 @@ public class DisputeEvidenceNotReceivedOptions : INestedOptions, IHasSetTracking /// (ID of a file upload) /// Additional documentation supporting the dispute. /// - [JsonProperty("additional_documentation")] + [JsonProperty("additional_documentation", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("additional_documentation")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string AdditionalDocumentation { get => this.additionalDocumentation; @@ -38,9 +39,10 @@ public string AdditionalDocumentation /// /// Date when the cardholder expected to receive the product. /// - [JsonProperty("expected_at")] + [JsonProperty("expected_at", NullValueHandling = NullValueHandling.Ignore)] [JsonConverter(typeof(UnixDateTimeConverter))] [STJS.JsonPropertyName("expected_at")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] public DateTime? ExpectedAt { @@ -55,8 +57,9 @@ public DateTime? ExpectedAt /// /// Explanation of why the cardholder is disputing this transaction. /// - [JsonProperty("explanation")] + [JsonProperty("explanation", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("explanation")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string Explanation { get => this.explanation; @@ -70,8 +73,9 @@ public string Explanation /// /// Description of the merchandise or service that was purchased. /// - [JsonProperty("product_description")] + [JsonProperty("product_description", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("product_description")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string ProductDescription { get => this.productDescription; @@ -86,8 +90,9 @@ public string ProductDescription /// Whether the product was a merchandise or service. /// One of: merchandise, or service. /// - [JsonProperty("product_type")] + [JsonProperty("product_type", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("product_type")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string ProductType { get => this.productType; diff --git a/src/Stripe.net/Services/Issuing/Disputes/DisputeEvidenceOptions.cs b/src/Stripe.net/Services/Issuing/Disputes/DisputeEvidenceOptions.cs index 1e396e7478..ab2139cc18 100644 --- a/src/Stripe.net/Services/Issuing/Disputes/DisputeEvidenceOptions.cs +++ b/src/Stripe.net/Services/Issuing/Disputes/DisputeEvidenceOptions.cs @@ -24,8 +24,9 @@ public class DisputeEvidenceOptions : INestedOptions, IHasSetTracking /// /// Evidence provided when reason is 'canceled'. /// - [JsonProperty("canceled")] + [JsonProperty("canceled", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("canceled")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public DisputeEvidenceCanceledOptions Canceled { get => this.canceled; @@ -39,8 +40,9 @@ public DisputeEvidenceCanceledOptions Canceled /// /// Evidence provided when reason is 'duplicate'. /// - [JsonProperty("duplicate")] + [JsonProperty("duplicate", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("duplicate")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public DisputeEvidenceDuplicateOptions Duplicate { get => this.duplicate; @@ -54,8 +56,9 @@ public DisputeEvidenceDuplicateOptions Duplicate /// /// Evidence provided when reason is 'fraudulent'. /// - [JsonProperty("fraudulent")] + [JsonProperty("fraudulent", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("fraudulent")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public DisputeEvidenceFraudulentOptions Fraudulent { get => this.fraudulent; @@ -69,8 +72,9 @@ public DisputeEvidenceFraudulentOptions Fraudulent /// /// Evidence provided when reason is 'merchandise_not_as_described'. /// - [JsonProperty("merchandise_not_as_described")] + [JsonProperty("merchandise_not_as_described", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("merchandise_not_as_described")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public DisputeEvidenceMerchandiseNotAsDescribedOptions MerchandiseNotAsDescribed { get => this.merchandiseNotAsDescribed; @@ -84,8 +88,9 @@ public DisputeEvidenceMerchandiseNotAsDescribedOptions MerchandiseNotAsDescribed /// /// Evidence provided when reason is 'no_valid_authorization'. /// - [JsonProperty("no_valid_authorization")] + [JsonProperty("no_valid_authorization", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("no_valid_authorization")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public DisputeEvidenceNoValidAuthorizationOptions NoValidAuthorization { get => this.noValidAuthorization; @@ -99,8 +104,9 @@ public DisputeEvidenceNoValidAuthorizationOptions NoValidAuthorization /// /// Evidence provided when reason is 'not_received'. /// - [JsonProperty("not_received")] + [JsonProperty("not_received", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("not_received")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public DisputeEvidenceNotReceivedOptions NotReceived { get => this.notReceived; @@ -114,8 +120,9 @@ public DisputeEvidenceNotReceivedOptions NotReceived /// /// Evidence provided when reason is 'other'. /// - [JsonProperty("other")] + [JsonProperty("other", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("other")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public DisputeEvidenceOtherOptions Other { get => this.other; @@ -140,8 +147,9 @@ public DisputeEvidenceOtherOptions Other /// /// Evidence provided when reason is 'service_not_as_described'. /// - [JsonProperty("service_not_as_described")] + [JsonProperty("service_not_as_described", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("service_not_as_described")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public DisputeEvidenceServiceNotAsDescribedOptions ServiceNotAsDescribed { get => this.serviceNotAsDescribed; diff --git a/src/Stripe.net/Services/Issuing/Disputes/DisputeEvidenceOtherOptions.cs b/src/Stripe.net/Services/Issuing/Disputes/DisputeEvidenceOtherOptions.cs index cca22a4fd0..0f90c9e753 100644 --- a/src/Stripe.net/Services/Issuing/Disputes/DisputeEvidenceOtherOptions.cs +++ b/src/Stripe.net/Services/Issuing/Disputes/DisputeEvidenceOtherOptions.cs @@ -21,8 +21,9 @@ public class DisputeEvidenceOtherOptions : INestedOptions, IHasSetTracking /// (ID of a file upload) /// Additional documentation supporting the dispute. /// - [JsonProperty("additional_documentation")] + [JsonProperty("additional_documentation", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("additional_documentation")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string AdditionalDocumentation { get => this.additionalDocumentation; @@ -36,8 +37,9 @@ public string AdditionalDocumentation /// /// Explanation of why the cardholder is disputing this transaction. /// - [JsonProperty("explanation")] + [JsonProperty("explanation", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("explanation")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string Explanation { get => this.explanation; @@ -51,8 +53,9 @@ public string Explanation /// /// Description of the merchandise or service that was purchased. /// - [JsonProperty("product_description")] + [JsonProperty("product_description", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("product_description")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string ProductDescription { get => this.productDescription; @@ -67,8 +70,9 @@ public string ProductDescription /// Whether the product was a merchandise or service. /// One of: merchandise, or service. /// - [JsonProperty("product_type")] + [JsonProperty("product_type", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("product_type")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string ProductType { get => this.productType; diff --git a/src/Stripe.net/Services/Issuing/Disputes/DisputeEvidenceServiceNotAsDescribedOptions.cs b/src/Stripe.net/Services/Issuing/Disputes/DisputeEvidenceServiceNotAsDescribedOptions.cs index bbac5a9480..01c54ce925 100644 --- a/src/Stripe.net/Services/Issuing/Disputes/DisputeEvidenceServiceNotAsDescribedOptions.cs +++ b/src/Stripe.net/Services/Issuing/Disputes/DisputeEvidenceServiceNotAsDescribedOptions.cs @@ -23,8 +23,9 @@ public class DisputeEvidenceServiceNotAsDescribedOptions : INestedOptions, IHasS /// (ID of a file upload) /// Additional documentation supporting the dispute. /// - [JsonProperty("additional_documentation")] + [JsonProperty("additional_documentation", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("additional_documentation")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string AdditionalDocumentation { get => this.additionalDocumentation; @@ -38,9 +39,10 @@ public string AdditionalDocumentation /// /// Date when order was canceled. /// - [JsonProperty("canceled_at")] + [JsonProperty("canceled_at", NullValueHandling = NullValueHandling.Ignore)] [JsonConverter(typeof(UnixDateTimeConverter))] [STJS.JsonPropertyName("canceled_at")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] public DateTime? CanceledAt { @@ -55,8 +57,9 @@ public DateTime? CanceledAt /// /// Reason for canceling the order. /// - [JsonProperty("cancellation_reason")] + [JsonProperty("cancellation_reason", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("cancellation_reason")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string CancellationReason { get => this.cancellationReason; @@ -70,8 +73,9 @@ public string CancellationReason /// /// Explanation of why the cardholder is disputing this transaction. /// - [JsonProperty("explanation")] + [JsonProperty("explanation", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("explanation")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string Explanation { get => this.explanation; @@ -85,9 +89,10 @@ public string Explanation /// /// Date when the product was received. /// - [JsonProperty("received_at")] + [JsonProperty("received_at", NullValueHandling = NullValueHandling.Ignore)] [JsonConverter(typeof(UnixDateTimeConverter))] [STJS.JsonPropertyName("received_at")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] public DateTime? ReceivedAt { diff --git a/src/Stripe.net/Services/Issuing/Disputes/DisputeSubmitOptions.cs b/src/Stripe.net/Services/Issuing/Disputes/DisputeSubmitOptions.cs index 294f208992..386bdd0ac7 100644 --- a/src/Stripe.net/Services/Issuing/Disputes/DisputeSubmitOptions.cs +++ b/src/Stripe.net/Services/Issuing/Disputes/DisputeSubmitOptions.cs @@ -17,8 +17,9 @@ public class DisputeSubmitOptions : BaseOptions, IHasMetadata /// object in a structured format. Individual keys can be unset by posting an empty value to /// them. All keys can be unset by posting an empty value to metadata. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary Metadata { get => this.metadata; diff --git a/src/Stripe.net/Services/Issuing/Disputes/DisputeUpdateOptions.cs b/src/Stripe.net/Services/Issuing/Disputes/DisputeUpdateOptions.cs index b5b04031c1..7fa91f1490 100644 --- a/src/Stripe.net/Services/Issuing/Disputes/DisputeUpdateOptions.cs +++ b/src/Stripe.net/Services/Issuing/Disputes/DisputeUpdateOptions.cs @@ -32,8 +32,9 @@ public class DisputeUpdateOptions : BaseOptions, IHasMetadata /// object in a structured format. Individual keys can be unset by posting an empty value to /// them. All keys can be unset by posting an empty value to metadata. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary Metadata { get => this.metadata; diff --git a/src/Stripe.net/Services/Issuing/PersonalizationDesigns/PersonalizationDesignCarrierTextOptions.cs b/src/Stripe.net/Services/Issuing/PersonalizationDesigns/PersonalizationDesignCarrierTextOptions.cs index e6df3bf2a8..d2099a7657 100644 --- a/src/Stripe.net/Services/Issuing/PersonalizationDesigns/PersonalizationDesignCarrierTextOptions.cs +++ b/src/Stripe.net/Services/Issuing/PersonalizationDesigns/PersonalizationDesignCarrierTextOptions.cs @@ -20,8 +20,9 @@ public class PersonalizationDesignCarrierTextOptions : INestedOptions, IHasSetTr /// /// The footer body text of the carrier letter. /// - [JsonProperty("footer_body")] + [JsonProperty("footer_body", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("footer_body")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string FooterBody { get => this.footerBody; @@ -35,8 +36,9 @@ public string FooterBody /// /// The footer title text of the carrier letter. /// - [JsonProperty("footer_title")] + [JsonProperty("footer_title", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("footer_title")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string FooterTitle { get => this.footerTitle; @@ -50,8 +52,9 @@ public string FooterTitle /// /// The header body text of the carrier letter. /// - [JsonProperty("header_body")] + [JsonProperty("header_body", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("header_body")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string HeaderBody { get => this.headerBody; @@ -65,8 +68,9 @@ public string HeaderBody /// /// The header title text of the carrier letter. /// - [JsonProperty("header_title")] + [JsonProperty("header_title", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("header_title")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string HeaderTitle { get => this.headerTitle; diff --git a/src/Stripe.net/Services/Issuing/PersonalizationDesigns/PersonalizationDesignUpdateOptions.cs b/src/Stripe.net/Services/Issuing/PersonalizationDesigns/PersonalizationDesignUpdateOptions.cs index eddb0a44ee..7d45ea167c 100644 --- a/src/Stripe.net/Services/Issuing/PersonalizationDesigns/PersonalizationDesignUpdateOptions.cs +++ b/src/Stripe.net/Services/Issuing/PersonalizationDesigns/PersonalizationDesignUpdateOptions.cs @@ -18,8 +18,9 @@ public class PersonalizationDesignUpdateOptions : BaseOptions, IHasMetadata /// The file for the card logo, for use with physical bundles that support card logos. Must /// have a purpose value of issuing_logo. /// - [JsonProperty("card_logo")] + [JsonProperty("card_logo", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("card_logo")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string CardLogo { get => this.cardLogo; @@ -33,8 +34,9 @@ public string CardLogo /// /// Hash containing carrier text, for use with physical bundles that support carrier text. /// - [JsonProperty("carrier_text")] + [JsonProperty("carrier_text", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("carrier_text")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public PersonalizationDesignCarrierTextOptions CarrierText { get => this.carrierText; @@ -49,8 +51,9 @@ public PersonalizationDesignCarrierTextOptions CarrierText /// A lookup key used to retrieve personalization designs dynamically from a static string. /// This may be up to 200 characters. /// - [JsonProperty("lookup_key")] + [JsonProperty("lookup_key", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("lookup_key")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string LookupKey { get => this.lookupKey; @@ -74,8 +77,9 @@ public string LookupKey /// /// Friendly display name. Providing an empty string will set the field to null. /// - [JsonProperty("name")] + [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("name")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string Name { get => this.name; diff --git a/src/Stripe.net/Services/Issuing/Transactions/TransactionUpdateOptions.cs b/src/Stripe.net/Services/Issuing/Transactions/TransactionUpdateOptions.cs index add97d8fb8..1a1fad0a48 100644 --- a/src/Stripe.net/Services/Issuing/Transactions/TransactionUpdateOptions.cs +++ b/src/Stripe.net/Services/Issuing/Transactions/TransactionUpdateOptions.cs @@ -17,8 +17,9 @@ public class TransactionUpdateOptions : BaseOptions, IHasMetadata /// object in a structured format. Individual keys can be unset by posting an empty value to /// them. All keys can be unset by posting an empty value to metadata. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary Metadata { get => this.metadata; diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentAmountDetailsOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentAmountDetailsOptions.cs index a34f812e33..d729f55171 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentAmountDetailsOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentAmountDetailsOptions.cs @@ -26,8 +26,9 @@ public class PaymentIntentAmountDetailsOptions : INestedOptions, IHasSetTracking /// This field is mutually exclusive with the /// amount_details[line_items][#][discount_amount] field. /// - [JsonProperty("discount_amount")] + [JsonProperty("discount_amount", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("discount_amount")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public long? DiscountAmount { get => this.discountAmount; @@ -58,8 +59,9 @@ public long? DiscountAmount /// A list of line items, each containing information about a product in the PaymentIntent. /// There is a maximum of 200 line items. /// - [JsonProperty("line_items")] + [JsonProperty("line_items", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("line_items")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List LineItems { get => this.lineItems; @@ -73,8 +75,9 @@ public List LineItems /// /// Contains information about the shipping portion of the amount. /// - [JsonProperty("shipping")] + [JsonProperty("shipping", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("shipping")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public PaymentIntentAmountDetailsShippingOptions Shipping { get => this.shipping; @@ -88,8 +91,9 @@ public PaymentIntentAmountDetailsShippingOptions Shipping /// /// Contains information about the tax portion of the amount. /// - [JsonProperty("tax")] + [JsonProperty("tax", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("tax")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public PaymentIntentAmountDetailsTaxOptions Tax { get => this.tax; diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentAmountDetailsShippingOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentAmountDetailsShippingOptions.cs index 4294c947b4..ba0caf7729 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentAmountDetailsShippingOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentAmountDetailsShippingOptions.cs @@ -21,8 +21,9 @@ public class PaymentIntentAmountDetailsShippingOptions : INestedOptions, IHasSet /// href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. An /// integer greater than or equal to 0. /// - [JsonProperty("amount")] + [JsonProperty("amount", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("amount")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public long? Amount { get => this.amount; @@ -37,8 +38,9 @@ public long? Amount /// If a physical good is being shipped, the postal code of where it is being shipped from. /// At most 10 alphanumeric characters long, hyphens are allowed. /// - [JsonProperty("from_postal_code")] + [JsonProperty("from_postal_code", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("from_postal_code")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string FromPostalCode { get => this.fromPostalCode; @@ -53,8 +55,9 @@ public string FromPostalCode /// If a physical good is being shipped, the postal code of where it is being shipped to. At /// most 10 alphanumeric characters long, hyphens are allowed. /// - [JsonProperty("to_postal_code")] + [JsonProperty("to_postal_code", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("to_postal_code")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string ToPostalCode { get => this.toPostalCode; diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentCaptureOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentCaptureOptions.cs index 9ac195a0c0..ad28d5867f 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentCaptureOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentCaptureOptions.cs @@ -63,8 +63,9 @@ public class PaymentIntentCaptureOptions : BaseOptions, IHasMetadata /// object in a structured format. Individual keys can be unset by posting an empty value to /// them. All keys can be unset by posting an empty value to metadata. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary Metadata { get => this.metadata; @@ -78,8 +79,9 @@ public Dictionary Metadata /// /// Provides industry-specific information about the charge. /// - [JsonProperty("payment_details")] + [JsonProperty("payment_details", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("payment_details")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public PaymentIntentPaymentDetailsOptions PaymentDetails { get => this.paymentDetails; diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentConfirmOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentConfirmOptions.cs index c256622c96..fb5f04dae1 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentConfirmOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentConfirmOptions.cs @@ -20,8 +20,9 @@ public class PaymentIntentConfirmOptions : BaseOptions /// /// Provides industry-specific information about the amount. /// - [JsonProperty("amount_details")] + [JsonProperty("amount_details", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("amount_details")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public PaymentIntentAmountDetailsOptions AmountDetails { get => this.amountDetails; @@ -80,8 +81,9 @@ public PaymentIntentAmountDetailsOptions AmountDetails /// sofort, swish, twint, upi, us_bank_account, /// wechat_pay, or zip. /// - [JsonProperty("excluded_payment_method_types")] + [JsonProperty("excluded_payment_method_types", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("excluded_payment_method_types")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List ExcludedPaymentMethodTypes { get => this.excludedPaymentMethodTypes; @@ -106,8 +108,9 @@ public List ExcludedPaymentMethodTypes [STJS.JsonPropertyName("mandate")] public string Mandate { get; set; } - [JsonProperty("mandate_data")] + [JsonProperty("mandate_data", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("mandate_data")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public PaymentIntentMandateDataOptions MandateData { get => this.mandateData; @@ -132,8 +135,9 @@ public PaymentIntentMandateDataOptions MandateData /// /// Provides industry-specific information about the charge. /// - [JsonProperty("payment_details")] + [JsonProperty("payment_details", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("payment_details")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public PaymentIntentPaymentDetailsOptions PaymentDetails { get => this.paymentDetails; @@ -198,8 +202,9 @@ public PaymentIntentPaymentDetailsOptions PaymentDetails /// regardless of your email /// settings. /// - [JsonProperty("receipt_email")] + [JsonProperty("receipt_email", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("receipt_email")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string ReceiptEmail { get => this.receiptEmail; @@ -245,8 +250,9 @@ public string ReceiptEmail /// off_session. /// One of: off_session, or on_session. /// - [JsonProperty("setup_future_usage")] + [JsonProperty("setup_future_usage", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("setup_future_usage")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string SetupFutureUsage { get => this.setupFutureUsage; @@ -260,8 +266,9 @@ public string SetupFutureUsage /// /// Shipping information for this PaymentIntent. /// - [JsonProperty("shipping")] + [JsonProperty("shipping", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("shipping")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public ChargeShippingOptions Shipping { get => this.shipping; diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentCreateOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentCreateOptions.cs index 720d08f5c8..ac0c411bd7 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentCreateOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentCreateOptions.cs @@ -196,8 +196,9 @@ public class PaymentIntentCreateOptions : BaseOptions, IHasMetadata /// with confirm=true. /// - [JsonProperty("mandate_data")] + [JsonProperty("mandate_data", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("mandate_data")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public PaymentIntentMandateDataOptions MandateData { get => this.mandateData; diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentHooksInputsTaxOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentHooksInputsTaxOptions.cs index 65e3555009..6eb68623ba 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentHooksInputsTaxOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentHooksInputsTaxOptions.cs @@ -17,8 +17,9 @@ public class PaymentIntentHooksInputsTaxOptions : INestedOptions, IHasSetTrackin /// /// The TaxCalculation id. /// - [JsonProperty("calculation")] + [JsonProperty("calculation", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("calculation")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string Calculation { get => this.calculation; diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentDetailsOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentDetailsOptions.cs index 5dfd949a06..ed44230d2f 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentDetailsOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentDetailsOptions.cs @@ -21,8 +21,9 @@ public class PaymentIntentPaymentDetailsOptions : INestedOptions, IHasSetTrackin /// This field is truncated to 25 alphanumeric characters, excluding spaces, before being /// sent to card networks. /// - [JsonProperty("customer_reference")] + [JsonProperty("customer_reference", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("customer_reference")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string CustomerReference { get => this.customerReference; @@ -41,8 +42,9 @@ public string CustomerReference /// before being sent to card networks. For Klarna, this field is truncated to 255 /// characters and is visible to customers when they view the order in the Klarna app. /// - [JsonProperty("order_reference")] + [JsonProperty("order_reference", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("order_reference")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string OrderReference { get => this.orderReference; diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataBillingDetailsOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataBillingDetailsOptions.cs index f624e5bc00..5fb7bb2fe9 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataBillingDetailsOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataBillingDetailsOptions.cs @@ -20,8 +20,9 @@ public class PaymentIntentPaymentMethodDataBillingDetailsOptions : INestedOption /// /// Billing address. /// - [JsonProperty("address")] + [JsonProperty("address", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("address")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public AddressOptions Address { get => this.address; @@ -35,8 +36,9 @@ public AddressOptions Address /// /// Email address. /// - [JsonProperty("email")] + [JsonProperty("email", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("email")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string Email { get => this.email; @@ -50,8 +52,9 @@ public string Email /// /// Full name. /// - [JsonProperty("name")] + [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("name")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string Name { get => this.name; @@ -65,8 +68,9 @@ public string Name /// /// Billing phone number (including extension). /// - [JsonProperty("phone")] + [JsonProperty("phone", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("phone")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string Phone { get => this.phone; diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsAcssDebitMandateOptionsOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsAcssDebitMandateOptionsOptions.cs index 61779a6d8e..cc2f3c22ef 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsAcssDebitMandateOptionsOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsAcssDebitMandateOptionsOptions.cs @@ -21,8 +21,9 @@ public class PaymentIntentPaymentMethodOptionsAcssDebitMandateOptionsOptions : I /// setup_intent and setup_intent_client_secret when confirming a Setup /// Intent. /// - [JsonProperty("custom_mandate_url")] + [JsonProperty("custom_mandate_url", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("custom_mandate_url")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string CustomMandateUrl { get => this.customMandateUrl; diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsAcssDebitOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsAcssDebitOptions.cs index 4f800d4108..e68ab26669 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsAcssDebitOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsAcssDebitOptions.cs @@ -46,8 +46,9 @@ public class PaymentIntentPaymentMethodOptionsAcssDebitOptions : INestedOptions, /// off_session. /// One of: none, off_session, or on_session. /// - [JsonProperty("setup_future_usage")] + [JsonProperty("setup_future_usage", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("setup_future_usage")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string SetupFutureUsage { get => this.setupFutureUsage; diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsAffirmOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsAffirmOptions.cs index 48006b1a42..964a7f58b5 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsAffirmOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsAffirmOptions.cs @@ -24,8 +24,9 @@ public class PaymentIntentPaymentMethodOptionsAffirmOptions : INestedOptions, IH /// If capture_method is already set on the PaymentIntent, providing an empty value /// for this parameter unsets the stored value for this payment method type. /// - [JsonProperty("capture_method")] + [JsonProperty("capture_method", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("capture_method")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string CaptureMethod { get => this.captureMethod; diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsAfterpayClearpayOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsAfterpayClearpayOptions.cs index 532b62a13a..73f61ebfd9 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsAfterpayClearpayOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsAfterpayClearpayOptions.cs @@ -24,8 +24,9 @@ public class PaymentIntentPaymentMethodOptionsAfterpayClearpayOptions : INestedO /// If capture_method is already set on the PaymentIntent, providing an empty value /// for this parameter unsets the stored value for this payment method type. /// - [JsonProperty("capture_method")] + [JsonProperty("capture_method", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("capture_method")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string CaptureMethod { get => this.captureMethod; diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsAlipayOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsAlipayOptions.cs index b074844ac8..00a0329ef6 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsAlipayOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsAlipayOptions.cs @@ -39,8 +39,9 @@ public class PaymentIntentPaymentMethodOptionsAlipayOptions : INestedOptions, IH /// off_session. /// One of: none, or off_session. /// - [JsonProperty("setup_future_usage")] + [JsonProperty("setup_future_usage", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("setup_future_usage")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string SetupFutureUsage { get => this.setupFutureUsage; diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsAlmaOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsAlmaOptions.cs index d0eaed3eda..580658e622 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsAlmaOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsAlmaOptions.cs @@ -24,8 +24,9 @@ public class PaymentIntentPaymentMethodOptionsAlmaOptions : INestedOptions, IHas /// If capture_method is already set on the PaymentIntent, providing an empty value /// for this parameter unsets the stored value for this payment method type. /// - [JsonProperty("capture_method")] + [JsonProperty("capture_method", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("capture_method")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string CaptureMethod { get => this.captureMethod; diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsAmazonPayOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsAmazonPayOptions.cs index 35409bb4d9..bc673ab3ad 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsAmazonPayOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsAmazonPayOptions.cs @@ -25,8 +25,9 @@ public class PaymentIntentPaymentMethodOptionsAmazonPayOptions : INestedOptions, /// If capture_method is already set on the PaymentIntent, providing an empty value /// for this parameter unsets the stored value for this payment method type. /// - [JsonProperty("capture_method")] + [JsonProperty("capture_method", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("capture_method")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string CaptureMethod { get => this.captureMethod; @@ -58,8 +59,9 @@ public string CaptureMethod /// href="https://stripe.com/strong-customer-authentication">SCA. /// One of: none, or off_session. /// - [JsonProperty("setup_future_usage")] + [JsonProperty("setup_future_usage", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("setup_future_usage")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string SetupFutureUsage { get => this.setupFutureUsage; diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsAuBecsDebitOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsAuBecsDebitOptions.cs index c1010b99c0..99564c6a4e 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsAuBecsDebitOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsAuBecsDebitOptions.cs @@ -39,8 +39,9 @@ public class PaymentIntentPaymentMethodOptionsAuBecsDebitOptions : INestedOption /// off_session. /// One of: none, off_session, or on_session. /// - [JsonProperty("setup_future_usage")] + [JsonProperty("setup_future_usage", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("setup_future_usage")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string SetupFutureUsage { get => this.setupFutureUsage; diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsBacsDebitMandateOptionsOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsBacsDebitMandateOptionsOptions.cs index 466f931afc..831f85b99a 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsBacsDebitMandateOptionsOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsBacsDebitMandateOptionsOptions.cs @@ -19,8 +19,9 @@ public class PaymentIntentPaymentMethodOptionsBacsDebitMandateOptionsOptions : I /// consist of only uppercase letters, numbers, spaces, or the following special characters: /// '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. /// - [JsonProperty("reference_prefix")] + [JsonProperty("reference_prefix", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("reference_prefix")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string ReferencePrefix { get => this.referencePrefix; diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsBacsDebitOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsBacsDebitOptions.cs index 4cba53fc46..85d3a45d57 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsBacsDebitOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsBacsDebitOptions.cs @@ -46,8 +46,9 @@ public class PaymentIntentPaymentMethodOptionsBacsDebitOptions : INestedOptions, /// off_session. /// One of: none, off_session, or on_session. /// - [JsonProperty("setup_future_usage")] + [JsonProperty("setup_future_usage", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("setup_future_usage")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string SetupFutureUsage { get => this.setupFutureUsage; diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsBancontactOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsBancontactOptions.cs index 39cf7f0e5a..cd2765762b 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsBancontactOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsBancontactOptions.cs @@ -48,8 +48,9 @@ public class PaymentIntentPaymentMethodOptionsBancontactOptions : INestedOptions /// off_session. /// One of: none, or off_session. /// - [JsonProperty("setup_future_usage")] + [JsonProperty("setup_future_usage", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("setup_future_usage")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string SetupFutureUsage { get => this.setupFutureUsage; diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsBillieOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsBillieOptions.cs index 818424babc..3a4ea96149 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsBillieOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsBillieOptions.cs @@ -24,8 +24,9 @@ public class PaymentIntentPaymentMethodOptionsBillieOptions : INestedOptions, IH /// If capture_method is already set on the PaymentIntent, providing an empty value /// for this parameter unsets the stored value for this payment method type. /// - [JsonProperty("capture_method")] + [JsonProperty("capture_method", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("capture_method")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string CaptureMethod { get => this.captureMethod; diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsBlikOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsBlikOptions.cs index 1bf0a103d5..7db1fb2cd3 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsBlikOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsBlikOptions.cs @@ -46,8 +46,9 @@ public class PaymentIntentPaymentMethodOptionsBlikOptions : INestedOptions, IHas /// publishable key, you can only update the value from on_session to /// off_session. /// - [JsonProperty("setup_future_usage")] + [JsonProperty("setup_future_usage", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("setup_future_usage")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string SetupFutureUsage { get => this.setupFutureUsage; diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsBoletoOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsBoletoOptions.cs index 909cd224a3..c76f24a9e6 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsBoletoOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsBoletoOptions.cs @@ -48,8 +48,9 @@ public class PaymentIntentPaymentMethodOptionsBoletoOptions : INestedOptions, IH /// off_session. /// One of: none, off_session, or on_session. /// - [JsonProperty("setup_future_usage")] + [JsonProperty("setup_future_usage", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("setup_future_usage")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string SetupFutureUsage { get => this.setupFutureUsage; diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardInstallmentsOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardInstallmentsOptions.cs index 4567d74d0c..2fc3b2f04e 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardInstallmentsOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardInstallmentsOptions.cs @@ -27,8 +27,9 @@ public class PaymentIntentPaymentMethodOptionsCardInstallmentsOptions : INestedO /// The selected installment plan to use for this payment attempt. This parameter can only /// be provided during confirmation. /// - [JsonProperty("plan")] + [JsonProperty("plan", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("plan")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public PaymentIntentPaymentMethodOptionsCardInstallmentsPlanOptions Plan { get => this.plan; diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardOptions.cs index 21cbc182fb..cf68920deb 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardOptions.cs @@ -27,8 +27,9 @@ public class PaymentIntentPaymentMethodOptionsCardOptions : INestedOptions, IHas /// If capture_method is already set on the PaymentIntent, providing an empty value /// for this parameter unsets the stored value for this payment method type. /// - [JsonProperty("capture_method")] + [JsonProperty("capture_method", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("capture_method")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string CaptureMethod { get => this.captureMethod; @@ -173,8 +174,9 @@ public string CaptureMethod /// off_session. /// One of: none, off_session, or on_session. /// - [JsonProperty("setup_future_usage")] + [JsonProperty("setup_future_usage", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("setup_future_usage")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string SetupFutureUsage { get => this.setupFutureUsage; @@ -192,8 +194,9 @@ public string SetupFutureUsage /// 22 characters. On card statements, the concatenation of both prefix and suffix /// (including separators) will appear truncated to 22 characters. /// - [JsonProperty("statement_descriptor_suffix_kana")] + [JsonProperty("statement_descriptor_suffix_kana", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("statement_descriptor_suffix_kana")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string StatementDescriptorSuffixKana { get => this.statementDescriptorSuffixKana; @@ -211,8 +214,9 @@ public string StatementDescriptorSuffixKana /// 17 characters. On card statements, the concatenation of both prefix and suffix /// (including separators) will appear truncated to 17 characters. /// - [JsonProperty("statement_descriptor_suffix_kanji")] + [JsonProperty("statement_descriptor_suffix_kanji", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("statement_descriptor_suffix_kanji")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string StatementDescriptorSuffixKanji { get => this.statementDescriptorSuffixKanji; diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCashappOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCashappOptions.cs index 3458ee7dd7..2d56fc3b7f 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCashappOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCashappOptions.cs @@ -25,8 +25,9 @@ public class PaymentIntentPaymentMethodOptionsCashappOptions : INestedOptions, I /// If capture_method is already set on the PaymentIntent, providing an empty value /// for this parameter unsets the stored value for this payment method type. /// - [JsonProperty("capture_method")] + [JsonProperty("capture_method", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("capture_method")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string CaptureMethod { get => this.captureMethod; @@ -62,8 +63,9 @@ public string CaptureMethod /// off_session. /// One of: none, off_session, or on_session. /// - [JsonProperty("setup_future_usage")] + [JsonProperty("setup_future_usage", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("setup_future_usage")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string SetupFutureUsage { get => this.setupFutureUsage; diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsIdealOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsIdealOptions.cs index 6e2f5af47d..43abfc303e 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsIdealOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsIdealOptions.cs @@ -39,8 +39,9 @@ public class PaymentIntentPaymentMethodOptionsIdealOptions : INestedOptions, IHa /// off_session. /// One of: none, or off_session. /// - [JsonProperty("setup_future_usage")] + [JsonProperty("setup_future_usage", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("setup_future_usage")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string SetupFutureUsage { get => this.setupFutureUsage; diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsKakaoPayOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsKakaoPayOptions.cs index ed779d29a3..2487a50edb 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsKakaoPayOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsKakaoPayOptions.cs @@ -25,8 +25,9 @@ public class PaymentIntentPaymentMethodOptionsKakaoPayOptions : INestedOptions, /// If capture_method is already set on the PaymentIntent, providing an empty value /// for this parameter unsets the stored value for this payment method type. /// - [JsonProperty("capture_method")] + [JsonProperty("capture_method", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("capture_method")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string CaptureMethod { get => this.captureMethod; @@ -58,8 +59,9 @@ public string CaptureMethod /// href="https://stripe.com/strong-customer-authentication">SCA. /// One of: none, or off_session. /// - [JsonProperty("setup_future_usage")] + [JsonProperty("setup_future_usage", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("setup_future_usage")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string SetupFutureUsage { get => this.setupFutureUsage; diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsKlarnaOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsKlarnaOptions.cs index c019693617..f9f085e541 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsKlarnaOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsKlarnaOptions.cs @@ -26,8 +26,9 @@ public class PaymentIntentPaymentMethodOptionsKlarnaOptions : INestedOptions, IH /// If capture_method is already set on the PaymentIntent, providing an empty value /// for this parameter unsets the stored value for this payment method type. /// - [JsonProperty("capture_method")] + [JsonProperty("capture_method", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("capture_method")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string CaptureMethod { get => this.captureMethod; @@ -92,8 +93,9 @@ public string CaptureMethod /// /// Subscription details if setting up or charging a subscription. /// - [JsonProperty("subscriptions")] + [JsonProperty("subscriptions", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("subscriptions")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List Subscriptions { get => this.subscriptions; diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsKonbiniOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsKonbiniOptions.cs index 2c822a27c0..301c7644a2 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsKonbiniOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsKonbiniOptions.cs @@ -23,8 +23,9 @@ public class PaymentIntentPaymentMethodOptionsKonbiniOptions : INestedOptions, I /// applicable convenience stores. Must not consist of only zeroes and could be rejected in /// case of insufficient uniqueness. We recommend to use the customer's phone number. /// - [JsonProperty("confirmation_number")] + [JsonProperty("confirmation_number", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("confirmation_number")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string ConfirmationNumber { get => this.confirmationNumber; @@ -41,8 +42,9 @@ public string ConfirmationNumber /// expires_after_days set to 2 on Monday JST, the instructions will expire on /// Wednesday 23:59:59 JST. Defaults to 3 days. /// - [JsonProperty("expires_after_days")] + [JsonProperty("expires_after_days", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("expires_after_days")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public long? ExpiresAfterDays { get => this.expiresAfterDays; @@ -57,9 +59,10 @@ public long? ExpiresAfterDays /// The timestamp at which the Konbini payment instructions will expire. Only one of /// expires_after_days or expires_at may be set. /// - [JsonProperty("expires_at")] + [JsonProperty("expires_at", NullValueHandling = NullValueHandling.Ignore)] [JsonConverter(typeof(UnixDateTimeConverter))] [STJS.JsonPropertyName("expires_at")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] public DateTime? ExpiresAt { @@ -75,8 +78,9 @@ public DateTime? ExpiresAt /// A product descriptor of up to 22 characters, which will appear to customers at the /// convenience store. /// - [JsonProperty("product_description")] + [JsonProperty("product_description", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("product_description")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string ProductDescription { get => this.productDescription; diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsKrCardOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsKrCardOptions.cs index 6a675a7731..fac0da3aed 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsKrCardOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsKrCardOptions.cs @@ -25,8 +25,9 @@ public class PaymentIntentPaymentMethodOptionsKrCardOptions : INestedOptions, IH /// If capture_method is already set on the PaymentIntent, providing an empty value /// for this parameter unsets the stored value for this payment method type. /// - [JsonProperty("capture_method")] + [JsonProperty("capture_method", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("capture_method")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string CaptureMethod { get => this.captureMethod; @@ -58,8 +59,9 @@ public string CaptureMethod /// href="https://stripe.com/strong-customer-authentication">SCA. /// One of: none, or off_session. /// - [JsonProperty("setup_future_usage")] + [JsonProperty("setup_future_usage", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("setup_future_usage")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string SetupFutureUsage { get => this.setupFutureUsage; diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsLinkOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsLinkOptions.cs index bfbfd30725..5b1a4ab150 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsLinkOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsLinkOptions.cs @@ -26,8 +26,9 @@ public class PaymentIntentPaymentMethodOptionsLinkOptions : INestedOptions, IHas /// If capture_method is already set on the PaymentIntent, providing an empty value /// for this parameter unsets the stored value for this payment method type. /// - [JsonProperty("capture_method")] + [JsonProperty("capture_method", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("capture_method")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string CaptureMethod { get => this.captureMethod; @@ -71,8 +72,9 @@ public string CaptureMethod /// off_session. /// One of: none, or off_session. /// - [JsonProperty("setup_future_usage")] + [JsonProperty("setup_future_usage", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("setup_future_usage")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string SetupFutureUsage { get => this.setupFutureUsage; diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsMobilepayOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsMobilepayOptions.cs index 5c5c727bb7..d864e9d375 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsMobilepayOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsMobilepayOptions.cs @@ -24,8 +24,9 @@ public class PaymentIntentPaymentMethodOptionsMobilepayOptions : INestedOptions, /// If capture_method is already set on the PaymentIntent, providing an empty value /// for this parameter unsets the stored value for this payment method type. /// - [JsonProperty("capture_method")] + [JsonProperty("capture_method", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("capture_method")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string CaptureMethod { get => this.captureMethod; diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsNaverPayOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsNaverPayOptions.cs index 845747ab40..d40803d62a 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsNaverPayOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsNaverPayOptions.cs @@ -25,8 +25,9 @@ public class PaymentIntentPaymentMethodOptionsNaverPayOptions : INestedOptions, /// If capture_method is already set on the PaymentIntent, providing an empty value /// for this parameter unsets the stored value for this payment method type. /// - [JsonProperty("capture_method")] + [JsonProperty("capture_method", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("capture_method")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string CaptureMethod { get => this.captureMethod; @@ -58,8 +59,9 @@ public string CaptureMethod /// href="https://stripe.com/strong-customer-authentication">SCA. /// One of: none, or off_session. /// - [JsonProperty("setup_future_usage")] + [JsonProperty("setup_future_usage", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("setup_future_usage")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string SetupFutureUsage { get => this.setupFutureUsage; diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsNzBankAccountOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsNzBankAccountOptions.cs index 34186b2eac..dc8c1b2416 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsNzBankAccountOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsNzBankAccountOptions.cs @@ -39,8 +39,9 @@ public class PaymentIntentPaymentMethodOptionsNzBankAccountOptions : INestedOpti /// off_session. /// One of: none, off_session, or on_session. /// - [JsonProperty("setup_future_usage")] + [JsonProperty("setup_future_usage", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("setup_future_usage")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string SetupFutureUsage { get => this.setupFutureUsage; diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsOptions.cs index 987bb5d13b..683491119d 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsOptions.cs @@ -70,8 +70,9 @@ public class PaymentIntentPaymentMethodOptionsOptions : INestedOptions, IHasSetT /// If this is a acss_debit PaymentMethod, this sub-hash contains details about the /// ACSS Debit payment method options. /// - [JsonProperty("acss_debit")] + [JsonProperty("acss_debit", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("acss_debit")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public PaymentIntentPaymentMethodOptionsAcssDebitOptions AcssDebit { get => this.acssDebit; @@ -86,8 +87,9 @@ public PaymentIntentPaymentMethodOptionsAcssDebitOptions AcssDebit /// If this is an affirm PaymentMethod, this sub-hash contains details about the /// Affirm payment method options. /// - [JsonProperty("affirm")] + [JsonProperty("affirm", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("affirm")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public PaymentIntentPaymentMethodOptionsAffirmOptions Affirm { get => this.affirm; @@ -102,8 +104,9 @@ public PaymentIntentPaymentMethodOptionsAffirmOptions Affirm /// If this is a afterpay_clearpay PaymentMethod, this sub-hash contains details /// about the Afterpay Clearpay payment method options. /// - [JsonProperty("afterpay_clearpay")] + [JsonProperty("afterpay_clearpay", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("afterpay_clearpay")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public PaymentIntentPaymentMethodOptionsAfterpayClearpayOptions AfterpayClearpay { get => this.afterpayClearpay; @@ -118,8 +121,9 @@ public PaymentIntentPaymentMethodOptionsAfterpayClearpayOptions AfterpayClearpay /// If this is a alipay PaymentMethod, this sub-hash contains details about the /// Alipay payment method options. /// - [JsonProperty("alipay")] + [JsonProperty("alipay", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("alipay")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public PaymentIntentPaymentMethodOptionsAlipayOptions Alipay { get => this.alipay; @@ -134,8 +138,9 @@ public PaymentIntentPaymentMethodOptionsAlipayOptions Alipay /// If this is a alma PaymentMethod, this sub-hash contains details about the Alma /// payment method options. /// - [JsonProperty("alma")] + [JsonProperty("alma", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("alma")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public PaymentIntentPaymentMethodOptionsAlmaOptions Alma { get => this.alma; @@ -150,8 +155,9 @@ public PaymentIntentPaymentMethodOptionsAlmaOptions Alma /// If this is a amazon_pay PaymentMethod, this sub-hash contains details about the /// Amazon Pay payment method options. /// - [JsonProperty("amazon_pay")] + [JsonProperty("amazon_pay", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("amazon_pay")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public PaymentIntentPaymentMethodOptionsAmazonPayOptions AmazonPay { get => this.amazonPay; @@ -166,8 +172,9 @@ public PaymentIntentPaymentMethodOptionsAmazonPayOptions AmazonPay /// If this is a au_becs_debit PaymentMethod, this sub-hash contains details about /// the AU BECS Direct Debit payment method options. /// - [JsonProperty("au_becs_debit")] + [JsonProperty("au_becs_debit", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("au_becs_debit")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public PaymentIntentPaymentMethodOptionsAuBecsDebitOptions AuBecsDebit { get => this.auBecsDebit; @@ -182,8 +189,9 @@ public PaymentIntentPaymentMethodOptionsAuBecsDebitOptions AuBecsDebit /// If this is a bacs_debit PaymentMethod, this sub-hash contains details about the /// BACS Debit payment method options. /// - [JsonProperty("bacs_debit")] + [JsonProperty("bacs_debit", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("bacs_debit")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public PaymentIntentPaymentMethodOptionsBacsDebitOptions BacsDebit { get => this.bacsDebit; @@ -198,8 +206,9 @@ public PaymentIntentPaymentMethodOptionsBacsDebitOptions BacsDebit /// If this is a bancontact PaymentMethod, this sub-hash contains details about the /// Bancontact payment method options. /// - [JsonProperty("bancontact")] + [JsonProperty("bancontact", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("bancontact")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public PaymentIntentPaymentMethodOptionsBancontactOptions Bancontact { get => this.bancontact; @@ -214,8 +223,9 @@ public PaymentIntentPaymentMethodOptionsBancontactOptions Bancontact /// If this is a billie PaymentMethod, this sub-hash contains details about the /// Billie payment method options. /// - [JsonProperty("billie")] + [JsonProperty("billie", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("billie")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public PaymentIntentPaymentMethodOptionsBillieOptions Billie { get => this.billie; @@ -230,8 +240,9 @@ public PaymentIntentPaymentMethodOptionsBillieOptions Billie /// If this is a blik PaymentMethod, this sub-hash contains details about the BLIK /// payment method options. /// - [JsonProperty("blik")] + [JsonProperty("blik", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("blik")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public PaymentIntentPaymentMethodOptionsBlikOptions Blik { get => this.blik; @@ -246,8 +257,9 @@ public PaymentIntentPaymentMethodOptionsBlikOptions Blik /// If this is a boleto PaymentMethod, this sub-hash contains details about the /// Boleto payment method options. /// - [JsonProperty("boleto")] + [JsonProperty("boleto", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("boleto")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public PaymentIntentPaymentMethodOptionsBoletoOptions Boleto { get => this.boleto; @@ -261,8 +273,9 @@ public PaymentIntentPaymentMethodOptionsBoletoOptions Boleto /// /// Configuration for any card payments attempted on this PaymentIntent. /// - [JsonProperty("card")] + [JsonProperty("card", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("card")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public PaymentIntentPaymentMethodOptionsCardOptions Card { get => this.card; @@ -277,8 +290,9 @@ public PaymentIntentPaymentMethodOptionsCardOptions Card /// If this is a card_present PaymentMethod, this sub-hash contains details about the /// Card Present payment method options. /// - [JsonProperty("card_present")] + [JsonProperty("card_present", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("card_present")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public PaymentIntentPaymentMethodOptionsCardPresentOptions CardPresent { get => this.cardPresent; @@ -293,8 +307,9 @@ public PaymentIntentPaymentMethodOptionsCardPresentOptions CardPresent /// If this is a cashapp PaymentMethod, this sub-hash contains details about the Cash /// App Pay payment method options. /// - [JsonProperty("cashapp")] + [JsonProperty("cashapp", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("cashapp")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public PaymentIntentPaymentMethodOptionsCashappOptions Cashapp { get => this.cashapp; @@ -309,8 +324,9 @@ public PaymentIntentPaymentMethodOptionsCashappOptions Cashapp /// If this is a crypto PaymentMethod, this sub-hash contains details about the /// Crypto payment method options. /// - [JsonProperty("crypto")] + [JsonProperty("crypto", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("crypto")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public PaymentIntentPaymentMethodOptionsCryptoOptions Crypto { get => this.crypto; @@ -325,8 +341,9 @@ public PaymentIntentPaymentMethodOptionsCryptoOptions Crypto /// If this is a customer balance PaymentMethod, this sub-hash contains details about /// the customer balance payment method options. /// - [JsonProperty("customer_balance")] + [JsonProperty("customer_balance", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("customer_balance")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public PaymentIntentPaymentMethodOptionsCustomerBalanceOptions CustomerBalance { get => this.customerBalance; @@ -341,8 +358,9 @@ public PaymentIntentPaymentMethodOptionsCustomerBalanceOptions CustomerBalance /// If this is a eps PaymentMethod, this sub-hash contains details about the EPS /// payment method options. /// - [JsonProperty("eps")] + [JsonProperty("eps", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("eps")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public PaymentIntentPaymentMethodOptionsEpsOptions Eps { get => this.eps; @@ -357,8 +375,9 @@ public PaymentIntentPaymentMethodOptionsEpsOptions Eps /// If this is a fpx PaymentMethod, this sub-hash contains details about the FPX /// payment method options. /// - [JsonProperty("fpx")] + [JsonProperty("fpx", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("fpx")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public PaymentIntentPaymentMethodOptionsFpxOptions Fpx { get => this.fpx; @@ -373,8 +392,9 @@ public PaymentIntentPaymentMethodOptionsFpxOptions Fpx /// If this is a giropay PaymentMethod, this sub-hash contains details about the /// Giropay payment method options. /// - [JsonProperty("giropay")] + [JsonProperty("giropay", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("giropay")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public PaymentIntentPaymentMethodOptionsGiropayOptions Giropay { get => this.giropay; @@ -389,8 +409,9 @@ public PaymentIntentPaymentMethodOptionsGiropayOptions Giropay /// If this is a grabpay PaymentMethod, this sub-hash contains details about the /// Grabpay payment method options. /// - [JsonProperty("grabpay")] + [JsonProperty("grabpay", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("grabpay")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public PaymentIntentPaymentMethodOptionsGrabpayOptions Grabpay { get => this.grabpay; @@ -405,8 +426,9 @@ public PaymentIntentPaymentMethodOptionsGrabpayOptions Grabpay /// If this is a ideal PaymentMethod, this sub-hash contains details about the Ideal /// payment method options. /// - [JsonProperty("ideal")] + [JsonProperty("ideal", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("ideal")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public PaymentIntentPaymentMethodOptionsIdealOptions Ideal { get => this.ideal; @@ -421,8 +443,9 @@ public PaymentIntentPaymentMethodOptionsIdealOptions Ideal /// If this is a interac_present PaymentMethod, this sub-hash contains details about /// the Card Present payment method options. /// - [JsonProperty("interac_present")] + [JsonProperty("interac_present", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("interac_present")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public PaymentIntentPaymentMethodOptionsInteracPresentOptions InteracPresent { get => this.interacPresent; @@ -437,8 +460,9 @@ public PaymentIntentPaymentMethodOptionsInteracPresentOptions InteracPresent /// If this is a kakao_pay PaymentMethod, this sub-hash contains details about the /// Kakao Pay payment method options. /// - [JsonProperty("kakao_pay")] + [JsonProperty("kakao_pay", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("kakao_pay")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public PaymentIntentPaymentMethodOptionsKakaoPayOptions KakaoPay { get => this.kakaoPay; @@ -453,8 +477,9 @@ public PaymentIntentPaymentMethodOptionsKakaoPayOptions KakaoPay /// If this is a klarna PaymentMethod, this sub-hash contains details about the /// Klarna payment method options. /// - [JsonProperty("klarna")] + [JsonProperty("klarna", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("klarna")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public PaymentIntentPaymentMethodOptionsKlarnaOptions Klarna { get => this.klarna; @@ -469,8 +494,9 @@ public PaymentIntentPaymentMethodOptionsKlarnaOptions Klarna /// If this is a konbini PaymentMethod, this sub-hash contains details about the /// Konbini payment method options. /// - [JsonProperty("konbini")] + [JsonProperty("konbini", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("konbini")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public PaymentIntentPaymentMethodOptionsKonbiniOptions Konbini { get => this.konbini; @@ -485,8 +511,9 @@ public PaymentIntentPaymentMethodOptionsKonbiniOptions Konbini /// If this is a kr_card PaymentMethod, this sub-hash contains details about the KR /// Card payment method options. /// - [JsonProperty("kr_card")] + [JsonProperty("kr_card", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("kr_card")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public PaymentIntentPaymentMethodOptionsKrCardOptions KrCard { get => this.krCard; @@ -501,8 +528,9 @@ public PaymentIntentPaymentMethodOptionsKrCardOptions KrCard /// If this is a link PaymentMethod, this sub-hash contains details about the Link /// payment method options. /// - [JsonProperty("link")] + [JsonProperty("link", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("link")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public PaymentIntentPaymentMethodOptionsLinkOptions Link { get => this.link; @@ -517,8 +545,9 @@ public PaymentIntentPaymentMethodOptionsLinkOptions Link /// If this is a mb_way PaymentMethod, this sub-hash contains details about the MB /// WAY payment method options. /// - [JsonProperty("mb_way")] + [JsonProperty("mb_way", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("mb_way")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public PaymentIntentPaymentMethodOptionsMbWayOptions MbWay { get => this.mbWay; @@ -533,8 +562,9 @@ public PaymentIntentPaymentMethodOptionsMbWayOptions MbWay /// If this is a MobilePay PaymentMethod, this sub-hash contains details about the /// MobilePay payment method options. /// - [JsonProperty("mobilepay")] + [JsonProperty("mobilepay", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("mobilepay")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public PaymentIntentPaymentMethodOptionsMobilepayOptions Mobilepay { get => this.mobilepay; @@ -549,8 +579,9 @@ public PaymentIntentPaymentMethodOptionsMobilepayOptions Mobilepay /// If this is a multibanco PaymentMethod, this sub-hash contains details about the /// Multibanco payment method options. /// - [JsonProperty("multibanco")] + [JsonProperty("multibanco", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("multibanco")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public PaymentIntentPaymentMethodOptionsMultibancoOptions Multibanco { get => this.multibanco; @@ -565,8 +596,9 @@ public PaymentIntentPaymentMethodOptionsMultibancoOptions Multibanco /// If this is a naver_pay PaymentMethod, this sub-hash contains details about the /// Naver Pay payment method options. /// - [JsonProperty("naver_pay")] + [JsonProperty("naver_pay", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("naver_pay")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public PaymentIntentPaymentMethodOptionsNaverPayOptions NaverPay { get => this.naverPay; @@ -581,8 +613,9 @@ public PaymentIntentPaymentMethodOptionsNaverPayOptions NaverPay /// If this is a nz_bank_account PaymentMethod, this sub-hash contains details about /// the NZ BECS Direct Debit payment method options. /// - [JsonProperty("nz_bank_account")] + [JsonProperty("nz_bank_account", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("nz_bank_account")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public PaymentIntentPaymentMethodOptionsNzBankAccountOptions NzBankAccount { get => this.nzBankAccount; @@ -597,8 +630,9 @@ public PaymentIntentPaymentMethodOptionsNzBankAccountOptions NzBankAccount /// If this is a oxxo PaymentMethod, this sub-hash contains details about the OXXO /// payment method options. /// - [JsonProperty("oxxo")] + [JsonProperty("oxxo", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("oxxo")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public PaymentIntentPaymentMethodOptionsOxxoOptions Oxxo { get => this.oxxo; @@ -613,8 +647,9 @@ public PaymentIntentPaymentMethodOptionsOxxoOptions Oxxo /// If this is a p24 PaymentMethod, this sub-hash contains details about the /// Przelewy24 payment method options. /// - [JsonProperty("p24")] + [JsonProperty("p24", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("p24")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public PaymentIntentPaymentMethodOptionsP24Options P24 { get => this.p24; @@ -629,8 +664,9 @@ public PaymentIntentPaymentMethodOptionsP24Options P24 /// If this is a pay_by_bank PaymentMethod, this sub-hash contains details about the /// PayByBank payment method options. /// - [JsonProperty("pay_by_bank")] + [JsonProperty("pay_by_bank", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("pay_by_bank")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public PaymentIntentPaymentMethodOptionsPayByBankOptions PayByBank { get => this.payByBank; @@ -645,8 +681,9 @@ public PaymentIntentPaymentMethodOptionsPayByBankOptions PayByBank /// If this is a payco PaymentMethod, this sub-hash contains details about the PAYCO /// payment method options. /// - [JsonProperty("payco")] + [JsonProperty("payco", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("payco")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public PaymentIntentPaymentMethodOptionsPaycoOptions Payco { get => this.payco; @@ -661,8 +698,9 @@ public PaymentIntentPaymentMethodOptionsPaycoOptions Payco /// If this is a paynow PaymentMethod, this sub-hash contains details about the /// PayNow payment method options. /// - [JsonProperty("paynow")] + [JsonProperty("paynow", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("paynow")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public PaymentIntentPaymentMethodOptionsPaynowOptions Paynow { get => this.paynow; @@ -677,8 +715,9 @@ public PaymentIntentPaymentMethodOptionsPaynowOptions Paynow /// If this is a paypal PaymentMethod, this sub-hash contains details about the /// PayPal payment method options. /// - [JsonProperty("paypal")] + [JsonProperty("paypal", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("paypal")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public PaymentIntentPaymentMethodOptionsPaypalOptions Paypal { get => this.paypal; @@ -693,8 +732,9 @@ public PaymentIntentPaymentMethodOptionsPaypalOptions Paypal /// If this is a payto PaymentMethod, this sub-hash contains details about the PayTo /// payment method options. /// - [JsonProperty("payto")] + [JsonProperty("payto", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("payto")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public PaymentIntentPaymentMethodOptionsPaytoOptions Payto { get => this.payto; @@ -709,8 +749,9 @@ public PaymentIntentPaymentMethodOptionsPaytoOptions Payto /// If this is a pix PaymentMethod, this sub-hash contains details about the Pix /// payment method options. /// - [JsonProperty("pix")] + [JsonProperty("pix", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("pix")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public PaymentIntentPaymentMethodOptionsPixOptions Pix { get => this.pix; @@ -725,8 +766,9 @@ public PaymentIntentPaymentMethodOptionsPixOptions Pix /// If this is a promptpay PaymentMethod, this sub-hash contains details about the /// PromptPay payment method options. /// - [JsonProperty("promptpay")] + [JsonProperty("promptpay", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("promptpay")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public PaymentIntentPaymentMethodOptionsPromptpayOptions Promptpay { get => this.promptpay; @@ -741,8 +783,9 @@ public PaymentIntentPaymentMethodOptionsPromptpayOptions Promptpay /// If this is a revolut_pay PaymentMethod, this sub-hash contains details about the /// Revolut Pay payment method options. /// - [JsonProperty("revolut_pay")] + [JsonProperty("revolut_pay", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("revolut_pay")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public PaymentIntentPaymentMethodOptionsRevolutPayOptions RevolutPay { get => this.revolutPay; @@ -757,8 +800,9 @@ public PaymentIntentPaymentMethodOptionsRevolutPayOptions RevolutPay /// If this is a samsung_pay PaymentMethod, this sub-hash contains details about the /// Samsung Pay payment method options. /// - [JsonProperty("samsung_pay")] + [JsonProperty("samsung_pay", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("samsung_pay")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public PaymentIntentPaymentMethodOptionsSamsungPayOptions SamsungPay { get => this.samsungPay; @@ -773,8 +817,9 @@ public PaymentIntentPaymentMethodOptionsSamsungPayOptions SamsungPay /// If this is a satispay PaymentMethod, this sub-hash contains details about the /// Satispay payment method options. /// - [JsonProperty("satispay")] + [JsonProperty("satispay", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("satispay")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public PaymentIntentPaymentMethodOptionsSatispayOptions Satispay { get => this.satispay; @@ -789,8 +834,9 @@ public PaymentIntentPaymentMethodOptionsSatispayOptions Satispay /// If this is a sepa_debit PaymentIntent, this sub-hash contains details about the /// SEPA Debit payment method options. /// - [JsonProperty("sepa_debit")] + [JsonProperty("sepa_debit", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("sepa_debit")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public PaymentIntentPaymentMethodOptionsSepaDebitOptions SepaDebit { get => this.sepaDebit; @@ -805,8 +851,9 @@ public PaymentIntentPaymentMethodOptionsSepaDebitOptions SepaDebit /// If this is a sofort PaymentMethod, this sub-hash contains details about the /// SOFORT payment method options. /// - [JsonProperty("sofort")] + [JsonProperty("sofort", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("sofort")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public PaymentIntentPaymentMethodOptionsSofortOptions Sofort { get => this.sofort; @@ -821,8 +868,9 @@ public PaymentIntentPaymentMethodOptionsSofortOptions Sofort /// If this is a Swish PaymentMethod, this sub-hash contains details about the Swish /// payment method options. /// - [JsonProperty("swish")] + [JsonProperty("swish", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("swish")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public PaymentIntentPaymentMethodOptionsSwishOptions Swish { get => this.swish; @@ -837,8 +885,9 @@ public PaymentIntentPaymentMethodOptionsSwishOptions Swish /// If this is a twint PaymentMethod, this sub-hash contains details about the TWINT /// payment method options. /// - [JsonProperty("twint")] + [JsonProperty("twint", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("twint")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public PaymentIntentPaymentMethodOptionsTwintOptions Twint { get => this.twint; @@ -853,8 +902,9 @@ public PaymentIntentPaymentMethodOptionsTwintOptions Twint /// If this is a upi PaymentIntent, this sub-hash contains details about the UPI /// payment method options. /// - [JsonProperty("upi")] + [JsonProperty("upi", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("upi")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public PaymentIntentPaymentMethodOptionsUpiOptions Upi { get => this.upi; @@ -869,8 +919,9 @@ public PaymentIntentPaymentMethodOptionsUpiOptions Upi /// If this is a us_bank_account PaymentMethod, this sub-hash contains details about /// the US bank account payment method options. /// - [JsonProperty("us_bank_account")] + [JsonProperty("us_bank_account", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("us_bank_account")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public PaymentIntentPaymentMethodOptionsUsBankAccountOptions UsBankAccount { get => this.usBankAccount; @@ -885,8 +936,9 @@ public PaymentIntentPaymentMethodOptionsUsBankAccountOptions UsBankAccount /// If this is a wechat_pay PaymentMethod, this sub-hash contains details about the /// WeChat Pay payment method options. /// - [JsonProperty("wechat_pay")] + [JsonProperty("wechat_pay", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("wechat_pay")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public PaymentIntentPaymentMethodOptionsWechatPayOptions WechatPay { get => this.wechatPay; @@ -901,8 +953,9 @@ public PaymentIntentPaymentMethodOptionsWechatPayOptions WechatPay /// If this is a zip PaymentMethod, this sub-hash contains details about the Zip /// payment method options. /// - [JsonProperty("zip")] + [JsonProperty("zip", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("zip")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public PaymentIntentPaymentMethodOptionsZipOptions Zip { get => this.zip; diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsPaycoOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsPaycoOptions.cs index 3753ca8acd..d2bf3efb24 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsPaycoOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsPaycoOptions.cs @@ -24,8 +24,9 @@ public class PaymentIntentPaymentMethodOptionsPaycoOptions : INestedOptions, IHa /// If capture_method is already set on the PaymentIntent, providing an empty value /// for this parameter unsets the stored value for this payment method type. /// - [JsonProperty("capture_method")] + [JsonProperty("capture_method", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("capture_method")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string CaptureMethod { get => this.captureMethod; diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsPaypalOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsPaypalOptions.cs index be7b4a8e8d..3da0e69e3f 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsPaypalOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsPaypalOptions.cs @@ -18,8 +18,9 @@ public class PaymentIntentPaymentMethodOptionsPaypalOptions : INestedOptions, IH /// /// Controls when the funds will be captured from the customer's account. /// - [JsonProperty("capture_method")] + [JsonProperty("capture_method", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("capture_method")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string CaptureMethod { get => this.captureMethod; @@ -83,8 +84,9 @@ public string CaptureMethod /// off_session. /// One of: none, or off_session. /// - [JsonProperty("setup_future_usage")] + [JsonProperty("setup_future_usage", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("setup_future_usage")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string SetupFutureUsage { get => this.setupFutureUsage; diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsPaytoMandateOptionsOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsPaytoMandateOptionsOptions.cs index d0354ffef4..e761d38adc 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsPaytoMandateOptionsOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsPaytoMandateOptionsOptions.cs @@ -22,8 +22,9 @@ public class PaymentIntentPaymentMethodOptionsPaytoMandateOptionsOptions : INest /// /// Amount that will be collected. It is required when amount_type is fixed. /// - [JsonProperty("amount")] + [JsonProperty("amount", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("amount")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public long? Amount { get => this.amount; @@ -40,8 +41,9 @@ public long? Amount /// Defaults to maximum. /// One of: fixed, or maximum. /// - [JsonProperty("amount_type")] + [JsonProperty("amount_type", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("amount_type")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string AmountType { get => this.amountType; @@ -56,8 +58,9 @@ public string AmountType /// Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no /// end date. /// - [JsonProperty("end_date")] + [JsonProperty("end_date", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("end_date")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string EndDate { get => this.endDate; @@ -73,8 +76,9 @@ public string EndDate /// One of: adhoc, annual, daily, fortnightly, monthly, /// quarterly, semi_annual, or weekly. /// - [JsonProperty("payment_schedule")] + [JsonProperty("payment_schedule", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("payment_schedule")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string PaymentSchedule { get => this.paymentSchedule; @@ -89,8 +93,9 @@ public string PaymentSchedule /// The number of payments that will be made during a payment period. Defaults to 1 except /// for when payment_schedule is adhoc. In that case, it defaults to no limit. /// - [JsonProperty("payments_per_period")] + [JsonProperty("payments_per_period", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("payments_per_period")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public long? PaymentsPerPeriod { get => this.paymentsPerPeriod; @@ -108,8 +113,9 @@ public long? PaymentsPerPeriod /// other, pension, personal, retail, salary, tax, /// or utility. /// - [JsonProperty("purpose")] + [JsonProperty("purpose", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("purpose")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string Purpose { get => this.purpose; diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsPaytoOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsPaytoOptions.cs index d99ac69b78..aff7352748 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsPaytoOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsPaytoOptions.cs @@ -48,8 +48,9 @@ public class PaymentIntentPaymentMethodOptionsPaytoOptions : INestedOptions, IHa /// off_session. /// One of: none, or off_session. /// - [JsonProperty("setup_future_usage")] + [JsonProperty("setup_future_usage", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("setup_future_usage")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string SetupFutureUsage { get => this.setupFutureUsage; diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsRevolutPayOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsRevolutPayOptions.cs index 8df79450ca..5fc4a52305 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsRevolutPayOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsRevolutPayOptions.cs @@ -25,8 +25,9 @@ public class PaymentIntentPaymentMethodOptionsRevolutPayOptions : INestedOptions /// If capture_method is already set on the PaymentIntent, providing an empty value /// for this parameter unsets the stored value for this payment method type. /// - [JsonProperty("capture_method")] + [JsonProperty("capture_method", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("capture_method")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string CaptureMethod { get => this.captureMethod; @@ -58,8 +59,9 @@ public string CaptureMethod /// href="https://stripe.com/strong-customer-authentication">SCA. /// One of: none, or off_session. /// - [JsonProperty("setup_future_usage")] + [JsonProperty("setup_future_usage", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("setup_future_usage")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string SetupFutureUsage { get => this.setupFutureUsage; diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsSamsungPayOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsSamsungPayOptions.cs index 6a4d0fe720..09209a01b6 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsSamsungPayOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsSamsungPayOptions.cs @@ -24,8 +24,9 @@ public class PaymentIntentPaymentMethodOptionsSamsungPayOptions : INestedOptions /// If capture_method is already set on the PaymentIntent, providing an empty value /// for this parameter unsets the stored value for this payment method type. /// - [JsonProperty("capture_method")] + [JsonProperty("capture_method", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("capture_method")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string CaptureMethod { get => this.captureMethod; diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsSatispayOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsSatispayOptions.cs index 6a3924e8a2..582e277a09 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsSatispayOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsSatispayOptions.cs @@ -24,8 +24,9 @@ public class PaymentIntentPaymentMethodOptionsSatispayOptions : INestedOptions, /// If capture_method is already set on the PaymentIntent, providing an empty value /// for this parameter unsets the stored value for this payment method type. /// - [JsonProperty("capture_method")] + [JsonProperty("capture_method", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("capture_method")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string CaptureMethod { get => this.captureMethod; diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsSepaDebitMandateOptionsOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsSepaDebitMandateOptionsOptions.cs index 2af1d96ab4..b364f10dd8 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsSepaDebitMandateOptionsOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsSepaDebitMandateOptionsOptions.cs @@ -19,8 +19,9 @@ public class PaymentIntentPaymentMethodOptionsSepaDebitMandateOptionsOptions : I /// consist of only uppercase letters, numbers, spaces, or the following special characters: /// '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. /// - [JsonProperty("reference_prefix")] + [JsonProperty("reference_prefix", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("reference_prefix")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string ReferencePrefix { get => this.referencePrefix; diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsSepaDebitOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsSepaDebitOptions.cs index aeee1efb45..282efd212a 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsSepaDebitOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsSepaDebitOptions.cs @@ -46,8 +46,9 @@ public class PaymentIntentPaymentMethodOptionsSepaDebitOptions : INestedOptions, /// off_session. /// One of: none, off_session, or on_session. /// - [JsonProperty("setup_future_usage")] + [JsonProperty("setup_future_usage", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("setup_future_usage")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string SetupFutureUsage { get => this.setupFutureUsage; diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsSofortOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsSofortOptions.cs index 246c3d1e71..0e02a56f46 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsSofortOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsSofortOptions.cs @@ -19,8 +19,9 @@ public class PaymentIntentPaymentMethodOptionsSofortOptions : INestedOptions, IH /// Language shown to the payer on redirect. /// One of: de, en, es, fr, it, nl, or pl. /// - [JsonProperty("preferred_language")] + [JsonProperty("preferred_language", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("preferred_language")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string PreferredLanguage { get => this.preferredLanguage; @@ -56,8 +57,9 @@ public string PreferredLanguage /// off_session. /// One of: none, or off_session. /// - [JsonProperty("setup_future_usage")] + [JsonProperty("setup_future_usage", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("setup_future_usage")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string SetupFutureUsage { get => this.setupFutureUsage; diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsSwishOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsSwishOptions.cs index cf45d4fea2..100f08f77b 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsSwishOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsSwishOptions.cs @@ -17,8 +17,9 @@ public class PaymentIntentPaymentMethodOptionsSwishOptions : INestedOptions, IHa /// /// A reference for this payment to be displayed in the Swish app. /// - [JsonProperty("reference")] + [JsonProperty("reference", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("reference")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string Reference { get => this.reference; diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsUpiOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsUpiOptions.cs index 494935b725..2946b6071d 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsUpiOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsUpiOptions.cs @@ -24,8 +24,9 @@ public class PaymentIntentPaymentMethodOptionsUpiOptions : INestedOptions, IHasS /// /// One of: none, off_session, or on_session. /// - [JsonProperty("setup_future_usage")] + [JsonProperty("setup_future_usage", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("setup_future_usage")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string SetupFutureUsage { get => this.setupFutureUsage; diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsUsBankAccountMandateOptionsOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsUsBankAccountMandateOptionsOptions.cs index d017971148..8639c8e56e 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsUsBankAccountMandateOptionsOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsUsBankAccountMandateOptionsOptions.cs @@ -17,8 +17,9 @@ public class PaymentIntentPaymentMethodOptionsUsBankAccountMandateOptionsOptions /// /// The method used to collect offline mandate customer acceptance. /// - [JsonProperty("collection_method")] + [JsonProperty("collection_method", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("collection_method")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string CollectionMethod { get => this.collectionMethod; diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsUsBankAccountOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsUsBankAccountOptions.cs index fcd00f5d8f..8f3a5bd333 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsUsBankAccountOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsUsBankAccountOptions.cs @@ -61,8 +61,9 @@ public class PaymentIntentPaymentMethodOptionsUsBankAccountOptions : INestedOpti /// off_session. /// One of: none, off_session, or on_session. /// - [JsonProperty("setup_future_usage")] + [JsonProperty("setup_future_usage", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("setup_future_usage")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string SetupFutureUsage { get => this.setupFutureUsage; @@ -86,8 +87,9 @@ public string SetupFutureUsage /// The purpose of the transaction. /// One of: goods, other, services, or unspecified. /// - [JsonProperty("transaction_purpose")] + [JsonProperty("transaction_purpose", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("transaction_purpose")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string TransactionPurpose { get => this.transactionPurpose; diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentUpdateOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentUpdateOptions.cs index 2e7a02af98..4991798882 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentUpdateOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentUpdateOptions.cs @@ -35,8 +35,9 @@ public class PaymentIntentUpdateOptions : BaseOptions, IHasMetadata /// /// Provides industry-specific information about the amount. /// - [JsonProperty("amount_details")] + [JsonProperty("amount_details", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("amount_details")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public PaymentIntentAmountDetailsOptions AmountDetails { get => this.amountDetails; @@ -55,8 +56,9 @@ public PaymentIntentAmountDetailsOptions AmountDetails /// href="https://docs.stripe.com/payments/connected-accounts">use case for connected /// accounts. /// - [JsonProperty("application_fee_amount")] + [JsonProperty("application_fee_amount", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("application_fee_amount")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public long? ApplicationFeeAmount { get => this.applicationFeeAmount; @@ -142,8 +144,9 @@ public long? ApplicationFeeAmount /// sofort, swish, twint, upi, us_bank_account, /// wechat_pay, or zip. /// - [JsonProperty("excluded_payment_method_types")] + [JsonProperty("excluded_payment_method_types", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("excluded_payment_method_types")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List ExcludedPaymentMethodTypes { get => this.excludedPaymentMethodTypes; @@ -167,8 +170,9 @@ public List ExcludedPaymentMethodTypes /// object in a structured format. Individual keys can be unset by posting an empty value to /// them. All keys can be unset by posting an empty value to metadata. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary Metadata { get => this.metadata; @@ -182,8 +186,9 @@ public Dictionary Metadata /// /// Provides industry-specific information about the charge. /// - [JsonProperty("payment_details")] + [JsonProperty("payment_details", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("payment_details")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public PaymentIntentPaymentDetailsOptions PaymentDetails { get => this.paymentDetails; @@ -247,8 +252,9 @@ public PaymentIntentPaymentDetailsOptions PaymentDetails /// regardless of your email /// settings. /// - [JsonProperty("receipt_email")] + [JsonProperty("receipt_email", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("receipt_email")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string ReceiptEmail { get => this.receiptEmail; @@ -284,8 +290,9 @@ public string ReceiptEmail /// off_session. /// One of: off_session, or on_session. /// - [JsonProperty("setup_future_usage")] + [JsonProperty("setup_future_usage", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("setup_future_usage")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string SetupFutureUsage { get => this.setupFutureUsage; @@ -299,8 +306,9 @@ public string SetupFutureUsage /// /// Shipping information for this PaymentIntent. /// - [JsonProperty("shipping")] + [JsonProperty("shipping", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("shipping")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public ChargeShippingOptions Shipping { get => this.shipping; diff --git a/src/Stripe.net/Services/PaymentLinks/PaymentLinkCustomTextOptions.cs b/src/Stripe.net/Services/PaymentLinks/PaymentLinkCustomTextOptions.cs index 6f3547bb54..57770475d3 100644 --- a/src/Stripe.net/Services/PaymentLinks/PaymentLinkCustomTextOptions.cs +++ b/src/Stripe.net/Services/PaymentLinks/PaymentLinkCustomTextOptions.cs @@ -20,8 +20,9 @@ public class PaymentLinkCustomTextOptions : INestedOptions, IHasSetTracking /// /// Custom text that should be displayed after the payment confirmation button. /// - [JsonProperty("after_submit")] + [JsonProperty("after_submit", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("after_submit")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public PaymentLinkCustomTextAfterSubmitOptions AfterSubmit { get => this.afterSubmit; @@ -35,8 +36,9 @@ public PaymentLinkCustomTextAfterSubmitOptions AfterSubmit /// /// Custom text that should be displayed alongside shipping address collection. /// - [JsonProperty("shipping_address")] + [JsonProperty("shipping_address", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("shipping_address")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public PaymentLinkCustomTextShippingAddressOptions ShippingAddress { get => this.shippingAddress; @@ -50,8 +52,9 @@ public PaymentLinkCustomTextShippingAddressOptions ShippingAddress /// /// Custom text that should be displayed alongside the payment confirmation button. /// - [JsonProperty("submit")] + [JsonProperty("submit", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("submit")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public PaymentLinkCustomTextSubmitOptions Submit { get => this.submit; @@ -66,8 +69,9 @@ public PaymentLinkCustomTextSubmitOptions Submit /// Custom text that should be displayed in place of the default terms of service agreement /// text. /// - [JsonProperty("terms_of_service_acceptance")] + [JsonProperty("terms_of_service_acceptance", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("terms_of_service_acceptance")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public PaymentLinkCustomTextTermsOfServiceAcceptanceOptions TermsOfServiceAcceptance { get => this.termsOfServiceAcceptance; diff --git a/src/Stripe.net/Services/PaymentLinks/PaymentLinkInvoiceCreationInvoiceDataOptions.cs b/src/Stripe.net/Services/PaymentLinks/PaymentLinkInvoiceCreationInvoiceDataOptions.cs index 2e139f9daa..4289122784 100644 --- a/src/Stripe.net/Services/PaymentLinks/PaymentLinkInvoiceCreationInvoiceDataOptions.cs +++ b/src/Stripe.net/Services/PaymentLinks/PaymentLinkInvoiceCreationInvoiceDataOptions.cs @@ -21,8 +21,9 @@ public class PaymentLinkInvoiceCreationInvoiceDataOptions : INestedOptions, IHas /// /// The account tax IDs associated with the invoice. /// - [JsonProperty("account_tax_ids")] + [JsonProperty("account_tax_ids", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("account_tax_ids")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List AccountTaxIds { get => this.accountTaxIds; @@ -36,8 +37,9 @@ public List AccountTaxIds /// /// Default custom fields to be displayed on invoices for this customer. /// - [JsonProperty("custom_fields")] + [JsonProperty("custom_fields", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("custom_fields")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List CustomFields { get => this.customFields; @@ -76,8 +78,9 @@ public List CustomField /// object in a structured format. Individual keys can be unset by posting an empty value to /// them. All keys can be unset by posting an empty value to metadata. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary Metadata { get => this.metadata; @@ -91,8 +94,9 @@ public Dictionary Metadata /// /// Default options for invoice PDF rendering for this customer. /// - [JsonProperty("rendering_options")] + [JsonProperty("rendering_options", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("rendering_options")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public PaymentLinkInvoiceCreationInvoiceDataRenderingOptionsOptions RenderingOptions { get => this.renderingOptions; diff --git a/src/Stripe.net/Services/PaymentLinks/PaymentLinkInvoiceCreationInvoiceDataRenderingOptionsOptions.cs b/src/Stripe.net/Services/PaymentLinks/PaymentLinkInvoiceCreationInvoiceDataRenderingOptionsOptions.cs index 3587c5049b..6483767169 100644 --- a/src/Stripe.net/Services/PaymentLinks/PaymentLinkInvoiceCreationInvoiceDataRenderingOptionsOptions.cs +++ b/src/Stripe.net/Services/PaymentLinks/PaymentLinkInvoiceCreationInvoiceDataRenderingOptionsOptions.cs @@ -22,8 +22,9 @@ public class PaymentLinkInvoiceCreationInvoiceDataRenderingOptionsOptions : INes /// amounts. /// One of: exclude_tax, or include_inclusive_tax. /// - [JsonProperty("amount_tax_display")] + [JsonProperty("amount_tax_display", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("amount_tax_display")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string AmountTaxDisplay { get => this.amountTaxDisplay; diff --git a/src/Stripe.net/Services/PaymentLinks/PaymentLinkPaymentIntentDataOptions.cs b/src/Stripe.net/Services/PaymentLinks/PaymentLinkPaymentIntentDataOptions.cs index 6503208a2d..14724e4982 100644 --- a/src/Stripe.net/Services/PaymentLinks/PaymentLinkPaymentIntentDataOptions.cs +++ b/src/Stripe.net/Services/PaymentLinks/PaymentLinkPaymentIntentDataOptions.cs @@ -30,8 +30,9 @@ public class PaymentLinkPaymentIntentDataOptions : INestedOptions, IHasMetadata, /// /// An arbitrary string attached to the object. Often useful for displaying to users. /// - [JsonProperty("description")] + [JsonProperty("description", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("description")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string Description { get => this.description; @@ -49,8 +50,9 @@ public string Description /// this payment link. Unlike object-level metadata, this field is declarative. Updates will /// clear prior values. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary Metadata { get => this.metadata; @@ -99,8 +101,9 @@ public Dictionary Metadata /// href="https://docs.stripe.com/get-started/account/statement-descriptors#dynamic">statement_descriptor_suffix /// instead. /// - [JsonProperty("statement_descriptor")] + [JsonProperty("statement_descriptor", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("statement_descriptor")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string StatementDescriptor { get => this.statementDescriptor; @@ -117,8 +120,9 @@ public string StatementDescriptor /// descriptor prefix to form the complete statement descriptor that appears on the /// customer's statement. /// - [JsonProperty("statement_descriptor_suffix")] + [JsonProperty("statement_descriptor_suffix", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("statement_descriptor_suffix")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string StatementDescriptorSuffix { get => this.statementDescriptorSuffix; @@ -135,8 +139,9 @@ public string StatementDescriptorSuffix /// href="https://docs.stripe.com/connect/separate-charges-and-transfers">use case for /// connected accounts for details. /// - [JsonProperty("transfer_group")] + [JsonProperty("transfer_group", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("transfer_group")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string TransferGroup { get => this.transferGroup; diff --git a/src/Stripe.net/Services/PaymentLinks/PaymentLinkSubscriptionDataOptions.cs b/src/Stripe.net/Services/PaymentLinks/PaymentLinkSubscriptionDataOptions.cs index 2913a8ecac..cf9e1dd2dc 100644 --- a/src/Stripe.net/Services/PaymentLinks/PaymentLinkSubscriptionDataOptions.cs +++ b/src/Stripe.net/Services/PaymentLinks/PaymentLinkSubscriptionDataOptions.cs @@ -40,8 +40,9 @@ public class PaymentLinkSubscriptionDataOptions : INestedOptions, IHasMetadata, /// payment link. Unlike object-level metadata, this field is declarative. Updates will /// clear prior values. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary Metadata { get => this.metadata; @@ -56,8 +57,9 @@ public Dictionary Metadata /// Integer representing the number of trial period days before the customer is charged for /// the first time. Has to be at least 1. /// - [JsonProperty("trial_period_days")] + [JsonProperty("trial_period_days", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("trial_period_days")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public long? TrialPeriodDays { get => this.trialPeriodDays; @@ -71,8 +73,9 @@ public long? TrialPeriodDays /// /// Settings related to subscription trials. /// - [JsonProperty("trial_settings")] + [JsonProperty("trial_settings", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("trial_settings")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public PaymentLinkSubscriptionDataTrialSettingsOptions TrialSettings { get => this.trialSettings; diff --git a/src/Stripe.net/Services/PaymentLinks/PaymentLinkUpdateOptions.cs b/src/Stripe.net/Services/PaymentLinks/PaymentLinkUpdateOptions.cs index d791846275..9e8df785ac 100644 --- a/src/Stripe.net/Services/PaymentLinks/PaymentLinkUpdateOptions.cs +++ b/src/Stripe.net/Services/PaymentLinks/PaymentLinkUpdateOptions.cs @@ -58,8 +58,9 @@ public class PaymentLinkUpdateOptions : BaseOptions, IHasMetadata /// Collect additional information from your customer using custom fields. Up to 3 fields /// are supported. You can't set this parameter if ui_mode is custom. /// - [JsonProperty("custom_fields")] + [JsonProperty("custom_fields", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("custom_fields")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List CustomFields { get => this.customFields; @@ -92,8 +93,9 @@ public List CustomFields /// The custom message to be displayed to a customer when a payment link is no longer /// active. /// - [JsonProperty("inactive_message")] + [JsonProperty("inactive_message", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("inactive_message")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string InactiveMessage { get => this.inactiveMessage; @@ -135,8 +137,9 @@ public string InactiveMessage /// /// Controls settings applied for collecting the customer's name. /// - [JsonProperty("name_collection")] + [JsonProperty("name_collection", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("name_collection")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public PaymentLinkNameCollectionOptions NameCollection { get => this.nameCollection; @@ -155,8 +158,9 @@ public PaymentLinkNameCollectionOptions NameCollection /// allowed on a payment link apply to the combined number of line items and optional items. /// There is a maximum of 20 combined line items and optional items. /// - [JsonProperty("optional_items")] + [JsonProperty("optional_items", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("optional_items")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List OptionalItems { get => this.optionalItems; @@ -206,8 +210,9 @@ public List OptionalItems /// satispay, sepa_debit, sofort, swish, twint, /// upi, us_bank_account, wechat_pay, or zip. /// - [JsonProperty("payment_method_types")] + [JsonProperty("payment_method_types", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("payment_method_types")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List PaymentMethodTypes { get => this.paymentMethodTypes; @@ -230,8 +235,9 @@ public List PaymentMethodTypes /// /// Settings that restrict the usage of a payment link. /// - [JsonProperty("restrictions")] + [JsonProperty("restrictions", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("restrictions")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public PaymentLinkRestrictionsOptions Restrictions { get => this.restrictions; @@ -245,8 +251,9 @@ public PaymentLinkRestrictionsOptions Restrictions /// /// Configuration for collecting the customer's shipping address. /// - [JsonProperty("shipping_address_collection")] + [JsonProperty("shipping_address_collection", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("shipping_address_collection")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public PaymentLinkShippingAddressCollectionOptions ShippingAddressCollection { get => this.shippingAddressCollection; diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationListOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationListOptions.cs index 0f28682a0e..1abba826f0 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationListOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationListOptions.cs @@ -13,8 +13,9 @@ public class PaymentMethodConfigurationListOptions : ListOptions /// /// The Connect application to filter by. /// - [JsonProperty("application")] + [JsonProperty("application", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("application")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string Application { get => this.application; diff --git a/src/Stripe.net/Services/PaymentMethods/PaymentMethodBillingDetailsOptions.cs b/src/Stripe.net/Services/PaymentMethods/PaymentMethodBillingDetailsOptions.cs index 675a563d00..f8858b68c9 100644 --- a/src/Stripe.net/Services/PaymentMethods/PaymentMethodBillingDetailsOptions.cs +++ b/src/Stripe.net/Services/PaymentMethods/PaymentMethodBillingDetailsOptions.cs @@ -20,8 +20,9 @@ public class PaymentMethodBillingDetailsOptions : INestedOptions, IHasSetTrackin /// /// Billing address. /// - [JsonProperty("address")] + [JsonProperty("address", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("address")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public AddressOptions Address { get => this.address; @@ -35,8 +36,9 @@ public AddressOptions Address /// /// Email address. /// - [JsonProperty("email")] + [JsonProperty("email", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("email")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string Email { get => this.email; @@ -50,8 +52,9 @@ public string Email /// /// Full name. /// - [JsonProperty("name")] + [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("name")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string Name { get => this.name; @@ -65,8 +68,9 @@ public string Name /// /// Billing phone number (including extension). /// - [JsonProperty("phone")] + [JsonProperty("phone", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("phone")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string Phone { get => this.phone; diff --git a/src/Stripe.net/Services/PaymentMethods/PaymentMethodCardNetworksOptions.cs b/src/Stripe.net/Services/PaymentMethods/PaymentMethodCardNetworksOptions.cs index 84a0394ecd..d47d826ea0 100644 --- a/src/Stripe.net/Services/PaymentMethods/PaymentMethodCardNetworksOptions.cs +++ b/src/Stripe.net/Services/PaymentMethods/PaymentMethodCardNetworksOptions.cs @@ -20,8 +20,9 @@ public class PaymentMethodCardNetworksOptions : INestedOptions, IHasSetTracking /// does not apply to the card will be stored as invalid_preference on the card. /// One of: cartes_bancaires, mastercard, or visa. /// - [JsonProperty("preferred")] + [JsonProperty("preferred", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("preferred")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string Preferred { get => this.preferred; diff --git a/src/Stripe.net/Services/PaymentMethods/PaymentMethodUpdateOptions.cs b/src/Stripe.net/Services/PaymentMethods/PaymentMethodUpdateOptions.cs index bbeef4fd90..fcecc5319e 100644 --- a/src/Stripe.net/Services/PaymentMethods/PaymentMethodUpdateOptions.cs +++ b/src/Stripe.net/Services/PaymentMethods/PaymentMethodUpdateOptions.cs @@ -43,8 +43,9 @@ public class PaymentMethodUpdateOptions : BaseOptions, IHasMetadata /// object in a structured format. Individual keys can be unset by posting an empty value to /// them. All keys can be unset by posting an empty value to metadata. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary Metadata { get => this.metadata; diff --git a/src/Stripe.net/Services/PaymentRecords/PaymentRecordReportPaymentAttemptCanceledOptions.cs b/src/Stripe.net/Services/PaymentRecords/PaymentRecordReportPaymentAttemptCanceledOptions.cs index 4d34800dea..8411eba7fb 100644 --- a/src/Stripe.net/Services/PaymentRecords/PaymentRecordReportPaymentAttemptCanceledOptions.cs +++ b/src/Stripe.net/Services/PaymentRecords/PaymentRecordReportPaymentAttemptCanceledOptions.cs @@ -27,8 +27,9 @@ public class PaymentRecordReportPaymentAttemptCanceledOptions : BaseOptions, IHa /// object in a structured format. Individual keys can be unset by posting an empty value to /// them. All keys can be unset by posting an empty value to metadata. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary Metadata { get => this.metadata; diff --git a/src/Stripe.net/Services/PaymentRecords/PaymentRecordReportPaymentAttemptFailedOptions.cs b/src/Stripe.net/Services/PaymentRecords/PaymentRecordReportPaymentAttemptFailedOptions.cs index d3b01b53a1..ebfc742b90 100644 --- a/src/Stripe.net/Services/PaymentRecords/PaymentRecordReportPaymentAttemptFailedOptions.cs +++ b/src/Stripe.net/Services/PaymentRecords/PaymentRecordReportPaymentAttemptFailedOptions.cs @@ -27,8 +27,9 @@ public class PaymentRecordReportPaymentAttemptFailedOptions : BaseOptions, IHasM /// object in a structured format. Individual keys can be unset by posting an empty value to /// them. All keys can be unset by posting an empty value to metadata. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary Metadata { get => this.metadata; diff --git a/src/Stripe.net/Services/PaymentRecords/PaymentRecordReportPaymentAttemptGuaranteedOptions.cs b/src/Stripe.net/Services/PaymentRecords/PaymentRecordReportPaymentAttemptGuaranteedOptions.cs index 9abeef558a..a30045858d 100644 --- a/src/Stripe.net/Services/PaymentRecords/PaymentRecordReportPaymentAttemptGuaranteedOptions.cs +++ b/src/Stripe.net/Services/PaymentRecords/PaymentRecordReportPaymentAttemptGuaranteedOptions.cs @@ -27,8 +27,9 @@ public class PaymentRecordReportPaymentAttemptGuaranteedOptions : BaseOptions, I /// object in a structured format. Individual keys can be unset by posting an empty value to /// them. All keys can be unset by posting an empty value to metadata. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary Metadata { get => this.metadata; diff --git a/src/Stripe.net/Services/PaymentRecords/PaymentRecordReportPaymentAttemptInformationalOptions.cs b/src/Stripe.net/Services/PaymentRecords/PaymentRecordReportPaymentAttemptInformationalOptions.cs index 1b95adc6f3..2bbce5a734 100644 --- a/src/Stripe.net/Services/PaymentRecords/PaymentRecordReportPaymentAttemptInformationalOptions.cs +++ b/src/Stripe.net/Services/PaymentRecords/PaymentRecordReportPaymentAttemptInformationalOptions.cs @@ -23,8 +23,9 @@ public class PaymentRecordReportPaymentAttemptInformationalOptions : BaseOptions /// /// An arbitrary string attached to the object. Often useful for displaying to users. /// - [JsonProperty("description")] + [JsonProperty("description", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("description")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string Description { get => this.description; @@ -41,8 +42,9 @@ public string Description /// object in a structured format. Individual keys can be unset by posting an empty value to /// them. All keys can be unset by posting an empty value to metadata. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary Metadata { get => this.metadata; @@ -56,8 +58,9 @@ public Dictionary Metadata /// /// Shipping information for this payment. /// - [JsonProperty("shipping_details")] + [JsonProperty("shipping_details", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("shipping_details")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public PaymentRecordShippingDetailsOptions ShippingDetails { get => this.shippingDetails; diff --git a/src/Stripe.net/Services/PaymentRecords/PaymentRecordReportPaymentAttemptOptions.cs b/src/Stripe.net/Services/PaymentRecords/PaymentRecordReportPaymentAttemptOptions.cs index 0acfceeadb..e8e6fb0551 100644 --- a/src/Stripe.net/Services/PaymentRecords/PaymentRecordReportPaymentAttemptOptions.cs +++ b/src/Stripe.net/Services/PaymentRecords/PaymentRecordReportPaymentAttemptOptions.cs @@ -48,8 +48,9 @@ public class PaymentRecordReportPaymentAttemptOptions : BaseOptions, IHasMetadat /// object in a structured format. Individual keys can be unset by posting an empty value to /// them. All keys can be unset by posting an empty value to metadata. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary Metadata { get => this.metadata; diff --git a/src/Stripe.net/Services/PaymentRecords/PaymentRecordReportPaymentOptions.cs b/src/Stripe.net/Services/PaymentRecords/PaymentRecordReportPaymentOptions.cs index 1085e89164..8806d732b3 100644 --- a/src/Stripe.net/Services/PaymentRecords/PaymentRecordReportPaymentOptions.cs +++ b/src/Stripe.net/Services/PaymentRecords/PaymentRecordReportPaymentOptions.cs @@ -70,8 +70,9 @@ public class PaymentRecordReportPaymentOptions : BaseOptions, IHasMetadata /// object in a structured format. Individual keys can be unset by posting an empty value to /// them. All keys can be unset by posting an empty value to metadata. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary Metadata { get => this.metadata; diff --git a/src/Stripe.net/Services/PaymentRecords/PaymentRecordReportRefundOptions.cs b/src/Stripe.net/Services/PaymentRecords/PaymentRecordReportRefundOptions.cs index 71c96095cc..9c2fa7b908 100644 --- a/src/Stripe.net/Services/PaymentRecords/PaymentRecordReportRefundOptions.cs +++ b/src/Stripe.net/Services/PaymentRecords/PaymentRecordReportRefundOptions.cs @@ -37,8 +37,9 @@ public class PaymentRecordReportRefundOptions : BaseOptions, IHasMetadata /// object in a structured format. Individual keys can be unset by posting an empty value to /// them. All keys can be unset by posting an empty value to metadata. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary Metadata { get => this.metadata; diff --git a/src/Stripe.net/Services/Payouts/PayoutUpdateOptions.cs b/src/Stripe.net/Services/Payouts/PayoutUpdateOptions.cs index 4e1244cbfe..45bfb47986 100644 --- a/src/Stripe.net/Services/Payouts/PayoutUpdateOptions.cs +++ b/src/Stripe.net/Services/Payouts/PayoutUpdateOptions.cs @@ -17,8 +17,9 @@ public class PayoutUpdateOptions : BaseOptions, IHasMetadata /// object in a structured format. Individual keys can be unset by posting an empty value to /// them. All keys can be unset by posting an empty value to metadata. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary Metadata { get => this.metadata; diff --git a/src/Stripe.net/Services/Plans/PlanCreateOptions.cs b/src/Stripe.net/Services/Plans/PlanCreateOptions.cs index dc6874f354..59af945924 100644 --- a/src/Stripe.net/Services/Plans/PlanCreateOptions.cs +++ b/src/Stripe.net/Services/Plans/PlanCreateOptions.cs @@ -92,8 +92,9 @@ public class PlanCreateOptions : BaseOptions, IHasId, IHasMetadata /// object in a structured format. Individual keys can be unset by posting an empty value to /// them. All keys can be unset by posting an empty value to metadata. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary Metadata { get => this.metadata; diff --git a/src/Stripe.net/Services/Plans/PlanUpdateOptions.cs b/src/Stripe.net/Services/Plans/PlanUpdateOptions.cs index 49ee7b858d..b02b9fcf3c 100644 --- a/src/Stripe.net/Services/Plans/PlanUpdateOptions.cs +++ b/src/Stripe.net/Services/Plans/PlanUpdateOptions.cs @@ -24,8 +24,9 @@ public class PlanUpdateOptions : BaseOptions, IHasMetadata /// object in a structured format. Individual keys can be unset by posting an empty value to /// them. All keys can be unset by posting an empty value to metadata. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary Metadata { get => this.metadata; diff --git a/src/Stripe.net/Services/Prices/PriceUpdateOptions.cs b/src/Stripe.net/Services/Prices/PriceUpdateOptions.cs index bd8a6b3e79..0f36c5e543 100644 --- a/src/Stripe.net/Services/Prices/PriceUpdateOptions.cs +++ b/src/Stripe.net/Services/Prices/PriceUpdateOptions.cs @@ -24,8 +24,9 @@ public class PriceUpdateOptions : BaseOptions, IHasMetadata /// href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code and a supported currency. /// - [JsonProperty("currency_options")] + [JsonProperty("currency_options", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("currency_options")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary CurrencyOptions { get => this.currencyOptions; @@ -50,8 +51,9 @@ public Dictionary CurrencyOptions /// object in a structured format. Individual keys can be unset by posting an empty value to /// them. All keys can be unset by posting an empty value to metadata. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary Metadata { get => this.metadata; diff --git a/src/Stripe.net/Services/Products/ProductUpdateOptions.cs b/src/Stripe.net/Services/Products/ProductUpdateOptions.cs index 7575f4e180..7e23620d95 100644 --- a/src/Stripe.net/Services/Products/ProductUpdateOptions.cs +++ b/src/Stripe.net/Services/Products/ProductUpdateOptions.cs @@ -38,8 +38,9 @@ public class ProductUpdateOptions : BaseOptions, IHasMetadata /// optionally store a long form explanation of the product being sold for your own /// rendering purposes. /// - [JsonProperty("description")] + [JsonProperty("description", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("description")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string Description { get => this.description; @@ -54,8 +55,9 @@ public string Description /// A list of up to 8 URLs of images for this product, meant to be displayable to the /// customer. /// - [JsonProperty("images")] + [JsonProperty("images", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("images")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List Images { get => this.images; @@ -70,8 +72,9 @@ public List Images /// A list of up to 15 marketing features for this product. These are displayed in pricing tables. /// - [JsonProperty("marketing_features")] + [JsonProperty("marketing_features", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("marketing_features")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List MarketingFeatures { get => this.marketingFeatures; @@ -88,8 +91,9 @@ public List MarketingFeatures /// object in a structured format. Individual keys can be unset by posting an empty value to /// them. All keys can be unset by posting an empty value to metadata. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary Metadata { get => this.metadata; @@ -110,8 +114,9 @@ public Dictionary Metadata /// /// The dimensions of this product for shipping purposes. /// - [JsonProperty("package_dimensions")] + [JsonProperty("package_dimensions", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("package_dimensions")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public ProductPackageDimensionsOptions PackageDimensions { get => this.packageDimensions; @@ -147,8 +152,9 @@ public ProductPackageDimensionsOptions PackageDimensions /// /// A tax code ID. /// - [JsonProperty("tax_code")] + [JsonProperty("tax_code", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("tax_code")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string TaxCode { get => this.taxCode; @@ -164,8 +170,9 @@ public string TaxCode /// customers' receipts, invoices, Checkout, and the customer portal. May only be set if /// type=service. /// - [JsonProperty("unit_label")] + [JsonProperty("unit_label", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("unit_label")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string UnitLabel { get => this.unitLabel; @@ -179,8 +186,9 @@ public string UnitLabel /// /// A URL of a publicly-accessible webpage for this product. /// - [JsonProperty("url")] + [JsonProperty("url", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("url")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string Url { get => this.url; diff --git a/src/Stripe.net/Services/PromotionCodes/PromotionCodeUpdateOptions.cs b/src/Stripe.net/Services/PromotionCodes/PromotionCodeUpdateOptions.cs index fe6b8c8f48..b8c54a9b26 100644 --- a/src/Stripe.net/Services/PromotionCodes/PromotionCodeUpdateOptions.cs +++ b/src/Stripe.net/Services/PromotionCodes/PromotionCodeUpdateOptions.cs @@ -25,8 +25,9 @@ public class PromotionCodeUpdateOptions : BaseOptions, IHasMetadata /// object in a structured format. Individual keys can be unset by posting an empty value to /// them. All keys can be unset by posting an empty value to metadata. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary Metadata { get => this.metadata; diff --git a/src/Stripe.net/Services/Quotes/QuoteCreateOptions.cs b/src/Stripe.net/Services/Quotes/QuoteCreateOptions.cs index 722250421f..6eec1033e9 100644 --- a/src/Stripe.net/Services/Quotes/QuoteCreateOptions.cs +++ b/src/Stripe.net/Services/Quotes/QuoteCreateOptions.cs @@ -25,8 +25,9 @@ public class QuoteCreateOptions : BaseOptions, IHasMetadata /// payment and transferred to the application owner's Stripe account. There cannot be any /// line items with recurring prices when using this field. /// - [JsonProperty("application_fee_amount")] + [JsonProperty("application_fee_amount", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("application_fee_amount")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public long? ApplicationFeeAmount { get => this.applicationFeeAmount; @@ -43,8 +44,9 @@ public long? ApplicationFeeAmount /// the application owner's Stripe account. There must be at least 1 line item with a /// recurring price to use this field. /// - [JsonProperty("application_fee_percent")] + [JsonProperty("application_fee_percent", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("application_fee_percent")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public decimal? ApplicationFeePercent { get => this.applicationFeePercent; @@ -95,8 +97,9 @@ public decimal? ApplicationFeePercent /// /// The tax rates that will apply to any line item that does not have tax_rates set. /// - [JsonProperty("default_tax_rates")] + [JsonProperty("default_tax_rates", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("default_tax_rates")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List DefaultTaxRates { get => this.defaultTaxRates; @@ -113,8 +116,9 @@ public List DefaultTaxRates /// href="https://dashboard.stripe.com/settings/billing/quote">quote template settings /// will be used. /// - [JsonProperty("description")] + [JsonProperty("description", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("description")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string Description { get => this.description; @@ -128,8 +132,9 @@ public string Description /// /// The discounts applied to the quote. /// - [JsonProperty("discounts")] + [JsonProperty("discounts", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("discounts")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List Discounts { get => this.discounts; @@ -159,8 +164,9 @@ public List Discounts /// href="https://dashboard.stripe.com/settings/billing/quote">quote template settings /// will be used. /// - [JsonProperty("footer")] + [JsonProperty("footer", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("footer")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string Footer { get => this.footer; @@ -186,8 +192,9 @@ public string Footer /// href="https://dashboard.stripe.com/settings/billing/quote">quote template settings /// will be used. /// - [JsonProperty("header")] + [JsonProperty("header", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("header")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string Header { get => this.header; @@ -226,8 +233,9 @@ public string Header /// /// The account on behalf of which to charge. /// - [JsonProperty("on_behalf_of")] + [JsonProperty("on_behalf_of", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("on_behalf_of")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string OnBehalfOf { get => this.onBehalfOf; @@ -259,8 +267,9 @@ public string OnBehalfOf /// /// The data with which to automatically create a Transfer for each of the invoices. /// - [JsonProperty("transfer_data")] + [JsonProperty("transfer_data", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("transfer_data")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public QuoteTransferDataOptions TransferData { get => this.transferData; diff --git a/src/Stripe.net/Services/Quotes/QuoteLineItemOptions.cs b/src/Stripe.net/Services/Quotes/QuoteLineItemOptions.cs index 700cc736e4..ffa44a22f6 100644 --- a/src/Stripe.net/Services/Quotes/QuoteLineItemOptions.cs +++ b/src/Stripe.net/Services/Quotes/QuoteLineItemOptions.cs @@ -19,8 +19,9 @@ public class QuoteLineItemOptions : INestedOptions, IHasId, IHasSetTracking /// /// The discounts applied to this line item. /// - [JsonProperty("discounts")] + [JsonProperty("discounts", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("discounts")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List Discounts { get => this.discounts; @@ -64,8 +65,9 @@ public List Discounts /// The tax rates which apply to the line item. When set, the default_tax_rates on /// the quote do not apply to this line item. /// - [JsonProperty("tax_rates")] + [JsonProperty("tax_rates", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("tax_rates")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List TaxRates { get => this.taxRates; diff --git a/src/Stripe.net/Services/Quotes/QuoteSubscriptionDataOptions.cs b/src/Stripe.net/Services/Quotes/QuoteSubscriptionDataOptions.cs index f14b51b258..2e402b3f88 100644 --- a/src/Stripe.net/Services/Quotes/QuoteSubscriptionDataOptions.cs +++ b/src/Stripe.net/Services/Quotes/QuoteSubscriptionDataOptions.cs @@ -30,8 +30,9 @@ public class QuoteSubscriptionDataOptions : INestedOptions, IHasMetadata, IHasSe /// to optionally store an explanation of the subscription for rendering in Stripe surfaces /// and certain local payment methods UIs. /// - [JsonProperty("description")] + [JsonProperty("description", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("description")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string Description { get => this.description; @@ -47,9 +48,10 @@ public string Description /// after the quote is accepted. The effective_date is ignored if it is in the past /// when the quote is accepted. /// - [JsonProperty("effective_date")] + [JsonProperty("effective_date", NullValueHandling = NullValueHandling.Ignore)] [JsonConverter(typeof(AnyOfConverter))] [STJS.JsonPropertyName("effective_date")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] [STJS.JsonConverter(typeof(STJAnyOfConverter))] public AnyOf EffectiveDate { @@ -78,8 +80,9 @@ public string Description /// Integer representing the number of trial period days before the customer is charged for /// the first time. /// - [JsonProperty("trial_period_days")] + [JsonProperty("trial_period_days", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("trial_period_days")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public long? TrialPeriodDays { get => this.trialPeriodDays; diff --git a/src/Stripe.net/Services/Quotes/QuoteUpdateOptions.cs b/src/Stripe.net/Services/Quotes/QuoteUpdateOptions.cs index ee4827e1c5..3110e38e6b 100644 --- a/src/Stripe.net/Services/Quotes/QuoteUpdateOptions.cs +++ b/src/Stripe.net/Services/Quotes/QuoteUpdateOptions.cs @@ -25,8 +25,9 @@ public class QuoteUpdateOptions : BaseOptions, IHasMetadata /// payment and transferred to the application owner's Stripe account. There cannot be any /// line items with recurring prices when using this field. /// - [JsonProperty("application_fee_amount")] + [JsonProperty("application_fee_amount", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("application_fee_amount")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public long? ApplicationFeeAmount { get => this.applicationFeeAmount; @@ -43,8 +44,9 @@ public long? ApplicationFeeAmount /// the application owner's Stripe account. There must be at least 1 line item with a /// recurring price to use this field. /// - [JsonProperty("application_fee_percent")] + [JsonProperty("application_fee_percent", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("application_fee_percent")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public decimal? ApplicationFeePercent { get => this.applicationFeePercent; @@ -95,8 +97,9 @@ public decimal? ApplicationFeePercent /// /// The tax rates that will apply to any line item that does not have tax_rates set. /// - [JsonProperty("default_tax_rates")] + [JsonProperty("default_tax_rates", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("default_tax_rates")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List DefaultTaxRates { get => this.defaultTaxRates; @@ -110,8 +113,9 @@ public List DefaultTaxRates /// /// A description that will be displayed on the quote PDF. /// - [JsonProperty("description")] + [JsonProperty("description", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("description")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string Description { get => this.description; @@ -125,8 +129,9 @@ public string Description /// /// The discounts applied to the quote. /// - [JsonProperty("discounts")] + [JsonProperty("discounts", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("discounts")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List Discounts { get => this.discounts; @@ -150,8 +155,9 @@ public List Discounts /// /// A footer that will be displayed on the quote PDF. /// - [JsonProperty("footer")] + [JsonProperty("footer", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("footer")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string Footer { get => this.footer; @@ -165,8 +171,9 @@ public string Footer /// /// A header that will be displayed on the quote PDF. /// - [JsonProperty("header")] + [JsonProperty("header", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("header")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string Header { get => this.header; @@ -205,8 +212,9 @@ public string Header /// /// The account on behalf of which to charge. /// - [JsonProperty("on_behalf_of")] + [JsonProperty("on_behalf_of", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("on_behalf_of")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string OnBehalfOf { get => this.onBehalfOf; @@ -231,8 +239,9 @@ public string OnBehalfOf /// /// The data with which to automatically create a Transfer for each of the invoices. /// - [JsonProperty("transfer_data")] + [JsonProperty("transfer_data", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("transfer_data")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public QuoteTransferDataOptions TransferData { get => this.transferData; diff --git a/src/Stripe.net/Services/Refunds/RefundCreateOptions.cs b/src/Stripe.net/Services/Refunds/RefundCreateOptions.cs index c631cc2ab8..b2898c0a2e 100644 --- a/src/Stripe.net/Services/Refunds/RefundCreateOptions.cs +++ b/src/Stripe.net/Services/Refunds/RefundCreateOptions.cs @@ -52,8 +52,9 @@ public class RefundCreateOptions : BaseOptions, IHasMetadata /// object in a structured format. Individual keys can be unset by posting an empty value to /// them. All keys can be unset by posting an empty value to metadata. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary Metadata { get => this.metadata; diff --git a/src/Stripe.net/Services/Refunds/RefundUpdateOptions.cs b/src/Stripe.net/Services/Refunds/RefundUpdateOptions.cs index 151deb727a..0bb705b7f2 100644 --- a/src/Stripe.net/Services/Refunds/RefundUpdateOptions.cs +++ b/src/Stripe.net/Services/Refunds/RefundUpdateOptions.cs @@ -17,8 +17,9 @@ public class RefundUpdateOptions : BaseOptions, IHasMetadata /// object in a structured format. Individual keys can be unset by posting an empty value to /// them. All keys can be unset by posting an empty value to metadata. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary Metadata { get => this.metadata; diff --git a/src/Stripe.net/Services/SetupIntents/SetupIntentConfirmOptions.cs b/src/Stripe.net/Services/SetupIntents/SetupIntentConfirmOptions.cs index 2789cc1615..5f224f6992 100644 --- a/src/Stripe.net/Services/SetupIntents/SetupIntentConfirmOptions.cs +++ b/src/Stripe.net/Services/SetupIntents/SetupIntentConfirmOptions.cs @@ -25,8 +25,9 @@ public class SetupIntentConfirmOptions : BaseOptions [STJS.JsonPropertyName("confirmation_token")] public string ConfirmationToken { get; set; } - [JsonProperty("mandate_data")] + [JsonProperty("mandate_data", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("mandate_data")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public SetupIntentMandateDataOptions MandateData { get => this.mandateData; diff --git a/src/Stripe.net/Services/SetupIntents/SetupIntentCreateOptions.cs b/src/Stripe.net/Services/SetupIntents/SetupIntentCreateOptions.cs index 62bb3d399f..e2c7169581 100644 --- a/src/Stripe.net/Services/SetupIntents/SetupIntentCreateOptions.cs +++ b/src/Stripe.net/Services/SetupIntents/SetupIntentCreateOptions.cs @@ -118,8 +118,9 @@ public class SetupIntentCreateOptions : BaseOptions, IHasMetadata /// with confirm=true. /// - [JsonProperty("mandate_data")] + [JsonProperty("mandate_data", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("mandate_data")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public SetupIntentMandateDataOptions MandateData { get => this.mandateData; diff --git a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataBillingDetailsOptions.cs b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataBillingDetailsOptions.cs index 478dc21e29..a8f6250945 100644 --- a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataBillingDetailsOptions.cs +++ b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataBillingDetailsOptions.cs @@ -20,8 +20,9 @@ public class SetupIntentPaymentMethodDataBillingDetailsOptions : INestedOptions, /// /// Billing address. /// - [JsonProperty("address")] + [JsonProperty("address", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("address")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public AddressOptions Address { get => this.address; @@ -35,8 +36,9 @@ public AddressOptions Address /// /// Email address. /// - [JsonProperty("email")] + [JsonProperty("email", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("email")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string Email { get => this.email; @@ -50,8 +52,9 @@ public string Email /// /// Full name. /// - [JsonProperty("name")] + [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("name")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string Name { get => this.name; @@ -65,8 +68,9 @@ public string Name /// /// Billing phone number (including extension). /// - [JsonProperty("phone")] + [JsonProperty("phone", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("phone")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string Phone { get => this.phone; diff --git a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsAcssDebitMandateOptionsOptions.cs b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsAcssDebitMandateOptionsOptions.cs index 051b0a0d2f..4f7ff139e1 100644 --- a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsAcssDebitMandateOptionsOptions.cs +++ b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsAcssDebitMandateOptionsOptions.cs @@ -22,8 +22,9 @@ public class SetupIntentPaymentMethodOptionsAcssDebitMandateOptionsOptions : INe /// setup_intent and setup_intent_client_secret when confirming a Setup /// Intent. /// - [JsonProperty("custom_mandate_url")] + [JsonProperty("custom_mandate_url", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("custom_mandate_url")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string CustomMandateUrl { get => this.customMandateUrl; diff --git a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsBacsDebitMandateOptionsOptions.cs b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsBacsDebitMandateOptionsOptions.cs index b313f575fc..18ab5ac929 100644 --- a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsBacsDebitMandateOptionsOptions.cs +++ b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsBacsDebitMandateOptionsOptions.cs @@ -19,8 +19,9 @@ public class SetupIntentPaymentMethodOptionsBacsDebitMandateOptionsOptions : INe /// consist of only uppercase letters, numbers, spaces, or the following special characters: /// '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. /// - [JsonProperty("reference_prefix")] + [JsonProperty("reference_prefix", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("reference_prefix")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string ReferencePrefix { get => this.referencePrefix; diff --git a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsKlarnaOptions.cs b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsKlarnaOptions.cs index 069b8448d7..8731939dce 100644 --- a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsKlarnaOptions.cs +++ b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsKlarnaOptions.cs @@ -47,8 +47,9 @@ public class SetupIntentPaymentMethodOptionsKlarnaOptions : INestedOptions, IHas /// /// Subscription details if setting up or charging a subscription. /// - [JsonProperty("subscriptions")] + [JsonProperty("subscriptions", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("subscriptions")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List Subscriptions { get => this.subscriptions; diff --git a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsPaytoMandateOptionsOptions.cs b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsPaytoMandateOptionsOptions.cs index d56286c515..e3a3599012 100644 --- a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsPaytoMandateOptionsOptions.cs +++ b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsPaytoMandateOptionsOptions.cs @@ -23,8 +23,9 @@ public class SetupIntentPaymentMethodOptionsPaytoMandateOptionsOptions : INested /// /// Amount that will be collected. It is required when amount_type is fixed. /// - [JsonProperty("amount")] + [JsonProperty("amount", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("amount")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public long? Amount { get => this.amount; @@ -41,8 +42,9 @@ public long? Amount /// Defaults to maximum. /// One of: fixed, or maximum. /// - [JsonProperty("amount_type")] + [JsonProperty("amount_type", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("amount_type")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string AmountType { get => this.amountType; @@ -57,8 +59,9 @@ public string AmountType /// Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no /// end date. /// - [JsonProperty("end_date")] + [JsonProperty("end_date", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("end_date")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string EndDate { get => this.endDate; @@ -74,8 +77,9 @@ public string EndDate /// One of: adhoc, annual, daily, fortnightly, monthly, /// quarterly, semi_annual, or weekly. /// - [JsonProperty("payment_schedule")] + [JsonProperty("payment_schedule", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("payment_schedule")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string PaymentSchedule { get => this.paymentSchedule; @@ -90,8 +94,9 @@ public string PaymentSchedule /// The number of payments that will be made during a payment period. Defaults to 1 except /// for when payment_schedule is adhoc. In that case, it defaults to no limit. /// - [JsonProperty("payments_per_period")] + [JsonProperty("payments_per_period", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("payments_per_period")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public long? PaymentsPerPeriod { get => this.paymentsPerPeriod; @@ -109,8 +114,9 @@ public long? PaymentsPerPeriod /// other, pension, personal, retail, salary, tax, /// or utility. /// - [JsonProperty("purpose")] + [JsonProperty("purpose", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("purpose")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string Purpose { get => this.purpose; @@ -125,8 +131,9 @@ public string Purpose /// Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to /// confirmation time. /// - [JsonProperty("start_date")] + [JsonProperty("start_date", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("start_date")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string StartDate { get => this.startDate; diff --git a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsSepaDebitMandateOptionsOptions.cs b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsSepaDebitMandateOptionsOptions.cs index 13f26eb329..2876ba8f62 100644 --- a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsSepaDebitMandateOptionsOptions.cs +++ b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsSepaDebitMandateOptionsOptions.cs @@ -19,8 +19,9 @@ public class SetupIntentPaymentMethodOptionsSepaDebitMandateOptionsOptions : INe /// consist of only uppercase letters, numbers, spaces, or the following special characters: /// '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. /// - [JsonProperty("reference_prefix")] + [JsonProperty("reference_prefix", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("reference_prefix")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string ReferencePrefix { get => this.referencePrefix; diff --git a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsUpiOptions.cs b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsUpiOptions.cs index e11860e49a..f53ce01a31 100644 --- a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsUpiOptions.cs +++ b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsUpiOptions.cs @@ -24,8 +24,9 @@ public class SetupIntentPaymentMethodOptionsUpiOptions : INestedOptions, IHasSet /// /// One of: none, off_session, or on_session. /// - [JsonProperty("setup_future_usage")] + [JsonProperty("setup_future_usage", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("setup_future_usage")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string SetupFutureUsage { get => this.setupFutureUsage; diff --git a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsUsBankAccountMandateOptionsOptions.cs b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsUsBankAccountMandateOptionsOptions.cs index e9daaeb775..b35afb7a8b 100644 --- a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsUsBankAccountMandateOptionsOptions.cs +++ b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsUsBankAccountMandateOptionsOptions.cs @@ -17,8 +17,9 @@ public class SetupIntentPaymentMethodOptionsUsBankAccountMandateOptionsOptions : /// /// The method used to collect offline mandate customer acceptance. /// - [JsonProperty("collection_method")] + [JsonProperty("collection_method", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("collection_method")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string CollectionMethod { get => this.collectionMethod; diff --git a/src/Stripe.net/Services/SetupIntents/SetupIntentUpdateOptions.cs b/src/Stripe.net/Services/SetupIntents/SetupIntentUpdateOptions.cs index 00b978dc62..2c3d3db5d6 100644 --- a/src/Stripe.net/Services/SetupIntents/SetupIntentUpdateOptions.cs +++ b/src/Stripe.net/Services/SetupIntents/SetupIntentUpdateOptions.cs @@ -68,8 +68,9 @@ public class SetupIntentUpdateOptions : BaseOptions, IHasMetadata /// sofort, swish, twint, upi, us_bank_account, /// wechat_pay, or zip. /// - [JsonProperty("excluded_payment_method_types")] + [JsonProperty("excluded_payment_method_types", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("excluded_payment_method_types")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List ExcludedPaymentMethodTypes { get => this.excludedPaymentMethodTypes; @@ -100,8 +101,9 @@ public List ExcludedPaymentMethodTypes /// object in a structured format. Individual keys can be unset by posting an empty value to /// them. All keys can be unset by posting an empty value to metadata. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary Metadata { get => this.metadata; diff --git a/src/Stripe.net/Services/ShippingRates/ShippingRateUpdateOptions.cs b/src/Stripe.net/Services/ShippingRates/ShippingRateUpdateOptions.cs index 6b706a3a7c..6c637e39af 100644 --- a/src/Stripe.net/Services/ShippingRates/ShippingRateUpdateOptions.cs +++ b/src/Stripe.net/Services/ShippingRates/ShippingRateUpdateOptions.cs @@ -32,8 +32,9 @@ public class ShippingRateUpdateOptions : BaseOptions, IHasMetadata /// object in a structured format. Individual keys can be unset by posting an empty value to /// them. All keys can be unset by posting an empty value to metadata. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary Metadata { get => this.metadata; diff --git a/src/Stripe.net/Services/Sources/SourceCardOptions.cs b/src/Stripe.net/Services/Sources/SourceCardOptions.cs index 6dc5fd7e9b..d7cc9c22b9 100644 --- a/src/Stripe.net/Services/Sources/SourceCardOptions.cs +++ b/src/Stripe.net/Services/Sources/SourceCardOptions.cs @@ -49,14 +49,6 @@ public class SourceCardOptions : INestedOptions, IHasMetadata [STJS.JsonPropertyName("exp_year")] public long? ExpYear { get; set; } - [JsonProperty("name")] - [STJS.JsonPropertyName("name")] - public string Name { get; set; } - - [JsonProperty("number")] - [STJS.JsonPropertyName("number")] - public string Number { get; set; } - /// /// Set of key-value pairs that you can /// attach to an object. This can be useful for storing additional information about the @@ -65,5 +57,13 @@ public class SourceCardOptions : INestedOptions, IHasMetadata [JsonProperty("metadata")] [STJS.JsonPropertyName("metadata")] public Dictionary Metadata { get; set; } + + [JsonProperty("name")] + [STJS.JsonPropertyName("name")] + public string Name { get; set; } + + [JsonProperty("number")] + [STJS.JsonPropertyName("number")] + public string Number { get; set; } } } diff --git a/src/Stripe.net/Services/Sources/SourceMandateOptions.cs b/src/Stripe.net/Services/Sources/SourceMandateOptions.cs index fc04224999..2d2af6cd52 100644 --- a/src/Stripe.net/Services/Sources/SourceMandateOptions.cs +++ b/src/Stripe.net/Services/Sources/SourceMandateOptions.cs @@ -25,8 +25,9 @@ public class SourceMandateOptions : INestedOptions, IHasSetTracking /// /// The amount specified by the mandate. (Leave null for a mandate covering all amounts). /// - [JsonProperty("amount")] + [JsonProperty("amount", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("amount")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public long? Amount { get => this.amount; diff --git a/src/Stripe.net/Services/Sources/SourceUpdateOptions.cs b/src/Stripe.net/Services/Sources/SourceUpdateOptions.cs index edf0336b92..f997d9a950 100644 --- a/src/Stripe.net/Services/Sources/SourceUpdateOptions.cs +++ b/src/Stripe.net/Services/Sources/SourceUpdateOptions.cs @@ -36,8 +36,9 @@ public class SourceUpdateOptions : BaseOptions, IHasMetadata /// object in a structured format. Individual keys can be unset by posting an empty value to /// them. All keys can be unset by posting an empty value to metadata. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary Metadata { get => this.metadata; diff --git a/src/Stripe.net/Services/SubscriptionItems/SubscriptionItemCreateOptions.cs b/src/Stripe.net/Services/SubscriptionItems/SubscriptionItemCreateOptions.cs index 233639624a..c901ab704d 100644 --- a/src/Stripe.net/Services/SubscriptionItems/SubscriptionItemCreateOptions.cs +++ b/src/Stripe.net/Services/SubscriptionItems/SubscriptionItemCreateOptions.cs @@ -18,8 +18,9 @@ public class SubscriptionItemCreateOptions : BaseOptions, IHasMetadata /// Define thresholds at which an invoice will be sent, and the subscription advanced to a /// new billing period. Pass an empty string to remove previously-defined thresholds. /// - [JsonProperty("billing_thresholds")] + [JsonProperty("billing_thresholds", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("billing_thresholds")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public SubscriptionItemBillingThresholdsOptions BillingThresholds { get => this.billingThresholds; @@ -33,8 +34,9 @@ public SubscriptionItemBillingThresholdsOptions BillingThresholds /// /// The coupons to redeem into discounts for the subscription item. /// - [JsonProperty("discounts")] + [JsonProperty("discounts", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("discounts")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List Discounts { get => this.discounts; @@ -156,8 +158,9 @@ public List Discounts /// on the Subscription. When updating, pass an empty string to remove previously-defined /// tax rates. /// - [JsonProperty("tax_rates")] + [JsonProperty("tax_rates", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("tax_rates")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List TaxRates { get => this.taxRates; diff --git a/src/Stripe.net/Services/SubscriptionItems/SubscriptionItemUpdateOptions.cs b/src/Stripe.net/Services/SubscriptionItems/SubscriptionItemUpdateOptions.cs index c3c536c6f2..4f1e64ec86 100644 --- a/src/Stripe.net/Services/SubscriptionItems/SubscriptionItemUpdateOptions.cs +++ b/src/Stripe.net/Services/SubscriptionItems/SubscriptionItemUpdateOptions.cs @@ -19,8 +19,9 @@ public class SubscriptionItemUpdateOptions : BaseOptions, IHasMetadata /// Define thresholds at which an invoice will be sent, and the subscription advanced to a /// new billing period. Pass an empty string to remove previously-defined thresholds. /// - [JsonProperty("billing_thresholds")] + [JsonProperty("billing_thresholds", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("billing_thresholds")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public SubscriptionItemBillingThresholdsOptions BillingThresholds { get => this.billingThresholds; @@ -34,8 +35,9 @@ public SubscriptionItemBillingThresholdsOptions BillingThresholds /// /// The coupons to redeem into discounts for the subscription item. /// - [JsonProperty("discounts")] + [JsonProperty("discounts", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("discounts")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List Discounts { get => this.discounts; @@ -52,8 +54,9 @@ public List Discounts /// object in a structured format. Individual keys can be unset by posting an empty value to /// them. All keys can be unset by posting an empty value to metadata. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary Metadata { get => this.metadata; @@ -168,8 +171,9 @@ public Dictionary Metadata /// on the Subscription. When updating, pass an empty string to remove previously-defined /// tax rates. /// - [JsonProperty("tax_rates")] + [JsonProperty("tax_rates", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("tax_rates")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List TaxRates { get => this.taxRates; diff --git a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleCreateOptions.cs b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleCreateOptions.cs index d18602a302..77d0139d5c 100644 --- a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleCreateOptions.cs +++ b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleCreateOptions.cs @@ -69,8 +69,9 @@ public class SubscriptionScheduleCreateOptions : BaseOptions, IHasMetadata /// object in a structured format. Individual keys can be unset by posting an empty value to /// them. All keys can be unset by posting an empty value to metadata. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary Metadata { get => this.metadata; diff --git a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleDefaultSettingsInvoiceSettingsOptions.cs b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleDefaultSettingsInvoiceSettingsOptions.cs index 9c9d793a4d..2ccd0214e0 100644 --- a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleDefaultSettingsInvoiceSettingsOptions.cs +++ b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleDefaultSettingsInvoiceSettingsOptions.cs @@ -19,8 +19,9 @@ public class SubscriptionScheduleDefaultSettingsInvoiceSettingsOptions : INested /// The account tax IDs associated with the subscription schedule. Will be set on invoices /// generated by the subscription schedule. /// - [JsonProperty("account_tax_ids")] + [JsonProperty("account_tax_ids", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("account_tax_ids")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List AccountTaxIds { get => this.accountTaxIds; diff --git a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleDefaultSettingsOptions.cs b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleDefaultSettingsOptions.cs index e46444e612..1f25e0ed7f 100644 --- a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleDefaultSettingsOptions.cs +++ b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleDefaultSettingsOptions.cs @@ -52,8 +52,9 @@ public class SubscriptionScheduleDefaultSettingsOptions : INestedOptions, IHasSe /// Define thresholds at which an invoice will be sent, and the subscription advanced to a /// new billing period. Pass an empty string to remove previously-defined thresholds. /// - [JsonProperty("billing_thresholds")] + [JsonProperty("billing_thresholds", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("billing_thresholds")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public SubscriptionScheduleDefaultSettingsBillingThresholdsOptions BillingThresholds { get => this.billingThresholds; @@ -90,8 +91,9 @@ public SubscriptionScheduleDefaultSettingsBillingThresholdsOptions BillingThresh /// optionally store an explanation of the subscription for rendering in Stripe surfaces and /// certain local payment methods UIs. /// - [JsonProperty("description")] + [JsonProperty("description", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("description")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string Description { get => this.description; @@ -113,8 +115,9 @@ public string Description /// The account on behalf of which to charge, for each of the associated subscription's /// invoices. /// - [JsonProperty("on_behalf_of")] + [JsonProperty("on_behalf_of", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("on_behalf_of")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string OnBehalfOf { get => this.onBehalfOf; @@ -129,8 +132,9 @@ public string OnBehalfOf /// The data with which to automatically create a Transfer for each of the associated /// subscription's invoices. /// - [JsonProperty("transfer_data")] + [JsonProperty("transfer_data", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("transfer_data")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public SubscriptionScheduleDefaultSettingsTransferDataOptions TransferData { get => this.transferData; diff --git a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseAddInvoiceItemOptions.cs b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseAddInvoiceItemOptions.cs index fd040e03d8..5c09f1ef23 100644 --- a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseAddInvoiceItemOptions.cs +++ b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseAddInvoiceItemOptions.cs @@ -67,8 +67,9 @@ public class SubscriptionSchedulePhaseAddInvoiceItemOptions : INestedOptions, IH /// The tax rates which apply to the item. When set, the default_tax_rates do not /// apply to this item. /// - [JsonProperty("tax_rates")] + [JsonProperty("tax_rates", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("tax_rates")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List TaxRates { get => this.taxRates; diff --git a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseInvoiceSettingsOptions.cs b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseInvoiceSettingsOptions.cs index ffc904a6db..b7102d3751 100644 --- a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseInvoiceSettingsOptions.cs +++ b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseInvoiceSettingsOptions.cs @@ -19,8 +19,9 @@ public class SubscriptionSchedulePhaseInvoiceSettingsOptions : INestedOptions, I /// The account tax IDs associated with this phase of the subscription schedule. Will be set /// on invoices generated by this phase of the subscription schedule. /// - [JsonProperty("account_tax_ids")] + [JsonProperty("account_tax_ids", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("account_tax_ids")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List AccountTaxIds { get => this.accountTaxIds; diff --git a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseItemOptions.cs b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseItemOptions.cs index 5c6d9a4c89..46b925788d 100644 --- a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseItemOptions.cs +++ b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseItemOptions.cs @@ -21,8 +21,9 @@ public class SubscriptionSchedulePhaseItemOptions : INestedOptions, IHasMetadata /// Define thresholds at which an invoice will be sent, and the subscription advanced to a /// new billing period. Pass an empty string to remove previously-defined thresholds. /// - [JsonProperty("billing_thresholds")] + [JsonProperty("billing_thresholds", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("billing_thresholds")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public SubscriptionSchedulePhaseItemBillingThresholdsOptions BillingThresholds { get => this.billingThresholds; @@ -36,8 +37,9 @@ public SubscriptionSchedulePhaseItemBillingThresholdsOptions BillingThresholds /// /// The coupons to redeem into discounts for the subscription item. /// - [JsonProperty("discounts")] + [JsonProperty("discounts", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("discounts")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List Discounts { get => this.discounts; @@ -100,8 +102,9 @@ public List Discounts /// on the Subscription. When updating, pass an empty string to remove previously-defined /// tax rates. /// - [JsonProperty("tax_rates")] + [JsonProperty("tax_rates", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("tax_rates")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List TaxRates { get => this.taxRates; diff --git a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseOptions.cs b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseOptions.cs index 9043a1d76b..18c4d1464e 100644 --- a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseOptions.cs +++ b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseOptions.cs @@ -62,8 +62,9 @@ public class SubscriptionSchedulePhaseOptions : INestedOptions, IHasMetadata, IH /// Define thresholds at which an invoice will be sent, and the subscription advanced to a /// new billing period. Pass an empty string to remove previously-defined thresholds. /// - [JsonProperty("billing_thresholds")] + [JsonProperty("billing_thresholds", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("billing_thresholds")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public SubscriptionSchedulePhaseBillingThresholdsOptions BillingThresholds { get => this.billingThresholds; @@ -112,8 +113,9 @@ public SubscriptionSchedulePhaseBillingThresholdsOptions BillingThresholds /// href="https://docs.stripe.com/api/invoices/create#create_invoice-default_tax_rates">default_tax_rates /// for any Invoices issued by the Subscription during this Phase. /// - [JsonProperty("default_tax_rates")] + [JsonProperty("default_tax_rates", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("default_tax_rates")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List DefaultTaxRates { get => this.defaultTaxRates; @@ -129,8 +131,9 @@ public List DefaultTaxRates /// optionally store an explanation of the subscription for rendering in Stripe surfaces and /// certain local payment methods UIs. /// - [JsonProperty("description")] + [JsonProperty("description", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("description")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string Description { get => this.description; @@ -146,8 +149,9 @@ public string Description /// the discount from the subscription's customer. Pass an empty string to avoid inheriting /// any discounts. /// - [JsonProperty("discounts")] + [JsonProperty("discounts", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("discounts")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List Discounts { get => this.discounts; diff --git a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleUpdateOptions.cs b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleUpdateOptions.cs index b38276fe90..f521f0881b 100644 --- a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleUpdateOptions.cs +++ b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleUpdateOptions.cs @@ -36,8 +36,9 @@ public class SubscriptionScheduleUpdateOptions : BaseOptions, IHasMetadata /// object in a structured format. Individual keys can be unset by posting an empty value to /// them. All keys can be unset by posting an empty value to metadata. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary Metadata { get => this.metadata; diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionAddInvoiceItemOptions.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionAddInvoiceItemOptions.cs index fc30c4920e..3d4301a260 100644 --- a/src/Stripe.net/Services/Subscriptions/SubscriptionAddInvoiceItemOptions.cs +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionAddInvoiceItemOptions.cs @@ -67,8 +67,9 @@ public class SubscriptionAddInvoiceItemOptions : INestedOptions, IHasMetadata, I /// The tax rates which apply to the item. When set, the default_tax_rates do not /// apply to this item. /// - [JsonProperty("tax_rates")] + [JsonProperty("tax_rates", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("tax_rates")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List TaxRates { get => this.taxRates; diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionCancellationDetailsOptions.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionCancellationDetailsOptions.cs index 575b89f23f..d1e002ec0f 100644 --- a/src/Stripe.net/Services/Subscriptions/SubscriptionCancellationDetailsOptions.cs +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionCancellationDetailsOptions.cs @@ -19,8 +19,9 @@ public class SubscriptionCancellationDetailsOptions : INestedOptions, IHasSetTra /// Additional comments about why the user canceled the subscription, if the subscription /// was canceled explicitly by the user. /// - [JsonProperty("comment")] + [JsonProperty("comment", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("comment")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string Comment { get => this.comment; @@ -38,8 +39,9 @@ public string Comment /// other, switched_service, too_complex, too_expensive, or /// unused. /// - [JsonProperty("feedback")] + [JsonProperty("feedback", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("feedback")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string Feedback { get => this.feedback; diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionCreateOptions.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionCreateOptions.cs index 9273908618..31600b0438 100644 --- a/src/Stripe.net/Services/Subscriptions/SubscriptionCreateOptions.cs +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionCreateOptions.cs @@ -34,8 +34,9 @@ public class SubscriptionCreateOptions : BaseOptions, IHasMetadata /// information, see the application fees documentation. /// - [JsonProperty("application_fee_percent")] + [JsonProperty("application_fee_percent", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("application_fee_percent")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public decimal? ApplicationFeePercent { get => this.applicationFeePercent; @@ -98,8 +99,9 @@ public decimal? ApplicationFeePercent /// new billing period. When updating, pass an empty string to remove previously-defined /// thresholds. /// - [JsonProperty("billing_thresholds")] + [JsonProperty("billing_thresholds", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("billing_thresholds")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public SubscriptionBillingThresholdsOptions BillingThresholds { get => this.billingThresholds; @@ -203,8 +205,9 @@ public SubscriptionBillingThresholdsOptions BillingThresholds /// tax_rates set. Invoices created will have their default_tax_rates /// populated from the subscription. /// - [JsonProperty("default_tax_rates")] + [JsonProperty("default_tax_rates", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("default_tax_rates")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List DefaultTaxRates { get => this.defaultTaxRates; @@ -228,8 +231,9 @@ public List DefaultTaxRates /// The coupons to redeem into discounts for the subscription. If not specified or empty, /// inherits the discount from the subscription's customer. /// - [JsonProperty("discounts")] + [JsonProperty("discounts", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("discounts")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List Discounts { get => this.discounts; @@ -260,8 +264,9 @@ public List Discounts /// object in a structured format. Individual keys can be unset by posting an empty value to /// them. All keys can be unset by posting an empty value to metadata. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary Metadata { get => this.metadata; @@ -283,8 +288,9 @@ public Dictionary Metadata /// /// The account on behalf of which to charge, for each of the subscription's invoices. /// - [JsonProperty("on_behalf_of")] + [JsonProperty("on_behalf_of", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("on_behalf_of")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string OnBehalfOf { get => this.onBehalfOf; @@ -347,8 +353,9 @@ public string OnBehalfOf /// analogous to calling Create an /// invoice for the given subscription at the specified interval. /// - [JsonProperty("pending_invoice_item_interval")] + [JsonProperty("pending_invoice_item_interval", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("pending_invoice_item_interval")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public SubscriptionPendingInvoiceItemIntervalOptions PendingInvoiceItemInterval { get => this.pendingInvoiceItemInterval; diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionInvoiceSettingsOptions.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionInvoiceSettingsOptions.cs index 7335554b13..f1eedb1452 100644 --- a/src/Stripe.net/Services/Subscriptions/SubscriptionInvoiceSettingsOptions.cs +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionInvoiceSettingsOptions.cs @@ -19,8 +19,9 @@ public class SubscriptionInvoiceSettingsOptions : INestedOptions, IHasSetTrackin /// The account tax IDs associated with the subscription. Will be set on invoices generated /// by the subscription. /// - [JsonProperty("account_tax_ids")] + [JsonProperty("account_tax_ids", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("account_tax_ids")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List AccountTaxIds { get => this.accountTaxIds; diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionItemOptions.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionItemOptions.cs index 9be5b7473e..312498c6ea 100644 --- a/src/Stripe.net/Services/Subscriptions/SubscriptionItemOptions.cs +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionItemOptions.cs @@ -21,8 +21,9 @@ public class SubscriptionItemOptions : INestedOptions, IHasId, IHasMetadata, IHa /// Define thresholds at which an invoice will be sent, and the subscription advanced to a /// new billing period. Pass an empty string to remove previously-defined thresholds. /// - [JsonProperty("billing_thresholds")] + [JsonProperty("billing_thresholds", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("billing_thresholds")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public SubscriptionItemBillingThresholdsOptions BillingThresholds { get => this.billingThresholds; @@ -52,8 +53,9 @@ public SubscriptionItemBillingThresholdsOptions BillingThresholds /// /// The coupons to redeem into discounts for the subscription item. /// - [JsonProperty("discounts")] + [JsonProperty("discounts", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("discounts")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List Discounts { get => this.discounts; @@ -119,8 +121,9 @@ public List Discounts /// on the Subscription. When updating, pass an empty string to remove previously-defined /// tax rates. /// - [JsonProperty("tax_rates")] + [JsonProperty("tax_rates", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("tax_rates")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List TaxRates { get => this.taxRates; diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionPaymentSettingsOptions.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionPaymentSettingsOptions.cs index c048ed4cfe..fb78e13404 100644 --- a/src/Stripe.net/Services/Subscriptions/SubscriptionPaymentSettingsOptions.cs +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionPaymentSettingsOptions.cs @@ -41,8 +41,9 @@ public class SubscriptionPaymentSettingsOptions : INestedOptions, IHasSetTrackin /// sepa_credit_transfer, sepa_debit, sofort, swish, /// us_bank_account, or wechat_pay. /// - [JsonProperty("payment_method_types")] + [JsonProperty("payment_method_types", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("payment_method_types")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List PaymentMethodTypes { get => this.paymentMethodTypes; diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsOptions.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsOptions.cs index 4c55555ef4..5c06215afa 100644 --- a/src/Stripe.net/Services/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsOptions.cs +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionPaymentSettingsPaymentMethodOptionsOptions.cs @@ -25,8 +25,9 @@ public class SubscriptionPaymentSettingsPaymentMethodOptionsOptions : INestedOpt /// This sub-hash contains details about the Canadian pre-authorized debit payment method /// options to pass to the invoice’s PaymentIntent. /// - [JsonProperty("acss_debit")] + [JsonProperty("acss_debit", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("acss_debit")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public SubscriptionPaymentSettingsPaymentMethodOptionsAcssDebitOptions AcssDebit { get => this.acssDebit; @@ -41,8 +42,9 @@ public SubscriptionPaymentSettingsPaymentMethodOptionsAcssDebitOptions AcssDebit /// This sub-hash contains details about the Bancontact payment method options to pass to /// the invoice’s PaymentIntent. /// - [JsonProperty("bancontact")] + [JsonProperty("bancontact", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("bancontact")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public SubscriptionPaymentSettingsPaymentMethodOptionsBancontactOptions Bancontact { get => this.bancontact; @@ -57,8 +59,9 @@ public SubscriptionPaymentSettingsPaymentMethodOptionsBancontactOptions Banconta /// This sub-hash contains details about the Card payment method options to pass to the /// invoice’s PaymentIntent. /// - [JsonProperty("card")] + [JsonProperty("card", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("card")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public SubscriptionPaymentSettingsPaymentMethodOptionsCardOptions Card { get => this.card; @@ -73,8 +76,9 @@ public SubscriptionPaymentSettingsPaymentMethodOptionsCardOptions Card /// This sub-hash contains details about the Bank transfer payment method options to pass to /// the invoice’s PaymentIntent. /// - [JsonProperty("customer_balance")] + [JsonProperty("customer_balance", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("customer_balance")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceOptions CustomerBalance { get => this.customerBalance; @@ -89,8 +93,9 @@ public SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceOptions Cus /// This sub-hash contains details about the Konbini payment method options to pass to the /// invoice’s PaymentIntent. /// - [JsonProperty("konbini")] + [JsonProperty("konbini", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("konbini")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public SubscriptionPaymentSettingsPaymentMethodOptionsKonbiniOptions Konbini { get => this.konbini; @@ -105,8 +110,9 @@ public SubscriptionPaymentSettingsPaymentMethodOptionsKonbiniOptions Konbini /// This sub-hash contains details about the PayTo payment method options to pass to the /// invoice’s PaymentIntent. /// - [JsonProperty("payto")] + [JsonProperty("payto", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("payto")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public SubscriptionPaymentSettingsPaymentMethodOptionsPaytoOptions Payto { get => this.payto; @@ -121,8 +127,9 @@ public SubscriptionPaymentSettingsPaymentMethodOptionsPaytoOptions Payto /// This sub-hash contains details about the SEPA Direct Debit payment method options to /// pass to the invoice’s PaymentIntent. /// - [JsonProperty("sepa_debit")] + [JsonProperty("sepa_debit", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("sepa_debit")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public SubscriptionPaymentSettingsPaymentMethodOptionsSepaDebitOptions SepaDebit { get => this.sepaDebit; @@ -137,8 +144,9 @@ public SubscriptionPaymentSettingsPaymentMethodOptionsSepaDebitOptions SepaDebit /// This sub-hash contains details about the ACH direct debit payment method options to pass /// to the invoice’s PaymentIntent. /// - [JsonProperty("us_bank_account")] + [JsonProperty("us_bank_account", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("us_bank_account")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public SubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountOptions UsBankAccount { get => this.usBankAccount; diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionUpdateOptions.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionUpdateOptions.cs index 9ef8b0b8ce..4a74c6d67f 100644 --- a/src/Stripe.net/Services/Subscriptions/SubscriptionUpdateOptions.cs +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionUpdateOptions.cs @@ -39,8 +39,9 @@ public class SubscriptionUpdateOptions : BaseOptions, IHasMetadata /// information, see the application fees documentation. /// - [JsonProperty("application_fee_percent")] + [JsonProperty("application_fee_percent", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("application_fee_percent")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public decimal? ApplicationFeePercent { get => this.applicationFeePercent; @@ -75,8 +76,9 @@ public decimal? ApplicationFeePercent /// new billing period. When updating, pass an empty string to remove previously-defined /// thresholds. /// - [JsonProperty("billing_thresholds")] + [JsonProperty("billing_thresholds", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("billing_thresholds")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public SubscriptionBillingThresholdsOptions BillingThresholds { get => this.billingThresholds; @@ -93,9 +95,10 @@ public SubscriptionBillingThresholdsOptions BillingThresholds /// proration_behavior. If set during a future period, this will always cause a /// proration for that period. /// - [JsonProperty("cancel_at")] + [JsonProperty("cancel_at", NullValueHandling = NullValueHandling.Ignore)] [JsonConverter(typeof(AnyOfConverter))] [STJS.JsonPropertyName("cancel_at")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] [STJS.JsonConverter(typeof(STJAnyOfConverter))] public AnyOf CancelAt { @@ -163,8 +166,9 @@ public SubscriptionBillingThresholdsOptions BillingThresholds /// or default_source. /// - [JsonProperty("default_source")] + [JsonProperty("default_source", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("default_source")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string DefaultSource { get => this.defaultSource; @@ -181,8 +185,9 @@ public string DefaultSource /// populated from the subscription. Pass an empty string to remove previously-defined tax /// rates. /// - [JsonProperty("default_tax_rates")] + [JsonProperty("default_tax_rates", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("default_tax_rates")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List DefaultTaxRates { get => this.defaultTaxRates; @@ -198,8 +203,9 @@ public List DefaultTaxRates /// to optionally store an explanation of the subscription for rendering in Stripe surfaces /// and certain local payment methods UIs. /// - [JsonProperty("description")] + [JsonProperty("description", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("description")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string Description { get => this.description; @@ -214,8 +220,9 @@ public string Description /// The coupons to redeem into discounts for the subscription. If not specified or empty, /// inherits the discount from the subscription's customer. /// - [JsonProperty("discounts")] + [JsonProperty("discounts", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("discounts")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List Discounts { get => this.discounts; @@ -246,8 +253,9 @@ public List Discounts /// object in a structured format. Individual keys can be unset by posting an empty value to /// them. All keys can be unset by posting an empty value to metadata. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary Metadata { get => this.metadata; @@ -269,8 +277,9 @@ public Dictionary Metadata /// /// The account on behalf of which to charge, for each of the subscription's invoices. /// - [JsonProperty("on_behalf_of")] + [JsonProperty("on_behalf_of", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("on_behalf_of")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string OnBehalfOf { get => this.onBehalfOf; @@ -287,8 +296,9 @@ public string OnBehalfOf /// more about pausing /// collection. /// - [JsonProperty("pause_collection")] + [JsonProperty("pause_collection", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("pause_collection")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public SubscriptionPauseCollectionOptions PauseCollection { get => this.pauseCollection; @@ -346,8 +356,9 @@ public SubscriptionPauseCollectionOptions PauseCollection /// analogous to calling Create an /// invoice for the given subscription at the specified interval. /// - [JsonProperty("pending_invoice_item_interval")] + [JsonProperty("pending_invoice_item_interval", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("pending_invoice_item_interval")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public SubscriptionPendingInvoiceItemIntervalOptions PendingInvoiceItemInterval { get => this.pendingInvoiceItemInterval; @@ -389,8 +400,9 @@ public SubscriptionPendingInvoiceItemIntervalOptions PendingInvoiceItemInterval /// destination and the ID of the resulting transfers will be found on the resulting /// charges. This will be unset if you POST an empty value. /// - [JsonProperty("transfer_data")] + [JsonProperty("transfer_data", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("transfer_data")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public SubscriptionTransferDataOptions TransferData { get => this.transferData; diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationUpdateOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationUpdateOptions.cs index d341d068e9..f228c296fa 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationUpdateOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationUpdateOptions.cs @@ -26,9 +26,10 @@ public class RegistrationUpdateOptions : BaseOptions /// will be active indefinitely. It can be either now to indicate the current time, /// or a timestamp measured in seconds since the Unix epoch. /// - [JsonProperty("expires_at")] + [JsonProperty("expires_at", NullValueHandling = NullValueHandling.Ignore)] [JsonConverter(typeof(AnyOfConverter))] [STJS.JsonPropertyName("expires_at")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] [STJS.JsonConverter(typeof(STJAnyOfConverter))] public AnyOf ExpiresAt { diff --git a/src/Stripe.net/Services/TaxRates/TaxRateUpdateOptions.cs b/src/Stripe.net/Services/TaxRates/TaxRateUpdateOptions.cs index d40fcd7b23..83eeac2a2e 100644 --- a/src/Stripe.net/Services/TaxRates/TaxRateUpdateOptions.cs +++ b/src/Stripe.net/Services/TaxRates/TaxRateUpdateOptions.cs @@ -57,8 +57,9 @@ public class TaxRateUpdateOptions : BaseOptions, IHasMetadata /// object in a structured format. Individual keys can be unset by posting an empty value to /// them. All keys can be unset by posting an empty value to metadata. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary Metadata { get => this.metadata; diff --git a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationBbposWisepad3Options.cs b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationBbposWisepad3Options.cs index d7db60a1e3..ff44781a58 100644 --- a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationBbposWisepad3Options.cs +++ b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationBbposWisepad3Options.cs @@ -17,8 +17,9 @@ public class ConfigurationBbposWisepad3Options : INestedOptions, IHasSetTracking /// /// A File ID representing an image you want to display on the reader. /// - [JsonProperty("splashscreen")] + [JsonProperty("splashscreen", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("splashscreen")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string Splashscreen { get => this.splashscreen; diff --git a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationBbposWiseposEOptions.cs b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationBbposWiseposEOptions.cs index 22d0a034fd..29f24bb788 100644 --- a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationBbposWiseposEOptions.cs +++ b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationBbposWiseposEOptions.cs @@ -17,8 +17,9 @@ public class ConfigurationBbposWiseposEOptions : INestedOptions, IHasSetTracking /// /// A File ID representing an image to display on the reader. /// - [JsonProperty("splashscreen")] + [JsonProperty("splashscreen", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("splashscreen")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string Splashscreen { get => this.splashscreen; diff --git a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationCreateOptions.cs b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationCreateOptions.cs index 57baeecf78..4e523f6361 100644 --- a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationCreateOptions.cs +++ b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationCreateOptions.cs @@ -30,8 +30,9 @@ public class ConfigurationCreateOptions : BaseOptions /// /// Configuration for cellular connectivity. /// - [JsonProperty("cellular")] + [JsonProperty("cellular", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("cellular")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public ConfigurationCellularOptions Cellular { get => this.cellular; @@ -52,8 +53,9 @@ public ConfigurationCellularOptions Cellular /// /// Configurations for collecting transactions offline. /// - [JsonProperty("offline")] + [JsonProperty("offline", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("offline")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public ConfigurationOfflineOptions Offline { get => this.offline; @@ -88,8 +90,9 @@ public ConfigurationOfflineOptions Offline /// /// Tipping configurations for readers that support on-reader tips. /// - [JsonProperty("tipping")] + [JsonProperty("tipping", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("tipping")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public ConfigurationTippingOptions Tipping { get => this.tipping; @@ -110,8 +113,9 @@ public ConfigurationTippingOptions Tipping /// /// Configurations for connecting to a WiFi network. /// - [JsonProperty("wifi")] + [JsonProperty("wifi", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("wifi")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public ConfigurationWifiOptions Wifi { get => this.wifi; diff --git a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationStripeS700Options.cs b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationStripeS700Options.cs index 2f4792930c..6b9a701917 100644 --- a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationStripeS700Options.cs +++ b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationStripeS700Options.cs @@ -17,8 +17,9 @@ public class ConfigurationStripeS700Options : INestedOptions, IHasSetTracking /// /// A File ID representing an image you want to display on the reader. /// - [JsonProperty("splashscreen")] + [JsonProperty("splashscreen", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("splashscreen")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string Splashscreen { get => this.splashscreen; diff --git a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationStripeS710Options.cs b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationStripeS710Options.cs index 678b955f57..1af070c0b8 100644 --- a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationStripeS710Options.cs +++ b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationStripeS710Options.cs @@ -17,8 +17,9 @@ public class ConfigurationStripeS710Options : INestedOptions, IHasSetTracking /// /// A File ID representing an image you want to display on the reader. /// - [JsonProperty("splashscreen")] + [JsonProperty("splashscreen", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("splashscreen")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string Splashscreen { get => this.splashscreen; diff --git a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationUpdateOptions.cs b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationUpdateOptions.cs index f9c11af7b3..e972752a95 100644 --- a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationUpdateOptions.cs +++ b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationUpdateOptions.cs @@ -22,8 +22,9 @@ public class ConfigurationUpdateOptions : BaseOptions /// /// An object containing device type specific settings for BBPOS WisePad 3 readers. /// - [JsonProperty("bbpos_wisepad3")] + [JsonProperty("bbpos_wisepad3", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("bbpos_wisepad3")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public ConfigurationBbposWisepad3Options BbposWisepad3 { get => this.bbposWisepad3; @@ -37,8 +38,9 @@ public ConfigurationBbposWisepad3Options BbposWisepad3 /// /// An object containing device type specific settings for BBPOS WisePOS E readers. /// - [JsonProperty("bbpos_wisepos_e")] + [JsonProperty("bbpos_wisepos_e", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("bbpos_wisepos_e")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public ConfigurationBbposWiseposEOptions BbposWiseposE { get => this.bbposWiseposE; @@ -52,8 +54,9 @@ public ConfigurationBbposWiseposEOptions BbposWiseposE /// /// Configuration for cellular connectivity. /// - [JsonProperty("cellular")] + [JsonProperty("cellular", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("cellular")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public ConfigurationCellularOptions Cellular { get => this.cellular; @@ -74,8 +77,9 @@ public ConfigurationCellularOptions Cellular /// /// Configurations for collecting transactions offline. /// - [JsonProperty("offline")] + [JsonProperty("offline", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("offline")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public ConfigurationOfflineOptions Offline { get => this.offline; @@ -89,8 +93,9 @@ public ConfigurationOfflineOptions Offline /// /// Reboot time settings for readers. that support customized reboot time configuration. /// - [JsonProperty("reboot_window")] + [JsonProperty("reboot_window", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("reboot_window")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public ConfigurationRebootWindowOptions RebootWindow { get => this.rebootWindow; @@ -104,8 +109,9 @@ public ConfigurationRebootWindowOptions RebootWindow /// /// An object containing device type specific settings for Stripe S700 readers. /// - [JsonProperty("stripe_s700")] + [JsonProperty("stripe_s700", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("stripe_s700")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public ConfigurationStripeS700Options StripeS700 { get => this.stripeS700; @@ -119,8 +125,9 @@ public ConfigurationStripeS700Options StripeS700 /// /// An object containing device type specific settings for Stripe S710 readers. /// - [JsonProperty("stripe_s710")] + [JsonProperty("stripe_s710", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("stripe_s710")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public ConfigurationStripeS710Options StripeS710 { get => this.stripeS710; @@ -134,8 +141,9 @@ public ConfigurationStripeS710Options StripeS710 /// /// Tipping configurations for readers that support on-reader tips. /// - [JsonProperty("tipping")] + [JsonProperty("tipping", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("tipping")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public ConfigurationTippingOptions Tipping { get => this.tipping; @@ -149,8 +157,9 @@ public ConfigurationTippingOptions Tipping /// /// An object containing device type specific settings for Verifone P400 readers. /// - [JsonProperty("verifone_p400")] + [JsonProperty("verifone_p400", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("verifone_p400")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public ConfigurationVerifoneP400Options VerifoneP400 { get => this.verifoneP400; @@ -164,8 +173,9 @@ public ConfigurationVerifoneP400Options VerifoneP400 /// /// Configurations for connecting to a WiFi network. /// - [JsonProperty("wifi")] + [JsonProperty("wifi", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("wifi")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public ConfigurationWifiOptions Wifi { get => this.wifi; diff --git a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationVerifoneP400Options.cs b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationVerifoneP400Options.cs index 5a62f4c4ef..d16c8c942e 100644 --- a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationVerifoneP400Options.cs +++ b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationVerifoneP400Options.cs @@ -17,8 +17,9 @@ public class ConfigurationVerifoneP400Options : INestedOptions, IHasSetTracking /// /// A File ID representing an image you want to display on the reader. /// - [JsonProperty("splashscreen")] + [JsonProperty("splashscreen", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("splashscreen")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string Splashscreen { get => this.splashscreen; diff --git a/src/Stripe.net/Services/Terminal/Locations/LocationCreateOptions.cs b/src/Stripe.net/Services/Terminal/Locations/LocationCreateOptions.cs index 3e6db97988..951b25a890 100644 --- a/src/Stripe.net/Services/Terminal/Locations/LocationCreateOptions.cs +++ b/src/Stripe.net/Services/Terminal/Locations/LocationCreateOptions.cs @@ -68,8 +68,9 @@ public class LocationCreateOptions : BaseOptions, IHasMetadata /// object in a structured format. Individual keys can be unset by posting an empty value to /// them. All keys can be unset by posting an empty value to metadata. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary Metadata { get => this.metadata; diff --git a/src/Stripe.net/Services/Terminal/Locations/LocationUpdateOptions.cs b/src/Stripe.net/Services/Terminal/Locations/LocationUpdateOptions.cs index ffbd671d77..c0c85cfb5f 100644 --- a/src/Stripe.net/Services/Terminal/Locations/LocationUpdateOptions.cs +++ b/src/Stripe.net/Services/Terminal/Locations/LocationUpdateOptions.cs @@ -42,8 +42,9 @@ public class LocationUpdateOptions : BaseOptions, IHasMetadata /// /// The ID of a configuration that will be used to customize all readers in this location. /// - [JsonProperty("configuration_overrides")] + [JsonProperty("configuration_overrides", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("configuration_overrides")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string ConfigurationOverrides { get => this.configurationOverrides; @@ -57,8 +58,9 @@ public string ConfigurationOverrides /// /// A name for the location. /// - [JsonProperty("display_name")] + [JsonProperty("display_name", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("display_name")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string DisplayName { get => this.displayName; @@ -72,8 +74,9 @@ public string DisplayName /// /// The Kana variation of the name for the location (Japan only). /// - [JsonProperty("display_name_kana")] + [JsonProperty("display_name_kana", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("display_name_kana")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string DisplayNameKana { get => this.displayNameKana; @@ -87,8 +90,9 @@ public string DisplayNameKana /// /// The Kanji variation of the name for the location (Japan only). /// - [JsonProperty("display_name_kanji")] + [JsonProperty("display_name_kanji", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("display_name_kanji")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string DisplayNameKanji { get => this.displayNameKanji; @@ -105,8 +109,9 @@ public string DisplayNameKanji /// object in a structured format. Individual keys can be unset by posting an empty value to /// them. All keys can be unset by posting an empty value to metadata. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary Metadata { get => this.metadata; @@ -120,8 +125,9 @@ public Dictionary Metadata /// /// The phone number for the location. /// - [JsonProperty("phone")] + [JsonProperty("phone", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("phone")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string Phone { get => this.phone; diff --git a/src/Stripe.net/Services/Terminal/Readers/ReaderCreateOptions.cs b/src/Stripe.net/Services/Terminal/Readers/ReaderCreateOptions.cs index 7efbb258b0..3ee3b9fafc 100644 --- a/src/Stripe.net/Services/Terminal/Readers/ReaderCreateOptions.cs +++ b/src/Stripe.net/Services/Terminal/Readers/ReaderCreateOptions.cs @@ -32,8 +32,9 @@ public class ReaderCreateOptions : BaseOptions, IHasMetadata /// object in a structured format. Individual keys can be unset by posting an empty value to /// them. All keys can be unset by posting an empty value to metadata. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary Metadata { get => this.metadata; diff --git a/src/Stripe.net/Services/Terminal/Readers/ReaderUpdateOptions.cs b/src/Stripe.net/Services/Terminal/Readers/ReaderUpdateOptions.cs index 9afd8b7879..4c6a71117f 100644 --- a/src/Stripe.net/Services/Terminal/Readers/ReaderUpdateOptions.cs +++ b/src/Stripe.net/Services/Terminal/Readers/ReaderUpdateOptions.cs @@ -15,8 +15,9 @@ public class ReaderUpdateOptions : BaseOptions, IHasMetadata /// /// The new label of the reader. /// - [JsonProperty("label")] + [JsonProperty("label", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("label")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string Label { get => this.label; @@ -33,8 +34,9 @@ public string Label /// object in a structured format. Individual keys can be unset by posting an empty value to /// them. All keys can be unset by posting an empty value to metadata. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary Metadata { get => this.metadata; diff --git a/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataBillingDetailsOptions.cs b/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataBillingDetailsOptions.cs index eb7d9eb051..ecc8469c3d 100644 --- a/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataBillingDetailsOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataBillingDetailsOptions.cs @@ -20,8 +20,9 @@ public class ConfirmationTokenPaymentMethodDataBillingDetailsOptions : INestedOp /// /// Billing address. /// - [JsonProperty("address")] + [JsonProperty("address", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("address")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public AddressOptions Address { get => this.address; @@ -35,8 +36,9 @@ public AddressOptions Address /// /// Email address. /// - [JsonProperty("email")] + [JsonProperty("email", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("email")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string Email { get => this.email; @@ -50,8 +52,9 @@ public string Email /// /// Full name. /// - [JsonProperty("name")] + [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("name")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string Name { get => this.name; @@ -65,8 +68,9 @@ public string Name /// /// Billing phone number (including extension). /// - [JsonProperty("phone")] + [JsonProperty("phone", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("phone")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string Phone { get => this.phone; diff --git a/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenShippingOptions.cs b/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenShippingOptions.cs index 96dbd7a788..b5791d7dfd 100644 --- a/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenShippingOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenShippingOptions.cs @@ -31,8 +31,9 @@ public class ConfirmationTokenShippingOptions : INestedOptions, IHasSetTracking /// /// Recipient phone (including extension). /// - [JsonProperty("phone")] + [JsonProperty("phone", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("phone")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string Phone { get => this.phone; diff --git a/src/Stripe.net/Services/Tokens/TokenAccountCompanyOptions.cs b/src/Stripe.net/Services/Tokens/TokenAccountCompanyOptions.cs index aa2e7d3e50..24d356b4f8 100644 --- a/src/Stripe.net/Services/Tokens/TokenAccountCompanyOptions.cs +++ b/src/Stripe.net/Services/Tokens/TokenAccountCompanyOptions.cs @@ -138,8 +138,9 @@ public class TokenAccountCompanyOptions : INestedOptions, IHasSetTracking /// One of: qualified_entity_exceeds_ownership_threshold, or /// qualifies_as_financial_institution. /// - [JsonProperty("ownership_exemption_reason")] + [JsonProperty("ownership_exemption_reason", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("ownership_exemption_reason")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string OwnershipExemptionReason { get => this.ownershipExemptionReason; @@ -160,8 +161,9 @@ public string OwnershipExemptionReason /// /// When the business was incorporated or registered. /// - [JsonProperty("registration_date")] + [JsonProperty("registration_date", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("registration_date")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public TokenAccountCompanyRegistrationDateOptions RegistrationDate { get => this.registrationDate; @@ -205,8 +207,9 @@ public TokenAccountCompanyRegistrationDateOptions RegistrationDate /// unincorporated_association, unincorporated_non_profit, or /// unincorporated_partnership. /// - [JsonProperty("structure")] + [JsonProperty("structure", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("structure")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string Structure { get => this.structure; diff --git a/src/Stripe.net/Services/Tokens/TokenAccountIndividualOptions.cs b/src/Stripe.net/Services/Tokens/TokenAccountIndividualOptions.cs index a3add5d22f..740b3fa8a3 100644 --- a/src/Stripe.net/Services/Tokens/TokenAccountIndividualOptions.cs +++ b/src/Stripe.net/Services/Tokens/TokenAccountIndividualOptions.cs @@ -41,8 +41,9 @@ public class TokenAccountIndividualOptions : INestedOptions, IHasMetadata, IHasS /// /// The individual's date of birth. /// - [JsonProperty("dob")] + [JsonProperty("dob", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("dob")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public DobOptions Dob { get => this.dob; @@ -84,8 +85,9 @@ public DobOptions Dob /// /// A list of alternate names or aliases that the individual is known by. /// - [JsonProperty("full_name_aliases")] + [JsonProperty("full_name_aliases", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("full_name_aliases")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List FullNameAliases { get => this.fullNameAliases; @@ -160,8 +162,9 @@ public List FullNameAliases /// object in a structured format. Individual keys can be unset by posting an empty value to /// them. All keys can be unset by posting an empty value to metadata. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary Metadata { get => this.metadata; diff --git a/src/Stripe.net/Services/Tokens/TokenAccountIndividualRelationshipOptions.cs b/src/Stripe.net/Services/Tokens/TokenAccountIndividualRelationshipOptions.cs index 2b338f5741..32f5d58675 100644 --- a/src/Stripe.net/Services/Tokens/TokenAccountIndividualRelationshipOptions.cs +++ b/src/Stripe.net/Services/Tokens/TokenAccountIndividualRelationshipOptions.cs @@ -41,8 +41,9 @@ public class TokenAccountIndividualRelationshipOptions : INestedOptions, IHasSet /// /// The percent owned by the person of the account's legal entity. /// - [JsonProperty("percent_ownership")] + [JsonProperty("percent_ownership", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("percent_ownership")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public decimal? PercentOwnership { get => this.percentOwnership; diff --git a/src/Stripe.net/Services/Tokens/TokenPersonAdditionalTosAcceptancesAccountOptions.cs b/src/Stripe.net/Services/Tokens/TokenPersonAdditionalTosAcceptancesAccountOptions.cs index 0ebb0ec8c5..23e21a34a5 100644 --- a/src/Stripe.net/Services/Tokens/TokenPersonAdditionalTosAcceptancesAccountOptions.cs +++ b/src/Stripe.net/Services/Tokens/TokenPersonAdditionalTosAcceptancesAccountOptions.cs @@ -36,8 +36,9 @@ public class TokenPersonAdditionalTosAcceptancesAccountOptions : INestedOptions, /// The user agent of the browser from which the account representative accepted the service /// agreement. /// - [JsonProperty("user_agent")] + [JsonProperty("user_agent", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("user_agent")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string UserAgent { get => this.userAgent; diff --git a/src/Stripe.net/Services/Tokens/TokenPersonOptions.cs b/src/Stripe.net/Services/Tokens/TokenPersonOptions.cs index 58b2a57d15..f349f38476 100644 --- a/src/Stripe.net/Services/Tokens/TokenPersonOptions.cs +++ b/src/Stripe.net/Services/Tokens/TokenPersonOptions.cs @@ -49,8 +49,9 @@ public class TokenPersonOptions : INestedOptions, IHasMetadata, IHasSetTracking /// /// The person's date of birth. /// - [JsonProperty("dob")] + [JsonProperty("dob", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("dob")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public DobOptions Dob { get => this.dob; @@ -99,8 +100,9 @@ public DobOptions Dob /// /// A list of alternate names or aliases that the person is known by. /// - [JsonProperty("full_name_aliases")] + [JsonProperty("full_name_aliases", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("full_name_aliases")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public List FullNameAliases { get => this.fullNameAliases; @@ -174,8 +176,9 @@ public List FullNameAliases /// object in a structured format. Individual keys can be unset by posting an empty value to /// them. All keys can be unset by posting an empty value to metadata. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary Metadata { get => this.metadata; diff --git a/src/Stripe.net/Services/Tokens/TokenPersonRelationshipOptions.cs b/src/Stripe.net/Services/Tokens/TokenPersonRelationshipOptions.cs index 15f9d4aa01..2d5a5ec1d0 100644 --- a/src/Stripe.net/Services/Tokens/TokenPersonRelationshipOptions.cs +++ b/src/Stripe.net/Services/Tokens/TokenPersonRelationshipOptions.cs @@ -55,8 +55,9 @@ public class TokenPersonRelationshipOptions : INestedOptions, IHasSetTracking /// /// The percent owned by the person of the account's legal entity. /// - [JsonProperty("percent_ownership")] + [JsonProperty("percent_ownership", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("percent_ownership")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public decimal? PercentOwnership { get => this.percentOwnership; diff --git a/src/Stripe.net/Services/Topups/TopupCreateOptions.cs b/src/Stripe.net/Services/Topups/TopupCreateOptions.cs index ec10997905..a6d172a431 100644 --- a/src/Stripe.net/Services/Topups/TopupCreateOptions.cs +++ b/src/Stripe.net/Services/Topups/TopupCreateOptions.cs @@ -40,8 +40,9 @@ public class TopupCreateOptions : BaseOptions, IHasMetadata /// object in a structured format. Individual keys can be unset by posting an empty value to /// them. All keys can be unset by posting an empty value to metadata. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary Metadata { get => this.metadata; diff --git a/src/Stripe.net/Services/Topups/TopupUpdateOptions.cs b/src/Stripe.net/Services/Topups/TopupUpdateOptions.cs index 27c2349894..9ab434f232 100644 --- a/src/Stripe.net/Services/Topups/TopupUpdateOptions.cs +++ b/src/Stripe.net/Services/Topups/TopupUpdateOptions.cs @@ -24,8 +24,9 @@ public class TopupUpdateOptions : BaseOptions, IHasMetadata /// object in a structured format. Individual keys can be unset by posting an empty value to /// them. All keys can be unset by posting an empty value to metadata. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary Metadata { get => this.metadata; diff --git a/src/Stripe.net/Services/TransferReversals/TransferReversalCreateOptions.cs b/src/Stripe.net/Services/TransferReversals/TransferReversalCreateOptions.cs index 19e5a7d767..1cfd097eeb 100644 --- a/src/Stripe.net/Services/TransferReversals/TransferReversalCreateOptions.cs +++ b/src/Stripe.net/Services/TransferReversals/TransferReversalCreateOptions.cs @@ -35,8 +35,9 @@ public class TransferReversalCreateOptions : BaseOptions, IHasMetadata /// object in a structured format. Individual keys can be unset by posting an empty value to /// them. All keys can be unset by posting an empty value to metadata. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary Metadata { get => this.metadata; diff --git a/src/Stripe.net/Services/TransferReversals/TransferReversalUpdateOptions.cs b/src/Stripe.net/Services/TransferReversals/TransferReversalUpdateOptions.cs index 7390b86816..75a6e437b1 100644 --- a/src/Stripe.net/Services/TransferReversals/TransferReversalUpdateOptions.cs +++ b/src/Stripe.net/Services/TransferReversals/TransferReversalUpdateOptions.cs @@ -17,8 +17,9 @@ public class TransferReversalUpdateOptions : BaseOptions, IHasMetadata /// object in a structured format. Individual keys can be unset by posting an empty value to /// them. All keys can be unset by posting an empty value to metadata. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary Metadata { get => this.metadata; diff --git a/src/Stripe.net/Services/Transfers/TransferUpdateOptions.cs b/src/Stripe.net/Services/Transfers/TransferUpdateOptions.cs index afbfcaacd3..6ec8ca690c 100644 --- a/src/Stripe.net/Services/Transfers/TransferUpdateOptions.cs +++ b/src/Stripe.net/Services/Transfers/TransferUpdateOptions.cs @@ -24,8 +24,9 @@ public class TransferUpdateOptions : BaseOptions, IHasMetadata /// object in a structured format. Individual keys can be unset by posting an empty value to /// them. All keys can be unset by posting an empty value to metadata. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary Metadata { get => this.metadata; diff --git a/src/Stripe.net/Services/Treasury/FinancialAccounts/FinancialAccountCreateOptions.cs b/src/Stripe.net/Services/Treasury/FinancialAccounts/FinancialAccountCreateOptions.cs index aab39b89a2..eeb5f4c90d 100644 --- a/src/Stripe.net/Services/Treasury/FinancialAccounts/FinancialAccountCreateOptions.cs +++ b/src/Stripe.net/Services/Treasury/FinancialAccounts/FinancialAccountCreateOptions.cs @@ -32,8 +32,9 @@ public class FinancialAccountCreateOptions : BaseOptions, IHasMetadata /// /// The nickname for the FinancialAccount. /// - [JsonProperty("nickname")] + [JsonProperty("nickname", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("nickname")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string Nickname { get => this.nickname; diff --git a/src/Stripe.net/Services/Treasury/FinancialAccounts/FinancialAccountUpdateOptions.cs b/src/Stripe.net/Services/Treasury/FinancialAccounts/FinancialAccountUpdateOptions.cs index 0c2b8592de..cebda9022e 100644 --- a/src/Stripe.net/Services/Treasury/FinancialAccounts/FinancialAccountUpdateOptions.cs +++ b/src/Stripe.net/Services/Treasury/FinancialAccounts/FinancialAccountUpdateOptions.cs @@ -41,8 +41,9 @@ public class FinancialAccountUpdateOptions : BaseOptions, IHasMetadata /// /// The nickname for the FinancialAccount. /// - [JsonProperty("nickname")] + [JsonProperty("nickname", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("nickname")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string Nickname { get => this.nickname; diff --git a/src/Stripe.net/Services/Treasury/OutboundPayments/OutboundPaymentDestinationPaymentMethodDataBillingDetailsOptions.cs b/src/Stripe.net/Services/Treasury/OutboundPayments/OutboundPaymentDestinationPaymentMethodDataBillingDetailsOptions.cs index a6f760cb02..33a88fd5b7 100644 --- a/src/Stripe.net/Services/Treasury/OutboundPayments/OutboundPaymentDestinationPaymentMethodDataBillingDetailsOptions.cs +++ b/src/Stripe.net/Services/Treasury/OutboundPayments/OutboundPaymentDestinationPaymentMethodDataBillingDetailsOptions.cs @@ -20,8 +20,9 @@ public class OutboundPaymentDestinationPaymentMethodDataBillingDetailsOptions : /// /// Billing address. /// - [JsonProperty("address")] + [JsonProperty("address", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("address")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public AddressOptions Address { get => this.address; @@ -35,8 +36,9 @@ public AddressOptions Address /// /// Email address. /// - [JsonProperty("email")] + [JsonProperty("email", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("email")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string Email { get => this.email; @@ -50,8 +52,9 @@ public string Email /// /// Full name. /// - [JsonProperty("name")] + [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("name")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string Name { get => this.name; @@ -65,8 +68,9 @@ public string Name /// /// Billing phone number (including extension). /// - [JsonProperty("phone")] + [JsonProperty("phone", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("phone")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string Phone { get => this.phone; diff --git a/src/Stripe.net/Services/Treasury/OutboundPayments/OutboundPaymentDestinationPaymentMethodOptionsOptions.cs b/src/Stripe.net/Services/Treasury/OutboundPayments/OutboundPaymentDestinationPaymentMethodOptionsOptions.cs index 20e7bb21a7..aa071241da 100644 --- a/src/Stripe.net/Services/Treasury/OutboundPayments/OutboundPaymentDestinationPaymentMethodOptionsOptions.cs +++ b/src/Stripe.net/Services/Treasury/OutboundPayments/OutboundPaymentDestinationPaymentMethodOptionsOptions.cs @@ -17,8 +17,9 @@ public class OutboundPaymentDestinationPaymentMethodOptionsOptions : INestedOpti /// /// Optional fields for us_bank_account. /// - [JsonProperty("us_bank_account")] + [JsonProperty("us_bank_account", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("us_bank_account")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public OutboundPaymentDestinationPaymentMethodOptionsUsBankAccountOptions UsBankAccount { get => this.usBankAccount; diff --git a/src/Stripe.net/Services/Treasury/OutboundTransfers/OutboundTransferDestinationPaymentMethodOptionsOptions.cs b/src/Stripe.net/Services/Treasury/OutboundTransfers/OutboundTransferDestinationPaymentMethodOptionsOptions.cs index a5cb9b8786..ca6681d8e4 100644 --- a/src/Stripe.net/Services/Treasury/OutboundTransfers/OutboundTransferDestinationPaymentMethodOptionsOptions.cs +++ b/src/Stripe.net/Services/Treasury/OutboundTransfers/OutboundTransferDestinationPaymentMethodOptionsOptions.cs @@ -17,8 +17,9 @@ public class OutboundTransferDestinationPaymentMethodOptionsOptions : INestedOpt /// /// Optional fields for us_bank_account. /// - [JsonProperty("us_bank_account")] + [JsonProperty("us_bank_account", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("us_bank_account")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public OutboundTransferDestinationPaymentMethodOptionsUsBankAccountOptions UsBankAccount { get => this.usBankAccount; diff --git a/src/Stripe.net/Services/V2/Core/AccountLinks/AccountLinkCreateUseCaseOptions.cs b/src/Stripe.net/Services/V2/Core/AccountLinks/AccountLinkCreateUseCaseOptions.cs index dc5bad2b94..7602ee0d82 100644 --- a/src/Stripe.net/Services/V2/Core/AccountLinks/AccountLinkCreateUseCaseOptions.cs +++ b/src/Stripe.net/Services/V2/Core/AccountLinks/AccountLinkCreateUseCaseOptions.cs @@ -8,14 +8,6 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountLinkCreateUseCaseOptions : INestedOptions { - /// - /// Open Enum. The type of Account Link the user is requesting. - /// One of: account_onboarding, or account_update. - /// - [JsonProperty("type")] - [STJS.JsonPropertyName("type")] - public string Type { get; set; } - /// /// Hash containing configuration options for an Account Link object that onboards a new /// account. @@ -31,5 +23,13 @@ public class AccountLinkCreateUseCaseOptions : INestedOptions [JsonProperty("account_update")] [STJS.JsonPropertyName("account_update")] public AccountLinkCreateUseCaseAccountUpdateOptions AccountUpdate { get; set; } + + /// + /// Open Enum. The type of Account Link the user is requesting. + /// One of: account_onboarding, or account_update. + /// + [JsonProperty("type")] + [STJS.JsonPropertyName("type")] + public string Type { get; set; } } } diff --git a/src/Stripe.net/Services/V2/Core/AccountTokens/AccountTokenCreateIdentityIndividualOptions.cs b/src/Stripe.net/Services/V2/Core/AccountTokens/AccountTokenCreateIdentityIndividualOptions.cs index 2c5aafac55..187bebccbb 100644 --- a/src/Stripe.net/Services/V2/Core/AccountTokens/AccountTokenCreateIdentityIndividualOptions.cs +++ b/src/Stripe.net/Services/V2/Core/AccountTokens/AccountTokenCreateIdentityIndividualOptions.cs @@ -83,8 +83,9 @@ public class AccountTokenCreateIdentityIndividualOptions : INestedOptions, IHasM /// Set of key-value pairs that you can attach to an object. This can be useful for storing /// additional information about the object in a structured format. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] [STJS.JsonConverter(typeof(STJNullPreservingDictionaryConverter))] public Dictionary Metadata { diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityIndividualOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityIndividualOptions.cs index 41c09ce708..4e12c248f5 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityIndividualOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityIndividualOptions.cs @@ -83,8 +83,9 @@ public class AccountUpdateIdentityIndividualOptions : INestedOptions, IHasMetada /// Set of key-value pairs that you can attach to an object. This can be useful for storing /// additional information about the object in a structured format. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] [STJS.JsonConverter(typeof(STJNullPreservingDictionaryConverter))] public Dictionary Metadata { diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateOptions.cs index 51804897d1..80f7369656 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateOptions.cs @@ -86,8 +86,9 @@ public class AccountUpdateOptions : BaseOptions, IHasMetadata /// Set of key-value pairs that you can attach to an object. This can be useful for storing /// additional information about the object in a structured format. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] [STJS.JsonConverter(typeof(STJNullPreservingDictionaryConverter))] public Dictionary Metadata { diff --git a/src/Stripe.net/Services/V2/Core/Accounts/PersonTokens/PersonTokenCreateOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/PersonTokens/PersonTokenCreateOptions.cs index 738ee15364..052316e273 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/PersonTokens/PersonTokenCreateOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/PersonTokens/PersonTokenCreateOptions.cs @@ -86,8 +86,9 @@ public class PersonTokenCreateOptions : BaseOptions, IHasMetadata /// Set of key-value pairs that you can attach to an object. This can be useful for storing /// additional information about the object in a structured format. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] [STJS.JsonConverter(typeof(STJNullPreservingDictionaryConverter))] public Dictionary Metadata { diff --git a/src/Stripe.net/Services/V2/Core/Accounts/Persons/PersonUpdateOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/Persons/PersonUpdateOptions.cs index 8ab6508406..49fda9b939 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/Persons/PersonUpdateOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/Persons/PersonUpdateOptions.cs @@ -86,8 +86,9 @@ public class PersonUpdateOptions : BaseOptions, IHasMetadata /// Set of key-value pairs that you can attach to an object. This can be useful for storing /// additional information about the object in a structured format. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] [STJS.JsonConverter(typeof(STJNullPreservingDictionaryConverter))] public Dictionary Metadata { diff --git a/src/Stripe.net/Services/V2/Core/EventDestinations/EventDestinationUpdateOptions.cs b/src/Stripe.net/Services/V2/Core/EventDestinations/EventDestinationUpdateOptions.cs index b7e44f2ee0..486618e986 100644 --- a/src/Stripe.net/Services/V2/Core/EventDestinations/EventDestinationUpdateOptions.cs +++ b/src/Stripe.net/Services/V2/Core/EventDestinations/EventDestinationUpdateOptions.cs @@ -36,8 +36,9 @@ public class EventDestinationUpdateOptions : BaseOptions, IHasMetadata /// /// Metadata. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] [STJS.JsonConverter(typeof(STJNullPreservingDictionaryConverter))] public Dictionary Metadata { diff --git a/src/Stripe.net/Services/WebhookEndpoints/WebhookEndpointCreateOptions.cs b/src/Stripe.net/Services/WebhookEndpoints/WebhookEndpointCreateOptions.cs index 0c2c9bd2d8..522d0a5a8a 100644 --- a/src/Stripe.net/Services/WebhookEndpoints/WebhookEndpointCreateOptions.cs +++ b/src/Stripe.net/Services/WebhookEndpoints/WebhookEndpointCreateOptions.cs @@ -64,8 +64,9 @@ public class WebhookEndpointCreateOptions : BaseOptions, IHasMetadata /// /// An optional description of what the webhook is used for. /// - [JsonProperty("description")] + [JsonProperty("description", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("description")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string Description { get => this.description; @@ -221,8 +222,9 @@ public string Description /// object in a structured format. Individual keys can be unset by posting an empty value to /// them. All keys can be unset by posting an empty value to metadata. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary Metadata { get => this.metadata; diff --git a/src/Stripe.net/Services/WebhookEndpoints/WebhookEndpointUpdateOptions.cs b/src/Stripe.net/Services/WebhookEndpoints/WebhookEndpointUpdateOptions.cs index f349a60706..8c9fa711c0 100644 --- a/src/Stripe.net/Services/WebhookEndpoints/WebhookEndpointUpdateOptions.cs +++ b/src/Stripe.net/Services/WebhookEndpoints/WebhookEndpointUpdateOptions.cs @@ -15,8 +15,9 @@ public class WebhookEndpointUpdateOptions : BaseOptions, IHasMetadata /// /// An optional description of what the webhook is used for. /// - [JsonProperty("description")] + [JsonProperty("description", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("description")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string Description { get => this.description; @@ -179,8 +180,9 @@ public string Description /// object in a structured format. Individual keys can be unset by posting an empty value to /// them. All keys can be unset by posting an empty value to metadata. /// - [JsonProperty("metadata")] + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Dictionary Metadata { get => this.metadata; diff --git a/src/StripeTests/Infrastructure/SetTrackingTest.cs b/src/StripeTests/Infrastructure/SetTrackingTest.cs index 0118df37e2..b8463cd60d 100644 --- a/src/StripeTests/Infrastructure/SetTrackingTest.cs +++ b/src/StripeTests/Infrastructure/SetTrackingTest.cs @@ -1,6 +1,8 @@ namespace StripeTests { using System.Collections.Generic; + using System.Text.Json; + using Newtonsoft.Json; using Stripe; using Stripe.Infrastructure.FormEncoding; using StripeTests.Infrastructure.TestData; @@ -159,5 +161,82 @@ public async void V2JsonEncoding_SetValueThenNull_SendsNull() .ReadAsStringAsync(); Assert.Equal("{\"emptyable_string\":null}", result); } + + // Newtonsoft round-trip: unset emptyable properties stay unset + // This is the scenario from stripe/stripe-dotnet#3364 — a user + // serializes Options via AWS Lambda (Newtonsoft), and the receiving + // service deserializes and sends to the API. + // Newtonsoft serialization: unset emptyable properties are omitted + // This is the core fix for stripe/stripe-dotnet#3364 — third-party + // serializers now skip null emptyable properties instead of writing + // "mandate_data": null. + [Fact] + public void NewtonsoftSerialization_UnsetEmptyable_Omitted() + { + var options = new TestOptions + { + String = "hello", + }; + + var json = JsonConvert.SerializeObject(options); + Assert.DoesNotContain("emptyable_string", json); + Assert.DoesNotContain("emptyable_nested", json); + Assert.Contains("\"string\":\"hello\"", json); + } + + // Newtonsoft serialization: explicit null is also omitted (known limitation) + // Third-party serializers cannot distinguish "set to null" from "unset" + // because the NullValueHandling.Ignore attribute skips all nulls. + [Fact] + public void NewtonsoftSerialization_ExplicitNull_AlsoOmitted() + { + var options = new TestOptions(); + options.EmptyableString = null; + + var json = JsonConvert.SerializeObject(options); + Assert.DoesNotContain("emptyable_string", json); + } + + // Our STJ round-trip: explicit null survives because our converter + // checks IsPropertySet and force-writes null. + [Fact] + public void StjRoundTrip_ExplicitNull_IntentPreserved() + { + var options = new TestOptions(); + options.EmptyableString = null; + + var stjOptions = StripeConfiguration.SerializerOptions; + var json = System.Text.Json.JsonSerializer.Serialize(options, stjOptions); + Assert.Contains("\"emptyable_string\":null", json); + + var deserialized = System.Text.Json.JsonSerializer.Deserialize( + json, stjOptions); + + var result = ContentEncoder.CreateQueryString(deserialized); + Assert.Equal("emptyable_string=", result); + } + + // Our STJ round-trip: unset emptyable properties stay unset + [Fact] + public void StjRoundTrip_UnsetEmptyable_StaysUnset() + { + var options = new TestOptions + { + String = "hello", + }; + + var stjOptions = StripeConfiguration.SerializerOptions; + var json = System.Text.Json.JsonSerializer.Serialize(options, stjOptions); + Assert.DoesNotContain("emptyable_string", json); + Assert.DoesNotContain("emptyable_nested", json); + + var deserialized = System.Text.Json.JsonSerializer.Deserialize( + json, stjOptions); + + var result = ContentEncoder.CreateQueryString(deserialized); + Assert.Contains("string=hello", result); + Assert.DoesNotContain("emptyable_string", result); + Assert.DoesNotContain("emptyable_nested", result); + } } } diff --git a/src/StripeTests/Infrastructure/TestData/TestOptions.cs b/src/StripeTests/Infrastructure/TestData/TestOptions.cs index 8eb9d64995..f84bac450e 100644 --- a/src/StripeTests/Infrastructure/TestData/TestOptions.cs +++ b/src/StripeTests/Infrastructure/TestData/TestOptions.cs @@ -67,8 +67,9 @@ public class TestOptions : BaseOptions [STJS.JsonPropertyName("string_enum")] public TestStringEnum StringEnum { get; set; } - [JsonProperty("emptyable_string")] + [JsonProperty("emptyable_string", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("emptyable_string")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public string EmptyableString { get => this.emptyableString; @@ -79,8 +80,9 @@ public string EmptyableString } } - [JsonProperty("emptyable_nested")] + [JsonProperty("emptyable_nested", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("emptyable_nested")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] public Nested EmptyableNested { get => this.emptyableNested; diff --git a/src/StripeTests/Services/GeneratedExamplesTest.cs b/src/StripeTests/Services/GeneratedExamplesTest.cs index 668114649c..04ed738ec9 100644 --- a/src/StripeTests/Services/GeneratedExamplesTest.cs +++ b/src/StripeTests/Services/GeneratedExamplesTest.cs @@ -723,7 +723,7 @@ public void TestCoreEventsGet() HttpMethod.Get, "/v2/core/events/ll_123", HttpStatusCode.OK, - "{\"changes\":{\"int_key\":123,\"string_key\":\"value\",\"boolean_key\":true,\"object_key\":{\"object_int_key\":123,\"object_string_key\":\"value\",\"object_boolean_key\":true},\"array_key\":[1,2,3]},\"context\":\"context\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"object\":\"v2.core.event\",\"reason\":{\"type\":\"request\",\"request\":{\"id\":\"obj_123\",\"idempotency_key\":\"idempotency_key\"}},\"type\":\"type\"}"); + "{\"object\":\"v2.core.event\",\"changes\":{\"int_key\":123,\"string_key\":\"value\",\"boolean_key\":true,\"object_key\":{\"object_int_key\":123,\"object_string_key\":\"value\",\"object_boolean_key\":true},\"array_key\":[1,2,3]},\"context\":\"context\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"reason\":{\"request\":{\"id\":\"obj_123\",\"idempotency_key\":\"idempotency_key\"},\"type\":\"request\"},\"type\":\"type\"}"); var client = new StripeClient(this.Requestor); var service = client.V2.Core.Events; Stripe.V2.Core.Event result = service.Get("ll_123"); @@ -6162,7 +6162,7 @@ public void TestV2BillingMeterEventPost() HttpMethod.Post, "/v2/billing/meter_events", (HttpStatusCode)200, - "{\"created\":\"1970-01-12T21:42:34.472Z\",\"event_name\":\"event_name\",\"identifier\":\"identifier\",\"object\":\"v2.billing.meter_event\",\"payload\":{\"key\":\"payload\"},\"timestamp\":\"1970-01-01T15:18:46.294Z\",\"livemode\":true}"); + "{\"object\":\"v2.billing.meter_event\",\"created\":\"1970-01-12T21:42:34.472Z\",\"event_name\":\"event_name\",\"identifier\":\"identifier\",\"livemode\":true,\"payload\":{\"key\":\"payload\"},\"timestamp\":\"1970-01-01T15:18:46.294Z\"}"); var options = new Stripe.V2.Billing.MeterEventCreateOptions { EventName = "event_name", @@ -6184,7 +6184,7 @@ public void TestV2BillingMeterEventAdjustmentPost() HttpMethod.Post, "/v2/billing/meter_event_adjustments", (HttpStatusCode)200, - "{\"cancel\":{\"identifier\":\"identifier\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"event_name\":\"event_name\",\"id\":\"obj_123\",\"object\":\"v2.billing.meter_event_adjustment\",\"status\":\"complete\",\"type\":\"cancel\",\"livemode\":true}"); + "{\"object\":\"v2.billing.meter_event_adjustment\",\"cancel\":{\"identifier\":\"identifier\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"event_name\":\"event_name\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"complete\",\"type\":\"cancel\"}"); var options = new Stripe.V2.Billing.MeterEventAdjustmentCreateOptions { Cancel = new Stripe.V2.Billing.MeterEventAdjustmentCreateCancelOptions @@ -6210,7 +6210,7 @@ public void TestV2BillingMeterEventSessionPost() HttpMethod.Post, "/v2/billing/meter_event_session", (HttpStatusCode)200, - "{\"authentication_token\":\"authentication_token\",\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"object\":\"v2.billing.meter_event_session\",\"livemode\":true}"); + "{\"object\":\"v2.billing.meter_event_session\",\"authentication_token\":\"authentication_token\",\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"livemode\":true}"); var options = new Stripe.V2.Billing.MeterEventSessionCreateOptions(); var client = new StripeClient(this.Requestor); var service = client.V2.Billing.MeterEventSession; @@ -6262,7 +6262,7 @@ public void TestV2CoreAccountGet() HttpMethod.Get, "/v2/core/accounts", (HttpStatusCode)200, - "{\"data\":[{\"applied_configurations\":[\"recipient\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.core.account\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"object\":\"v2.core.account\",\"applied_configurations\":[\"recipient\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); var service = client.V2.Core.Accounts; Stripe.V2.StripeList accounts = service @@ -6277,7 +6277,7 @@ public void TestV2CoreAccountPost() HttpMethod.Post, "/v2/core/accounts", (HttpStatusCode)200, - "{\"applied_configurations\":[\"recipient\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.core.account\",\"livemode\":true}"); + "{\"object\":\"v2.core.account\",\"applied_configurations\":[\"recipient\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true}"); var options = new Stripe.V2.Core.AccountCreateOptions(); var client = new StripeClient(this.Requestor); var service = client.V2.Core.Accounts; @@ -6292,7 +6292,7 @@ public void TestV2CoreAccountGet2() HttpMethod.Get, "/v2/core/accounts/id_123", (HttpStatusCode)200, - "{\"applied_configurations\":[\"recipient\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.core.account\",\"livemode\":true}"); + "{\"object\":\"v2.core.account\",\"applied_configurations\":[\"recipient\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true}"); var client = new StripeClient(this.Requestor); var service = client.V2.Core.Accounts; Stripe.V2.Core.Account account = service.Get("id_123"); @@ -6306,7 +6306,7 @@ public void TestV2CoreAccountPost2() HttpMethod.Post, "/v2/core/accounts/id_123", (HttpStatusCode)200, - "{\"applied_configurations\":[\"recipient\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.core.account\",\"livemode\":true}"); + "{\"object\":\"v2.core.account\",\"applied_configurations\":[\"recipient\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true}"); var options = new Stripe.V2.Core.AccountUpdateOptions(); var client = new StripeClient(this.Requestor); var service = client.V2.Core.Accounts; @@ -6321,7 +6321,7 @@ public void TestV2CoreAccountPost3() HttpMethod.Post, "/v2/core/accounts/id_123/close", (HttpStatusCode)200, - "{\"applied_configurations\":[\"recipient\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.core.account\",\"livemode\":true}"); + "{\"object\":\"v2.core.account\",\"applied_configurations\":[\"recipient\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true}"); var client = new StripeClient(this.Requestor); var service = client.V2.Core.Accounts; Stripe.V2.Core.Account account = service.Close("id_123"); @@ -6337,7 +6337,7 @@ public void TestV2CoreAccountsPersonGet() HttpMethod.Get, "/v2/core/accounts/account_id_123/persons", (HttpStatusCode)200, - "{\"data\":[{\"account\":\"account\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.core.account_person\",\"updated\":\"1970-01-03T17:07:10.277Z\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"object\":\"v2.core.account_person\",\"account\":\"account\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"updated\":\"1970-01-03T17:07:10.277Z\"}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); var service = client.V2.Core.Accounts.Persons; Stripe.V2.StripeList accountPersons = service @@ -6354,7 +6354,7 @@ public void TestV2CoreAccountsPersonPost() HttpMethod.Post, "/v2/core/accounts/account_id_123/persons", (HttpStatusCode)200, - "{\"account\":\"account\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.core.account_person\",\"updated\":\"1970-01-03T17:07:10.277Z\",\"livemode\":true}"); + "{\"object\":\"v2.core.account_person\",\"account\":\"account\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"updated\":\"1970-01-03T17:07:10.277Z\"}"); var options = new Stripe.V2.Core.Accounts.PersonCreateOptions(); var client = new StripeClient(this.Requestor); var service = client.V2.Core.Accounts.Persons; @@ -6391,7 +6391,7 @@ public void TestV2CoreAccountsPersonGet2() HttpMethod.Get, "/v2/core/accounts/account_id_123/persons/id_123", (HttpStatusCode)200, - "{\"account\":\"account\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.core.account_person\",\"updated\":\"1970-01-03T17:07:10.277Z\",\"livemode\":true}"); + "{\"object\":\"v2.core.account_person\",\"account\":\"account\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"updated\":\"1970-01-03T17:07:10.277Z\"}"); var client = new StripeClient(this.Requestor); var service = client.V2.Core.Accounts.Persons; Stripe.V2.Core.AccountPerson accountPerson = service.Get( @@ -6409,7 +6409,7 @@ public void TestV2CoreAccountsPersonPost2() HttpMethod.Post, "/v2/core/accounts/account_id_123/persons/id_123", (HttpStatusCode)200, - "{\"account\":\"account\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.core.account_person\",\"updated\":\"1970-01-03T17:07:10.277Z\",\"livemode\":true}"); + "{\"object\":\"v2.core.account_person\",\"account\":\"account\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"updated\":\"1970-01-03T17:07:10.277Z\"}"); var options = new Stripe.V2.Core.Accounts.PersonUpdateOptions(); var client = new StripeClient(this.Requestor); var service = client.V2.Core.Accounts.Persons; @@ -6429,7 +6429,7 @@ public void TestV2CoreAccountsPersonTokenPost() HttpMethod.Post, "/v2/core/accounts/account_id_123/person_tokens", (HttpStatusCode)200, - "{\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"livemode\":true,\"object\":\"v2.core.account_person_token\",\"used\":true}"); + "{\"object\":\"v2.core.account_person_token\",\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"livemode\":true,\"used\":true}"); var options = new Stripe.V2.Core.Accounts.PersonTokenCreateOptions(); var client = new StripeClient(this.Requestor); var service = client.V2.Core.Accounts.PersonTokens; @@ -6447,7 +6447,7 @@ public void TestV2CoreAccountsPersonTokenGet() HttpMethod.Get, "/v2/core/accounts/account_id_123/person_tokens/id_123", (HttpStatusCode)200, - "{\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"livemode\":true,\"object\":\"v2.core.account_person_token\",\"used\":true}"); + "{\"object\":\"v2.core.account_person_token\",\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"livemode\":true,\"used\":true}"); var client = new StripeClient(this.Requestor); var service = client.V2.Core.Accounts.PersonTokens; Stripe.V2.Core.AccountPersonToken accountPersonToken = service.Get( @@ -6465,13 +6465,12 @@ public void TestV2CoreAccountLinkPost() HttpMethod.Post, "/v2/core/account_links", (HttpStatusCode)200, - "{\"account\":\"account\",\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"object\":\"v2.core.account_link\",\"url\":\"url\",\"use_case\":{\"type\":\"account_onboarding\"},\"livemode\":true}"); + "{\"object\":\"v2.core.account_link\",\"account\":\"account\",\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"livemode\":true,\"url\":\"url\",\"use_case\":{\"type\":\"account_onboarding\"}}"); var options = new Stripe.V2.Core.AccountLinkCreateOptions { Account = "account", UseCase = new Stripe.V2.Core.AccountLinkCreateUseCaseOptions { - Type = "account_onboarding", AccountOnboarding = new Stripe.V2.Core.AccountLinkCreateUseCaseAccountOnboardingOptions { CollectionOptions = new Stripe.V2.Core.AccountLinkCreateUseCaseAccountOnboardingCollectionOptionsOptions @@ -6494,6 +6493,7 @@ public void TestV2CoreAccountLinkPost() RefreshUrl = "refresh_url", ReturnUrl = "return_url", }, + Type = "account_onboarding", }, }; var client = new StripeClient(this.Requestor); @@ -6509,7 +6509,7 @@ public void TestV2CoreAccountTokenPost() HttpMethod.Post, "/v2/core/account_tokens", (HttpStatusCode)200, - "{\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"livemode\":true,\"object\":\"v2.core.account_token\",\"used\":true}"); + "{\"object\":\"v2.core.account_token\",\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"livemode\":true,\"used\":true}"); var options = new Stripe.V2.Core.AccountTokenCreateOptions(); var client = new StripeClient(this.Requestor); var service = client.V2.Core.AccountTokens; @@ -6524,7 +6524,7 @@ public void TestV2CoreAccountTokenGet() HttpMethod.Get, "/v2/core/account_tokens/id_123", (HttpStatusCode)200, - "{\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"livemode\":true,\"object\":\"v2.core.account_token\",\"used\":true}"); + "{\"object\":\"v2.core.account_token\",\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"livemode\":true,\"used\":true}"); var client = new StripeClient(this.Requestor); var service = client.V2.Core.AccountTokens; Stripe.V2.Core.AccountToken accountToken = service.Get("id_123"); @@ -6540,7 +6540,7 @@ public void TestV2CoreEventGet() HttpMethod.Get, "/v2/core/events", (HttpStatusCode)200, - "{\"data\":[{\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"object\":\"v2.core.event\",\"type\":\"type\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"object\":\"v2.core.event\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"type\":\"type\"}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); var service = client.V2.Core.Events; Stripe.V2.StripeList events = service.List(); @@ -6554,7 +6554,7 @@ public void TestV2CoreEventGet2() HttpMethod.Get, "/v2/core/events/id_123", (HttpStatusCode)200, - "{\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"object\":\"v2.core.event\",\"type\":\"type\"}"); + "{\"object\":\"v2.core.event\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"type\":\"type\"}"); var client = new StripeClient(this.Requestor); var service = client.V2.Core.Events; Stripe.V2.Core.Event result = service.Get("id_123"); @@ -6568,7 +6568,7 @@ public void TestV2CoreEventDestinationGet() HttpMethod.Get, "/v2/core/event_destinations", (HttpStatusCode)200, - "{\"data\":[{\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"id\":\"obj_123\",\"name\":\"name\",\"object\":\"v2.core.event_destination\",\"status\":\"disabled\",\"type\":\"amazon_eventbridge\",\"updated\":\"1970-01-03T17:07:10.277Z\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"object\":\"v2.core.event_destination\",\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"id\":\"obj_123\",\"livemode\":true,\"name\":\"name\",\"status\":\"disabled\",\"type\":\"amazon_eventbridge\",\"updated\":\"1970-01-03T17:07:10.277Z\"}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); var service = client.V2.Core.EventDestinations; Stripe.V2.StripeList eventDestinations = service @@ -6583,7 +6583,7 @@ public void TestV2CoreEventDestinationPost() HttpMethod.Post, "/v2/core/event_destinations", (HttpStatusCode)200, - "{\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"id\":\"obj_123\",\"name\":\"name\",\"object\":\"v2.core.event_destination\",\"status\":\"disabled\",\"type\":\"amazon_eventbridge\",\"updated\":\"1970-01-03T17:07:10.277Z\",\"livemode\":true}"); + "{\"object\":\"v2.core.event_destination\",\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"id\":\"obj_123\",\"livemode\":true,\"name\":\"name\",\"status\":\"disabled\",\"type\":\"amazon_eventbridge\",\"updated\":\"1970-01-03T17:07:10.277Z\"}"); var options = new Stripe.V2.Core.EventDestinationCreateOptions { EnabledEvents = new List { "enabled_events" }, @@ -6621,7 +6621,7 @@ public void TestV2CoreEventDestinationGet2() HttpMethod.Get, "/v2/core/event_destinations/id_123", (HttpStatusCode)200, - "{\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"id\":\"obj_123\",\"name\":\"name\",\"object\":\"v2.core.event_destination\",\"status\":\"disabled\",\"type\":\"amazon_eventbridge\",\"updated\":\"1970-01-03T17:07:10.277Z\",\"livemode\":true}"); + "{\"object\":\"v2.core.event_destination\",\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"id\":\"obj_123\",\"livemode\":true,\"name\":\"name\",\"status\":\"disabled\",\"type\":\"amazon_eventbridge\",\"updated\":\"1970-01-03T17:07:10.277Z\"}"); var client = new StripeClient(this.Requestor); var service = client.V2.Core.EventDestinations; Stripe.V2.Core.EventDestination eventDestination = service.Get( @@ -6638,7 +6638,7 @@ public void TestV2CoreEventDestinationPost2() HttpMethod.Post, "/v2/core/event_destinations/id_123", (HttpStatusCode)200, - "{\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"id\":\"obj_123\",\"name\":\"name\",\"object\":\"v2.core.event_destination\",\"status\":\"disabled\",\"type\":\"amazon_eventbridge\",\"updated\":\"1970-01-03T17:07:10.277Z\",\"livemode\":true}"); + "{\"object\":\"v2.core.event_destination\",\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"id\":\"obj_123\",\"livemode\":true,\"name\":\"name\",\"status\":\"disabled\",\"type\":\"amazon_eventbridge\",\"updated\":\"1970-01-03T17:07:10.277Z\"}"); var options = new Stripe.V2.Core.EventDestinationUpdateOptions(); var client = new StripeClient(this.Requestor); var service = client.V2.Core.EventDestinations; @@ -6657,7 +6657,7 @@ public void TestV2CoreEventDestinationPost3() HttpMethod.Post, "/v2/core/event_destinations/id_123/disable", (HttpStatusCode)200, - "{\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"id\":\"obj_123\",\"name\":\"name\",\"object\":\"v2.core.event_destination\",\"status\":\"disabled\",\"type\":\"amazon_eventbridge\",\"updated\":\"1970-01-03T17:07:10.277Z\",\"livemode\":true}"); + "{\"object\":\"v2.core.event_destination\",\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"id\":\"obj_123\",\"livemode\":true,\"name\":\"name\",\"status\":\"disabled\",\"type\":\"amazon_eventbridge\",\"updated\":\"1970-01-03T17:07:10.277Z\"}"); var client = new StripeClient(this.Requestor); var service = client.V2.Core.EventDestinations; Stripe.V2.Core.EventDestination eventDestination = service.Disable( @@ -6674,7 +6674,7 @@ public void TestV2CoreEventDestinationPost4() HttpMethod.Post, "/v2/core/event_destinations/id_123/enable", (HttpStatusCode)200, - "{\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"id\":\"obj_123\",\"name\":\"name\",\"object\":\"v2.core.event_destination\",\"status\":\"disabled\",\"type\":\"amazon_eventbridge\",\"updated\":\"1970-01-03T17:07:10.277Z\",\"livemode\":true}"); + "{\"object\":\"v2.core.event_destination\",\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"id\":\"obj_123\",\"livemode\":true,\"name\":\"name\",\"status\":\"disabled\",\"type\":\"amazon_eventbridge\",\"updated\":\"1970-01-03T17:07:10.277Z\"}"); var client = new StripeClient(this.Requestor); var service = client.V2.Core.EventDestinations; Stripe.V2.Core.EventDestination eventDestination = service.Enable( @@ -6691,7 +6691,7 @@ public void TestV2CoreEventDestinationPost5() HttpMethod.Post, "/v2/core/event_destinations/id_123/ping", (HttpStatusCode)200, - "{\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"object\":\"v2.core.event\",\"type\":\"type\"}"); + "{\"object\":\"v2.core.event\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"type\":\"type\"}"); var client = new StripeClient(this.Requestor); var service = client.V2.Core.EventDestinations; Stripe.V2.Core.Event result = service.Ping("id_123");