Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 4 additions & 10 deletions lib/stripe/core_resources/customer.ex
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,7 @@ defmodule Stripe.Customer do
subscriptions: Stripe.List.t(Stripe.Subscription.t()),
tax: Stripe.Types.tax() | nil,
tax_exempt: binary | nil,
tax_ids: term,
tax_info: Stripe.Types.tax_info() | nil,
tax_info_verification: Stripe.Types.tax_info_verification() | nil
tax_ids: term
}

defstruct [
Expand All @@ -64,9 +62,7 @@ defmodule Stripe.Customer do
:subscriptions,
:tax,
:tax_exempt,
:tax_ids,
:tax_info,
:tax_info_verification
:tax_ids
]

@plural_endpoint "customers"
Expand All @@ -87,8 +83,7 @@ defmodule Stripe.Customer do
optional(:preferred_locales) => list(binary),
optional(:shipping) => Stripe.Types.shipping(),
optional(:source) => Stripe.Source.t(),
optional(:tax_exempt) => :exempt | :none | :reverse,
optional(:tax_info) => Stripe.Types.tax_info()
optional(:tax_exempt) => :exempt | :none | :reverse
}
| %{}
def create(params, opts \\ []) do
Expand Down Expand Up @@ -127,8 +122,7 @@ defmodule Stripe.Customer do
optional(:preferred_locales) => list(binary),
optional(:shipping) => Stripe.Types.shipping(),
optional(:source) => Stripe.Source.t(),
optional(:tax_exempt) => :exempt | :none | :reverse,
optional(:tax_info) => Stripe.Types.tax_info()
optional(:tax_exempt) => :exempt | :none | :reverse
}
| %{}
def update(id, params, opts \\ []) do
Expand Down
2 changes: 0 additions & 2 deletions lib/stripe/payment_methods/card.ex
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ defmodule Stripe.Card do
last4: String.t(),
metadata: Stripe.Types.metadata(),
name: String.t() | nil,
recipient: Stripe.id() | Stripe.Recipient.t() | nil,
tokenization_method: String.t() | nil
}

Expand Down Expand Up @@ -81,7 +80,6 @@ defmodule Stripe.Card do
:last4,
:metadata,
:name,
:recipient,
:tokenization_method
]

Expand Down
2 changes: 0 additions & 2 deletions lib/stripe/subscriptions/plan.ex
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ defmodule Stripe.Plan do
interval_count: pos_integer,
livemode: boolean,
metadata: Stripe.Types.metadata(),
name: String.t(),
nickname: String.t() | nil,
product: Stripe.id() | Stripe.Product.t(),
tiers: Stripe.List.t(map) | nil,
Expand All @@ -82,7 +81,6 @@ defmodule Stripe.Plan do
:interval_count,
:livemode,
:metadata,
:name,
:nickname,
:product,
:tiers,
Expand Down
10 changes: 0 additions & 10 deletions lib/stripe/subscriptions/subscription.ex
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,7 @@ defmodule Stripe.Subscription do
latest_invoice: Stripe.Invoice.t() | nil,
livemode: boolean,
metadata: Stripe.Types.metadata(),
plan: Stripe.Plan.t() | nil,
quantity: integer | nil,
start: Stripe.timestamp(),
status: String.t(),
tax_percent: float | nil,
trial_end: Stripe.timestamp() | nil,
trial_start: Stripe.timestamp() | nil,
trial_settings: map
Expand All @@ -67,11 +63,7 @@ defmodule Stripe.Subscription do
:latest_invoice,
:livemode,
:metadata,
:plan,
:quantity,
:start,
:status,
:tax_percent,
:trial_end,
:trial_start,
:trial_settings
Expand All @@ -98,7 +90,6 @@ defmodule Stripe.Subscription do
],
optional(:metadata) => Stripe.Types.metadata(),
optional(:prorate) => boolean,
optional(:tax_percent) => float,
optional(:trial_end) => Stripe.timestamp(),
optional(:trial_from_plan) => boolean,
optional(:trial_period_days) => non_neg_integer
Expand Down Expand Up @@ -145,7 +136,6 @@ defmodule Stripe.Subscription do
optional(:metadata) => Stripe.Types.metadata(),
optional(:prorate) => boolean,
optional(:proration_date) => Stripe.timestamp(),
optional(:tax_percent) => float,
optional(:trial_end) => Stripe.timestamp(),
optional(:trial_from_plan) => boolean
}
Expand Down
10 changes: 0 additions & 10 deletions lib/stripe/types.ex
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,6 @@ defmodule Stripe.Types do
location: location()
}

@type tax_info :: %{
type: String.t(),
tax_id: String.t() | nil,
}

@type tax_info_verification :: %{
status: String.t() | nil,
verified_name: String.t() | nil,
}

@type transfer_schedule :: %{
delay_days: non_neg_integer,
interval: String.t(),
Expand Down
3 changes: 1 addition & 2 deletions test/stripe/converter_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ defmodule Stripe.ConverterTest do
has_more: false,
total_count: 0,
url: "/v1/customers/cus_9ryX7lUQ4Dcpf7/subscriptions"
},
tax_info: nil
}
},
previous_attributes: %{
description: "testcustomer",
Expand Down