From b40dc1f264962c5816e94ca7460819a618320cf0 Mon Sep 17 00:00:00 2001 From: "stripe-openapi[bot]" <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 25 Jul 2024 13:34:26 -0700 Subject: [PATCH] Update generated code (#1437) * Update generated code for v1137 * Update generated code for v1154 --------- Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> --- OPENAPI_VERSION | 2 +- lib/stripe/resources/checkout/session.rb | 11 +++++++++++ lib/stripe/resources/refund.rb | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index c903c3517..793cc6975 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1126 \ No newline at end of file +v1154 \ No newline at end of file diff --git a/lib/stripe/resources/checkout/session.rb b/lib/stripe/resources/checkout/session.rb index 9760fa88d..a05371292 100644 --- a/lib/stripe/resources/checkout/session.rb +++ b/lib/stripe/resources/checkout/session.rb @@ -20,6 +20,7 @@ module Checkout class Session < APIResource extend Stripe::APIOperations::Create extend Stripe::APIOperations::List + include Stripe::APIOperations::Save OBJECT_NAME = "checkout.session" def self.object_name @@ -89,6 +90,16 @@ def self.list_line_items(session, params = {}, opts = {}) opts: opts ) end + + # Updates a Session object. + def self.update(id, params = {}, opts = {}) + request_stripe_object( + method: :post, + path: format("/v1/checkout/sessions/%s", { id: CGI.escape(id) }), + params: params, + opts: opts + ) + end end end end diff --git a/lib/stripe/resources/refund.rb b/lib/stripe/resources/refund.rb index e3a99775f..ad962b2da 100644 --- a/lib/stripe/resources/refund.rb +++ b/lib/stripe/resources/refund.rb @@ -56,7 +56,7 @@ def self.create(params = {}, opts = {}) request_stripe_object(method: :post, path: "/v1/refunds", params: params, opts: opts) end - # Returns a list of all refunds you created. We return the refunds in sorted order, with the most recent refunds appearing first The 10 most recent refunds are always available by default on the Charge object. + # Returns a list of all refunds you created. We return the refunds in sorted order, with the most recent refunds appearing first. The 10 most recent refunds are always available by default on the Charge object. def self.list(filters = {}, opts = {}) request_stripe_object(method: :get, path: "/v1/refunds", params: filters, opts: opts) end