mirror of
https://github.com/stripe/stripe-ruby.git
synced 2025-10-03 00:01:21 -04:00
* chore!: Update CA certifacte bundle (Apr 26). (#1079) * Generate stripe-ruby with breaking changes (#1102) * Generate stripe-ruby with breaking changes * Remove RecipientTest * Remove AlipayAccount tests * Regenerate files * Delete outdated tests * Fix more tests * Fix more tests * Fix example test manually * Update retrieve_cash_balance method to have params. (#1104) Co-authored-by: Dominic Charley-Roy <78050200+dcr-stripe@users.noreply.github.com>
50 lines
1.4 KiB
Ruby
50 lines
1.4 KiB
Ruby
# File generated from our OpenAPI spec
|
|
# frozen_string_literal: true
|
|
|
|
module Stripe
|
|
module Checkout
|
|
class Session < APIResource
|
|
extend Stripe::APIOperations::Create
|
|
extend Stripe::APIOperations::List
|
|
|
|
OBJECT_NAME = "checkout.session"
|
|
|
|
def expire(params = {}, opts = {})
|
|
request_stripe_object(
|
|
method: :post,
|
|
path: format("/v1/checkout/sessions/%<session>s/expire", { session: CGI.escape(self["id"]) }),
|
|
params: params,
|
|
opts: opts
|
|
)
|
|
end
|
|
|
|
def list_line_items(params = {}, opts = {})
|
|
request_stripe_object(
|
|
method: :get,
|
|
path: format("/v1/checkout/sessions/%<session>s/line_items", { session: CGI.escape(self["id"]) }),
|
|
params: params,
|
|
opts: opts
|
|
)
|
|
end
|
|
|
|
def self.expire(session, params = {}, opts = {})
|
|
request_stripe_object(
|
|
method: :post,
|
|
path: format("/v1/checkout/sessions/%<session>s/expire", { session: CGI.escape(session) }),
|
|
params: params,
|
|
opts: opts
|
|
)
|
|
end
|
|
|
|
def self.list_line_items(session, params = {}, opts = {})
|
|
request_stripe_object(
|
|
method: :get,
|
|
path: format("/v1/checkout/sessions/%<session>s/line_items", { session: CGI.escape(session) }),
|
|
params: params,
|
|
opts: opts
|
|
)
|
|
end
|
|
end
|
|
end
|
|
end
|