mirror of
https://github.com/stripe/stripe-ruby.git
synced 2025-10-08 00:02:46 -04:00
Static methods for delete/list on BankAccount/Card cannot be implemented. Use the onces on Customer instead. (#1420)
This commit is contained in:
parent
f0c40e0f79
commit
fa2baeba7a
@ -64,12 +64,12 @@ module Stripe
|
|||||||
end
|
end
|
||||||
|
|
||||||
def self.delete(id, params = {}, opts = {})
|
def self.delete(id, params = {}, opts = {})
|
||||||
request_stripe_object(
|
raise NotImplementedError,
|
||||||
method: :delete,
|
"Bank accounts cannot be deleted without a customer ID or an " \
|
||||||
path: "#{resource_url}/#{id}",
|
"account ID. Delete a bank account using " \
|
||||||
params: params,
|
"`Customer.delete_source('customer_id', 'bank_account_id')` " \
|
||||||
opts: opts
|
"or `Account.delete_external_account('account_id', " \
|
||||||
)
|
"'bank_account_id')`"
|
||||||
end
|
end
|
||||||
|
|
||||||
def delete(params = {}, opts = {})
|
def delete(params = {}, opts = {})
|
||||||
@ -82,12 +82,11 @@ module Stripe
|
|||||||
end
|
end
|
||||||
|
|
||||||
def self.list(filters = {}, opts = {})
|
def self.list(filters = {}, opts = {})
|
||||||
request_stripe_object(
|
raise NotImplementedError,
|
||||||
method: :delete,
|
"Bank accounts cannot be listed without a customer ID or an " \
|
||||||
path: resource_url.to_s,
|
"account ID. List bank accounts using " \
|
||||||
params: filters,
|
"`Customer.list_sources('customer_id')` " \
|
||||||
opts: opts
|
"or `Account.list_external_accounts('account_id')`"
|
||||||
)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -42,12 +42,11 @@ module Stripe
|
|||||||
end
|
end
|
||||||
|
|
||||||
def self.delete(id, params = {}, opts = {})
|
def self.delete(id, params = {}, opts = {})
|
||||||
request_stripe_object(
|
raise NotImplementedError,
|
||||||
method: :delete,
|
"Card cannot be deleted without a customer ID or an account " \
|
||||||
path: "#{resource_url}/#{id}",
|
"ID. Delete a card using `Customer.delete_source(" \
|
||||||
params: params,
|
"'customer_id', 'card_id')` or " \
|
||||||
opts: opts
|
"`Account.delete_external_account('account_id', 'card_id')`"
|
||||||
)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def delete(params = {}, opts = {})
|
def delete(params = {}, opts = {})
|
||||||
@ -60,12 +59,11 @@ module Stripe
|
|||||||
end
|
end
|
||||||
|
|
||||||
def self.list(filters = {}, opts = {})
|
def self.list(filters = {}, opts = {})
|
||||||
request_stripe_object(
|
raise NotImplementedError,
|
||||||
method: :delete,
|
"Cards cannot be listed without a customer ID or an account " \
|
||||||
path: resource_url.to_s,
|
"ID. List cards using `Customer.list_sources(" \
|
||||||
params: filters,
|
"'customer_id')` or " \
|
||||||
opts: opts
|
"`Account.list_external_accounts('account_id')`"
|
||||||
)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user