Compare commits

...

13 Commits

Author SHA1 Message Date
Pavel Krymets
486bee15a8 Codegen for openapi v184 2022-08-23 05:35:55 -07:00
Pavel Krymets
fdf5be66f5 Reset version to 7.1.0-beta.2 2022-08-23 05:35:23 -07:00
Pavel Krymets
c732841fd3 Include latest changes from the master branch 2022-08-23 05:35:23 -07:00
Pavel Krymets
22db70b479 Set version to 7.1.0 to simplify merge 2022-08-23 05:35:23 -07:00
Kamil Pajdzik
cb53c3b14a Bump version to 7.1.0 2022-08-19 11:55:04 -07:00
Kamil Pajdzik
73324f2ce6
Codegen for openapi v183 (#1116) 2022-08-19 09:19:03 -07:00
anniel-stripe
c5af3ad4f2
Merge pull request #1118 from stripe/anniel-rubocop-allowed-chars
Update AllowedChars in rubocop config
2022-08-19 08:59:01 -07:00
Dominic Charley-Roy
7bb5a3582c
Merge branch 'master' into anniel-rubocop-allowed-chars 2022-08-19 11:52:01 -04:00
Annie Li
77cc0b1554 Update AllowedChars in rubocop config 2022-08-18 15:46:13 -07:00
Dominic Charley-Roy
be2efb7d25
Refresh rubocop config. (#1117) 2022-08-18 17:47:20 -04:00
Ramya Rao
0f04faab6d
Add a support section to the readme (#1115)
We have user feedback on the lack of clarity around whether or not we maintain and improve older major versions of the SDK. This PR adds a support section clarifying this
2022-08-17 14:06:15 -07:00
Pavel Krymets
2db4fd9d06 Bump version to 7.1.0-beta.2 2022-08-11 15:42:00 -07:00
pakrym-stripe
6797f906e1
Merge pull request #1113 from stripe/latest-codegen-beta
API Updates for beta branch
2022-08-11 15:39:47 -07:00
104 changed files with 577 additions and 18 deletions

View File

@ -4,12 +4,6 @@ AllCops:
DisplayCopNames: true DisplayCopNames: true
TargetRubyVersion: 2.3 TargetRubyVersion: 2.3
Exclude:
# brandur: Exclude ephmeral script-like files that I use to try and
# reproduce problems with the library. If you know of a better way of doing
# this (e.g. exclude files not tracked by Git), feel free to change it.
- "example_*"
Layout/CaseIndentation: Layout/CaseIndentation:
EnforcedStyle: end EnforcedStyle: end
@ -19,12 +13,6 @@ Layout/FirstArrayElementIndentation:
Layout/FirstHashElementIndentation: Layout/FirstHashElementIndentation:
EnforcedStyle: consistent EnforcedStyle: consistent
# This can be re-enabled once we're 2.3+ only and can use the squiggly heredoc
# operator. Prior to that, Rubocop recommended bringing in a library like
# ActiveSupport to get heredoc indentation, which is just terrible.
Layout/HeredocIndentation:
Enabled: false
Layout/LineLength: Layout/LineLength:
Exclude: Exclude:
- "lib/stripe/object_types.rb" - "lib/stripe/object_types.rb"
@ -56,6 +44,11 @@ Metrics/ModuleLength:
Style/AccessModifierDeclarations: Style/AccessModifierDeclarations:
EnforcedStyle: inline EnforcedStyle: inline
Style/AsciiComments:
AllowedChars:
-
-
Style/FrozenStringLiteralComment: Style/FrozenStringLiteralComment:
EnforcedStyle: always EnforcedStyle: always

View File

@ -1,5 +1,17 @@
# Changelog # Changelog
## 7.1.0 - 2022-08-19
* [#1116](https://github.com/stripe/stripe-ruby/pull/1116) API Updates
* Add support for new resource `CustomerCashBalanceTransaction`
* [#1118](https://github.com/stripe/stripe-ruby/pull/1118) Update AllowedChars in rubocop config
* [#1117](https://github.com/stripe/stripe-ruby/pull/1117) Refresh rubocop config.
* [#1115](https://github.com/stripe/stripe-ruby/pull/1115) Add a support section to the readme
## 7.1.0-beta.2 - 2022-08-11
* [#1113](https://github.com/stripe/stripe-ruby/pull/1113) API Updates for beta branch
- Updated stable APIs to the latest version
- Add `refund_payment` method to Terminal resource
## 7.1.0-beta.1 - 2022-08-03 ## 7.1.0-beta.1 - 2022-08-03
* [#1107](https://github.com/stripe/stripe-ruby/pull/1107) API Updates for beta branch * [#1107](https://github.com/stripe/stripe-ruby/pull/1107) API Updates for beta branch
- Updated stable APIs to the latest version - Updated stable APIs to the latest version

View File

@ -1 +1 @@
v178 v184

View File

@ -16,6 +16,10 @@ The library also provides other features. For example:
- Built-in mechanisms for the serialization of parameters according to the - Built-in mechanisms for the serialization of parameters according to the
expectations of Stripe's API. expectations of Stripe's API.
## Support
New features and bug fixes are released on the latest major version of the Stripe Ruby library. If you are on an older major version, we recommend that you upgrade to the latest in order to use the new features and bug fixes including those for security vulnerabilities. Older major versions of the package will continue to be available for use, but will not be receiving any updates.
## Documentation ## Documentation
See the [Ruby API docs](https://stripe.com/docs/api?lang=ruby). See the [Ruby API docs](https://stripe.com/docs/api?lang=ruby).

View File

@ -1 +1 @@
7.1.0-beta.1 7.1.0-beta.2

View File

@ -3,8 +3,6 @@
module Stripe module Stripe
module ApiVersion module ApiVersion
# rubocop:disable Layout/LineLength CURRENT = "2022-08-01"
CURRENT = "2022-08-01; server_side_confirmation_beta=v1; orders_beta=v4; terminal_interac_refunds_beta=v1"
# rubocop:enable Layout/LineLength
end end
end end

View File

@ -14,6 +14,7 @@ module Stripe
# business objects # business objects
Account::OBJECT_NAME => Account, Account::OBJECT_NAME => Account,
AccountLink::OBJECT_NAME => AccountLink, AccountLink::OBJECT_NAME => AccountLink,
AccountSession::OBJECT_NAME => AccountSession,
ApplePayDomain::OBJECT_NAME => ApplePayDomain, ApplePayDomain::OBJECT_NAME => ApplePayDomain,
ApplicationFee::OBJECT_NAME => ApplicationFee, ApplicationFee::OBJECT_NAME => ApplicationFee,
ApplicationFeeRefund::OBJECT_NAME => ApplicationFeeRefund, ApplicationFeeRefund::OBJECT_NAME => ApplicationFeeRefund,
@ -34,6 +35,7 @@ module Stripe
CreditNoteLineItem::OBJECT_NAME => CreditNoteLineItem, CreditNoteLineItem::OBJECT_NAME => CreditNoteLineItem,
Customer::OBJECT_NAME => Customer, Customer::OBJECT_NAME => Customer,
CustomerBalanceTransaction::OBJECT_NAME => CustomerBalanceTransaction, CustomerBalanceTransaction::OBJECT_NAME => CustomerBalanceTransaction,
CustomerCashBalanceTransaction::OBJECT_NAME => CustomerCashBalanceTransaction,
Discount::OBJECT_NAME => Discount, Discount::OBJECT_NAME => Discount,
Dispute::OBJECT_NAME => Dispute, Dispute::OBJECT_NAME => Dispute,
EphemeralKey::OBJECT_NAME => EphemeralKey, EphemeralKey::OBJECT_NAME => EphemeralKey,

View File

@ -3,6 +3,7 @@
require "stripe/resources/account" require "stripe/resources/account"
require "stripe/resources/account_link" require "stripe/resources/account_link"
require "stripe/resources/account_session"
require "stripe/resources/apple_pay_domain" require "stripe/resources/apple_pay_domain"
require "stripe/resources/application_fee" require "stripe/resources/application_fee"
require "stripe/resources/application_fee_refund" require "stripe/resources/application_fee_refund"
@ -23,6 +24,7 @@ require "stripe/resources/credit_note"
require "stripe/resources/credit_note_line_item" require "stripe/resources/credit_note_line_item"
require "stripe/resources/customer" require "stripe/resources/customer"
require "stripe/resources/customer_balance_transaction" require "stripe/resources/customer_balance_transaction"
require "stripe/resources/customer_cash_balance_transaction"
require "stripe/resources/discount" require "stripe/resources/discount"
require "stripe/resources/dispute" require "stripe/resources/dispute"
require "stripe/resources/ephemeral_key" require "stripe/resources/ephemeral_key"

View File

@ -2,6 +2,12 @@
# frozen_string_literal: true # frozen_string_literal: true
module Stripe module Stripe
# This is an object representing a Stripe account. You can retrieve it to see
# properties on the account like its current e-mail address or if the account is
# enabled yet to make live charges.
#
# Some properties, marked below, are available only to platforms that want to
# [create and manage Express or Custom accounts](https://stripe.com/docs/connect/accounts).
class Account < APIResource class Account < APIResource
extend Gem::Deprecate extend Gem::Deprecate
extend Stripe::APIOperations::Create extend Stripe::APIOperations::Create

View File

@ -2,6 +2,10 @@
# frozen_string_literal: true # frozen_string_literal: true
module Stripe module Stripe
# Account Links are the means by which a Connect platform grants a connected account permission to access
# Stripe-hosted applications, such as Connect Onboarding.
#
# Related guide: [Connect Onboarding](https://stripe.com/docs/connect/connect-onboarding).
class AccountLink < APIResource class AccountLink < APIResource
extend Stripe::APIOperations::Create extend Stripe::APIOperations::Create

View File

@ -0,0 +1,17 @@
# File generated from our OpenAPI spec
# frozen_string_literal: true
module Stripe
# An AccountSession allows a Connect platform to grant access to a connected account in Connect Elements.
#
# We recommend that you create an AccountSession each time you need to display an embedded UI
# to your user. Do not save AccountSessions to your database as they expire relatively
# quickly, and cannot be used more than once.
#
# Related guide: [Connect Elements](https://stripe.com/docs/connect/get-started-connect-elements).
class AccountSession < APIResource
extend Stripe::APIOperations::Create
OBJECT_NAME = "account_session"
end
end

View File

@ -2,6 +2,11 @@
# frozen_string_literal: true # frozen_string_literal: true
module Stripe module Stripe
# `Application Fee Refund` objects allow you to refund an application fee that
# has previously been created but not yet refunded. Funds will be refunded to
# the Stripe account from which the fee was originally collected.
#
# Related guide: [Refunding Application Fees](https://stripe.com/docs/connect/destination-charges#refunding-app-fee).
class ApplicationFeeRefund < APIResource class ApplicationFeeRefund < APIResource
extend Stripe::APIOperations::List extend Stripe::APIOperations::List
include Stripe::APIOperations::Save include Stripe::APIOperations::Save

View File

@ -3,6 +3,15 @@
module Stripe module Stripe
module Apps module Apps
# Secret Store is an API that allows Stripe Apps developers to securely persist secrets for use by UI Extensions and app backends.
#
# The primary resource in Secret Store is a `secret`. Other apps can't view secrets created by an app. Additionally, secrets are scoped to provide further permission control.
#
# All Dashboard users and the app backend share `account` scoped secrets. Use the `account` scope for secrets that don't change per-user, like a third-party API key.
#
# A `user` scoped secret is accessible by the app backend and one specific Dashboard user. Use the `user` scope for per-user secrets like per-user OAuth tokens, where different users might have different permissions.
#
# Related guide: [Store data between page reloads](https://stripe.com/docs/stripe-apps/store-auth-data-custom-objects).
class Secret < APIResource class Secret < APIResource
extend Stripe::APIOperations::Create extend Stripe::APIOperations::Create
extend Stripe::APIOperations::List extend Stripe::APIOperations::List

View File

@ -2,6 +2,17 @@
# frozen_string_literal: true # frozen_string_literal: true
module Stripe module Stripe
# This is an object representing your Stripe balance. You can retrieve it to see
# the balance currently on your Stripe account.
#
# You can also retrieve the balance history, which contains a list of
# [transactions](https://stripe.com/docs/reporting/balance-transaction-types) that contributed to the balance
# (charges, payouts, and so forth).
#
# The available and pending amounts for each currency are broken down further by
# payment source types.
#
# Related guide: [Understanding Connect Account Balances](https://stripe.com/docs/connect/account-balances).
class Balance < SingletonAPIResource class Balance < SingletonAPIResource
OBJECT_NAME = "balance" OBJECT_NAME = "balance"
end end

View File

@ -2,6 +2,10 @@
# frozen_string_literal: true # frozen_string_literal: true
module Stripe module Stripe
# Balance transactions represent funds moving through your Stripe account.
# They're created for every type of transaction that comes into or flows out of your Stripe account balance.
#
# Related guide: [Balance Transaction Types](https://stripe.com/docs/reports/balance-transaction-types).
class BalanceTransaction < APIResource class BalanceTransaction < APIResource
extend Stripe::APIOperations::List extend Stripe::APIOperations::List

View File

@ -2,6 +2,13 @@
# frozen_string_literal: true # frozen_string_literal: true
module Stripe module Stripe
# These bank accounts are payment methods on `Customer` objects.
#
# On the other hand [External Accounts](https://stripe.com/docs/api#external_accounts) are transfer
# destinations on `Account` objects for [Custom accounts](https://stripe.com/docs/connect/custom-accounts).
# They can be bank accounts or debit cards as well, and are documented in the links above.
#
# Related guide: [Bank Debits and Transfers](https://stripe.com/docs/payments/bank-debits-transfers).
class BankAccount < APIResource class BankAccount < APIResource
include Stripe::APIOperations::Delete include Stripe::APIOperations::Delete
extend Stripe::APIOperations::List extend Stripe::APIOperations::List

View File

@ -3,6 +3,7 @@
module Stripe module Stripe
module BillingPortal module BillingPortal
# A portal configuration describes the functionality and behavior of a portal session.
class Configuration < APIResource class Configuration < APIResource
extend Stripe::APIOperations::Create extend Stripe::APIOperations::Create
extend Stripe::APIOperations::List extend Stripe::APIOperations::List

View File

@ -3,6 +3,20 @@
module Stripe module Stripe
module BillingPortal module BillingPortal
# The Billing customer portal is a Stripe-hosted UI for subscription and
# billing management.
#
# A portal configuration describes the functionality and features that you
# want to provide to your customers through the portal.
#
# A portal session describes the instantiation of the customer portal for
# a particular customer. By visiting the session's URL, the customer
# can manage their subscriptions and billing details. For security reasons,
# sessions are short-lived and will expire if the customer does not visit the URL.
# Create sessions on-demand when customers intend to manage their subscriptions
# and billing details.
#
# Learn more in the [integration guide](https://stripe.com/docs/billing/subscriptions/integrating-customer-portal).
class Session < APIResource class Session < APIResource
extend Stripe::APIOperations::Create extend Stripe::APIOperations::Create

View File

@ -2,6 +2,9 @@
# frozen_string_literal: true # frozen_string_literal: true
module Stripe module Stripe
# This is an object representing a capability for a Stripe account.
#
# Related guide: [Account capabilities](https://stripe.com/docs/connect/account-capabilities).
class Capability < APIResource class Capability < APIResource
extend Stripe::APIOperations::List extend Stripe::APIOperations::List
include Stripe::APIOperations::Save include Stripe::APIOperations::Save

View File

@ -2,6 +2,11 @@
# frozen_string_literal: true # frozen_string_literal: true
module Stripe module Stripe
# You can store multiple cards on a customer in order to charge the customer
# later. You can also store multiple debit cards on a recipient in order to
# transfer to those cards later.
#
# Related guide: [Card Payments with Sources](https://stripe.com/docs/sources/cards).
class Card < APIResource class Card < APIResource
include Stripe::APIOperations::Delete include Stripe::APIOperations::Delete
extend Stripe::APIOperations::List extend Stripe::APIOperations::List

View File

@ -2,6 +2,7 @@
# frozen_string_literal: true # frozen_string_literal: true
module Stripe module Stripe
# A customer's `Cash balance` represents real funds. Customers can add funds to their cash balance by sending a bank transfer. These funds can be used for payment and can eventually be paid out to your bank account.
class CashBalance < APIResource class CashBalance < APIResource
OBJECT_NAME = "cash_balance" OBJECT_NAME = "cash_balance"

View File

@ -2,6 +2,11 @@
# frozen_string_literal: true # frozen_string_literal: true
module Stripe module Stripe
# To charge a credit or a debit card, you create a `Charge` object. You can
# retrieve and refund individual charges as well as list all charges. Charges
# are identified by a unique, random ID.
#
# Related guide: [Accept a payment with the Charges API](https://stripe.com/docs/payments/accept-a-payment-charges).
class Charge < APIResource class Charge < APIResource
extend Stripe::APIOperations::Create extend Stripe::APIOperations::Create
extend Stripe::APIOperations::List extend Stripe::APIOperations::List

View File

@ -3,6 +3,20 @@
module Stripe module Stripe
module Checkout module Checkout
# A Checkout Session represents your customer's session as they pay for
# one-time purchases or subscriptions through [Checkout](https://stripe.com/docs/payments/checkout)
# or [Payment Links](https://stripe.com/docs/payments/payment-links). We recommend creating a
# new Session each time your customer attempts to pay.
#
# Once payment is successful, the Checkout Session will contain a reference
# to the [Customer](https://stripe.com/docs/api/customers), and either the successful
# [PaymentIntent](https://stripe.com/docs/api/payment_intents) or an active
# [Subscription](https://stripe.com/docs/api/subscriptions).
#
# You can create a Checkout Session on your server and pass its ID to the
# client to begin Checkout.
#
# Related guide: [Checkout Quickstart](https://stripe.com/docs/checkout/quickstart).
class Session < APIResource class Session < APIResource
extend Stripe::APIOperations::Create extend Stripe::APIOperations::Create
extend Stripe::APIOperations::List extend Stripe::APIOperations::List

View File

@ -2,6 +2,12 @@
# frozen_string_literal: true # frozen_string_literal: true
module Stripe module Stripe
# Stripe needs to collect certain pieces of information about each account
# created. These requirements can differ depending on the account's country. The
# Country Specs API makes these rules available to your integration.
#
# You can also view the information from this API call as [an online
# guide](https://stripe.com/docs/connect/required-verification-information).
class CountrySpec < APIResource class CountrySpec < APIResource
extend Stripe::APIOperations::List extend Stripe::APIOperations::List

View File

@ -2,6 +2,9 @@
# frozen_string_literal: true # frozen_string_literal: true
module Stripe module Stripe
# A coupon contains information about a percent-off or amount-off discount you
# might want to apply to a customer. Coupons may be applied to [subscriptions](https://stripe.com/docs/api#subscriptions), [invoices](https://stripe.com/docs/api#invoices),
# [checkout sessions](https://stripe.com/docs/api/checkout/sessions), [quotes](https://stripe.com/docs/api#quotes), and more. Coupons do not work with conventional one-off [charges](https://stripe.com/docs/api#create_charge) or [payment intents](https://stripe.com/docs/api/payment_intents).
class Coupon < APIResource class Coupon < APIResource
extend Stripe::APIOperations::Create extend Stripe::APIOperations::Create
include Stripe::APIOperations::Delete include Stripe::APIOperations::Delete

View File

@ -2,6 +2,9 @@
# frozen_string_literal: true # frozen_string_literal: true
module Stripe module Stripe
# Issue a credit note to adjust an invoice's amount after the invoice is finalized.
#
# Related guide: [Credit Notes](https://stripe.com/docs/billing/invoices/credit-notes).
class CreditNote < APIResource class CreditNote < APIResource
extend Stripe::APIOperations::Create extend Stripe::APIOperations::Create
extend Stripe::APIOperations::List extend Stripe::APIOperations::List

View File

@ -2,6 +2,9 @@
# frozen_string_literal: true # frozen_string_literal: true
module Stripe module Stripe
# This object represents a customer of your business. It lets you create recurring charges and track payments that belong to the same customer.
#
# Related guide: [Save a card during payment](https://stripe.com/docs/payments/save-during-payment).
class Customer < APIResource class Customer < APIResource
extend Stripe::APIOperations::Create extend Stripe::APIOperations::Create
include Stripe::APIOperations::Delete include Stripe::APIOperations::Delete
@ -14,6 +17,8 @@ module Stripe
nested_resource_class_methods :balance_transaction, nested_resource_class_methods :balance_transaction,
operations: %i[create retrieve update list] operations: %i[create retrieve update list]
nested_resource_class_methods :cash_balance_transaction,
operations: %i[retrieve list]
nested_resource_class_methods :tax_id, nested_resource_class_methods :tax_id,
operations: %i[create retrieve delete list] operations: %i[create retrieve delete list]

View File

@ -2,6 +2,12 @@
# frozen_string_literal: true # frozen_string_literal: true
module Stripe module Stripe
# Each customer has a [`balance`](https://stripe.com/docs/api/customers/object#customer_object-balance) value,
# which denotes a debit or credit that's automatically applied to their next invoice upon finalization.
# You may modify the value directly by using the [update customer API](https://stripe.com/docs/api/customers/update),
# or by creating a Customer Balance Transaction, which increments or decrements the customer's `balance` by the specified `amount`.
#
# Related guide: [Customer Balance](https://stripe.com/docs/billing/customer/balance) to learn more.
class CustomerBalanceTransaction < APIResource class CustomerBalanceTransaction < APIResource
extend Stripe::APIOperations::List extend Stripe::APIOperations::List
include Stripe::APIOperations::Save include Stripe::APIOperations::Save

View File

@ -0,0 +1,14 @@
# File generated from our OpenAPI spec
# frozen_string_literal: true
module Stripe
# Customers with certain payments enabled have a cash balance, representing funds that were paid
# by the customer to a merchant, but have not yet been allocated to a payment. Cash Balance Transactions
# represent when funds are moved into or out of this balance. This includes funding by the customer, allocation
# to payments, and refunds to the customer.
class CustomerCashBalanceTransaction < APIResource
extend Stripe::APIOperations::List
OBJECT_NAME = "customer_cash_balance_transaction"
end
end

View File

@ -2,6 +2,10 @@
# frozen_string_literal: true # frozen_string_literal: true
module Stripe module Stripe
# A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes).
# It contains information about when the discount began, when it will end, and what it is applied to.
#
# Related guide: [Applying Discounts to Subscriptions](https://stripe.com/docs/billing/subscriptions/discounts).
class Discount < StripeObject class Discount < StripeObject
OBJECT_NAME = "discount" OBJECT_NAME = "discount"
end end

View File

@ -2,6 +2,13 @@
# frozen_string_literal: true # frozen_string_literal: true
module Stripe module Stripe
# A dispute occurs when a customer questions your charge with their card issuer.
# When this happens, you're given the opportunity to respond to the dispute with
# evidence that shows that the charge is legitimate. You can find more
# information about the dispute process in our [Disputes and
# Fraud](https://stripe.com/docs/disputes) documentation.
#
# Related guide: [Disputes and Fraud](https://stripe.com/docs/disputes).
class Dispute < APIResource class Dispute < APIResource
extend Stripe::APIOperations::List extend Stripe::APIOperations::List
include Stripe::APIOperations::Save include Stripe::APIOperations::Save

View File

@ -2,6 +2,35 @@
# frozen_string_literal: true # frozen_string_literal: true
module Stripe module Stripe
# Events are our way of letting you know when something interesting happens in
# your account. When an interesting event occurs, we create a new `Event`
# object. For example, when a charge succeeds, we create a `charge.succeeded`
# event; and when an invoice payment attempt fails, we create an
# `invoice.payment_failed` event. Note that many API requests may cause multiple
# events to be created. For example, if you create a new subscription for a
# customer, you will receive both a `customer.subscription.created` event and a
# `charge.succeeded` event.
#
# Events occur when the state of another API resource changes. The state of that
# resource at the time of the change is embedded in the event's data field. For
# example, a `charge.succeeded` event will contain a charge, and an
# `invoice.payment_failed` event will contain an invoice.
#
# As with other API resources, you can use endpoints to retrieve an
# [individual event](https://stripe.com/docs/api#retrieve_event) or a [list of events](https://stripe.com/docs/api#list_events)
# from the API. We also have a separate
# [webhooks](http://en.wikipedia.org/wiki/Webhook) system for sending the
# `Event` objects directly to an endpoint on your server. Webhooks are managed
# in your
# [account settings](https://dashboard.stripe.com/account/webhooks),
# and our [Using Webhooks](https://stripe.com/docs/webhooks) guide will help you get set up.
#
# When using [Connect](https://stripe.com/docs/connect), you can also receive notifications of
# events that occur in connected accounts. For these events, there will be an
# additional `account` attribute in the received `Event` object.
#
# **NOTE:** Right now, access to events through the [Retrieve Event API](https://stripe.com/docs/api#retrieve_event) is
# guaranteed only for 30 days.
class Event < APIResource class Event < APIResource
extend Stripe::APIOperations::List extend Stripe::APIOperations::List

View File

@ -2,6 +2,17 @@
# frozen_string_literal: true # frozen_string_literal: true
module Stripe module Stripe
# `Exchange Rate` objects allow you to determine the rates that Stripe is
# currently using to convert from one currency to another. Since this number is
# variable throughout the day, there are various reasons why you might want to
# know the current rate (for example, to dynamically price an item for a user
# with a default payment in a foreign currency).
#
# If you want a guarantee that the charge is made with a certain exchange rate
# you expect is current, you can pass in `exchange_rate` to charges endpoints.
# If the value is no longer up to date, the charge won't go through. Please
# refer to our [Exchange Rates API](https://stripe.com/docs/exchange-rates) guide for more
# details.
class ExchangeRate < APIResource class ExchangeRate < APIResource
extend Stripe::APIOperations::List extend Stripe::APIOperations::List

View File

@ -2,6 +2,13 @@
# frozen_string_literal: true # frozen_string_literal: true
module Stripe module Stripe
# This is an object representing a file hosted on Stripe's servers. The
# file may have been uploaded by yourself using the [create file](https://stripe.com/docs/api#create_file)
# request (for example, when uploading dispute evidence) or it may have
# been created by Stripe (for example, the results of a [Sigma scheduled
# query](https://stripe.com/docs/api#scheduled_queries)).
#
# Related guide: [File Upload Guide](https://stripe.com/docs/file-upload).
class File < APIResource class File < APIResource
extend Stripe::APIOperations::Create extend Stripe::APIOperations::Create
extend Stripe::APIOperations::List extend Stripe::APIOperations::List

View File

@ -2,6 +2,9 @@
# frozen_string_literal: true # frozen_string_literal: true
module Stripe module Stripe
# To share the contents of a `File` object with non-Stripe users, you can
# create a `FileLink`. `FileLink`s contain a URL that can be used to
# retrieve the contents of the file without authentication.
class FileLink < APIResource class FileLink < APIResource
extend Stripe::APIOperations::Create extend Stripe::APIOperations::Create
extend Stripe::APIOperations::List extend Stripe::APIOperations::List

View File

@ -3,6 +3,7 @@
module Stripe module Stripe
module FinancialConnections module FinancialConnections
# A Financial Connections Account represents an account that exists outside of Stripe, to which you have been granted some degree of access.
class Account < APIResource class Account < APIResource
extend Stripe::APIOperations::List extend Stripe::APIOperations::List

View File

@ -3,6 +3,7 @@
module Stripe module Stripe
module FinancialConnections module FinancialConnections
# Describes a snapshot of the owners of an account at a particular point in time.
class AccountOwnership < StripeObject class AccountOwnership < StripeObject
OBJECT_NAME = "financial_connections.account_ownership" OBJECT_NAME = "financial_connections.account_ownership"
end end

View File

@ -3,6 +3,7 @@
module Stripe module Stripe
module FinancialConnections module FinancialConnections
# A Financial Connections Session is the secure way to programmatically launch the client-side Stripe.js modal that lets your users link their accounts.
class Session < APIResource class Session < APIResource
extend Stripe::APIOperations::Create extend Stripe::APIOperations::Create

View File

@ -2,6 +2,11 @@
# frozen_string_literal: true # frozen_string_literal: true
module Stripe module Stripe
# Each customer has a [`balance`](https://stripe.com/docs/api/customers/object#customer_object-balance) that is
# automatically applied to future invoices and payments using the `customer_balance` payment method.
# Customers can fund this balance by initiating a bank transfer to any account in the
# `financial_addresses` field.
# Related guide: [Customer Balance - Funding Instructions](https://stripe.com/docs/payments/customer-balance/funding-instructions) to learn more
class FundingInstructions < APIResource class FundingInstructions < APIResource
OBJECT_NAME = "funding_instructions" OBJECT_NAME = "funding_instructions"

View File

@ -3,6 +3,17 @@
module Stripe module Stripe
module Identity module Identity
# A VerificationReport is the result of an attempt to collect and verify data from a user.
# The collection of verification checks performed is determined from the `type` and `options`
# parameters used. You can find the result of each verification check performed in the
# appropriate sub-resource: `document`, `id_number`, `selfie`.
#
# Each VerificationReport contains a copy of any data collected by the user as well as
# reference IDs which can be used to access collected images through the [FileUpload](https://stripe.com/docs/api/files)
# API. To configure and create VerificationReports, use the
# [VerificationSession](https://stripe.com/docs/api/identity/verification_sessions) API.
#
# Related guides: [Accessing verification results](https://stripe.com/docs/identity/verification-sessions#results).
class VerificationReport < APIResource class VerificationReport < APIResource
extend Stripe::APIOperations::List extend Stripe::APIOperations::List

View File

@ -3,6 +3,17 @@
module Stripe module Stripe
module Identity module Identity
# A VerificationSession guides you through the process of collecting and verifying the identities
# of your users. It contains details about the type of verification, such as what [verification
# check](https://stripe.com/docs/identity/verification-checks) to perform. Only create one VerificationSession for
# each verification in your system.
#
# A VerificationSession transitions through [multiple
# statuses](https://stripe.com/docs/identity/how-sessions-work) throughout its lifetime as it progresses through
# the verification flow. The VerificationSession contains the user's verified data after
# verification checks are complete.
#
# Related guide: [The Verification Sessions API](https://stripe.com/docs/identity/verification-sessions)
class VerificationSession < APIResource class VerificationSession < APIResource
extend Stripe::APIOperations::Create extend Stripe::APIOperations::Create
extend Stripe::APIOperations::List extend Stripe::APIOperations::List

View File

@ -2,6 +2,38 @@
# frozen_string_literal: true # frozen_string_literal: true
module Stripe module Stripe
# Invoices are statements of amounts owed by a customer, and are either
# generated one-off, or generated periodically from a subscription.
#
# They contain [invoice items](https://stripe.com/docs/api#invoiceitems), and proration adjustments
# that may be caused by subscription upgrades/downgrades (if necessary).
#
# If your invoice is configured to be billed through automatic charges,
# Stripe automatically finalizes your invoice and attempts payment. Note
# that finalizing the invoice,
# [when automatic](https://stripe.com/docs/billing/invoices/workflow/#auto_advance), does
# not happen immediately as the invoice is created. Stripe waits
# until one hour after the last webhook was successfully sent (or the last
# webhook timed out after failing). If you (and the platforms you may have
# connected to) have no webhooks configured, Stripe waits one hour after
# creation to finalize the invoice.
#
# If your invoice is configured to be billed by sending an email, then based on your
# [email settings](https://dashboard.stripe.com/account/billing/automatic),
# Stripe will email the invoice to your customer and await payment. These
# emails can contain a link to a hosted page to pay the invoice.
#
# Stripe applies any customer credit on the account before determining the
# amount due for the invoice (i.e., the amount that will be actually
# charged). If the amount due for the invoice is less than Stripe's [minimum allowed charge
# per currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts), the
# invoice is automatically marked paid, and we add the amount due to the
# customer's credit balance which is applied to the next invoice.
#
# More details on the customer's credit balance are
# [here](https://stripe.com/docs/billing/customer/balance).
#
# Related guide: [Send Invoices to Customers](https://stripe.com/docs/billing/invoices/sending).
class Invoice < APIResource class Invoice < APIResource
extend Stripe::APIOperations::Create extend Stripe::APIOperations::Create
include Stripe::APIOperations::Delete include Stripe::APIOperations::Delete

View File

@ -2,6 +2,13 @@
# frozen_string_literal: true # frozen_string_literal: true
module Stripe module Stripe
# Sometimes you want to add a charge or credit to a customer, but actually
# charge or credit the customer's card only at the end of a regular billing
# cycle. This is useful for combining several charges (to minimize
# per-transaction fees), or for having Stripe tabulate your usage-based billing
# totals.
#
# Related guide: [Subscription Invoices](https://stripe.com/docs/billing/invoices/subscription#adding-upcoming-invoice-items).
class InvoiceItem < APIResource class InvoiceItem < APIResource
extend Stripe::APIOperations::Create extend Stripe::APIOperations::Create
include Stripe::APIOperations::Delete include Stripe::APIOperations::Delete

View File

@ -3,6 +3,11 @@
module Stripe module Stripe
module Issuing module Issuing
# When an [issued card](https://stripe.com/docs/issuing) is used to make a purchase, an Issuing `Authorization`
# object is created. [Authorizations](https://stripe.com/docs/issuing/purchases/authorizations) must be approved for the
# purchase to be completed successfully.
#
# Related guide: [Issued Card Authorizations](https://stripe.com/docs/issuing/purchases/authorizations).
class Authorization < APIResource class Authorization < APIResource
extend Stripe::APIOperations::List extend Stripe::APIOperations::List
include Stripe::APIOperations::Save include Stripe::APIOperations::Save

View File

@ -3,6 +3,7 @@
module Stripe module Stripe
module Issuing module Issuing
# You can [create physical or virtual cards](https://stripe.com/docs/issuing/cards) that are issued to cardholders.
class Card < APIResource class Card < APIResource
extend Stripe::APIOperations::Create extend Stripe::APIOperations::Create
extend Stripe::APIOperations::List extend Stripe::APIOperations::List

View File

@ -3,6 +3,9 @@
module Stripe module Stripe
module Issuing module Issuing
# An Issuing `Cardholder` object represents an individual or business entity who is [issued](https://stripe.com/docs/issuing) cards.
#
# Related guide: [How to create a Cardholder](https://stripe.com/docs/issuing/cards#create-cardholder)
class Cardholder < APIResource class Cardholder < APIResource
extend Stripe::APIOperations::Create extend Stripe::APIOperations::Create
extend Stripe::APIOperations::List extend Stripe::APIOperations::List

View File

@ -3,6 +3,9 @@
module Stripe module Stripe
module Issuing module Issuing
# As a [card issuer](https://stripe.com/docs/issuing), you can dispute transactions that the cardholder does not recognize, suspects to be fraudulent, or has other issues with.
#
# Related guide: [Disputing Transactions](https://stripe.com/docs/issuing/purchases/disputes)
class Dispute < APIResource class Dispute < APIResource
extend Stripe::APIOperations::Create extend Stripe::APIOperations::Create
extend Stripe::APIOperations::List extend Stripe::APIOperations::List

View File

@ -3,6 +3,11 @@
module Stripe module Stripe
module Issuing module Issuing
# Any use of an [issued card](https://stripe.com/docs/issuing) that results in funds entering or leaving
# your Stripe account, such as a completed purchase or refund, is represented by an Issuing
# `Transaction` object.
#
# Related guide: [Issued Card Transactions](https://stripe.com/docs/issuing/purchases/transactions).
class Transaction < APIResource class Transaction < APIResource
extend Stripe::APIOperations::List extend Stripe::APIOperations::List
include Stripe::APIOperations::Save include Stripe::APIOperations::Save

View File

@ -2,6 +2,7 @@
# frozen_string_literal: true # frozen_string_literal: true
module Stripe module Stripe
# A line item.
class LineItem < APIResource class LineItem < APIResource
OBJECT_NAME = "item" OBJECT_NAME = "item"
end end

View File

@ -2,6 +2,7 @@
# frozen_string_literal: true # frozen_string_literal: true
module Stripe module Stripe
# A Mandate is a record of the permission a customer has given you to debit their payment method.
class Mandate < APIResource class Mandate < APIResource
OBJECT_NAME = "mandate" OBJECT_NAME = "mandate"
end end

View File

@ -2,6 +2,11 @@
# frozen_string_literal: true # frozen_string_literal: true
module Stripe module Stripe
# An Order describes a purchase being made by a customer, including the
# products & quantities being purchased, the order status, the payment information,
# and the billing/shipping details.
#
# Related guide: [Orders overview](https://stripe.com/docs/orders)
class Order < APIResource class Order < APIResource
extend Stripe::APIOperations::Create extend Stripe::APIOperations::Create
extend Stripe::APIOperations::List extend Stripe::APIOperations::List

View File

@ -2,6 +2,17 @@
# frozen_string_literal: true # frozen_string_literal: true
module Stripe module Stripe
# A PaymentIntent guides you through the process of collecting a payment from your customer.
# We recommend that you create exactly one PaymentIntent for each order or
# customer session in your system. You can reference the PaymentIntent later to
# see the history of payment attempts for a particular session.
#
# A PaymentIntent transitions through
# [multiple statuses](https://stripe.com/docs/payments/intents#intent-statuses)
# throughout its lifetime as it interfaces with Stripe.js to perform
# authentication flows and ultimately creates at most one successful charge.
#
# Related guide: [Payment Intents API](https://stripe.com/docs/payments/payment-intents).
class PaymentIntent < APIResource class PaymentIntent < APIResource
extend Stripe::APIOperations::Create extend Stripe::APIOperations::Create
extend Stripe::APIOperations::List extend Stripe::APIOperations::List

View File

@ -2,6 +2,11 @@
# frozen_string_literal: true # frozen_string_literal: true
module Stripe module Stripe
# A payment link is a shareable URL that will take your customers to a hosted payment page. A payment link can be shared and used multiple times.
#
# When a customer opens a payment link it will open a new [checkout session](https://stripe.com/docs/api/checkout/sessions) to render the payment page. You can use [checkout session events](https://stripe.com/docs/api/events/types#event_types-checkout.session.completed) to track payments through payment links.
#
# Related guide: [Payment Links API](https://stripe.com/docs/payments/payment-links/api)
class PaymentLink < APIResource class PaymentLink < APIResource
extend Stripe::APIOperations::Create extend Stripe::APIOperations::Create
extend Stripe::APIOperations::List extend Stripe::APIOperations::List

View File

@ -2,6 +2,11 @@
# frozen_string_literal: true # frozen_string_literal: true
module Stripe module Stripe
# PaymentMethod objects represent your customer's payment instruments.
# You can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to
# Customer objects to store instrument details for future payments.
#
# Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios).
class PaymentMethod < APIResource class PaymentMethod < APIResource
extend Stripe::APIOperations::Create extend Stripe::APIOperations::Create
extend Stripe::APIOperations::List extend Stripe::APIOperations::List

View File

@ -2,6 +2,14 @@
# frozen_string_literal: true # frozen_string_literal: true
module Stripe module Stripe
# A `Payout` object is created when you receive funds from Stripe, or when you
# initiate a payout to either a bank account or debit card of a [connected
# Stripe account](https://stripe.com/docs/connect/bank-debit-card-payouts). You can retrieve individual payouts,
# as well as list all payouts. Payouts are made on [varying
# schedules](https://stripe.com/docs/connect/manage-payout-schedule), depending on your country and
# industry.
#
# Related guide: [Receiving Payouts](https://stripe.com/docs/payouts).
class Payout < APIResource class Payout < APIResource
extend Stripe::APIOperations::Create extend Stripe::APIOperations::Create
extend Stripe::APIOperations::List extend Stripe::APIOperations::List

View File

@ -2,6 +2,12 @@
# frozen_string_literal: true # frozen_string_literal: true
module Stripe module Stripe
# This is an object representing a person associated with a Stripe account.
#
# A platform cannot access a Standard or Express account's persons after the account starts onboarding, such as after generating an account link for the account.
# See the [Standard onboarding](https://stripe.com/docs/connect/standard-accounts) or [Express onboarding documentation](https://stripe.com/docs/connect/express-accounts) for information about platform pre-filling and account onboarding steps.
#
# Related guide: [Handling Identity Verification with the API](https://stripe.com/docs/connect/identity-verification-api#person-information).
class Person < APIResource class Person < APIResource
extend Stripe::APIOperations::List extend Stripe::APIOperations::List
include Stripe::APIOperations::Save include Stripe::APIOperations::Save

View File

@ -2,6 +2,14 @@
# frozen_string_literal: true # frozen_string_literal: true
module Stripe module Stripe
# You can now model subscriptions more flexibly using the [Prices API](https://stripe.com/docs/api#prices). It replaces the Plans API and is backwards compatible to simplify your migration.
#
# Plans define the base price, currency, and billing cycle for recurring purchases of products.
# [Products](https://stripe.com/docs/api#products) help you track inventory or provisioning, and plans help you track pricing. Different physical goods or levels of service should be represented by products, and pricing options should be represented by plans. This approach lets you change prices without having to change your provisioning scheme.
#
# For example, you might have a single "gold" product that has plans for $10/month, $100/year, €9/month, and €90/year.
#
# Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription) and more about [products and prices](https://stripe.com/docs/products-prices/overview).
class Plan < APIResource class Plan < APIResource
extend Stripe::APIOperations::Create extend Stripe::APIOperations::Create
include Stripe::APIOperations::Delete include Stripe::APIOperations::Delete

View File

@ -2,6 +2,12 @@
# frozen_string_literal: true # frozen_string_literal: true
module Stripe module Stripe
# Prices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products.
# [Products](https://stripe.com/docs/api#products) help you track inventory or provisioning, and prices help you track payment terms. Different physical goods or levels of service should be represented by products, and pricing options should be represented by prices. This approach lets you change prices without having to change your provisioning scheme.
#
# For example, you might have a single "gold" product that has prices for $10/month, $100/year, and €9 once.
#
# Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription), [create an invoice](https://stripe.com/docs/billing/invoices/create), and more about [products and prices](https://stripe.com/docs/products-prices/overview).
class Price < APIResource class Price < APIResource
extend Stripe::APIOperations::Create extend Stripe::APIOperations::Create
extend Stripe::APIOperations::List extend Stripe::APIOperations::List

View File

@ -2,6 +2,14 @@
# frozen_string_literal: true # frozen_string_literal: true
module Stripe module Stripe
# Products describe the specific goods or services you offer to your customers.
# For example, you might offer a Standard and Premium version of your goods or service; each version would be a separate Product.
# They can be used in conjunction with [Prices](https://stripe.com/docs/api#prices) to configure pricing in Payment Links, Checkout, and Subscriptions.
#
# Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription),
# [share a Payment Link](https://stripe.com/docs/payments/payment-links/overview),
# [accept payments with Checkout](https://stripe.com/docs/payments/accept-a-payment#create-product-prices-upfront),
# and more about [Products and Prices](https://stripe.com/docs/products-prices/overview)
class Product < APIResource class Product < APIResource
extend Stripe::APIOperations::Create extend Stripe::APIOperations::Create
include Stripe::APIOperations::Delete include Stripe::APIOperations::Delete

View File

@ -2,6 +2,8 @@
# frozen_string_literal: true # frozen_string_literal: true
module Stripe module Stripe
# A Promotion Code represents a customer-redeemable code for a [coupon](https://stripe.com/docs/api#coupons). It can be used to
# create multiple codes for a single coupon.
class PromotionCode < APIResource class PromotionCode < APIResource
extend Stripe::APIOperations::Create extend Stripe::APIOperations::Create
extend Stripe::APIOperations::List extend Stripe::APIOperations::List

View File

@ -2,6 +2,8 @@
# frozen_string_literal: true # frozen_string_literal: true
module Stripe module Stripe
# A Quote is a way to model prices that you'd like to provide to a customer.
# Once accepted, it will automatically create an invoice, subscription or subscription schedule.
class Quote < APIResource class Quote < APIResource
extend Stripe::APIOperations::Create extend Stripe::APIOperations::Create
extend Stripe::APIOperations::List extend Stripe::APIOperations::List

View File

@ -2,6 +2,7 @@
# frozen_string_literal: true # frozen_string_literal: true
module Stripe module Stripe
# A quote phase describes the line items, coupons, and trialing status of a subscription for a predefined time period.
class QuotePhase < APIResource class QuotePhase < APIResource
extend Stripe::APIOperations::List extend Stripe::APIOperations::List

View File

@ -3,6 +3,10 @@
module Stripe module Stripe
module Radar module Radar
# An early fraud warning indicates that the card issuer has notified us that a
# charge may be fraudulent.
#
# Related guide: [Early Fraud Warnings](https://stripe.com/docs/disputes/measuring#early-fraud-warnings).
class EarlyFraudWarning < APIResource class EarlyFraudWarning < APIResource
extend Stripe::APIOperations::List extend Stripe::APIOperations::List

View File

@ -3,6 +3,9 @@
module Stripe module Stripe
module Radar module Radar
# Value lists allow you to group values together which can then be referenced in rules.
#
# Related guide: [Default Stripe Lists](https://stripe.com/docs/radar/lists#managing-list-items).
class ValueList < APIResource class ValueList < APIResource
extend Stripe::APIOperations::Create extend Stripe::APIOperations::Create
include Stripe::APIOperations::Delete include Stripe::APIOperations::Delete

View File

@ -3,6 +3,9 @@
module Stripe module Stripe
module Radar module Radar
# Value list items allow you to add specific values to a given Radar value list, which can then be used in rules.
#
# Related guide: [Managing List Items](https://stripe.com/docs/radar/lists#managing-list-items).
class ValueListItem < APIResource class ValueListItem < APIResource
extend Stripe::APIOperations::Create extend Stripe::APIOperations::Create
include Stripe::APIOperations::Delete include Stripe::APIOperations::Delete

View File

@ -2,6 +2,11 @@
# frozen_string_literal: true # frozen_string_literal: true
module Stripe module Stripe
# `Refund` objects allow you to refund a charge that has previously been created
# but not yet refunded. Funds will be refunded to the credit or debit card that
# was originally charged.
#
# Related guide: [Refunds](https://stripe.com/docs/refunds).
class Refund < APIResource class Refund < APIResource
extend Stripe::APIOperations::Create extend Stripe::APIOperations::Create
extend Stripe::APIOperations::List extend Stripe::APIOperations::List

View File

@ -3,6 +3,14 @@
module Stripe module Stripe
module Reporting module Reporting
# The Report Run object represents an instance of a report type generated with
# specific run parameters. Once the object is created, Stripe begins processing the report.
# When the report has finished running, it will give you a reference to a file
# where you can retrieve your results. For an overview, see
# [API Access to Reports](https://stripe.com/docs/reporting/statements/api).
#
# Note that certain report types can only be run based on your live-mode data (not test-mode
# data), and will error when queried without a [live-mode API key](https://stripe.com/docs/keys#test-live-modes).
class ReportRun < APIResource class ReportRun < APIResource
extend Stripe::APIOperations::Create extend Stripe::APIOperations::Create
extend Stripe::APIOperations::List extend Stripe::APIOperations::List

View File

@ -3,6 +3,14 @@
module Stripe module Stripe
module Reporting module Reporting
# The Report Type resource corresponds to a particular type of report, such as
# the "Activity summary" or "Itemized payouts" reports. These objects are
# identified by an ID belonging to a set of enumerated values. See
# [API Access to Reports documentation](https://stripe.com/docs/reporting/statements/api)
# for those Report Type IDs, along with required and optional parameters.
#
# Note that certain report types can only be run based on your live-mode data (not test-mode
# data), and will error when queried without a [live-mode API key](https://stripe.com/docs/keys#test-live-modes).
class ReportType < APIResource class ReportType < APIResource
extend Stripe::APIOperations::List extend Stripe::APIOperations::List

View File

@ -2,6 +2,19 @@
# frozen_string_literal: true # frozen_string_literal: true
module Stripe module Stripe
# [Stripe Connect](https://stripe.com/docs/connect) platforms can reverse transfers made to a
# connected account, either entirely or partially, and can also specify whether
# to refund any related application fees. Transfer reversals add to the
# platform's balance and subtract from the destination account's balance.
#
# Reversing a transfer that was made for a [destination
# charge](https://stripe.com/docs/connect/destination-charges) is allowed only up to the amount of
# the charge. It is possible to reverse a
# [transfer_group](https://stripe.com/docs/connect/charges-transfers#transfer-options)
# transfer only if the destination account has enough balance to cover the
# reversal.
#
# Related guide: [Reversing Transfers](https://stripe.com/docs/connect/charges-transfers#reversing-transfers).
class Reversal < APIResource class Reversal < APIResource
extend Stripe::APIOperations::List extend Stripe::APIOperations::List
include Stripe::APIOperations::Save include Stripe::APIOperations::Save

View File

@ -2,6 +2,10 @@
# frozen_string_literal: true # frozen_string_literal: true
module Stripe module Stripe
# Reviews can be used to supplement automated fraud detection with human expertise.
#
# Learn more about [Radar](https://stripe.com/radar) and reviewing payments
# [here](https://stripe.com/docs/radar/reviews).
class Review < APIResource class Review < APIResource
extend Stripe::APIOperations::List extend Stripe::APIOperations::List

View File

@ -2,6 +2,10 @@
# frozen_string_literal: true # frozen_string_literal: true
module Stripe module Stripe
# A SetupAttempt describes one attempted confirmation of a SetupIntent,
# whether that confirmation was successful or unsuccessful. You can use
# SetupAttempts to inspect details of a specific attempt at setting up a
# payment method using a SetupIntent.
class SetupAttempt < APIResource class SetupAttempt < APIResource
extend Stripe::APIOperations::List extend Stripe::APIOperations::List

View File

@ -2,6 +2,28 @@
# frozen_string_literal: true # frozen_string_literal: true
module Stripe module Stripe
# A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments.
# For example, you could use a SetupIntent to set up and save your customer's card without immediately collecting a payment.
# Later, you can use [PaymentIntents](https://stripe.com/docs/api#payment_intents) to drive the payment flow.
#
# Create a SetupIntent as soon as you're ready to collect your customer's payment credentials.
# Do not maintain long-lived, unconfirmed SetupIntents as they may no longer be valid.
# The SetupIntent then transitions through multiple [statuses](https://stripe.com/docs/payments/intents#intent-statuses) as it guides
# you through the setup process.
#
# Successful SetupIntents result in payment credentials that are optimized for future payments.
# For example, cardholders in [certain regions](https://stripe.com/guides/strong-customer-authentication) may need to be run through
# [Strong Customer Authentication](https://stripe.com/docs/strong-customer-authentication) at the time of payment method collection
# in order to streamline later [off-session payments](https://stripe.com/docs/payments/setup-intents).
# If the SetupIntent is used with a [Customer](https://stripe.com/docs/api#setup_intent_object-customer), upon success,
# it will automatically attach the resulting payment method to that Customer.
# We recommend using SetupIntents or [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) on
# PaymentIntents to save payment methods in order to prevent saving invalid or unoptimized payment methods.
#
# By using SetupIntents, you ensure that your customers experience the minimum set of required friction,
# even as regulations change over time.
#
# Related guide: [Setup Intents API](https://stripe.com/docs/payments/setup-intents).
class SetupIntent < APIResource class SetupIntent < APIResource
extend Stripe::APIOperations::Create extend Stripe::APIOperations::Create
extend Stripe::APIOperations::List extend Stripe::APIOperations::List

View File

@ -2,6 +2,9 @@
# frozen_string_literal: true # frozen_string_literal: true
module Stripe module Stripe
# Shipping rates describe the price of shipping presented to your customers and can be
# applied to [Checkout Sessions](https://stripe.com/docs/payments/checkout/shipping)
# and [Orders](https://stripe.com/docs/orders/shipping) to collect shipping costs.
class ShippingRate < APIResource class ShippingRate < APIResource
extend Stripe::APIOperations::Create extend Stripe::APIOperations::Create
extend Stripe::APIOperations::List extend Stripe::APIOperations::List

View File

@ -3,6 +3,10 @@
module Stripe module Stripe
module Sigma module Sigma
# If you have [scheduled a Sigma query](https://stripe.com/docs/sigma/scheduled-queries), you'll
# receive a `sigma.scheduled_query_run.created` webhook each time the query
# runs. The webhook contains a `ScheduledQueryRun` object, which you can use to
# retrieve the query results.
class ScheduledQueryRun < APIResource class ScheduledQueryRun < APIResource
extend Stripe::APIOperations::List extend Stripe::APIOperations::List

View File

@ -2,6 +2,12 @@
# frozen_string_literal: true # frozen_string_literal: true
module Stripe module Stripe
# Stores representations of [stock keeping units](http://en.wikipedia.org/wiki/Stock_keeping_unit).
# SKUs describe specific product variations, taking into account any combination of: attributes,
# currency, and cost. For example, a product may be a T-shirt, whereas a specific SKU represents
# the `size: large`, `color: red` version of that shirt.
#
# Can also be used to manage inventory.
class SKU < APIResource class SKU < APIResource
extend Stripe::APIOperations::Create extend Stripe::APIOperations::Create
include Stripe::APIOperations::Delete include Stripe::APIOperations::Delete

View File

@ -2,6 +2,12 @@
# frozen_string_literal: true # frozen_string_literal: true
module Stripe module Stripe
# `Source` objects allow you to accept a variety of payment methods. They
# represent a customer's payment instrument, and can be used with the Stripe API
# just like a `Card` object: once chargeable, they can be charged, or can be
# attached to customers.
#
# Related guides: [Sources API](https://stripe.com/docs/sources) and [Sources & Customers](https://stripe.com/docs/sources/customers).
class Source < APIResource class Source < APIResource
extend Stripe::APIOperations::Create extend Stripe::APIOperations::Create
include Stripe::APIOperations::Save include Stripe::APIOperations::Save

View File

@ -2,6 +2,10 @@
# frozen_string_literal: true # frozen_string_literal: true
module Stripe module Stripe
# Some payment methods have no required amount that a customer must send.
# Customers can be instructed to send any amount, and it can be made up of
# multiple transactions. As such, sources can have multiple associated
# transactions.
class SourceTransaction < StripeObject class SourceTransaction < StripeObject
OBJECT_NAME = "source_transaction" OBJECT_NAME = "source_transaction"
end end

View File

@ -2,6 +2,9 @@
# frozen_string_literal: true # frozen_string_literal: true
module Stripe module Stripe
# Subscriptions allow you to charge a customer on a recurring basis.
#
# Related guide: [Creating Subscriptions](https://stripe.com/docs/billing/subscriptions/creating).
class Subscription < APIResource class Subscription < APIResource
extend Stripe::APIOperations::Create extend Stripe::APIOperations::Create
extend Stripe::APIOperations::List extend Stripe::APIOperations::List

View File

@ -2,6 +2,8 @@
# frozen_string_literal: true # frozen_string_literal: true
module Stripe module Stripe
# Subscription items allow you to create customer subscriptions with more than
# one plan, making it easy to represent complex billing relationships.
class SubscriptionItem < APIResource class SubscriptionItem < APIResource
extend Stripe::APIOperations::Create extend Stripe::APIOperations::Create
include Stripe::APIOperations::Delete include Stripe::APIOperations::Delete

View File

@ -2,6 +2,9 @@
# frozen_string_literal: true # frozen_string_literal: true
module Stripe module Stripe
# A subscription schedule allows you to create and manage the lifecycle of a subscription by predefining expected changes.
#
# Related guide: [Subscription Schedules](https://stripe.com/docs/billing/subscriptions/subscription-schedules).
class SubscriptionSchedule < APIResource class SubscriptionSchedule < APIResource
extend Stripe::APIOperations::Create extend Stripe::APIOperations::Create
extend Stripe::APIOperations::List extend Stripe::APIOperations::List

View File

@ -2,6 +2,7 @@
# frozen_string_literal: true # frozen_string_literal: true
module Stripe module Stripe
# [Tax codes](https://stripe.com/docs/tax/tax-categories) classify goods and services for tax purposes.
class TaxCode < APIResource class TaxCode < APIResource
extend Stripe::APIOperations::List extend Stripe::APIOperations::List

View File

@ -2,6 +2,10 @@
# frozen_string_literal: true # frozen_string_literal: true
module Stripe module Stripe
# You can add one or multiple tax IDs to a [customer](https://stripe.com/docs/api/customers).
# A customer's tax IDs are displayed on invoices and credit notes issued for the customer.
#
# Related guide: [Customer Tax Identification Numbers](https://stripe.com/docs/billing/taxes/tax-ids).
class TaxId < APIResource class TaxId < APIResource
include Stripe::APIOperations::Delete include Stripe::APIOperations::Delete
extend Stripe::APIOperations::List extend Stripe::APIOperations::List

View File

@ -2,6 +2,9 @@
# frozen_string_literal: true # frozen_string_literal: true
module Stripe module Stripe
# Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax.
#
# Related guide: [Tax Rates](https://stripe.com/docs/billing/taxes/tax-rates).
class TaxRate < APIResource class TaxRate < APIResource
extend Stripe::APIOperations::Create extend Stripe::APIOperations::Create
extend Stripe::APIOperations::List extend Stripe::APIOperations::List

View File

@ -3,6 +3,7 @@
module Stripe module Stripe
module Terminal module Terminal
# A Configurations object represents how features should be configured for terminal readers.
class Configuration < APIResource class Configuration < APIResource
extend Stripe::APIOperations::Create extend Stripe::APIOperations::Create
include Stripe::APIOperations::Delete include Stripe::APIOperations::Delete

View File

@ -3,6 +3,9 @@
module Stripe module Stripe
module Terminal module Terminal
# A Connection Token is used by the Stripe Terminal SDK to connect to a reader.
#
# Related guide: [Fleet Management](https://stripe.com/docs/terminal/fleet/locations).
class ConnectionToken < APIResource class ConnectionToken < APIResource
extend Stripe::APIOperations::Create extend Stripe::APIOperations::Create

View File

@ -3,6 +3,9 @@
module Stripe module Stripe
module Terminal module Terminal
# A Location represents a grouping of readers.
#
# Related guide: [Fleet Management](https://stripe.com/docs/terminal/fleet/locations).
class Location < APIResource class Location < APIResource
extend Stripe::APIOperations::Create extend Stripe::APIOperations::Create
include Stripe::APIOperations::Delete include Stripe::APIOperations::Delete

View File

@ -3,6 +3,9 @@
module Stripe module Stripe
module Terminal module Terminal
# A Reader represents a physical device for accepting payment details.
#
# Related guide: [Connecting to a Reader](https://stripe.com/docs/terminal/payments/connect-reader).
class Reader < APIResource class Reader < APIResource
extend Stripe::APIOperations::Create extend Stripe::APIOperations::Create
include Stripe::APIOperations::Delete include Stripe::APIOperations::Delete

View File

@ -3,6 +3,9 @@
module Stripe module Stripe
module TestHelpers module TestHelpers
# A test clock enables deterministic control over objects in testmode. With a test clock, you can create
# objects at a frozen time in the past or future, and advance to a specific future time to observe webhooks and state changes. After the clock advances,
# you can either validate the current state of your scenario (and test your assumptions), change the current state of your scenario (and test more complex scenarios), or keep advancing forward in time.
class TestClock < APIResource class TestClock < APIResource
extend Stripe::APIOperations::Create extend Stripe::APIOperations::Create
include Stripe::APIOperations::Delete include Stripe::APIOperations::Delete

View File

@ -2,6 +2,28 @@
# frozen_string_literal: true # frozen_string_literal: true
module Stripe module Stripe
# Tokenization is the process Stripe uses to collect sensitive card or bank
# account details, or personally identifiable information (PII), directly from
# your customers in a secure manner. A token representing this information is
# returned to your server to use. You should use our
# [recommended payments integrations](https://stripe.com/docs/payments) to perform this process
# client-side. This ensures that no sensitive card data touches your server,
# and allows your integration to operate in a PCI-compliant way.
#
# If you cannot use client-side tokenization, you can also create tokens using
# the API with either your publishable or secret API key. Keep in mind that if
# your integration uses this method, you are responsible for any PCI compliance
# that may be required, and you must keep your secret API key safe. Unlike with
# client-side tokenization, your customer's information is not sent directly to
# Stripe, so we cannot determine how it is handled or stored.
#
# Tokens cannot be stored or used more than once. To store card or bank account
# information for later use, you can create [Customer](https://stripe.com/docs/api#customers)
# objects or [Custom accounts](https://stripe.com/docs/api#external_accounts). Note that
# [Radar](https://stripe.com/docs/radar), our integrated solution for automatic fraud protection,
# performs best with integrations that use client-side tokenization.
#
# Related guide: [Accept a payment](https://stripe.com/docs/payments/accept-a-payment-charges#web-create-token)
class Token < APIResource class Token < APIResource
extend Stripe::APIOperations::Create extend Stripe::APIOperations::Create

View File

@ -2,6 +2,11 @@
# frozen_string_literal: true # frozen_string_literal: true
module Stripe module Stripe
# To top up your Stripe balance, you create a top-up object. You can retrieve
# individual top-ups, as well as list all top-ups. Top-ups are identified by a
# unique, random ID.
#
# Related guide: [Topping Up your Platform Account](https://stripe.com/docs/connect/top-ups).
class Topup < APIResource class Topup < APIResource
extend Stripe::APIOperations::Create extend Stripe::APIOperations::Create
extend Stripe::APIOperations::List extend Stripe::APIOperations::List

View File

@ -2,6 +2,16 @@
# frozen_string_literal: true # frozen_string_literal: true
module Stripe module Stripe
# A `Transfer` object is created when you move funds between Stripe accounts as
# part of Connect.
#
# Before April 6, 2017, transfers also represented movement of funds from a
# Stripe account to a card or bank account. This behavior has since been split
# out into a [Payout](https://stripe.com/docs/api#payout_object) object, with corresponding payout endpoints. For more
# information, read about the
# [transfer/payout split](https://stripe.com/docs/transfer-payout-split).
#
# Related guide: [Creating Separate Charges and Transfers](https://stripe.com/docs/connect/charges-transfers).
class Transfer < APIResource class Transfer < APIResource
extend Stripe::APIOperations::Create extend Stripe::APIOperations::Create
extend Stripe::APIOperations::List extend Stripe::APIOperations::List

View File

@ -3,6 +3,7 @@
module Stripe module Stripe
module Treasury module Treasury
# You can reverse some [ReceivedCredits](https://stripe.com/docs/api#received_credits) depending on their network and source flow. Reversing a ReceivedCredit leads to the creation of a new object known as a CreditReversal.
class CreditReversal < APIResource class CreditReversal < APIResource
extend Stripe::APIOperations::Create extend Stripe::APIOperations::Create
extend Stripe::APIOperations::List extend Stripe::APIOperations::List

View File

@ -3,6 +3,7 @@
module Stripe module Stripe
module Treasury module Treasury
# You can reverse some [ReceivedDebits](https://stripe.com/docs/api#received_debits) depending on their network and source flow. Reversing a ReceivedDebit leads to the creation of a new object known as a DebitReversal.
class DebitReversal < APIResource class DebitReversal < APIResource
extend Stripe::APIOperations::Create extend Stripe::APIOperations::Create
extend Stripe::APIOperations::List extend Stripe::APIOperations::List

View File

@ -3,6 +3,8 @@
module Stripe module Stripe
module Treasury module Treasury
# Stripe Treasury provides users with a container for money called a FinancialAccount that is separate from their Payments balance.
# FinancialAccounts serve as the source and destination of Treasury's money movement APIs.
class FinancialAccount < APIResource class FinancialAccount < APIResource
extend Stripe::APIOperations::Create extend Stripe::APIOperations::Create
extend Stripe::APIOperations::List extend Stripe::APIOperations::List

View File

@ -3,6 +3,7 @@
module Stripe module Stripe
module Treasury module Treasury
# Use [InboundTransfers](https://stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) to add funds to your [FinancialAccount](https://stripe.com/docs/api#financial_accounts) via a PaymentMethod that is owned by you. The funds will be transferred via an ACH debit.
class InboundTransfer < APIResource class InboundTransfer < APIResource
extend Stripe::APIOperations::Create extend Stripe::APIOperations::Create
extend Stripe::APIOperations::List extend Stripe::APIOperations::List

View File

@ -3,6 +3,9 @@
module Stripe module Stripe
module Treasury module Treasury
# Use OutboundPayments to send funds to another party's external bank account or [FinancialAccount](https://stripe.com/docs/api#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://stripe.com/docs/api#outbound_transfers).
#
# Simulate OutboundPayment state changes with the `/v1/test_helpers/treasury/outbound_payments` endpoints. These methods can only be called on test mode objects.
class OutboundPayment < APIResource class OutboundPayment < APIResource
extend Stripe::APIOperations::Create extend Stripe::APIOperations::Create
extend Stripe::APIOperations::List extend Stripe::APIOperations::List

View File

@ -3,6 +3,9 @@
module Stripe module Stripe
module Treasury module Treasury
# Use OutboundTransfers to transfer funds from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) to a PaymentMethod belonging to the same entity. To send funds to a different party, use [OutboundPayments](https://stripe.com/docs/api#outbound_payments) instead. You can send funds over ACH rails or through a domestic wire transfer to a user's own external bank account.
#
# Simulate OutboundTransfer state changes with the `/v1/test_helpers/treasury/outbound_transfers` endpoints. These methods can only be called on test mode objects.
class OutboundTransfer < APIResource class OutboundTransfer < APIResource
extend Stripe::APIOperations::Create extend Stripe::APIOperations::Create
extend Stripe::APIOperations::List extend Stripe::APIOperations::List

View File

@ -3,6 +3,7 @@
module Stripe module Stripe
module Treasury module Treasury
# ReceivedCredits represent funds sent to a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) (for example, via ACH or wire). These money movements are not initiated from the FinancialAccount.
class ReceivedCredit < APIResource class ReceivedCredit < APIResource
extend Stripe::APIOperations::List extend Stripe::APIOperations::List

View File

@ -3,6 +3,7 @@
module Stripe module Stripe
module Treasury module Treasury
# ReceivedDebits represent funds pulled from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts). These are not initiated from the FinancialAccount.
class ReceivedDebit < APIResource class ReceivedDebit < APIResource
extend Stripe::APIOperations::List extend Stripe::APIOperations::List

View File

@ -3,6 +3,7 @@
module Stripe module Stripe
module Treasury module Treasury
# Transactions represent changes to a [FinancialAccount's](https://stripe.com/docs/api#financial_accounts) balance.
class Transaction < APIResource class Transaction < APIResource
extend Stripe::APIOperations::List extend Stripe::APIOperations::List

Some files were not shown because too many files have changed in this diff Show More