mirror of
https://github.com/stripe/stripe-ruby.git
synced 2025-08-10 00:01:09 -04:00
Compare commits
No commits in common. "37293f6aba196733beac8290147e043439cc6f37" and "a685a13a67e63f7fc4359e550a96ad4cfd451023" have entirely different histories.
37293f6aba
...
a685a13a67
@ -1,9 +1,8 @@
|
|||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
# TODO: (major) Deprecated, Remove along with extends
|
||||||
module Stripe
|
module Stripe
|
||||||
module APIOperations
|
module APIOperations
|
||||||
# The _search method via API Operations is deprecated.
|
|
||||||
# Please use the search method from within the resource instead.
|
|
||||||
module Search
|
module Search
|
||||||
def _search(search_url, filters = {}, opts = {})
|
def _search(search_url, filters = {}, opts = {})
|
||||||
request_stripe_object(
|
request_stripe_object(
|
||||||
@ -13,9 +12,6 @@ module Stripe
|
|||||||
opts: opts
|
opts: opts
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
extend Gem::Deprecate
|
|
||||||
deprecate :_search, "request_stripe_object", 2024, 1
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -11,6 +11,7 @@ module Stripe
|
|||||||
# for a Standard or Express account, some parameters are no longer returned. These are marked as **Custom Only** or **Custom and Express**
|
# for a Standard or Express account, some parameters are no longer returned. These are marked as **Custom Only** or **Custom and Express**
|
||||||
# below. Learn about the differences [between accounts](https://stripe.com/docs/connect/accounts).
|
# below. Learn about the differences [between accounts](https://stripe.com/docs/connect/accounts).
|
||||||
class Account < APIResource
|
class Account < APIResource
|
||||||
|
extend Gem::Deprecate
|
||||||
extend Stripe::APIOperations::Create
|
extend Stripe::APIOperations::Create
|
||||||
include Stripe::APIOperations::Delete
|
include Stripe::APIOperations::Delete
|
||||||
extend Stripe::APIOperations::List
|
extend Stripe::APIOperations::List
|
||||||
|
@ -39,26 +39,6 @@ module Stripe
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
context ".search" do
|
|
||||||
should "warn that ._search is deprecated" do
|
|
||||||
old_stderr = $stderr
|
|
||||||
$stderr = StringIO.new
|
|
||||||
begin
|
|
||||||
stub_request(:post, "#{Stripe.api_base}/v1/customers/search?query=foo:bar")
|
|
||||||
.to_return(body: JSON.generate(object: "customer"))
|
|
||||||
|
|
||||||
client = StripeClient.new
|
|
||||||
client.request { Customer._search("/v1/customers/search", query: "foo:bar") }
|
|
||||||
|
|
||||||
message = "NOTE: Stripe::Customer._search is deprecated; use request_stripe_object " \
|
|
||||||
"instead. It will be removed on or after 2024-01."
|
|
||||||
assert_match Regexp.new(message), $stderr.string
|
|
||||||
ensure
|
|
||||||
$stderr = old_stderr
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
context ".nested_resource_class_methods" do
|
context ".nested_resource_class_methods" do
|
||||||
class MainResource < APIResource # rubocop:todo Lint/ConstantDefinitionInBlock
|
class MainResource < APIResource # rubocop:todo Lint/ConstantDefinitionInBlock
|
||||||
extend Stripe::APIOperations::NestedResource
|
extend Stripe::APIOperations::NestedResource
|
||||||
|
Loading…
x
Reference in New Issue
Block a user