mirror of
https://github.com/stripe/stripe-ruby.git
synced 2025-10-03 00:01:21 -04:00
Codegen for openapi 1707cb8 (#1035)
This commit is contained in:
parent
c6124dbb09
commit
1f8b6bf3e1
@ -94,6 +94,7 @@ module Stripe
|
||||
Terminal::ConnectionToken::OBJECT_NAME => Terminal::ConnectionToken,
|
||||
Terminal::Location::OBJECT_NAME => Terminal::Location,
|
||||
Terminal::Reader::OBJECT_NAME => Terminal::Reader,
|
||||
TestHelpers::TestClock::OBJECT_NAME => TestHelpers::TestClock,
|
||||
ThreeDSecure::OBJECT_NAME => ThreeDSecure,
|
||||
Token::OBJECT_NAME => Token,
|
||||
Topup::OBJECT_NAME => Topup,
|
||||
|
@ -83,6 +83,7 @@ require "stripe/resources/tax_rate"
|
||||
require "stripe/resources/terminal/connection_token"
|
||||
require "stripe/resources/terminal/location"
|
||||
require "stripe/resources/terminal/reader"
|
||||
require "stripe/resources/test_helpers/test_clock"
|
||||
require "stripe/resources/three_d_secure"
|
||||
require "stripe/resources/token"
|
||||
require "stripe/resources/topup"
|
||||
|
25
lib/stripe/resources/test_helpers/test_clock.rb
Normal file
25
lib/stripe/resources/test_helpers/test_clock.rb
Normal file
@ -0,0 +1,25 @@
|
||||
# File generated from our OpenAPI spec
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Stripe
|
||||
module TestHelpers
|
||||
class TestClock < APIResource
|
||||
extend Stripe::APIOperations::Create
|
||||
include Stripe::APIOperations::Delete
|
||||
extend Stripe::APIOperations::List
|
||||
|
||||
OBJECT_NAME = "test_helpers.test_clock"
|
||||
|
||||
custom_method :advance, http_verb: :post
|
||||
|
||||
def advance(params = {}, opts = {})
|
||||
request_stripe_object(
|
||||
method: :post,
|
||||
path: resource_url + "/advance",
|
||||
params: params,
|
||||
opts: opts
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
@ -1629,6 +1629,39 @@ module Stripe
|
||||
assert_requested :post, "#{Stripe.api_base}/v1/tax_rates/txr_xxxxxxxxxxxxx"
|
||||
end
|
||||
end
|
||||
context "TestClock.advance" do
|
||||
should "support requests with args: test_clock, frozen_time" do
|
||||
Stripe::TestHelpers::TestClock.advance("clock_xyz", { frozen_time: 142 })
|
||||
assert_requested :post, "#{Stripe.api_base}/v1/test_helpers/test_clocks/clock_xyz/advance"
|
||||
end
|
||||
end
|
||||
context "TestClock.create" do
|
||||
should "support requests with args: frozen_time, name" do
|
||||
Stripe::TestHelpers::TestClock.create(
|
||||
frozen_time: 123,
|
||||
name: "cogsworth"
|
||||
)
|
||||
assert_requested :post, "#{Stripe.api_base}/v1/test_helpers/test_clocks"
|
||||
end
|
||||
end
|
||||
context "TestClock.delete" do
|
||||
should "support requests with args: test_clock" do
|
||||
Stripe::TestHelpers::TestClock.delete("clock_xyz")
|
||||
assert_requested :delete, "#{Stripe.api_base}/v1/test_helpers/test_clocks/clock_xyz?"
|
||||
end
|
||||
end
|
||||
context "TestClock.list" do
|
||||
should "work" do
|
||||
Stripe::TestHelpers::TestClock.list
|
||||
assert_requested :get, "#{Stripe.api_base}/v1/test_helpers/test_clocks?"
|
||||
end
|
||||
end
|
||||
context "TestClock.retrieve" do
|
||||
should "support requests with args: test_clock" do
|
||||
Stripe::TestHelpers::TestClock.retrieve("clock_xyz")
|
||||
assert_requested :get, "#{Stripe.api_base}/v1/test_helpers/test_clocks/clock_xyz?"
|
||||
end
|
||||
end
|
||||
context "Token.create" do
|
||||
should "support requests with args: card" do
|
||||
Stripe::Token.create(
|
||||
|
Loading…
x
Reference in New Issue
Block a user