From b1f26ddf8d09fd8fd61da8c1a511dd28b4f1a90b Mon Sep 17 00:00:00 2001 From: Olivier Bellone Date: Mon, 7 Oct 2019 15:22:44 -0700 Subject: [PATCH] Remove more deprecated stuff (#1802) --- src/Stripe.net/Entities/Issuing/Cards/Card.cs | 4 ---- src/Stripe.net/Entities/Plans/PlanTier.cs | 8 -------- .../Entities/Sources/SourceAuBecsDebit.cs | 8 -------- .../Infrastructure/Public/StripeResponse.cs | 20 ------------------- .../Services/_common/RequestOptions.cs | 18 ----------------- src/StripeTests/Entities/Plans/PlanTest.cs | 1 - 6 files changed, 59 deletions(-) diff --git a/src/Stripe.net/Entities/Issuing/Cards/Card.cs b/src/Stripe.net/Entities/Issuing/Cards/Card.cs index da8aa2a81d..0fbe8c47ca 100644 --- a/src/Stripe.net/Entities/Issuing/Cards/Card.cs +++ b/src/Stripe.net/Entities/Issuing/Cards/Card.cs @@ -139,9 +139,5 @@ public Card ReplacementFor /// [JsonProperty("type")] public string Type { get; set; } - - [Obsolete("This property has never been filled and should be ignored.")] - [JsonProperty("billing")] - public Billing Billing { get; set; } } } diff --git a/src/Stripe.net/Entities/Plans/PlanTier.cs b/src/Stripe.net/Entities/Plans/PlanTier.cs index 3e481bb36f..e3db5e81f8 100644 --- a/src/Stripe.net/Entities/Plans/PlanTier.cs +++ b/src/Stripe.net/Entities/Plans/PlanTier.cs @@ -36,13 +36,5 @@ public class PlanTier : StripeEntity /// [JsonProperty("up_to")] public long? UpTo { get; set; } - - [Obsolete("Use UnitAmountDecimal instead")] - [JsonIgnore] - public decimal? UnitAmountDecinal - { - get => this.UnitAmountDecimal; - set => this.UnitAmountDecimal = value; - } } } diff --git a/src/Stripe.net/Entities/Sources/SourceAuBecsDebit.cs b/src/Stripe.net/Entities/Sources/SourceAuBecsDebit.cs index 18cc9fc3b0..e7cb77c0f1 100644 --- a/src/Stripe.net/Entities/Sources/SourceAuBecsDebit.cs +++ b/src/Stripe.net/Entities/Sources/SourceAuBecsDebit.cs @@ -5,20 +5,12 @@ namespace Stripe public class SourceAuBecsDebit : StripeEntity { - [Obsolete("This property is deprecated, Account Number will not be returned from Stripe API.")] - [JsonProperty("account_number")] - public string AccountNumber { get; set; } - [JsonProperty("bsb_number")] public string BsbNumber { get; set; } [JsonProperty("fingerprint")] public string Fingerprint { get; set; } - [Obsolete("This property is deprecated, please use Last4 going forward.")] - [JsonProperty("last3")] - public string Last3 { get; set; } - [JsonProperty("last4")] public string Last4 { get; set; } } diff --git a/src/Stripe.net/Infrastructure/Public/StripeResponse.cs b/src/Stripe.net/Infrastructure/Public/StripeResponse.cs index a43b7c419d..d97d0f4f98 100644 --- a/src/Stripe.net/Infrastructure/Public/StripeResponse.cs +++ b/src/Stripe.net/Infrastructure/Public/StripeResponse.cs @@ -45,26 +45,6 @@ public StripeResponse(HttpStatusCode statusCode, HttpResponseHeaders headers, st /// The ID of the request, as returned by Stripe. public string RequestId => MaybeGetHeader(this.Headers, "Request-Id"); - /// - /// Gets the body of the response. - /// This method is deprecated and will be removed in a future version, please use the - /// property getter instead. - /// - /// The body of the response. - // TODO: remove this in a future a major version - [Obsolete("Use Content instead")] - public string ResponseJson => this.Content; - - /// - /// Gets the date of the request, as returned by Stripe. - /// This method is deprecated and will be removed in a future version, please use the - /// property getter instead. - /// - /// The date of the request, as returned by Stripe. - // TODO: remove this in a future a major version - [Obsolete("Use Date instead")] - public DateTime RequestDate => this.Date?.DateTime ?? default(DateTime); - internal int NumRetries { get; set; } /// Returns a string that represents the . diff --git a/src/Stripe.net/Services/_common/RequestOptions.cs b/src/Stripe.net/Services/_common/RequestOptions.cs index 62337f905e..cb43ad2552 100644 --- a/src/Stripe.net/Services/_common/RequestOptions.cs +++ b/src/Stripe.net/Services/_common/RequestOptions.cs @@ -23,24 +23,6 @@ public class RequestOptions /// public string StripeAccount { get; set; } - /// - /// - /// Get or sets the - /// ID - /// of the connected account to use for the request. - /// - /// - /// This property is deprecated and will be removed in a future version, please use the - /// property accessors instead. - /// - /// - [Obsolete("Use StripeAccount instead.")] - public string StripeConnectAccountId - { - get => this.StripeAccount; - set => this.StripeAccount = value; - } - /// Gets or sets the base URL for the request. /// /// This is an internal property. It is set by services or individual request methods when diff --git a/src/StripeTests/Entities/Plans/PlanTest.cs b/src/StripeTests/Entities/Plans/PlanTest.cs index 34070b9af8..37487e2924 100644 --- a/src/StripeTests/Entities/Plans/PlanTest.cs +++ b/src/StripeTests/Entities/Plans/PlanTest.cs @@ -53,7 +53,6 @@ public void DeserializePlanTier() Assert.NotNull(plan.Id); Assert.Equal("plan", plan.Object); Assert.Equal(199, plan.Tiers[0].UnitAmountDecimal); - Assert.Equal(199, plan.Tiers[0].UnitAmountDecinal); } } }