Skip to content

Commit

Permalink
Add deleted property to resources that can be deleted (#419)
Browse files Browse the repository at this point in the history
  • Loading branch information
snewcomer authored Oct 19, 2018
1 parent c15350a commit 9342077
Show file tree
Hide file tree
Showing 11 changed files with 41 additions and 19 deletions.
2 changes: 2 additions & 0 deletions lib/stripe/connect/account.ex
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ defmodule Stripe.Account do
business_name_kanji: String.t() | nil,
business_tax_id_provided: boolean,
business_vat_id_provided: boolean,
deleted: boolean | nil,
dob: legal_entity_dob,
first_name: String.t() | nil,
first_name_kana: String.t() | nil,
Expand Down Expand Up @@ -146,6 +147,7 @@ defmodule Stripe.Account do
:debit_negative_balances,
:decline_charge_on,
:default_currency,
:deleted,
:details_submitted,
:display_name,
:email,
Expand Down
2 changes: 2 additions & 0 deletions lib/stripe/core_resources/customer.ex
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ defmodule Stripe.Customer do
created: Stripe.timestamp(),
currency: String.t() | nil,
default_source: Stripe.id() | Stripe.Source.t() | nil,
deleted: boolean | nil,
delinquent: boolean | nil,
description: String.t() | nil,
discount: Stripe.Discount.t() | nil,
Expand All @@ -43,6 +44,7 @@ defmodule Stripe.Customer do
:created,
:currency,
:default_source,
:deleted,
:delinquent,
:description,
:discount,
Expand Down
2 changes: 2 additions & 0 deletions lib/stripe/core_resources/payout.ex
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ defmodule Stripe.Payout do
balance_transaction: Stripe.id() | Stripe.BalanceTransaction.t() | nil,
created: Stripe.timestamp(),
currency: String.t(),
deleted: boolean | nil,
description: String.t() | nil,
destination: Stripe.id() | Stripe.Card.t() | Stripe.BankAccount.t() | String.t() | nil,
failure_balance_transaction: Stripe.id() | Stripe.BalanceTransaction.t() | nil,
Expand All @@ -40,6 +41,7 @@ defmodule Stripe.Payout do
:balance_transaction,
:created,
:currency,
:deleted,
:description,
:destination,
:failure_balance_transaction,
Expand Down
2 changes: 2 additions & 0 deletions lib/stripe/payment_methods/bank_account.ex
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ defmodule Stripe.BankAccount do
currency: String.t(),
customer: Stripe.id() | Stripe.Customer.t() | nil,
default_for_currency: boolean | nil,
deleted: boolean | nil,
fingerprint: String.t() | nil,
last4: String.t(),
metadata: Stripe.Types.metadata() | nil,
Expand All @@ -37,6 +38,7 @@ defmodule Stripe.BankAccount do
:currency,
:customer,
:default_for_currency,
:deleted,
:fingerprint,
:last4,
:metadata,
Expand Down
2 changes: 2 additions & 0 deletions lib/stripe/payment_methods/card.ex
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ defmodule Stripe.Card do
customer: Stripe.id() | Stripe.Customer.t() | nil,
cvc_check: String.t() | nil,
default_for_currency: boolean | nil,
deleted: boolean | nil,
dynamic_last4: String.t() | nil,
exp_month: integer,
exp_year: integer,
Expand Down Expand Up @@ -71,6 +72,7 @@ defmodule Stripe.Card do
:customer,
:cvc_check,
:default_for_currency,
:deleted,
:dynamic_last4,
:exp_month,
:exp_year,
Expand Down
2 changes: 2 additions & 0 deletions lib/stripe/relay/product.ex
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ defmodule Stripe.Relay.Product do
caption: String.t(),
created: Stripe.timestamp(),
deactivate_on: [Stripe.id()],
deleted: boolean | nil,
description: String.t(),
images: [String.t()],
livemode: boolean,
Expand Down Expand Up @@ -46,6 +47,7 @@ defmodule Stripe.Relay.Product do
:caption,
:created,
:deactivate_on,
:deleted,
:description,
:images,
:livemode,
Expand Down
2 changes: 2 additions & 0 deletions lib/stripe/subscriptions/coupon.ex
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ defmodule Stripe.Coupon do
amount_off: pos_integer | nil,
created: Stripe.timestamp(),
currency: String.t() | nil,
deleted: boolean | nil,
duration: String.t(),
duration_in_months: pos_integer | nil,
livemode: boolean,
Expand All @@ -40,6 +41,7 @@ defmodule Stripe.Coupon do
:amount_off,
:created,
:currency,
:deleted,
:duration,
:duration_in_months,
:livemode,
Expand Down
2 changes: 2 additions & 0 deletions lib/stripe/subscriptions/discount.ex
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ defmodule Stripe.Discount do
object: String.t(),
coupon: Stripe.Coupon.t(),
customer: Stripe.id() | Stripe.Customer.t() | nil,
deleted: boolean | nil,
end: Stripe.timestamp() | nil,
start: Stripe.timestamp(),
subscription: Stripe.id() | nil
Expand All @@ -20,6 +21,7 @@ defmodule Stripe.Discount do
:object,
:coupon,
:customer,
:deleted,
:end,
:start,
:subscription
Expand Down
2 changes: 2 additions & 0 deletions lib/stripe/subscriptions/plan.ex
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ defmodule Stripe.Plan do
billing_scheme: String.t() | nil,
created: Stripe.timestamp(),
currency: String.t(),
deleted: boolean | nil,
interval: String.t(),
interval_count: pos_integer,
livemode: boolean,
Expand All @@ -76,6 +77,7 @@ defmodule Stripe.Plan do
:billing_scheme,
:created,
:currency,
:deleted,
:interval,
:interval_count,
:livemode,
Expand Down
40 changes: 21 additions & 19 deletions lib/stripe/subscriptions/product.ex
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,26 @@ defmodule Stripe.Product do
import Stripe.Request

@type t :: %__MODULE__{
id: Stripe.id(),
object: String.t(),
active: boolean | nil,
attributes: list | nil,
caption: String.t() | nil,
created: Stripe.timestamp(),
deactivate_on: list,
description: String.t() | nil,
images: list,
livemode: boolean,
metadata: Stripe.Types.metadata(),
name: String.t(),
package_dimensions: map | nil,
shippable: boolean | nil,
statement_descriptor: String.t() | nil,
type: String.t() | nil,
unit_label: String.t() | nil,
updated: Stripe.timestamp(),
url: String.t() | nil
id: Stripe.id(),
object: String.t(),
active: boolean | nil,
attributes: list | nil,
caption: String.t() | nil,
created: Stripe.timestamp(),
deactivate_on: list,
deleted: boolean | nil,
description: String.t() | nil,
images: list,
livemode: boolean,
metadata: Stripe.Types.metadata(),
name: String.t(),
package_dimensions: map | nil,
shippable: boolean | nil,
statement_descriptor: String.t() | nil,
type: String.t() | nil,
unit_label: String.t() | nil,
updated: Stripe.timestamp(),
url: String.t() | nil
}

defstruct [
Expand All @@ -46,6 +47,7 @@ defmodule Stripe.Product do
:caption,
:created,
:deactivate_on,
:deleted,
:description,
:images,
:livemode,
Expand Down
2 changes: 2 additions & 0 deletions lib/stripe/subscriptions/subscription_item.ex
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ defmodule Stripe.SubscriptionItem do
id: Stripe.id(),
object: String.t(),
created: Stripe.timestamp(),
deleted: boolean | nil,
metadata: Stripe.Types.metadata(),
plan: Stripe.Plan.t(),
quantity: non_neg_integer,
Expand All @@ -22,6 +23,7 @@ defmodule Stripe.SubscriptionItem do
:id,
:object,
:created,
:deleted,
:metadata,
:plan,
:quantity,
Expand Down

0 comments on commit 9342077

Please sign in to comment.