Class: Stripe::StripeService

Inherits:
Object
  • Object
show all
Defined in:
lib/stripe/stripe_service.rb

Direct Known Subclasses

AccountCapabilityService, AccountExternalAccountService, AccountLinkService, AccountLoginLinkService, AccountNoticeService, AccountPersonService, AccountService, AccountSessionService, AccountSignalsService, ApplePayDomainService, ApplicationFeeRefundService, ApplicationFeeService, Apps::SecretService, AppsService, BalanceService, BalanceSettingsService, BalanceTransactionService, BalanceTransferService, Billing::AlertService, Billing::Analytics::MeterUsageService, Billing::AnalyticsService, Billing::CreditBalanceSummaryService, Billing::CreditBalanceTransactionService, Billing::CreditGrantService, Billing::MeterEventAdjustmentService, Billing::MeterEventService, Billing::MeterEventSummaryService, Billing::MeterService, BillingPortal::ConfigurationService, BillingPortal::SessionService, BillingPortalService, BillingService, Capital::FinancingOfferService, Capital::FinancingSummaryService, Capital::FinancingTransactionService, CapitalService, ChargeService, Checkout::SessionLineItemService, Checkout::SessionService, CheckoutService, Climate::OrderService, Climate::ProductService, Climate::SupplierService, ClimateService, ConfirmationTokenService, CountrySpecService, CouponService, CreditNoteLineItemService, CreditNotePreviewLinesService, CreditNoteService, CustomerBalanceTransactionService, CustomerCashBalanceService, CustomerCashBalanceTransactionService, CustomerFundingInstructionsService, CustomerPaymentMethodService, CustomerPaymentSourceService, CustomerService, CustomerSessionService, CustomerTaxIdService, DelegatedCheckout::RequestedSessionService, DelegatedCheckoutService, DisputeService, Entitlements::ActiveEntitlementService, Entitlements::FeatureService, EntitlementsService, EphemeralKeyService, EventService, ExchangeRateService, ExternalAccountService, FileLinkService, FileService, FinancialConnections::AccountInferredBalanceService, FinancialConnections::AccountOwnerService, FinancialConnections::AccountService, FinancialConnections::AuthorizationService, FinancialConnections::InstitutionService, FinancialConnections::SessionService, FinancialConnections::TransactionService, FinancialConnectionsService, Forwarding::RequestService, ForwardingService, FrMealVouchersOnboardingService, FxQuoteService, Identity::BlocklistEntryService, Identity::VerificationReportService, Identity::VerificationSessionService, IdentityService, InvoiceItemService, InvoiceLineItemService, InvoicePaymentService, InvoiceRenderingTemplateService, InvoiceService, Issuing::AuthorizationService, Issuing::CardService, Issuing::CardholderService, Issuing::CreditUnderwritingRecordService, Issuing::DisputeService, Issuing::DisputeSettlementDetailService, Issuing::FraudLiabilityDebitService, Issuing::PersonalizationDesignService, Issuing::PhysicalBundleService, Issuing::ProgramService, Issuing::TokenService, Issuing::TransactionService, IssuingService, MandateService, MarginService, OAuthService, Orchestration::PaymentAttemptService, OrchestrationService, OrderService, PaymentAttemptRecordService, PaymentIntentAmountDetailsLineItemService, PaymentIntentService, PaymentLinkLineItemService, PaymentLinkService, PaymentMethodConfigurationService, PaymentMethodDomainService, PaymentMethodService, PaymentRecordService, PayoutService, PlanService, PriceService, Privacy::RedactionJobService, Privacy::RedactionJobValidationErrorService, PrivacyService, ProductCatalog::TrialOfferService, ProductCatalogService, ProductFeatureService, ProductService, PromotionCodeService, QuoteComputedUpfrontLineItemsService, QuoteLineItemService, QuoteLineService, QuotePreviewInvoiceService, QuotePreviewSubscriptionScheduleService, QuoteService, Radar::AccountEvaluationService, Radar::CustomerEvaluationService, Radar::EarlyFraudWarningService, Radar::IssuingAuthorizationEvaluationService, Radar::PaymentEvaluationService, Radar::ValueListItemService, Radar::ValueListService, RadarService, RefundService, Reporting::ReportRunService, Reporting::ReportTypeService, ReportingService, Reserve::HoldService, Reserve::PlanService, Reserve::ReleaseService, ReserveService, ReviewService, SetupAttemptService, SetupIntentService, Stripe::SharedPayment::GrantedTokenService, SharedPaymentService, ShippingRateService, Stripe::Sigma::ScheduledQueryRunService, SigmaService, SourceService, SourceTransactionService, SubscriptionItemService, SubscriptionScheduleService, SubscriptionService, Tax::AssociationService, Tax::CalculationLineItemService, Tax::CalculationService, Tax::FormService, Tax::LocationService, Tax::RegistrationService, Tax::SettingsService, Tax::TransactionLineItemService, Tax::TransactionService, TaxCodeService, TaxIdService, TaxRateService, TaxService, Terminal::ConfigurationService, Terminal::ConnectionTokenService, Terminal::LocationService, Terminal::OnboardingLinkService, Terminal::ReaderCollectedDataService, Terminal::ReaderService, TerminalService, TestHelpers::Capital::FinancingOfferService, TestHelpers::CapitalService, TestHelpers::ConfirmationTokenService, TestHelpers::CustomerService, TestHelpers::Issuing::AuthorizationService, TestHelpers::Issuing::CardService, TestHelpers::Issuing::PersonalizationDesignService, TestHelpers::Issuing::TransactionService, TestHelpers::IssuingService, TestHelpers::PaymentIntentService, TestHelpers::RefundService, TestHelpers::SharedPayment::GrantedTokenService, TestHelpers::SharedPaymentService, TestHelpers::Terminal::ReaderService, TestHelpers::TerminalService, TestHelpers::TestClockService, TestHelpers::Treasury::InboundTransferService, TestHelpers::Treasury::OutboundPaymentService, TestHelpers::Treasury::OutboundTransferService, TestHelpers::Treasury::ReceivedCreditService, TestHelpers::Treasury::ReceivedDebitService, TestHelpers::TreasuryService, TestHelpersService, TokenService, TopupService, TransferReversalService, TransferService, Treasury::CreditReversalService, Treasury::DebitReversalService, Treasury::FinancialAccountFeaturesService, Treasury::FinancialAccountService, Treasury::InboundTransferService, Treasury::OutboundPaymentService, Treasury::OutboundTransferService, Treasury::ReceivedCreditService, Treasury::ReceivedDebitService, Treasury::TransactionEntryService, Treasury::TransactionService, TreasuryService, V1Services, V2::Billing::BillSettingService, V2::Billing::BillSettings::VersionService, V2::Billing::CadenceService, V2::Billing::Cadences::SpendModifierRuleService, V2::Billing::CollectionSettingService, V2::Billing::CollectionSettings::VersionService, V2::Billing::CustomPricingUnitService, V2::Billing::IntentService, V2::Billing::Intents::ActionService, V2::Billing::LicenseFeeService, V2::Billing::LicenseFees::VersionService, V2::Billing::LicensedItemService, V2::Billing::MeterEventAdjustmentService, V2::Billing::MeterEventService, V2::Billing::MeterEventSessionService, V2::Billing::MeterEventStreamService, V2::Billing::MeteredItemService, V2::Billing::OneTimeItemService, V2::Billing::PricingPlanService, V2::Billing::PricingPlanSubscriptionService, V2::Billing::PricingPlans::ComponentService, V2::Billing::PricingPlans::VersionService, V2::Billing::ProfileService, V2::Billing::RateCardService, V2::Billing::RateCardSubscriptionService, V2::Billing::RateCards::CustomPricingUnitOverageRateService, V2::Billing::RateCards::RateService, V2::Billing::RateCards::VersionService, V2::Billing::ServiceActionService, V2::BillingService, V2::Core::AccountEvaluationService, V2::Core::AccountLinkService, V2::Core::AccountService, V2::Core::AccountTokenService, V2::Core::Accounts::PersonService, V2::Core::Accounts::PersonTokenService, V2::Core::BatchJobService, V2::Core::ClaimableSandboxService, V2::Core::ConnectionSessionService, V2::Core::EventDestinationService, V2::Core::EventService, V2::Core::Vault::GbBankAccountService, V2::Core::Vault::UsBankAccountService, V2::Core::VaultService, V2::CoreService, V2::Data::Reporting::QueryRunService, V2::Data::ReportingService, V2::DatumService, V2::Iam::ApiKeyService, V2::IamService, V2::MoneyManagement::AdjustmentService, V2::MoneyManagement::CurrencyConversionService, V2::MoneyManagement::FinancialAccountService, V2::MoneyManagement::FinancialAddressService, V2::MoneyManagement::InboundTransferService, V2::MoneyManagement::OutboundPaymentQuoteService, V2::MoneyManagement::OutboundPaymentService, V2::MoneyManagement::OutboundSetupIntentService, V2::MoneyManagement::OutboundTransferService, V2::MoneyManagement::PayoutMethodService, V2::MoneyManagement::PayoutMethodsBankAccountSpecService, V2::MoneyManagement::ReceivedCreditService, V2::MoneyManagement::ReceivedDebitService, V2::MoneyManagement::RecipientVerificationService, V2::MoneyManagement::TransactionEntryService, V2::MoneyManagement::TransactionService, V2::MoneyManagementService, V2::PaymentService, V2::Payments::OffSessionPaymentService, V2::Payments::SettlementAllocationIntentService, V2::Payments::SettlementAllocationIntents::SplitService, V2::Reporting::ReportRunService, V2::Reporting::ReportService, V2::ReportingService, V2::Tax::ManualRuleService, V2::TaxService, V2::TestHelperService, V2::TestHelpers::FinancialAddressService, V2::TestHelpers::MoneyManagementService, V2Services, WebhookEndpointService

Instance Method Summary collapse

Constructor Details

#initialize(requestor) ⇒ StripeService

Initializes a new StripeService



7
8
9
# File 'lib/stripe/stripe_service.rb', line 7

def initialize(requestor)
  @requestor = requestor
end

Instance Method Details

#request(method:, path:, base_address:, params: {}, opts: {}) ⇒ Object



11
12
13
14
15
16
17
18
19
20
# File 'lib/stripe/stripe_service.rb', line 11

def request(method:, path:, base_address:, params: {}, opts: {})
  @requestor.execute_request(
    method,
    path,
    base_address,
    params: params,
    opts: RequestOptions.extract_opts_from_hash(opts),
    usage: ["stripe_client"]
  )
end

#request_stream(method:, path:, base_address:, params: {}, opts: {}, &read_body_chunk_block) ⇒ Object



22
23
24
25
26
27
28
29
30
31
32
# File 'lib/stripe/stripe_service.rb', line 22

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),
    usage: ["stripe_client"],
    &read_body_chunk_block
  )
end