mirror of
https://github.com/stripe/stripe-ruby.git
synced 2025-05-14 00:02:13 -04:00
* Support for APIs in the new API version 2024-09-30.acacia (#1458) * remove parseSnapshotEvent (#1463) * Bump version to 13.0.0 * Fixed API Version --------- Co-authored-by: Ramya Rao <100975018+ramya-stripe@users.noreply.github.com> Co-authored-by: Ramya Rao <ramya@stripe.com> Co-authored-by: Prathmesh Ranaut <prathmesh@stripe.com>
33 lines
774 B
Ruby
33 lines
774 B
Ruby
# frozen_string_literal: true
|
|
# typed: true
|
|
|
|
module Stripe
|
|
class StripeService
|
|
# Initializes a new StripeService
|
|
def initialize(requestor)
|
|
@requestor = requestor
|
|
end
|
|
|
|
def request(method:, path:, base_address:, params: {}, opts: {})
|
|
@requestor.execute_request(
|
|
method,
|
|
path,
|
|
base_address,
|
|
params: params,
|
|
opts: RequestOptions.extract_opts_from_hash(opts)
|
|
)
|
|
end
|
|
|
|
def request_stream(method:, path:, base_address:, params: {}, opts: {}, &read_body_chunk_block)
|
|
@requestor.execute_request_stream(
|
|
method,
|
|
path,
|
|
base_address,
|
|
params: params,
|
|
opts: RequestOptions.extract_opts_from_hash(opts),
|
|
&read_body_chunk_block
|
|
)
|
|
end
|
|
end
|
|
end
|