stripe-ruby/lib/stripe/stripe_service.rb
helenye-stripe 41f5d0a594
Merge and codegen from master stripe-ruby v13.0.0 (#1465)
* 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>
2024-10-03 16:31:59 -04:00

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