stripe 7.1.0 → 7.2.0.pre.beta.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (105) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +29 -18
  3. data/OPENAPI_VERSION +1 -1
  4. data/VERSION +1 -1
  5. data/lib/stripe/object_types.rb +2 -0
  6. data/lib/stripe/resources/account.rb +6 -0
  7. data/lib/stripe/resources/account_link.rb +4 -0
  8. data/lib/stripe/resources/account_session.rb +17 -0
  9. data/lib/stripe/resources/application_fee_refund.rb +5 -0
  10. data/lib/stripe/resources/apps/secret.rb +9 -0
  11. data/lib/stripe/resources/balance.rb +11 -0
  12. data/lib/stripe/resources/balance_transaction.rb +4 -0
  13. data/lib/stripe/resources/bank_account.rb +7 -0
  14. data/lib/stripe/resources/billing_portal/configuration.rb +1 -0
  15. data/lib/stripe/resources/billing_portal/session.rb +14 -0
  16. data/lib/stripe/resources/capability.rb +3 -0
  17. data/lib/stripe/resources/card.rb +5 -0
  18. data/lib/stripe/resources/cash_balance.rb +1 -0
  19. data/lib/stripe/resources/charge.rb +5 -0
  20. data/lib/stripe/resources/checkout/session.rb +14 -0
  21. data/lib/stripe/resources/country_spec.rb +6 -0
  22. data/lib/stripe/resources/coupon.rb +3 -0
  23. data/lib/stripe/resources/credit_note.rb +3 -0
  24. data/lib/stripe/resources/customer.rb +3 -0
  25. data/lib/stripe/resources/customer_balance_transaction.rb +6 -0
  26. data/lib/stripe/resources/customer_cash_balance_transaction.rb +4 -0
  27. data/lib/stripe/resources/discount.rb +4 -0
  28. data/lib/stripe/resources/dispute.rb +7 -0
  29. data/lib/stripe/resources/event.rb +29 -0
  30. data/lib/stripe/resources/exchange_rate.rb +11 -0
  31. data/lib/stripe/resources/file.rb +7 -0
  32. data/lib/stripe/resources/file_link.rb +3 -0
  33. data/lib/stripe/resources/financial_connections/account.rb +1 -0
  34. data/lib/stripe/resources/financial_connections/account_ownership.rb +1 -0
  35. data/lib/stripe/resources/financial_connections/session.rb +1 -0
  36. data/lib/stripe/resources/funding_instructions.rb +5 -0
  37. data/lib/stripe/resources/identity/verification_report.rb +11 -0
  38. data/lib/stripe/resources/identity/verification_session.rb +11 -0
  39. data/lib/stripe/resources/invoice.rb +32 -0
  40. data/lib/stripe/resources/invoice_item.rb +7 -0
  41. data/lib/stripe/resources/issuing/authorization.rb +5 -0
  42. data/lib/stripe/resources/issuing/card.rb +1 -0
  43. data/lib/stripe/resources/issuing/cardholder.rb +3 -0
  44. data/lib/stripe/resources/issuing/dispute.rb +3 -0
  45. data/lib/stripe/resources/issuing/transaction.rb +5 -0
  46. data/lib/stripe/resources/line_item.rb +1 -0
  47. data/lib/stripe/resources/mandate.rb +1 -0
  48. data/lib/stripe/resources/order.rb +5 -0
  49. data/lib/stripe/resources/payment_intent.rb +11 -0
  50. data/lib/stripe/resources/payment_link.rb +5 -0
  51. data/lib/stripe/resources/payment_method.rb +5 -0
  52. data/lib/stripe/resources/payout.rb +8 -0
  53. data/lib/stripe/resources/person.rb +6 -0
  54. data/lib/stripe/resources/plan.rb +8 -0
  55. data/lib/stripe/resources/price.rb +6 -0
  56. data/lib/stripe/resources/product.rb +8 -0
  57. data/lib/stripe/resources/promotion_code.rb +2 -0
  58. data/lib/stripe/resources/quote.rb +2 -0
  59. data/lib/stripe/resources/quote_phase.rb +29 -0
  60. data/lib/stripe/resources/radar/early_fraud_warning.rb +4 -0
  61. data/lib/stripe/resources/radar/value_list.rb +3 -0
  62. data/lib/stripe/resources/radar/value_list_item.rb +3 -0
  63. data/lib/stripe/resources/refund.rb +5 -0
  64. data/lib/stripe/resources/reporting/report_run.rb +8 -0
  65. data/lib/stripe/resources/reporting/report_type.rb +8 -0
  66. data/lib/stripe/resources/reversal.rb +13 -0
  67. data/lib/stripe/resources/review.rb +4 -0
  68. data/lib/stripe/resources/setup_attempt.rb +4 -0
  69. data/lib/stripe/resources/setup_intent.rb +22 -0
  70. data/lib/stripe/resources/shipping_rate.rb +3 -0
  71. data/lib/stripe/resources/sigma/scheduled_query_run.rb +4 -0
  72. data/lib/stripe/resources/sku.rb +6 -0
  73. data/lib/stripe/resources/source.rb +6 -0
  74. data/lib/stripe/resources/source_transaction.rb +4 -0
  75. data/lib/stripe/resources/subscription.rb +3 -0
  76. data/lib/stripe/resources/subscription_item.rb +2 -0
  77. data/lib/stripe/resources/subscription_schedule.rb +21 -0
  78. data/lib/stripe/resources/tax_code.rb +1 -0
  79. data/lib/stripe/resources/tax_id.rb +4 -0
  80. data/lib/stripe/resources/tax_rate.rb +3 -0
  81. data/lib/stripe/resources/terminal/configuration.rb +1 -0
  82. data/lib/stripe/resources/terminal/connection_token.rb +3 -0
  83. data/lib/stripe/resources/terminal/location.rb +3 -0
  84. data/lib/stripe/resources/terminal/reader.rb +21 -0
  85. data/lib/stripe/resources/test_helpers/test_clock.rb +3 -0
  86. data/lib/stripe/resources/token.rb +22 -0
  87. data/lib/stripe/resources/topup.rb +5 -0
  88. data/lib/stripe/resources/transfer.rb +10 -0
  89. data/lib/stripe/resources/treasury/credit_reversal.rb +1 -0
  90. data/lib/stripe/resources/treasury/debit_reversal.rb +1 -0
  91. data/lib/stripe/resources/treasury/financial_account.rb +2 -0
  92. data/lib/stripe/resources/treasury/inbound_transfer.rb +1 -0
  93. data/lib/stripe/resources/treasury/outbound_payment.rb +3 -0
  94. data/lib/stripe/resources/treasury/outbound_transfer.rb +3 -0
  95. data/lib/stripe/resources/treasury/received_credit.rb +1 -0
  96. data/lib/stripe/resources/treasury/received_debit.rb +1 -0
  97. data/lib/stripe/resources/treasury/transaction.rb +1 -0
  98. data/lib/stripe/resources/treasury/transaction_entry.rb +1 -0
  99. data/lib/stripe/resources/usage_record.rb +4 -0
  100. data/lib/stripe/resources/webhook_endpoint.rb +7 -0
  101. data/lib/stripe/resources.rb +2 -0
  102. data/lib/stripe/stripe_configuration.rb +2 -0
  103. data/lib/stripe/version.rb +1 -1
  104. data/lib/stripe.rb +1 -0
  105. metadata +6 -4
@@ -2,6 +2,38 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Stripe
5
+ # Invoices are statements of amounts owed by a customer, and are either
6
+ # generated one-off, or generated periodically from a subscription.
7
+ #
8
+ # They contain [invoice items](https://stripe.com/docs/api#invoiceitems), and proration adjustments
9
+ # that may be caused by subscription upgrades/downgrades (if necessary).
10
+ #
11
+ # If your invoice is configured to be billed through automatic charges,
12
+ # Stripe automatically finalizes your invoice and attempts payment. Note
13
+ # that finalizing the invoice,
14
+ # [when automatic](https://stripe.com/docs/billing/invoices/workflow/#auto_advance), does
15
+ # not happen immediately as the invoice is created. Stripe waits
16
+ # until one hour after the last webhook was successfully sent (or the last
17
+ # webhook timed out after failing). If you (and the platforms you may have
18
+ # connected to) have no webhooks configured, Stripe waits one hour after
19
+ # creation to finalize the invoice.
20
+ #
21
+ # If your invoice is configured to be billed by sending an email, then based on your
22
+ # [email settings](https://dashboard.stripe.com/account/billing/automatic),
23
+ # Stripe will email the invoice to your customer and await payment. These
24
+ # emails can contain a link to a hosted page to pay the invoice.
25
+ #
26
+ # Stripe applies any customer credit on the account before determining the
27
+ # amount due for the invoice (i.e., the amount that will be actually
28
+ # charged). If the amount due for the invoice is less than Stripe's [minimum allowed charge
29
+ # per currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts), the
30
+ # invoice is automatically marked paid, and we add the amount due to the
31
+ # customer's credit balance which is applied to the next invoice.
32
+ #
33
+ # More details on the customer's credit balance are
34
+ # [here](https://stripe.com/docs/billing/customer/balance).
35
+ #
36
+ # Related guide: [Send Invoices to Customers](https://stripe.com/docs/billing/invoices/sending).
5
37
  class Invoice < APIResource
6
38
  extend Stripe::APIOperations::Create
7
39
  include Stripe::APIOperations::Delete
@@ -2,6 +2,13 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Stripe
5
+ # Sometimes you want to add a charge or credit to a customer, but actually
6
+ # charge or credit the customer's card only at the end of a regular billing
7
+ # cycle. This is useful for combining several charges (to minimize
8
+ # per-transaction fees), or for having Stripe tabulate your usage-based billing
9
+ # totals.
10
+ #
11
+ # Related guide: [Subscription Invoices](https://stripe.com/docs/billing/invoices/subscription#adding-upcoming-invoice-items).
5
12
  class InvoiceItem < APIResource
6
13
  extend Stripe::APIOperations::Create
7
14
  include Stripe::APIOperations::Delete
@@ -3,6 +3,11 @@
3
3
 
4
4
  module Stripe
5
5
  module Issuing
6
+ # When an [issued card](https://stripe.com/docs/issuing) is used to make a purchase, an Issuing `Authorization`
7
+ # object is created. [Authorizations](https://stripe.com/docs/issuing/purchases/authorizations) must be approved for the
8
+ # purchase to be completed successfully.
9
+ #
10
+ # Related guide: [Issued Card Authorizations](https://stripe.com/docs/issuing/purchases/authorizations).
6
11
  class Authorization < APIResource
7
12
  extend Stripe::APIOperations::List
8
13
  include Stripe::APIOperations::Save
@@ -3,6 +3,7 @@
3
3
 
4
4
  module Stripe
5
5
  module Issuing
6
+ # You can [create physical or virtual cards](https://stripe.com/docs/issuing/cards) that are issued to cardholders.
6
7
  class Card < APIResource
7
8
  extend Stripe::APIOperations::Create
8
9
  extend Stripe::APIOperations::List
@@ -3,6 +3,9 @@
3
3
 
4
4
  module Stripe
5
5
  module Issuing
6
+ # An Issuing `Cardholder` object represents an individual or business entity who is [issued](https://stripe.com/docs/issuing) cards.
7
+ #
8
+ # Related guide: [How to create a Cardholder](https://stripe.com/docs/issuing/cards#create-cardholder)
6
9
  class Cardholder < APIResource
7
10
  extend Stripe::APIOperations::Create
8
11
  extend Stripe::APIOperations::List
@@ -3,6 +3,9 @@
3
3
 
4
4
  module Stripe
5
5
  module Issuing
6
+ # 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.
7
+ #
8
+ # Related guide: [Disputing Transactions](https://stripe.com/docs/issuing/purchases/disputes)
6
9
  class Dispute < APIResource
7
10
  extend Stripe::APIOperations::Create
8
11
  extend Stripe::APIOperations::List
@@ -3,6 +3,11 @@
3
3
 
4
4
  module Stripe
5
5
  module Issuing
6
+ # Any use of an [issued card](https://stripe.com/docs/issuing) that results in funds entering or leaving
7
+ # your Stripe account, such as a completed purchase or refund, is represented by an Issuing
8
+ # `Transaction` object.
9
+ #
10
+ # Related guide: [Issued Card Transactions](https://stripe.com/docs/issuing/purchases/transactions).
6
11
  class Transaction < APIResource
7
12
  extend Stripe::APIOperations::List
8
13
  include Stripe::APIOperations::Save
@@ -2,6 +2,7 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Stripe
5
+ # A line item.
5
6
  class LineItem < APIResource
6
7
  OBJECT_NAME = "item"
7
8
  end
@@ -2,6 +2,7 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Stripe
5
+ # A Mandate is a record of the permission a customer has given you to debit their payment method.
5
6
  class Mandate < APIResource
6
7
  OBJECT_NAME = "mandate"
7
8
  end
@@ -2,6 +2,11 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Stripe
5
+ # An Order describes a purchase being made by a customer, including the
6
+ # products & quantities being purchased, the order status, the payment information,
7
+ # and the billing/shipping details.
8
+ #
9
+ # Related guide: [Orders overview](https://stripe.com/docs/orders)
5
10
  class Order < APIResource
6
11
  extend Stripe::APIOperations::Create
7
12
  extend Stripe::APIOperations::List
@@ -2,6 +2,17 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Stripe
5
+ # A PaymentIntent guides you through the process of collecting a payment from your customer.
6
+ # We recommend that you create exactly one PaymentIntent for each order or
7
+ # customer session in your system. You can reference the PaymentIntent later to
8
+ # see the history of payment attempts for a particular session.
9
+ #
10
+ # A PaymentIntent transitions through
11
+ # [multiple statuses](https://stripe.com/docs/payments/intents#intent-statuses)
12
+ # throughout its lifetime as it interfaces with Stripe.js to perform
13
+ # authentication flows and ultimately creates at most one successful charge.
14
+ #
15
+ # Related guide: [Payment Intents API](https://stripe.com/docs/payments/payment-intents).
5
16
  class PaymentIntent < APIResource
6
17
  extend Stripe::APIOperations::Create
7
18
  extend Stripe::APIOperations::List
@@ -2,6 +2,11 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Stripe
5
+ # 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.
6
+ #
7
+ # 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.
8
+ #
9
+ # Related guide: [Payment Links API](https://stripe.com/docs/payments/payment-links/api)
5
10
  class PaymentLink < APIResource
6
11
  extend Stripe::APIOperations::Create
7
12
  extend Stripe::APIOperations::List
@@ -2,6 +2,11 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Stripe
5
+ # PaymentMethod objects represent your customer's payment instruments.
6
+ # You can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to
7
+ # Customer objects to store instrument details for future payments.
8
+ #
9
+ # Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios).
5
10
  class PaymentMethod < APIResource
6
11
  extend Stripe::APIOperations::Create
7
12
  extend Stripe::APIOperations::List
@@ -2,6 +2,14 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Stripe
5
+ # A `Payout` object is created when you receive funds from Stripe, or when you
6
+ # initiate a payout to either a bank account or debit card of a [connected
7
+ # Stripe account](https://stripe.com/docs/connect/bank-debit-card-payouts). You can retrieve individual payouts,
8
+ # as well as list all payouts. Payouts are made on [varying
9
+ # schedules](https://stripe.com/docs/connect/manage-payout-schedule), depending on your country and
10
+ # industry.
11
+ #
12
+ # Related guide: [Receiving Payouts](https://stripe.com/docs/payouts).
5
13
  class Payout < APIResource
6
14
  extend Stripe::APIOperations::Create
7
15
  extend Stripe::APIOperations::List
@@ -2,6 +2,12 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Stripe
5
+ # This is an object representing a person associated with a Stripe account.
6
+ #
7
+ # 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.
8
+ # 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.
9
+ #
10
+ # Related guide: [Handling Identity Verification with the API](https://stripe.com/docs/connect/identity-verification-api#person-information).
5
11
  class Person < APIResource
6
12
  extend Stripe::APIOperations::List
7
13
  include Stripe::APIOperations::Save
@@ -2,6 +2,14 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Stripe
5
+ # 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.
6
+ #
7
+ # Plans define the base price, currency, and billing cycle for recurring purchases of products.
8
+ # [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.
9
+ #
10
+ # For example, you might have a single "gold" product that has plans for $10/month, $100/year, €9/month, and €90/year.
11
+ #
12
+ # 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).
5
13
  class Plan < APIResource
6
14
  extend Stripe::APIOperations::Create
7
15
  include Stripe::APIOperations::Delete
@@ -2,6 +2,12 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Stripe
5
+ # Prices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products.
6
+ # [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.
7
+ #
8
+ # For example, you might have a single "gold" product that has prices for $10/month, $100/year, and €9 once.
9
+ #
10
+ # 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).
5
11
  class Price < APIResource
6
12
  extend Stripe::APIOperations::Create
7
13
  extend Stripe::APIOperations::List
@@ -2,6 +2,14 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Stripe
5
+ # Products describe the specific goods or services you offer to your customers.
6
+ # For example, you might offer a Standard and Premium version of your goods or service; each version would be a separate Product.
7
+ # They can be used in conjunction with [Prices](https://stripe.com/docs/api#prices) to configure pricing in Payment Links, Checkout, and Subscriptions.
8
+ #
9
+ # Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription),
10
+ # [share a Payment Link](https://stripe.com/docs/payments/payment-links/overview),
11
+ # [accept payments with Checkout](https://stripe.com/docs/payments/accept-a-payment#create-product-prices-upfront),
12
+ # and more about [Products and Prices](https://stripe.com/docs/products-prices/overview)
5
13
  class Product < APIResource
6
14
  extend Stripe::APIOperations::Create
7
15
  include Stripe::APIOperations::Delete
@@ -2,6 +2,8 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Stripe
5
+ # A Promotion Code represents a customer-redeemable code for a [coupon](https://stripe.com/docs/api#coupons). It can be used to
6
+ # create multiple codes for a single coupon.
5
7
  class PromotionCode < APIResource
6
8
  extend Stripe::APIOperations::Create
7
9
  extend Stripe::APIOperations::List
@@ -2,6 +2,8 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Stripe
5
+ # A Quote is a way to model prices that you'd like to provide to a customer.
6
+ # Once accepted, it will automatically create an invoice, subscription or subscription schedule.
5
7
  class Quote < APIResource
6
8
  extend Stripe::APIOperations::Create
7
9
  extend Stripe::APIOperations::List
@@ -0,0 +1,29 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ # A quote phase describes the line items, coupons, and trialing status of a subscription for a predefined time period.
6
+ class QuotePhase < APIResource
7
+ extend Stripe::APIOperations::List
8
+
9
+ OBJECT_NAME = "quote_phase"
10
+
11
+ def list_line_items(params = {}, opts = {})
12
+ request_stripe_object(
13
+ method: :get,
14
+ path: format("/v1/quote_phases/%<quote_phase>s/line_items", { quote_phase: CGI.escape(self["id"]) }),
15
+ params: params,
16
+ opts: opts
17
+ )
18
+ end
19
+
20
+ def self.list_line_items(quote_phase, params = {}, opts = {})
21
+ request_stripe_object(
22
+ method: :get,
23
+ path: format("/v1/quote_phases/%<quote_phase>s/line_items", { quote_phase: CGI.escape(quote_phase) }),
24
+ params: params,
25
+ opts: opts
26
+ )
27
+ end
28
+ end
29
+ end
@@ -3,6 +3,10 @@
3
3
 
4
4
  module Stripe
5
5
  module Radar
6
+ # An early fraud warning indicates that the card issuer has notified us that a
7
+ # charge may be fraudulent.
8
+ #
9
+ # Related guide: [Early Fraud Warnings](https://stripe.com/docs/disputes/measuring#early-fraud-warnings).
6
10
  class EarlyFraudWarning < APIResource
7
11
  extend Stripe::APIOperations::List
8
12
 
@@ -3,6 +3,9 @@
3
3
 
4
4
  module Stripe
5
5
  module Radar
6
+ # Value lists allow you to group values together which can then be referenced in rules.
7
+ #
8
+ # Related guide: [Default Stripe Lists](https://stripe.com/docs/radar/lists#managing-list-items).
6
9
  class ValueList < APIResource
7
10
  extend Stripe::APIOperations::Create
8
11
  include Stripe::APIOperations::Delete
@@ -3,6 +3,9 @@
3
3
 
4
4
  module Stripe
5
5
  module Radar
6
+ # Value list items allow you to add specific values to a given Radar value list, which can then be used in rules.
7
+ #
8
+ # Related guide: [Managing List Items](https://stripe.com/docs/radar/lists#managing-list-items).
6
9
  class ValueListItem < APIResource
7
10
  extend Stripe::APIOperations::Create
8
11
  include Stripe::APIOperations::Delete
@@ -2,6 +2,11 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Stripe
5
+ # `Refund` objects allow you to refund a charge that has previously been created
6
+ # but not yet refunded. Funds will be refunded to the credit or debit card that
7
+ # was originally charged.
8
+ #
9
+ # Related guide: [Refunds](https://stripe.com/docs/refunds).
5
10
  class Refund < APIResource
6
11
  extend Stripe::APIOperations::Create
7
12
  extend Stripe::APIOperations::List
@@ -3,6 +3,14 @@
3
3
 
4
4
  module Stripe
5
5
  module Reporting
6
+ # The Report Run object represents an instance of a report type generated with
7
+ # specific run parameters. Once the object is created, Stripe begins processing the report.
8
+ # When the report has finished running, it will give you a reference to a file
9
+ # where you can retrieve your results. For an overview, see
10
+ # [API Access to Reports](https://stripe.com/docs/reporting/statements/api).
11
+ #
12
+ # Note that certain report types can only be run based on your live-mode data (not test-mode
13
+ # data), and will error when queried without a [live-mode API key](https://stripe.com/docs/keys#test-live-modes).
6
14
  class ReportRun < APIResource
7
15
  extend Stripe::APIOperations::Create
8
16
  extend Stripe::APIOperations::List
@@ -3,6 +3,14 @@
3
3
 
4
4
  module Stripe
5
5
  module Reporting
6
+ # The Report Type resource corresponds to a particular type of report, such as
7
+ # the "Activity summary" or "Itemized payouts" reports. These objects are
8
+ # identified by an ID belonging to a set of enumerated values. See
9
+ # [API Access to Reports documentation](https://stripe.com/docs/reporting/statements/api)
10
+ # for those Report Type IDs, along with required and optional parameters.
11
+ #
12
+ # Note that certain report types can only be run based on your live-mode data (not test-mode
13
+ # data), and will error when queried without a [live-mode API key](https://stripe.com/docs/keys#test-live-modes).
6
14
  class ReportType < APIResource
7
15
  extend Stripe::APIOperations::List
8
16
 
@@ -2,6 +2,19 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Stripe
5
+ # [Stripe Connect](https://stripe.com/docs/connect) platforms can reverse transfers made to a
6
+ # connected account, either entirely or partially, and can also specify whether
7
+ # to refund any related application fees. Transfer reversals add to the
8
+ # platform's balance and subtract from the destination account's balance.
9
+ #
10
+ # Reversing a transfer that was made for a [destination
11
+ # charge](https://stripe.com/docs/connect/destination-charges) is allowed only up to the amount of
12
+ # the charge. It is possible to reverse a
13
+ # [transfer_group](https://stripe.com/docs/connect/charges-transfers#transfer-options)
14
+ # transfer only if the destination account has enough balance to cover the
15
+ # reversal.
16
+ #
17
+ # Related guide: [Reversing Transfers](https://stripe.com/docs/connect/charges-transfers#reversing-transfers).
5
18
  class Reversal < APIResource
6
19
  extend Stripe::APIOperations::List
7
20
  include Stripe::APIOperations::Save
@@ -2,6 +2,10 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Stripe
5
+ # Reviews can be used to supplement automated fraud detection with human expertise.
6
+ #
7
+ # Learn more about [Radar](https://stripe.com/radar) and reviewing payments
8
+ # [here](https://stripe.com/docs/radar/reviews).
5
9
  class Review < APIResource
6
10
  extend Stripe::APIOperations::List
7
11
 
@@ -2,6 +2,10 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Stripe
5
+ # A SetupAttempt describes one attempted confirmation of a SetupIntent,
6
+ # whether that confirmation was successful or unsuccessful. You can use
7
+ # SetupAttempts to inspect details of a specific attempt at setting up a
8
+ # payment method using a SetupIntent.
5
9
  class SetupAttempt < APIResource
6
10
  extend Stripe::APIOperations::List
7
11
 
@@ -2,6 +2,28 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Stripe
5
+ # A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments.
6
+ # For example, you could use a SetupIntent to set up and save your customer's card without immediately collecting a payment.
7
+ # Later, you can use [PaymentIntents](https://stripe.com/docs/api#payment_intents) to drive the payment flow.
8
+ #
9
+ # Create a SetupIntent as soon as you're ready to collect your customer's payment credentials.
10
+ # Do not maintain long-lived, unconfirmed SetupIntents as they may no longer be valid.
11
+ # The SetupIntent then transitions through multiple [statuses](https://stripe.com/docs/payments/intents#intent-statuses) as it guides
12
+ # you through the setup process.
13
+ #
14
+ # Successful SetupIntents result in payment credentials that are optimized for future payments.
15
+ # For example, cardholders in [certain regions](https://stripe.com/guides/strong-customer-authentication) may need to be run through
16
+ # [Strong Customer Authentication](https://stripe.com/docs/strong-customer-authentication) at the time of payment method collection
17
+ # in order to streamline later [off-session payments](https://stripe.com/docs/payments/setup-intents).
18
+ # If the SetupIntent is used with a [Customer](https://stripe.com/docs/api#setup_intent_object-customer), upon success,
19
+ # it will automatically attach the resulting payment method to that Customer.
20
+ # We recommend using SetupIntents or [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) on
21
+ # PaymentIntents to save payment methods in order to prevent saving invalid or unoptimized payment methods.
22
+ #
23
+ # By using SetupIntents, you ensure that your customers experience the minimum set of required friction,
24
+ # even as regulations change over time.
25
+ #
26
+ # Related guide: [Setup Intents API](https://stripe.com/docs/payments/setup-intents).
5
27
  class SetupIntent < APIResource
6
28
  extend Stripe::APIOperations::Create
7
29
  extend Stripe::APIOperations::List
@@ -2,6 +2,9 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Stripe
5
+ # Shipping rates describe the price of shipping presented to your customers and can be
6
+ # applied to [Checkout Sessions](https://stripe.com/docs/payments/checkout/shipping)
7
+ # and [Orders](https://stripe.com/docs/orders/shipping) to collect shipping costs.
5
8
  class ShippingRate < APIResource
6
9
  extend Stripe::APIOperations::Create
7
10
  extend Stripe::APIOperations::List
@@ -3,6 +3,10 @@
3
3
 
4
4
  module Stripe
5
5
  module Sigma
6
+ # If you have [scheduled a Sigma query](https://stripe.com/docs/sigma/scheduled-queries), you'll
7
+ # receive a `sigma.scheduled_query_run.created` webhook each time the query
8
+ # runs. The webhook contains a `ScheduledQueryRun` object, which you can use to
9
+ # retrieve the query results.
6
10
  class ScheduledQueryRun < APIResource
7
11
  extend Stripe::APIOperations::List
8
12
 
@@ -2,6 +2,12 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Stripe
5
+ # Stores representations of [stock keeping units](http://en.wikipedia.org/wiki/Stock_keeping_unit).
6
+ # SKUs describe specific product variations, taking into account any combination of: attributes,
7
+ # currency, and cost. For example, a product may be a T-shirt, whereas a specific SKU represents
8
+ # the `size: large`, `color: red` version of that shirt.
9
+ #
10
+ # Can also be used to manage inventory.
5
11
  class SKU < APIResource
6
12
  extend Stripe::APIOperations::Create
7
13
  include Stripe::APIOperations::Delete
@@ -2,6 +2,12 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Stripe
5
+ # `Source` objects allow you to accept a variety of payment methods. They
6
+ # represent a customer's payment instrument, and can be used with the Stripe API
7
+ # just like a `Card` object: once chargeable, they can be charged, or can be
8
+ # attached to customers.
9
+ #
10
+ # Related guides: [Sources API](https://stripe.com/docs/sources) and [Sources & Customers](https://stripe.com/docs/sources/customers).
5
11
  class Source < APIResource
6
12
  extend Stripe::APIOperations::Create
7
13
  include Stripe::APIOperations::Save
@@ -2,6 +2,10 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Stripe
5
+ # Some payment methods have no required amount that a customer must send.
6
+ # Customers can be instructed to send any amount, and it can be made up of
7
+ # multiple transactions. As such, sources can have multiple associated
8
+ # transactions.
5
9
  class SourceTransaction < StripeObject
6
10
  OBJECT_NAME = "source_transaction"
7
11
  end
@@ -2,6 +2,9 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Stripe
5
+ # Subscriptions allow you to charge a customer on a recurring basis.
6
+ #
7
+ # Related guide: [Creating Subscriptions](https://stripe.com/docs/billing/subscriptions/creating).
5
8
  class Subscription < APIResource
6
9
  extend Stripe::APIOperations::Create
7
10
  extend Stripe::APIOperations::List
@@ -2,6 +2,8 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Stripe
5
+ # Subscription items allow you to create customer subscriptions with more than
6
+ # one plan, making it easy to represent complex billing relationships.
5
7
  class SubscriptionItem < APIResource
6
8
  extend Stripe::APIOperations::Create
7
9
  include Stripe::APIOperations::Delete
@@ -2,6 +2,9 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Stripe
5
+ # A subscription schedule allows you to create and manage the lifecycle of a subscription by predefining expected changes.
6
+ #
7
+ # Related guide: [Subscription Schedules](https://stripe.com/docs/billing/subscriptions/subscription-schedules).
5
8
  class SubscriptionSchedule < APIResource
6
9
  extend Stripe::APIOperations::Create
7
10
  extend Stripe::APIOperations::List
@@ -9,6 +12,15 @@ module Stripe
9
12
 
10
13
  OBJECT_NAME = "subscription_schedule"
11
14
 
15
+ def amend(params = {}, opts = {})
16
+ request_stripe_object(
17
+ method: :post,
18
+ path: format("/v1/subscription_schedules/%<schedule>s/amend", { schedule: CGI.escape(self["id"]) }),
19
+ params: params,
20
+ opts: opts
21
+ )
22
+ end
23
+
12
24
  def cancel(params = {}, opts = {})
13
25
  request_stripe_object(
14
26
  method: :post,
@@ -27,6 +39,15 @@ module Stripe
27
39
  )
28
40
  end
29
41
 
42
+ def self.amend(schedule, params = {}, opts = {})
43
+ request_stripe_object(
44
+ method: :post,
45
+ path: format("/v1/subscription_schedules/%<schedule>s/amend", { schedule: CGI.escape(schedule) }),
46
+ params: params,
47
+ opts: opts
48
+ )
49
+ end
50
+
30
51
  def self.cancel(schedule, params = {}, opts = {})
31
52
  request_stripe_object(
32
53
  method: :post,
@@ -2,6 +2,7 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Stripe
5
+ # [Tax codes](https://stripe.com/docs/tax/tax-categories) classify goods and services for tax purposes.
5
6
  class TaxCode < APIResource
6
7
  extend Stripe::APIOperations::List
7
8
 
@@ -2,6 +2,10 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Stripe
5
+ # You can add one or multiple tax IDs to a [customer](https://stripe.com/docs/api/customers).
6
+ # A customer's tax IDs are displayed on invoices and credit notes issued for the customer.
7
+ #
8
+ # Related guide: [Customer Tax Identification Numbers](https://stripe.com/docs/billing/taxes/tax-ids).
5
9
  class TaxId < APIResource
6
10
  include Stripe::APIOperations::Delete
7
11
  extend Stripe::APIOperations::List
@@ -2,6 +2,9 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Stripe
5
+ # 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.
6
+ #
7
+ # Related guide: [Tax Rates](https://stripe.com/docs/billing/taxes/tax-rates).
5
8
  class TaxRate < APIResource
6
9
  extend Stripe::APIOperations::Create
7
10
  extend Stripe::APIOperations::List
@@ -3,6 +3,7 @@
3
3
 
4
4
  module Stripe
5
5
  module Terminal
6
+ # A Configurations object represents how features should be configured for terminal readers.
6
7
  class Configuration < APIResource
7
8
  extend Stripe::APIOperations::Create
8
9
  include Stripe::APIOperations::Delete