mirror of
https://github.com/stripe/stripe-ruby.git
synced 2025-11-19 00:01:13 -05:00
Codegen for openapi 21065d4 (#1015)
This commit is contained in:
parent
9774447859
commit
3db855d309
@ -10,7 +10,18 @@ module Stripe
|
|||||||
|
|
||||||
OBJECT_NAME = "checkout.session"
|
OBJECT_NAME = "checkout.session"
|
||||||
|
|
||||||
|
custom_method :expire, http_verb: :post
|
||||||
|
|
||||||
nested_resource_class_methods :line_item, operations: %i[list]
|
nested_resource_class_methods :line_item, operations: %i[list]
|
||||||
|
|
||||||
|
def expire(params = {}, opts = {})
|
||||||
|
request_stripe_object(
|
||||||
|
method: :post,
|
||||||
|
path: resource_url + "/expire",
|
||||||
|
params: params,
|
||||||
|
opts: opts
|
||||||
|
)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -1269,6 +1269,12 @@ module Stripe
|
|||||||
assert_requested :post, "#{Stripe.api_base}/v1/billing_portal/sessions"
|
assert_requested :post, "#{Stripe.api_base}/v1/billing_portal/sessions"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
context "Session.expire" do
|
||||||
|
should "support requests with args: session" do
|
||||||
|
Stripe::Checkout::Session.expire("sess_xyz")
|
||||||
|
assert_requested :post, "#{Stripe.api_base}/v1/checkout/sessions/sess_xyz/expire?"
|
||||||
|
end
|
||||||
|
end
|
||||||
context "Session.list" do
|
context "Session.list" do
|
||||||
should "support requests with args: limit" do
|
should "support requests with args: limit" do
|
||||||
Stripe::Checkout::Session.list(limit: 3)
|
Stripe::Checkout::Session.list(limit: 3)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user