Module: Stripe

Extended by:
Forwardable
Defined in:
lib/stripe/object_types.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/list_object.rb,
lib/stripe/api_resource.rb,
lib/stripe/error_object.rb,
lib/stripe/resources/sku.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/instrumentation.rb,
lib/stripe/resources/event.rb,
lib/stripe/resources/order.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/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/recipient.rb,
lib/stripe/resources/capability.rb,
lib/stripe/resources/login_link.rb,
lib/stripe/stripe_configuration.rb,
lib/stripe/api_operations/create.rb,
lib/stripe/api_operations/delete.rb,
lib/stripe/resources/credit_note.rb,
lib/stripe/api_operations/request.rb,
lib/stripe/resources/account_link.rb,
lib/stripe/resources/bank_account.rb,
lib/stripe/resources/country_spec.rb,
lib/stripe/resources/invoice_item.rb,
lib/stripe/resources/issuing/card.rb,
lib/stripe/resources/order_return.rb,
lib/stripe/resources/setup_intent.rb,
lib/stripe/resources/subscription.rb,
lib/stripe/resources/usage_record.rb,
lib/stripe/singleton_api_resource.rb,
lib/stripe/resources/ephemeral_key.rb,
lib/stripe/resources/exchange_rate.rb,
lib/stripe/resources/setup_attempt.rb,
lib/stripe/resources/shipping_rate.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/resources/three_d_secure.rb,
lib/stripe/resources/application_fee.rb,
lib/stripe/resources/issuing/dispute.rb,
lib/stripe/resources/terminal/reader.rb,
lib/stripe/resources/apple_pay_domain.rb,
lib/stripe/resources/bitcoin_receiver.rb,
lib/stripe/resources/checkout/session.rb,
lib/stripe/resources/radar/value_list.rb,
lib/stripe/resources/webhook_endpoint.rb,
lib/stripe/resources/invoice_line_item.rb,
lib/stripe/resources/subscription_item.rb,
lib/stripe/resources/terminal/location.rb,
lib/stripe/resources/issuing/cardholder.rb,
lib/stripe/resources/recipient_transfer.rb,
lib/stripe/resources/source_transaction.rb,
lib/stripe/resources/balance_transaction.rb,
lib/stripe/resources/bitcoin_transaction.rb,
lib/stripe/resources/issuing/transaction.rb,
lib/stripe/api_operations/nested_resource.rb,
lib/stripe/resources/issuing/card_details.rb,
lib/stripe/resources/reporting/report_run.rb,
lib/stripe/resources/usage_record_summary.rb,
lib/stripe/resources/credit_note_line_item.rb,
lib/stripe/resources/issuing/authorization.rb,
lib/stripe/resources/radar/value_list_item.rb,
lib/stripe/resources/reporting/report_type.rb,
lib/stripe/resources/subscription_schedule.rb,
lib/stripe/resources/application_fee_refund.rb,
lib/stripe/resources/billing_portal/session.rb,
lib/stripe/resources/radar/early_fraud_warning.rb,
lib/stripe/resources/sigma/scheduled_query_run.rb,
lib/stripe/resources/terminal/connection_token.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/identity/verification_session.rb

Overview

File generated from our OpenAPI spec frozen_string_literal: true

Defined Under Namespace

Modules: APIOperations, BillingPortal, Checkout, Identity, Issuing, OAuth, ObjectTypes, Radar, Reporting, Sigma, StripeResponseBase, Terminal, Util, Webhook Classes: APIConnectionError, APIError, APIResource, Account, AccountLink, AlipayAccount, ApplePayDomain, ApplicationFee, ApplicationFeeRefund, AuthenticationError, Balance, BalanceTransaction, BankAccount, BitcoinReceiver, BitcoinTransaction, Capability, Card, CardError, Charge, ConnectionManager, CountrySpec, Coupon, CreditNote, CreditNoteLineItem, Customer, CustomerBalanceTransaction, Discount, Dispute, EphemeralKey, ErrorObject, Event, ExchangeRate, File, FileLink, IdempotencyError, Instrumentation, InvalidRequestError, Invoice, InvoiceItem, InvoiceLineItem, LineItem, ListObject, LoginLink, Mandate, MultipartEncoder, OAuthErrorObject, Order, OrderReturn, PaymentIntent, PaymentMethod, Payout, PermissionError, Person, Plan, Price, Product, PromotionCode, Quote, RateLimitError, Recipient, RecipientTransfer, Refund, Reversal, Review, SKU, SetupAttempt, SetupIntent, ShippingRate, SignatureVerificationError, SingletonAPIResource, Source, SourceTransaction, StripeClient, StripeConfiguration, StripeError, StripeHeadersOnlyResponse, StripeObject, StripeResponse, StripeResponseHeaders, Subscription, SubscriptionItem, SubscriptionSchedule, TaxCode, TaxId, TaxRate, ThreeDSecure, Token, Topup, Transfer, UsageRecord, UsageRecordSummary, WebhookEndpoint

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
VERSION =
"5.42.0"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.configObject (readonly)

Returns the value of attribute config.


65
66
67
# File 'lib/stripe.rb', line 65

def config
  @config
end

Class Method Details

.app_infoObject

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


94
95
96
# File 'lib/stripe.rb', line 94

def self.app_info
  @app_info
end

.app_info=(info) ⇒ Object


98
99
100
# File 'lib/stripe.rb', line 98

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.


107
108
109
110
111
112
113
114
# File 'lib/stripe.rb', line 107

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