Module: StripeMock::Compat
- Defined in:
- lib/stripe_mock/compat.rb
Class Method Summary collapse
- .active_client ⇒ Object
- .client ⇒ Object
- .client_instance ⇒ Object
- .method ⇒ Object
- .stripe_gte_13? ⇒ Boolean
Class Method Details
.active_client ⇒ Object
23 24 25 26 27 |
# File 'lib/stripe_mock/compat.rb', line 23 def self.active_client return client.active_client unless stripe_gte_13? client.active_requestor end |
.client ⇒ Object
13 14 15 16 17 |
# File 'lib/stripe_mock/compat.rb', line 13 def self.client return Stripe::StripeClient unless stripe_gte_13? Stripe::APIRequestor end |
.client_instance ⇒ Object
19 20 21 |
# File 'lib/stripe_mock/compat.rb', line 19 def self.client_instance @client ||= client.new end |
.method ⇒ Object
7 8 9 10 11 |
# File 'lib/stripe_mock/compat.rb', line 7 def self.method return :execute_request unless stripe_gte_13? :execute_request_internal end |
.stripe_gte_13? ⇒ Boolean
3 4 5 |
# File 'lib/stripe_mock/compat.rb', line 3 def self.stripe_gte_13? Gem::Version.new(Stripe::VERSION) >= Gem::Version.new('13.0.0') end |