Module: Stripe

Extended by:
Forwardable
Defined in:
lib/stripe/api_version.rb,
lib/stripe.rb,
lib/stripe/util.rb,
lib/stripe/oauth.rb,
lib/stripe/errors.rb,
lib/stripe/version.rb,
lib/stripe/webhook.rb,
lib/stripe/thin_event.rb,
lib/stripe/event_types.rb,
lib/stripe/list_object.rb,
lib/stripe/api_resource.rb,
lib/stripe/error_object.rb,
lib/stripe/object_types.rb,
lib/stripe/api_requestor.rb,
lib/stripe/stripe_client.rb,
lib/stripe/stripe_object.rb,
lib/stripe/resources/card.rb,
lib/stripe/resources/file.rb,
lib/stripe/resources/plan.rb,
lib/stripe/stripe_service.rb,
lib/stripe/v2_list_object.rb,
lib/stripe/instrumentation.rb,
lib/stripe/request_options.rb,
lib/stripe/resources/event.rb,
lib/stripe/resources/price.rb,
lib/stripe/resources/quote.rb,
lib/stripe/resources/token.rb,
lib/stripe/resources/topup.rb,
lib/stripe/stripe_response.rb,
lib/stripe/resources/charge.rb,
lib/stripe/resources/coupon.rb,
lib/stripe/resources/payout.rb,
lib/stripe/resources/person.rb,
lib/stripe/resources/refund.rb,
lib/stripe/resources/review.rb,
lib/stripe/resources/source.rb,
lib/stripe/resources/tax_id.rb,
lib/stripe/multipart_encoder.rb,
lib/stripe/resources/account.rb,
lib/stripe/resources/balance.rb,
lib/stripe/resources/dispute.rb,
lib/stripe/resources/invoice.rb,
lib/stripe/resources/mandate.rb,
lib/stripe/resources/product.rb,
lib/stripe/connection_manager.rb,
lib/stripe/resources/customer.rb,
lib/stripe/resources/discount.rb,
lib/stripe/resources/reversal.rb,
lib/stripe/resources/tax_code.rb,
lib/stripe/resources/tax_rate.rb,
lib/stripe/resources/transfer.rb,
lib/stripe/resources/v2/event.rb,
lib/stripe/api_operations/list.rb,
lib/stripe/api_operations/save.rb,
lib/stripe/resources/file_link.rb,
lib/stripe/resources/line_item.rb,
lib/stripe/resources/capability.rb,
lib/stripe/resources/login_link.rb,
lib/stripe/search_result_object.rb,
lib/stripe/services/tax_service.rb,
lib/stripe/services/v1_services.rb,
lib/stripe/services/v2_services.rb,
lib/stripe/stripe_configuration.rb,
lib/stripe/api_operations/create.rb,
lib/stripe/api_operations/delete.rb,
lib/stripe/api_operations/search.rb,
lib/stripe/resources/apps/secret.rb,
lib/stripe/resources/credit_note.rb,
lib/stripe/services/apps_service.rb,
lib/stripe/services/file_service.rb,
lib/stripe/services/plan_service.rb,
lib/stripe/api_operations/request.rb,
lib/stripe/resources/account_link.rb,
lib/stripe/resources/bank_account.rb,
lib/stripe/resources/cash_balance.rb,
lib/stripe/resources/country_spec.rb,
lib/stripe/resources/invoice_item.rb,
lib/stripe/resources/issuing/card.rb,
lib/stripe/resources/payment_link.rb,
lib/stripe/resources/setup_intent.rb,
lib/stripe/resources/subscription.rb,
lib/stripe/resources/tax/settings.rb,
lib/stripe/resources/usage_record.rb,
lib/stripe/services/event_service.rb,
lib/stripe/services/oauth_service.rb,
lib/stripe/services/price_service.rb,
lib/stripe/services/quote_service.rb,
lib/stripe/services/radar_service.rb,
lib/stripe/services/sigma_service.rb,
lib/stripe/services/token_service.rb,
lib/stripe/services/topup_service.rb,
lib/stripe/singleton_api_resource.rb,
lib/stripe/resources/billing/alert.rb,
lib/stripe/resources/billing/meter.rb,
lib/stripe/resources/climate/order.rb,
lib/stripe/resources/ephemeral_key.rb,
lib/stripe/resources/exchange_rate.rb,
lib/stripe/resources/issuing/token.rb,
lib/stripe/resources/setup_attempt.rb,
lib/stripe/resources/shipping_rate.rb,
lib/stripe/services/charge_service.rb,
lib/stripe/services/coupon_service.rb,
lib/stripe/services/payout_service.rb,
lib/stripe/services/refund_service.rb,
lib/stripe/services/review_service.rb,
lib/stripe/services/source_service.rb,
lib/stripe/services/tax_id_service.rb,
lib/stripe/resources/alipay_account.rb,
lib/stripe/resources/payment_intent.rb,
lib/stripe/resources/payment_method.rb,
lib/stripe/resources/promotion_code.rb,
lib/stripe/services/account_service.rb,
lib/stripe/services/balance_service.rb,
lib/stripe/services/billing_service.rb,
lib/stripe/services/climate_service.rb,
lib/stripe/services/dispute_service.rb,
lib/stripe/services/invoice_service.rb,
lib/stripe/services/issuing_service.rb,
lib/stripe/services/mandate_service.rb,
lib/stripe/services/product_service.rb,
lib/stripe/services/v2/core_service.rb,
lib/stripe/api_resource_test_helpers.rb,
lib/stripe/resources/account_session.rb,
lib/stripe/resources/application_fee.rb,
lib/stripe/resources/climate/product.rb,
lib/stripe/resources/issuing/dispute.rb,
lib/stripe/resources/product_feature.rb,
lib/stripe/resources/tax/calculation.rb,
lib/stripe/resources/tax/transaction.rb,
lib/stripe/resources/terminal/reader.rb,
lib/stripe/services/checkout_service.rb,
lib/stripe/services/customer_service.rb,
lib/stripe/services/identity_service.rb,
lib/stripe/services/tax_code_service.rb,
lib/stripe/services/tax_rate_service.rb,
lib/stripe/services/terminal_service.rb,
lib/stripe/services/transfer_service.rb,
lib/stripe/services/treasury_service.rb,
lib/stripe/resources/apple_pay_domain.rb,
lib/stripe/resources/checkout/session.rb,
lib/stripe/resources/climate/supplier.rb,
lib/stripe/resources/customer_session.rb,
lib/stripe/resources/radar/value_list.rb,
lib/stripe/resources/tax/registration.rb,
lib/stripe/resources/webhook_endpoint.rb,
lib/stripe/services/file_link_service.rb,
lib/stripe/services/reporting_service.rb,
lib/stripe/resources/invoice_line_item.rb,
lib/stripe/resources/subscription_item.rb,
lib/stripe/resources/terminal/location.rb,
lib/stripe/services/forwarding_service.rb,
lib/stripe/services/v2/billing_service.rb,
lib/stripe/resources/confirmation_token.rb,
lib/stripe/resources/forwarding/request.rb,
lib/stripe/resources/issuing/cardholder.rb,
lib/stripe/resources/recipient_transfer.rb,
lib/stripe/resources/source_transaction.rb,
lib/stripe/services/apps/secret_service.rb,
lib/stripe/services/credit_note_service.rb,
lib/stripe/api_operations/singleton_save.rb,
lib/stripe/resources/balance_transaction.rb,
lib/stripe/resources/billing/meter_event.rb,
lib/stripe/resources/issuing/transaction.rb,
lib/stripe/services/account_link_service.rb,
lib/stripe/services/country_spec_service.rb,
lib/stripe/services/entitlements_service.rb,
lib/stripe/services/invoice_item_service.rb,
lib/stripe/services/issuing/card_service.rb,
lib/stripe/services/payment_link_service.rb,
lib/stripe/services/setup_intent_service.rb,
lib/stripe/services/subscription_service.rb,
lib/stripe/services/tax/settings_service.rb,
lib/stripe/services/test_helpers_service.rb,
lib/stripe/api_operations/nested_resource.rb,
lib/stripe/resources/billing/credit_grant.rb,
lib/stripe/resources/entitlements/feature.rb,
lib/stripe/resources/funding_instructions.rb,
lib/stripe/resources/reporting/report_run.rb,
lib/stripe/resources/treasury/transaction.rb,
lib/stripe/resources/usage_record_summary.rb,
lib/stripe/resources/v2/event_destination.rb,
lib/stripe/services/billing/alert_service.rb,
lib/stripe/services/billing/meter_service.rb,
lib/stripe/services/climate/order_service.rb,
lib/stripe/services/ephemeral_key_service.rb,
lib/stripe/services/exchange_rate_service.rb,
lib/stripe/services/issuing/token_service.rb,
lib/stripe/services/setup_attempt_service.rb,
lib/stripe/services/shipping_rate_service.rb,
lib/stripe/services/v2/core/event_service.rb,
lib/stripe/resources/credit_note_line_item.rb,
lib/stripe/resources/issuing/authorization.rb,
lib/stripe/resources/payment_method_domain.rb,
lib/stripe/resources/radar/value_list_item.rb,
lib/stripe/resources/reporting/report_type.rb,
lib/stripe/resources/subscription_schedule.rb,
lib/stripe/services/account_person_service.rb,
lib/stripe/services/billing_portal_service.rb,
lib/stripe/services/payment_intent_service.rb,
lib/stripe/services/payment_method_service.rb,
lib/stripe/services/promotion_code_service.rb,
lib/stripe/resources/application_fee_refund.rb,
lib/stripe/resources/billing_portal/session.rb,
lib/stripe/resources/terminal/configuration.rb,
lib/stripe/resources/v2/billing/meter_event.rb,
lib/stripe/services/account_session_service.rb,
lib/stripe/services/application_fee_service.rb,
lib/stripe/services/climate/product_service.rb,
lib/stripe/services/customer_tax_id_service.rb,
lib/stripe/services/issuing/dispute_service.rb,
lib/stripe/services/product_feature_service.rb,
lib/stripe/services/quote_line_item_service.rb,
lib/stripe/services/tax/calculation_service.rb,
lib/stripe/services/tax/transaction_service.rb,
lib/stripe/services/terminal/reader_service.rb,
lib/stripe/resources/issuing/physical_bundle.rb,
lib/stripe/resources/test_helpers/test_clock.rb,
lib/stripe/resources/treasury/debit_reversal.rb,
lib/stripe/resources/treasury/received_debit.rb,
lib/stripe/services/apple_pay_domain_service.rb,
lib/stripe/services/checkout/session_service.rb,
lib/stripe/services/climate/supplier_service.rb,
lib/stripe/services/customer_session_service.rb,
lib/stripe/services/radar/value_list_service.rb,
lib/stripe/services/tax/registration_service.rb,
lib/stripe/services/webhook_endpoint_service.rb,
lib/stripe/resources/treasury/credit_reversal.rb,
lib/stripe/resources/treasury/received_credit.rb,
lib/stripe/services/invoice_line_item_service.rb,
lib/stripe/services/subscription_item_service.rb,
lib/stripe/services/terminal/location_service.rb,
lib/stripe/services/transfer_reversal_service.rb,
lib/stripe/resources/radar/early_fraud_warning.rb,
lib/stripe/resources/sigma/scheduled_query_run.rb,
lib/stripe/resources/tax/calculation_line_item.rb,
lib/stripe/resources/tax/transaction_line_item.rb,
lib/stripe/resources/terminal/connection_token.rb,
lib/stripe/resources/treasury/inbound_transfer.rb,
lib/stripe/resources/treasury/outbound_payment.rb,
lib/stripe/services/account_capability_service.rb,
lib/stripe/services/account_login_link_service.rb,
lib/stripe/services/confirmation_token_service.rb,
lib/stripe/services/forwarding/request_service.rb,
lib/stripe/services/issuing/cardholder_service.rb,
lib/stripe/services/source_transaction_service.rb,
lib/stripe/resources/invoice_rendering_template.rb,
lib/stripe/resources/treasury/financial_account.rb,
lib/stripe/resources/treasury/outbound_transfer.rb,
lib/stripe/resources/treasury/transaction_entry.rb,
lib/stripe/services/balance_transaction_service.rb,
lib/stripe/services/billing/meter_event_service.rb,
lib/stripe/services/issuing/transaction_service.rb,
lib/stripe/services/test_helpers/refund_service.rb,
lib/stripe/resources/billing/meter_event_summary.rb,
lib/stripe/services/billing/credit_grant_service.rb,
lib/stripe/services/entitlements/feature_service.rb,
lib/stripe/services/reporting/report_run_service.rb,
lib/stripe/services/test_helpers/issuing_service.rb,
lib/stripe/services/treasury/transaction_service.rb,
lib/stripe/resources/billing_portal/configuration.rb,
lib/stripe/resources/customer_balance_transaction.rb,
lib/stripe/resources/identity/verification_report.rb,
lib/stripe/resources/payment_method_configuration.rb,
lib/stripe/services/credit_note_line_item_service.rb,
lib/stripe/services/customer_cash_balance_service.rb,
lib/stripe/services/financial_connections_service.rb,
lib/stripe/services/issuing/authorization_service.rb,
lib/stripe/services/payment_method_domain_service.rb,
lib/stripe/services/radar/value_list_item_service.rb,
lib/stripe/services/reporting/report_type_service.rb,
lib/stripe/services/subscription_schedule_service.rb,
lib/stripe/services/test_helpers/customer_service.rb,
lib/stripe/services/test_helpers/terminal_service.rb,
lib/stripe/services/test_helpers/treasury_service.rb,
lib/stripe/resources/financial_connections/account.rb,
lib/stripe/resources/financial_connections/session.rb,
lib/stripe/resources/identity/verification_session.rb,
lib/stripe/services/application_fee_refund_service.rb,
lib/stripe/services/billing_portal/session_service.rb,
lib/stripe/services/invoice_upcoming_lines_service.rb,
lib/stripe/services/payment_link_line_item_service.rb,
lib/stripe/services/terminal/configuration_service.rb,
lib/stripe/services/v2/billing/meter_event_service.rb,
lib/stripe/resources/billing/credit_balance_summary.rb,
lib/stripe/resources/billing/meter_event_adjustment.rb,
lib/stripe/resources/issuing/personalization_design.rb,
lib/stripe/resources/v2/billing/meter_event_session.rb,
lib/stripe/services/customer_payment_method_service.rb,
lib/stripe/services/customer_payment_source_service.rb,
lib/stripe/services/issuing/physical_bundle_service.rb,
lib/stripe/services/test_helpers/test_clock_service.rb,
lib/stripe/services/treasury/debit_reversal_service.rb,
lib/stripe/services/treasury/received_debit_service.rb,
lib/stripe/resources/entitlements/active_entitlement.rb,
lib/stripe/services/account_external_account_service.rb,
lib/stripe/services/treasury/credit_reversal_service.rb,
lib/stripe/services/treasury/received_credit_service.rb,
lib/stripe/services/credit_note_preview_lines_service.rb,
lib/stripe/services/radar/early_fraud_warning_service.rb,
lib/stripe/services/sigma/scheduled_query_run_service.rb,
lib/stripe/services/tax/calculation_line_item_service.rb,
lib/stripe/services/tax/transaction_line_item_service.rb,
lib/stripe/services/terminal/connection_token_service.rb,
lib/stripe/services/test_helpers/issuing/card_service.rb,
lib/stripe/services/treasury/inbound_transfer_service.rb,
lib/stripe/services/treasury/outbound_payment_service.rb,
lib/stripe/services/v2/core/event_destination_service.rb,
lib/stripe/resources/customer_cash_balance_transaction.rb,
lib/stripe/resources/financial_connections/transaction.rb,
lib/stripe/resources/v2/billing/meter_event_adjustment.rb,
lib/stripe/services/checkout/session_line_item_service.rb,
lib/stripe/services/invoice_rendering_template_service.rb,
lib/stripe/services/treasury/financial_account_service.rb,
lib/stripe/services/treasury/outbound_transfer_service.rb,
lib/stripe/services/treasury/transaction_entry_service.rb,
lib/stripe/events/v1_billing_meter_no_meter_found_event.rb,
lib/stripe/resources/billing/credit_balance_transaction.rb,
lib/stripe/services/billing/meter_event_summary_service.rb,
lib/stripe/resources/financial_connections/account_owner.rb,
lib/stripe/resources/treasury/financial_account_features.rb,
lib/stripe/services/billing_portal/configuration_service.rb,
lib/stripe/services/customer_balance_transaction_service.rb,
lib/stripe/services/identity/verification_report_service.rb,
lib/stripe/services/payment_method_configuration_service.rb,
lib/stripe/services/test_helpers/terminal/reader_service.rb,
lib/stripe/services/customer_funding_instructions_service.rb,
lib/stripe/services/financial_connections/account_service.rb,
lib/stripe/services/financial_connections/session_service.rb,
lib/stripe/services/identity/verification_session_service.rb,
lib/stripe/services/v2/billing/meter_event_stream_service.rb,
lib/stripe/services/billing/credit_balance_summary_service.rb,
lib/stripe/services/billing/meter_event_adjustment_service.rb,
lib/stripe/services/issuing/personalization_design_service.rb,
lib/stripe/services/subscription_item_usage_record_service.rb,
lib/stripe/services/v2/billing/meter_event_session_service.rb,
lib/stripe/services/entitlements/active_entitlement_service.rb,
lib/stripe/services/test_helpers/confirmation_token_service.rb,
lib/stripe/resources/financial_connections/account_ownership.rb,
lib/stripe/services/test_helpers/issuing/transaction_service.rb,
lib/stripe/services/customer_cash_balance_transaction_service.rb,
lib/stripe/services/financial_connections/transaction_service.rb,
lib/stripe/services/quote_computed_upfront_line_items_service.rb,
lib/stripe/services/v2/billing/meter_event_adjustment_service.rb,
lib/stripe/services/billing/credit_balance_transaction_service.rb,
lib/stripe/services/test_helpers/issuing/authorization_service.rb,
lib/stripe/events/v1_billing_meter_error_report_triggered_event.rb,
lib/stripe/services/financial_connections/account_owner_service.rb,
lib/stripe/services/treasury/financial_account_features_service.rb,
lib/stripe/services/test_helpers/treasury/received_debit_service.rb,
lib/stripe/services/test_helpers/treasury/received_credit_service.rb,
lib/stripe/services/subscription_item_usage_record_summary_service.rb,
lib/stripe/services/test_helpers/treasury/inbound_transfer_service.rb,
lib/stripe/services/test_helpers/treasury/outbound_payment_service.rb,
lib/stripe/services/test_helpers/treasury/outbound_transfer_service.rb,
lib/stripe/services/test_helpers/issuing/personalization_design_service.rb

Overview

File generated from our OpenAPI spec frozen_string_literal: true

Defined Under Namespace

Modules: APIOperations, ApiVersion, Apps, Billing, BillingPortal, Checkout, Climate, Entitlements, EventTypes, FinancialConnections, Forwarding, Identity, Issuing, OAuth, ObjectTypes, Radar, Reporting, RequestOptions, Sigma, StripeResponseBase, Tax, Terminal, TestHelpers, Treasury, Util, V2, Webhook Classes: APIConnectionError, APIError, APIRequestor, APIResource, APIResourceTestHelpers, Account, AccountCapabilityService, AccountExternalAccountService, AccountLink, AccountLinkService, AccountLoginLinkService, AccountPersonService, AccountService, AccountSession, AccountSessionService, AlipayAccount, ApplePayDomain, ApplePayDomainService, ApplicationFee, ApplicationFeeRefund, ApplicationFeeRefundService, ApplicationFeeService, AppsService, AuthenticationError, Balance, BalanceService, BalanceTransaction, BalanceTransactionService, BankAccount, BillingPortalService, BillingService, Capability, Card, CardError, CashBalance, Charge, ChargeService, CheckoutService, ClimateService, ConfirmationToken, ConfirmationTokenService, ConnectionManager, CountrySpec, CountrySpecService, Coupon, CouponService, CreditNote, CreditNoteLineItem, CreditNoteLineItemService, CreditNotePreviewLinesService, CreditNoteService, Customer, CustomerBalanceTransaction, CustomerBalanceTransactionService, CustomerCashBalanceService, CustomerCashBalanceTransaction, CustomerCashBalanceTransactionService, CustomerFundingInstructionsService, CustomerPaymentMethodService, CustomerPaymentSourceService, CustomerService, CustomerSession, CustomerSessionService, CustomerTaxIdService, Discount, Dispute, DisputeService, EntitlementsService, EphemeralKey, EphemeralKeyService, ErrorObject, Event, EventService, ExchangeRate, ExchangeRateService, File, FileLink, FileLinkService, FileService, FinancialConnectionsService, ForwardingService, FundingInstructions, IdempotencyError, IdentityService, Instrumentation, InvalidRequestError, Invoice, InvoiceItem, InvoiceItemService, InvoiceLineItem, InvoiceLineItemService, InvoiceRenderingTemplate, InvoiceRenderingTemplateService, InvoiceService, InvoiceUpcomingLinesService, IssuingService, LineItem, ListObject, LoginLink, Mandate, MandateService, MultipartEncoder, OAuthErrorObject, OAuthService, PaymentIntent, PaymentIntentService, PaymentLink, PaymentLinkLineItemService, PaymentLinkService, PaymentMethod, PaymentMethodConfiguration, PaymentMethodConfigurationService, PaymentMethodDomain, PaymentMethodDomainService, PaymentMethodService, Payout, PayoutService, PermissionError, Person, Plan, PlanService, Price, PriceService, Product, ProductFeature, ProductFeatureService, ProductService, PromotionCode, PromotionCodeService, Quote, QuoteComputedUpfrontLineItemsService, QuoteLineItemService, QuoteService, RadarService, RateLimitError, RecipientTransfer, Refund, RefundService, ReportingService, Reversal, Review, ReviewService, SearchResultObject, SetupAttempt, SetupAttemptService, SetupIntent, SetupIntentService, ShippingRate, ShippingRateService, SigmaService, SignatureVerificationError, SingletonAPIResource, Source, SourceService, SourceTransaction, SourceTransactionService, StripeClient, StripeConfiguration, StripeError, StripeHeadersOnlyResponse, StripeObject, StripeResponse, StripeResponseHeaders, StripeService, Subscription, SubscriptionItem, SubscriptionItemService, SubscriptionItemUsageRecordService, SubscriptionItemUsageRecordSummaryService, SubscriptionSchedule, SubscriptionScheduleService, SubscriptionService, TaxCode, TaxCodeService, TaxId, TaxIdService, TaxRate, TaxRateService, TaxService, TemporarySessionExpiredError, TerminalService, TestHelpersService, ThinEvent, Token, TokenService, Topup, TopupService, Transfer, TransferReversalService, TransferService, TreasuryService, UsageRecord, UsageRecordSummary, V1BillingMeterErrorReportTriggeredEvent, V1BillingMeterNoMeterFoundEvent, V1Services, V2Services, WebhookEndpoint, WebhookEndpointService

Constant Summary collapse

DEFAULT_CA_BUNDLE_PATH =
__dir__ + "/data/ca-certificates.crt"
LEVEL_DEBUG =

map to the same values as the standard library’s logger

Logger::DEBUG
LEVEL_ERROR =
Logger::ERROR
LEVEL_INFO =
Logger::INFO
DEFAULT_API_BASE =

API base constants

"https://api.stripe.com"
DEFAULT_CONNECT_BASE =
"https://connect.stripe.com"
DEFAULT_UPLOAD_BASE =
"https://files.stripe.com"
DEFAULT_METER_EVENTS_BASE =
"https://meter-events.stripe.com"
VERSION =
"13.2.0"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.configObject (readonly)

Returns the value of attribute config.



84
85
86
# File 'lib/stripe.rb', line 84

def config
  @config
end

Class Method Details

.app_infoObject

Gets the application for a plugin that’s identified some. See #set_app_info.



114
115
116
# File 'lib/stripe.rb', line 114

def self.app_info
  @app_info
end

.app_info=(info) ⇒ Object



118
119
120
# File 'lib/stripe.rb', line 118

def self.app_info=(info)
  @app_info = info
end

.set_app_info(name, partner_id: nil, url: nil, version: nil) ⇒ Object

Sets some basic information about the running application that’s sent along with API requests. Useful for plugin authors to identify their plugin when communicating with Stripe.

Takes a name and optional partner program ID, plugin URL, and version.



127
128
129
130
131
132
133
134
# File 'lib/stripe.rb', line 127

def self.set_app_info(name, partner_id: nil, url: nil, version: nil)
  @app_info = {
    name: name,
    partner_id: partner_id,
    url: url,
    version: version,
  }
end