Skip to content

Commit 7e573eb

Browse files
committed
[MON-2250] remove deprecated fields
1 parent 8035666 commit 7e573eb

6 files changed

Lines changed: 5 additions & 36 deletions

File tree

lib/stripe/core_resources/customer.ex

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,7 @@ defmodule Stripe.Customer do
3737
subscriptions: Stripe.List.t(Stripe.Subscription.t()),
3838
tax: Stripe.Types.tax() | nil,
3939
tax_exempt: binary | nil,
40-
tax_ids: term,
41-
tax_info: Stripe.Types.tax_info() | nil,
42-
tax_info_verification: Stripe.Types.tax_info_verification() | nil
40+
tax_ids: term
4341
}
4442

4543
defstruct [
@@ -64,9 +62,7 @@ defmodule Stripe.Customer do
6462
:subscriptions,
6563
:tax,
6664
:tax_exempt,
67-
:tax_ids,
68-
:tax_info,
69-
:tax_info_verification
65+
:tax_ids
7066
]
7167

7268
@plural_endpoint "customers"
@@ -87,8 +83,7 @@ defmodule Stripe.Customer do
8783
optional(:preferred_locales) => list(binary),
8884
optional(:shipping) => Stripe.Types.shipping(),
8985
optional(:source) => Stripe.Source.t(),
90-
optional(:tax_exempt) => :exempt | :none | :reverse,
91-
optional(:tax_info) => Stripe.Types.tax_info()
86+
optional(:tax_exempt) => :exempt | :none | :reverse
9287
}
9388
| %{}
9489
def create(params, opts \\ []) do
@@ -127,8 +122,7 @@ defmodule Stripe.Customer do
127122
optional(:preferred_locales) => list(binary),
128123
optional(:shipping) => Stripe.Types.shipping(),
129124
optional(:source) => Stripe.Source.t(),
130-
optional(:tax_exempt) => :exempt | :none | :reverse,
131-
optional(:tax_info) => Stripe.Types.tax_info()
125+
optional(:tax_exempt) => :exempt | :none | :reverse
132126
}
133127
| %{}
134128
def update(id, params, opts \\ []) do

lib/stripe/payment_methods/card.ex

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ defmodule Stripe.Card do
4949
last4: String.t(),
5050
metadata: Stripe.Types.metadata(),
5151
name: String.t() | nil,
52-
recipient: Stripe.id() | Stripe.Recipient.t() | nil,
5352
tokenization_method: String.t() | nil
5453
}
5554

@@ -81,7 +80,6 @@ defmodule Stripe.Card do
8180
:last4,
8281
:metadata,
8382
:name,
84-
:recipient,
8583
:tokenization_method
8684
]
8785

lib/stripe/subscriptions/plan.ex

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ defmodule Stripe.Plan do
5858
interval_count: pos_integer,
5959
livemode: boolean,
6060
metadata: Stripe.Types.metadata(),
61-
name: String.t(),
6261
nickname: String.t() | nil,
6362
product: Stripe.id() | Stripe.Product.t(),
6463
tiers: Stripe.List.t(map) | nil,
@@ -82,7 +81,6 @@ defmodule Stripe.Plan do
8281
:interval_count,
8382
:livemode,
8483
:metadata,
85-
:name,
8684
:nickname,
8785
:product,
8886
:tiers,

lib/stripe/subscriptions/subscription.ex

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,7 @@ defmodule Stripe.Subscription do
3636
latest_invoice: Stripe.Invoice.t() | nil,
3737
livemode: boolean,
3838
metadata: Stripe.Types.metadata(),
39-
plan: Stripe.Plan.t() | nil,
40-
quantity: integer | nil,
41-
start: Stripe.timestamp(),
4239
status: String.t(),
43-
tax_percent: float | nil,
4440
trial_end: Stripe.timestamp() | nil,
4541
trial_start: Stripe.timestamp() | nil,
4642
trial_settings: map
@@ -67,11 +63,7 @@ defmodule Stripe.Subscription do
6763
:latest_invoice,
6864
:livemode,
6965
:metadata,
70-
:plan,
71-
:quantity,
72-
:start,
7366
:status,
74-
:tax_percent,
7567
:trial_end,
7668
:trial_start,
7769
:trial_settings
@@ -98,7 +90,6 @@ defmodule Stripe.Subscription do
9890
],
9991
optional(:metadata) => Stripe.Types.metadata(),
10092
optional(:prorate) => boolean,
101-
optional(:tax_percent) => float,
10293
optional(:trial_end) => Stripe.timestamp(),
10394
optional(:trial_from_plan) => boolean,
10495
optional(:trial_period_days) => non_neg_integer
@@ -145,7 +136,6 @@ defmodule Stripe.Subscription do
145136
optional(:metadata) => Stripe.Types.metadata(),
146137
optional(:prorate) => boolean,
147138
optional(:proration_date) => Stripe.timestamp(),
148-
optional(:tax_percent) => float,
149139
optional(:trial_end) => Stripe.timestamp(),
150140
optional(:trial_from_plan) => boolean
151141
}

lib/stripe/types.ex

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,6 @@ defmodule Stripe.Types do
4444
location: location()
4545
}
4646

47-
@type tax_info :: %{
48-
type: String.t(),
49-
tax_id: String.t() | nil,
50-
}
51-
52-
@type tax_info_verification :: %{
53-
status: String.t() | nil,
54-
verified_name: String.t() | nil,
55-
}
56-
5747
@type transfer_schedule :: %{
5848
delay_days: non_neg_integer,
5949
interval: String.t(),

test/stripe/converter_test.exs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ defmodule Stripe.ConverterTest do
3434
has_more: false,
3535
total_count: 0,
3636
url: "/v1/customers/cus_9ryX7lUQ4Dcpf7/subscriptions"
37-
},
38-
tax_info: nil
37+
}
3938
},
4039
previous_attributes: %{
4140
description: "testcustomer",

0 commit comments

Comments
 (0)