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
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 989ee2b99d22b4fef0e7862b8ff6cd4a043ca09668ed9eb457864c408bb8eb4a
4
- data.tar.gz: 872b69c6afe17c944f48a8f6b5e96494aa86d378eb0a281f8d8b05ae122ea8a6
3
+ metadata.gz: e4845d5ca23b7a644ecea69e1ed4248990a2602e69ca624c01b3f2ccf6f89e21
4
+ data.tar.gz: fb173da5fd059e3644062a92f93e9362f0f0c13f375753f5049ec16c10cbb766
5
5
  SHA512:
6
- metadata.gz: d82ab0a2ea55ca4551695c286fcfc72ef35cbcd61f31d340ad37158bb1052f1a8330aabd5b92c10af5ac7fd84fea1d889f37c87b273fdb0d9305cdfb92328077
7
- data.tar.gz: 5ea3f368e59bdcc12cf68fabee95eac23f07792e3506afd1dcb77d7e5e2986c006d8292b74a711190c49444b31c7af07a4c7ee31f86b928b00cc5ebf0bcf1697
6
+ metadata.gz: e46a5de00036241655b787669f934adf56fd18f9327468d1b7970cfbab2ee4407b4dab45a819bb3cebe18d63311bd7782aa2d19f6c84bc5985a0854d49240164
7
+ data.tar.gz: 04cb4e8098a288ee885b3e0a9bc515c436f875cac7fda1819aa8b02fd0859984e376f1be61267cd21f95da686fdd1b78d08fc4a452a60cb3b621db42feb557e7
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## 7.2.0-beta.1 - 2022-08-23
4
+ * [#1122](https://github.com/stripe/stripe-ruby/pull/1122) API Updates for beta branch
5
+ - Updated stable APIs to the latest version
6
+ - `Stripe-Version` beta headers are not pinned by-default and need to be manually specified, please refer to [beta SDKs README section](https://github.com/stripe/stripe-ruby/blob/master/README.md#beta-sdks)
7
+
3
8
  ## 7.1.0 - 2022-08-19
4
9
  * [#1116](https://github.com/stripe/stripe-ruby/pull/1116) API Updates
5
10
  * Add support for new resource `CustomerCashBalanceTransaction`
@@ -7,6 +12,16 @@
7
12
  * [#1117](https://github.com/stripe/stripe-ruby/pull/1117) Refresh rubocop config.
8
13
  * [#1115](https://github.com/stripe/stripe-ruby/pull/1115) Add a support section to the readme
9
14
 
15
+ ## 7.1.0-beta.2 - 2022-08-11
16
+ * [#1113](https://github.com/stripe/stripe-ruby/pull/1113) API Updates for beta branch
17
+ - Updated stable APIs to the latest version
18
+ - Add `refund_payment` method to Terminal resource
19
+
20
+ ## 7.1.0-beta.1 - 2022-08-03
21
+ * [#1107](https://github.com/stripe/stripe-ruby/pull/1107) API Updates for beta branch
22
+ - Updated stable APIs to the latest version
23
+ - Added the `Order` resource support
24
+
10
25
  ## 7.0.0 - 2022-08-02
11
26
 
12
27
  Breaking changes that arose during code generation of the library that we postponed for the next major version. For changes to the SDK, read more detailed description at https://github.com/stripe/stripe-ruby/wiki/Migration-guide-for-v7. For changes to the Stripe products, read more at https://stripe.com/docs/upgrades#2022-08-01.
@@ -18,21 +33,19 @@ Breaking changes that arose during code generation of the library that we postpo
18
33
  * [#1090](https://github.com/stripe/stripe-ruby/pull/1090) Use auto-generation for `Invoice` methods
19
34
  * [#1103](https://github.com/stripe/stripe-ruby/pull/1103) Next major release changes
20
35
 
21
- ### ⚠️ Changed
22
- * `retrieve_cash_balance` and `update_cash_balance` methods on `Customer` resource no longer requires the second argument to always be `nil`. The methods now now take in `customer_id`, `params`, and `opts` parameters.
23
- * Update default bundle of CA certificates to April 26, 2022.
24
-
25
- ### Deprecated
26
- * Deprecate `delete` method on `Subscription` resource. Please use `cancel` method instead.
27
-
28
- ### ⚠️ Removed
29
- * Remove `details` method from `Issuing.Card` resource. The method was not supported.
30
- * Remove `Issuing.CardDetails` resource. Read more at https://stripe.com/docs/issuing/cards/virtual.
31
- * Remove `create` method from `ReportType` resource. The method was not supported.
32
- * Remove `usage_record_summaries` method from `SubscriptionItem` resource. Please use `list_usage_record_summaries` method instead.
33
- * Remove `AlipayAccount`, `BitcoinReceiver`, `BitcoinTransaction`, `Issuing::CardDetails`, `Recipient`, ` RecipientTransfer`, and `ThreeDSecure` resources. The resources were deprecated or no longer in use.
34
- * Remove ability to list `Card` resource for a `Recipient`.
35
- * Remove `cancel` method from `Transfer` resource. The method was deprecated.
36
+ ## 6.6.0-beta.1 - 2022-07-22
37
+ * [#1100](https://github.com/stripe/stripe-ruby/pull/1100) API Updates for beta branch
38
+ - Updated stable APIs to the latest version
39
+ - Add `QuotePhase` resource
40
+ * [#1097](https://github.com/stripe/stripe-ruby/pull/1097) API Updates for beta branch
41
+ - Updated stable APIs to the latest version
42
+ - Add `SubscriptionSchedule.amend` method.
43
+ * [#1093](https://github.com/stripe/stripe-ruby/pull/1093) API Updates for beta branch
44
+ - Include `server_side_confirmation_beta=v1` beta
45
+ - Add `secretKeyConfirmation` to `PaymentIntent`
46
+ * [#1085](https://github.com/stripe/stripe-ruby/pull/1085) API Updates for beta branch
47
+ - Updated stable APIs to the latest version
48
+ * [#1075](https://github.com/stripe/stripe-ruby/pull/1075) Use the generated API version
36
49
 
37
50
  ## 6.5.0 - 2022-06-29
38
51
  * [#1084](https://github.com/stripe/stripe-ruby/pull/1084) API Updates
@@ -62,8 +75,6 @@ Breaking changes that arose during code generation of the library that we postpo
62
75
  * Add support for new resources `Treasury.CreditReversal`, `Treasury.DebitReversal`, `Treasury.FinancialAccountFeatures`, `Treasury.FinancialAccount`, `Treasury.FlowDetails`, `Treasury.InboundTransfer`, `Treasury.OutboundPayment`, `Treasury.OutboundTransfer`, `Treasury.ReceivedCredit`, `Treasury.ReceivedDebit`, `Treasury.TransactionEntry`, and `Treasury.Transaction`
63
76
  * Add support for `retrieve_payment_method` method on resource `Customer`
64
77
  * Add support for `list_owners` and `list` methods on resource `FinancialConnections.Account`
65
-
66
-
67
78
 
68
79
  ## 6.0.0 - 2022-05-09
69
80
  * [#1056](https://github.com/stripe/stripe-ruby/pull/1056) API Updates
@@ -79,7 +90,6 @@ Breaking changes that arose during code generation of the library that we postpo
79
90
  ## 5.55.0 - 2022-05-05
80
91
  * [#1055](https://github.com/stripe/stripe-ruby/pull/1055) API Updates
81
92
  * Add support for new resources `FinancialConnections.AccountOwner`, `FinancialConnections.AccountOwnership`, `FinancialConnections.Account`, and `FinancialConnections.Session`
82
-
83
93
 
84
94
  ## 5.54.0 - 2022-05-03
85
95
  * [#1053](https://github.com/stripe/stripe-ruby/pull/1053) API Updates
@@ -1110,3 +1120,4 @@ Identical to 1.56.0 above. I incorrectly cut a patch-level release.
1110
1120
  <!--
1111
1121
  # vim: set tw=0:
1112
1122
  -->
1123
+
data/OPENAPI_VERSION CHANGED
@@ -1 +1 @@
1
- v183
1
+ v184
data/VERSION CHANGED
@@ -1 +1 @@
1
- 7.1.0
1
+ 7.2.0-beta.1
@@ -14,6 +14,7 @@ module Stripe
14
14
  # business objects
15
15
  Account::OBJECT_NAME => Account,
16
16
  AccountLink::OBJECT_NAME => AccountLink,
17
+ AccountSession::OBJECT_NAME => AccountSession,
17
18
  ApplePayDomain::OBJECT_NAME => ApplePayDomain,
18
19
  ApplicationFee::OBJECT_NAME => ApplicationFee,
19
20
  ApplicationFeeRefund::OBJECT_NAME => ApplicationFeeRefund,
@@ -73,6 +74,7 @@ module Stripe
73
74
  Product::OBJECT_NAME => Product,
74
75
  PromotionCode::OBJECT_NAME => PromotionCode,
75
76
  Quote::OBJECT_NAME => Quote,
77
+ QuotePhase::OBJECT_NAME => QuotePhase,
76
78
  Radar::EarlyFraudWarning::OBJECT_NAME => Radar::EarlyFraudWarning,
77
79
  Radar::ValueList::OBJECT_NAME => Radar::ValueList,
78
80
  Radar::ValueListItem::OBJECT_NAME => Radar::ValueListItem,
@@ -2,6 +2,12 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Stripe
5
+ # This is an object representing a Stripe account. You can retrieve it to see
6
+ # properties on the account like its current e-mail address or if the account is
7
+ # enabled yet to make live charges.
8
+ #
9
+ # Some properties, marked below, are available only to platforms that want to
10
+ # [create and manage Express or Custom accounts](https://stripe.com/docs/connect/accounts).
5
11
  class Account < APIResource
6
12
  extend Gem::Deprecate
7
13
  extend Stripe::APIOperations::Create
@@ -2,6 +2,10 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Stripe
5
+ # Account Links are the means by which a Connect platform grants a connected account permission to access
6
+ # Stripe-hosted applications, such as Connect Onboarding.
7
+ #
8
+ # Related guide: [Connect Onboarding](https://stripe.com/docs/connect/connect-onboarding).
5
9
  class AccountLink < APIResource
6
10
  extend Stripe::APIOperations::Create
7
11
 
@@ -0,0 +1,17 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ # An AccountSession allows a Connect platform to grant access to a connected account in Connect Elements.
6
+ #
7
+ # We recommend that you create an AccountSession each time you need to display an embedded UI
8
+ # to your user. Do not save AccountSessions to your database as they expire relatively
9
+ # quickly, and cannot be used more than once.
10
+ #
11
+ # Related guide: [Connect Elements](https://stripe.com/docs/connect/get-started-connect-elements).
12
+ class AccountSession < APIResource
13
+ extend Stripe::APIOperations::Create
14
+
15
+ OBJECT_NAME = "account_session"
16
+ end
17
+ end
@@ -2,6 +2,11 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Stripe
5
+ # `Application Fee Refund` objects allow you to refund an application fee that
6
+ # has previously been created but not yet refunded. Funds will be refunded to
7
+ # the Stripe account from which the fee was originally collected.
8
+ #
9
+ # Related guide: [Refunding Application Fees](https://stripe.com/docs/connect/destination-charges#refunding-app-fee).
5
10
  class ApplicationFeeRefund < APIResource
6
11
  extend Stripe::APIOperations::List
7
12
  include Stripe::APIOperations::Save
@@ -3,6 +3,15 @@
3
3
 
4
4
  module Stripe
5
5
  module Apps
6
+ # Secret Store is an API that allows Stripe Apps developers to securely persist secrets for use by UI Extensions and app backends.
7
+ #
8
+ # 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.
9
+ #
10
+ # 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.
11
+ #
12
+ # 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.
13
+ #
14
+ # Related guide: [Store data between page reloads](https://stripe.com/docs/stripe-apps/store-auth-data-custom-objects).
6
15
  class Secret < APIResource
7
16
  extend Stripe::APIOperations::Create
8
17
  extend Stripe::APIOperations::List
@@ -2,6 +2,17 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Stripe
5
+ # This is an object representing your Stripe balance. You can retrieve it to see
6
+ # the balance currently on your Stripe account.
7
+ #
8
+ # You can also retrieve the balance history, which contains a list of
9
+ # [transactions](https://stripe.com/docs/reporting/balance-transaction-types) that contributed to the balance
10
+ # (charges, payouts, and so forth).
11
+ #
12
+ # The available and pending amounts for each currency are broken down further by
13
+ # payment source types.
14
+ #
15
+ # Related guide: [Understanding Connect Account Balances](https://stripe.com/docs/connect/account-balances).
5
16
  class Balance < SingletonAPIResource
6
17
  OBJECT_NAME = "balance"
7
18
  end
@@ -2,6 +2,10 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Stripe
5
+ # Balance transactions represent funds moving through your Stripe account.
6
+ # They're created for every type of transaction that comes into or flows out of your Stripe account balance.
7
+ #
8
+ # Related guide: [Balance Transaction Types](https://stripe.com/docs/reports/balance-transaction-types).
5
9
  class BalanceTransaction < APIResource
6
10
  extend Stripe::APIOperations::List
7
11
 
@@ -2,6 +2,13 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Stripe
5
+ # These bank accounts are payment methods on `Customer` objects.
6
+ #
7
+ # On the other hand [External Accounts](https://stripe.com/docs/api#external_accounts) are transfer
8
+ # destinations on `Account` objects for [Custom accounts](https://stripe.com/docs/connect/custom-accounts).
9
+ # They can be bank accounts or debit cards as well, and are documented in the links above.
10
+ #
11
+ # Related guide: [Bank Debits and Transfers](https://stripe.com/docs/payments/bank-debits-transfers).
5
12
  class BankAccount < APIResource
6
13
  include Stripe::APIOperations::Delete
7
14
  extend Stripe::APIOperations::List
@@ -3,6 +3,7 @@
3
3
 
4
4
  module Stripe
5
5
  module BillingPortal
6
+ # A portal configuration describes the functionality and behavior of a portal session.
6
7
  class Configuration < APIResource
7
8
  extend Stripe::APIOperations::Create
8
9
  extend Stripe::APIOperations::List
@@ -3,6 +3,20 @@
3
3
 
4
4
  module Stripe
5
5
  module BillingPortal
6
+ # The Billing customer portal is a Stripe-hosted UI for subscription and
7
+ # billing management.
8
+ #
9
+ # A portal configuration describes the functionality and features that you
10
+ # want to provide to your customers through the portal.
11
+ #
12
+ # A portal session describes the instantiation of the customer portal for
13
+ # a particular customer. By visiting the session's URL, the customer
14
+ # can manage their subscriptions and billing details. For security reasons,
15
+ # sessions are short-lived and will expire if the customer does not visit the URL.
16
+ # Create sessions on-demand when customers intend to manage their subscriptions
17
+ # and billing details.
18
+ #
19
+ # Learn more in the [integration guide](https://stripe.com/docs/billing/subscriptions/integrating-customer-portal).
6
20
  class Session < APIResource
7
21
  extend Stripe::APIOperations::Create
8
22
 
@@ -2,6 +2,9 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Stripe
5
+ # This is an object representing a capability for a Stripe account.
6
+ #
7
+ # Related guide: [Account capabilities](https://stripe.com/docs/connect/account-capabilities).
5
8
  class Capability < APIResource
6
9
  extend Stripe::APIOperations::List
7
10
  include Stripe::APIOperations::Save
@@ -2,6 +2,11 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Stripe
5
+ # You can store multiple cards on a customer in order to charge the customer
6
+ # later. You can also store multiple debit cards on a recipient in order to
7
+ # transfer to those cards later.
8
+ #
9
+ # Related guide: [Card Payments with Sources](https://stripe.com/docs/sources/cards).
5
10
  class Card < APIResource
6
11
  include Stripe::APIOperations::Delete
7
12
  extend Stripe::APIOperations::List
@@ -2,6 +2,7 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Stripe
5
+ # 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.
5
6
  class CashBalance < APIResource
6
7
  OBJECT_NAME = "cash_balance"
7
8
 
@@ -2,6 +2,11 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Stripe
5
+ # To charge a credit or a debit card, you create a `Charge` object. You can
6
+ # retrieve and refund individual charges as well as list all charges. Charges
7
+ # are identified by a unique, random ID.
8
+ #
9
+ # Related guide: [Accept a payment with the Charges API](https://stripe.com/docs/payments/accept-a-payment-charges).
5
10
  class Charge < APIResource
6
11
  extend Stripe::APIOperations::Create
7
12
  extend Stripe::APIOperations::List
@@ -3,6 +3,20 @@
3
3
 
4
4
  module Stripe
5
5
  module Checkout
6
+ # A Checkout Session represents your customer's session as they pay for
7
+ # one-time purchases or subscriptions through [Checkout](https://stripe.com/docs/payments/checkout)
8
+ # or [Payment Links](https://stripe.com/docs/payments/payment-links). We recommend creating a
9
+ # new Session each time your customer attempts to pay.
10
+ #
11
+ # Once payment is successful, the Checkout Session will contain a reference
12
+ # to the [Customer](https://stripe.com/docs/api/customers), and either the successful
13
+ # [PaymentIntent](https://stripe.com/docs/api/payment_intents) or an active
14
+ # [Subscription](https://stripe.com/docs/api/subscriptions).
15
+ #
16
+ # You can create a Checkout Session on your server and pass its ID to the
17
+ # client to begin Checkout.
18
+ #
19
+ # Related guide: [Checkout Quickstart](https://stripe.com/docs/checkout/quickstart).
6
20
  class Session < APIResource
7
21
  extend Stripe::APIOperations::Create
8
22
  extend Stripe::APIOperations::List
@@ -2,6 +2,12 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Stripe
5
+ # Stripe needs to collect certain pieces of information about each account
6
+ # created. These requirements can differ depending on the account's country. The
7
+ # Country Specs API makes these rules available to your integration.
8
+ #
9
+ # You can also view the information from this API call as [an online
10
+ # guide](https://stripe.com/docs/connect/required-verification-information).
5
11
  class CountrySpec < APIResource
6
12
  extend Stripe::APIOperations::List
7
13
 
@@ -2,6 +2,9 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Stripe
5
+ # A coupon contains information about a percent-off or amount-off discount you
6
+ # 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),
7
+ # [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).
5
8
  class Coupon < APIResource
6
9
  extend Stripe::APIOperations::Create
7
10
  include Stripe::APIOperations::Delete
@@ -2,6 +2,9 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Stripe
5
+ # Issue a credit note to adjust an invoice's amount after the invoice is finalized.
6
+ #
7
+ # Related guide: [Credit Notes](https://stripe.com/docs/billing/invoices/credit-notes).
5
8
  class CreditNote < APIResource
6
9
  extend Stripe::APIOperations::Create
7
10
  extend Stripe::APIOperations::List
@@ -2,6 +2,9 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Stripe
5
+ # This object represents a customer of your business. It lets you create recurring charges and track payments that belong to the same customer.
6
+ #
7
+ # Related guide: [Save a card during payment](https://stripe.com/docs/payments/save-during-payment).
5
8
  class Customer < APIResource
6
9
  extend Stripe::APIOperations::Create
7
10
  include Stripe::APIOperations::Delete
@@ -2,6 +2,12 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Stripe
5
+ # Each customer has a [`balance`](https://stripe.com/docs/api/customers/object#customer_object-balance) value,
6
+ # which denotes a debit or credit that's automatically applied to their next invoice upon finalization.
7
+ # You may modify the value directly by using the [update customer API](https://stripe.com/docs/api/customers/update),
8
+ # or by creating a Customer Balance Transaction, which increments or decrements the customer's `balance` by the specified `amount`.
9
+ #
10
+ # Related guide: [Customer Balance](https://stripe.com/docs/billing/customer/balance) to learn more.
5
11
  class CustomerBalanceTransaction < APIResource
6
12
  extend Stripe::APIOperations::List
7
13
  include Stripe::APIOperations::Save
@@ -2,6 +2,10 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Stripe
5
+ # Customers with certain payments enabled have a cash balance, representing funds that were paid
6
+ # by the customer to a merchant, but have not yet been allocated to a payment. Cash Balance Transactions
7
+ # represent when funds are moved into or out of this balance. This includes funding by the customer, allocation
8
+ # to payments, and refunds to the customer.
5
9
  class CustomerCashBalanceTransaction < 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 discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes).
6
+ # It contains information about when the discount began, when it will end, and what it is applied to.
7
+ #
8
+ # Related guide: [Applying Discounts to Subscriptions](https://stripe.com/docs/billing/subscriptions/discounts).
5
9
  class Discount < StripeObject
6
10
  OBJECT_NAME = "discount"
7
11
  end
@@ -2,6 +2,13 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Stripe
5
+ # A dispute occurs when a customer questions your charge with their card issuer.
6
+ # When this happens, you're given the opportunity to respond to the dispute with
7
+ # evidence that shows that the charge is legitimate. You can find more
8
+ # information about the dispute process in our [Disputes and
9
+ # Fraud](https://stripe.com/docs/disputes) documentation.
10
+ #
11
+ # Related guide: [Disputes and Fraud](https://stripe.com/docs/disputes).
5
12
  class Dispute < APIResource
6
13
  extend Stripe::APIOperations::List
7
14
  include Stripe::APIOperations::Save
@@ -2,6 +2,35 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Stripe
5
+ # Events are our way of letting you know when something interesting happens in
6
+ # your account. When an interesting event occurs, we create a new `Event`
7
+ # object. For example, when a charge succeeds, we create a `charge.succeeded`
8
+ # event; and when an invoice payment attempt fails, we create an
9
+ # `invoice.payment_failed` event. Note that many API requests may cause multiple
10
+ # events to be created. For example, if you create a new subscription for a
11
+ # customer, you will receive both a `customer.subscription.created` event and a
12
+ # `charge.succeeded` event.
13
+ #
14
+ # Events occur when the state of another API resource changes. The state of that
15
+ # resource at the time of the change is embedded in the event's data field. For
16
+ # example, a `charge.succeeded` event will contain a charge, and an
17
+ # `invoice.payment_failed` event will contain an invoice.
18
+ #
19
+ # As with other API resources, you can use endpoints to retrieve an
20
+ # [individual event](https://stripe.com/docs/api#retrieve_event) or a [list of events](https://stripe.com/docs/api#list_events)
21
+ # from the API. We also have a separate
22
+ # [webhooks](http://en.wikipedia.org/wiki/Webhook) system for sending the
23
+ # `Event` objects directly to an endpoint on your server. Webhooks are managed
24
+ # in your
25
+ # [account settings](https://dashboard.stripe.com/account/webhooks),
26
+ # and our [Using Webhooks](https://stripe.com/docs/webhooks) guide will help you get set up.
27
+ #
28
+ # When using [Connect](https://stripe.com/docs/connect), you can also receive notifications of
29
+ # events that occur in connected accounts. For these events, there will be an
30
+ # additional `account` attribute in the received `Event` object.
31
+ #
32
+ # **NOTE:** Right now, access to events through the [Retrieve Event API](https://stripe.com/docs/api#retrieve_event) is
33
+ # guaranteed only for 30 days.
5
34
  class Event < APIResource
6
35
  extend Stripe::APIOperations::List
7
36
 
@@ -2,6 +2,17 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Stripe
5
+ # `Exchange Rate` objects allow you to determine the rates that Stripe is
6
+ # currently using to convert from one currency to another. Since this number is
7
+ # variable throughout the day, there are various reasons why you might want to
8
+ # know the current rate (for example, to dynamically price an item for a user
9
+ # with a default payment in a foreign currency).
10
+ #
11
+ # If you want a guarantee that the charge is made with a certain exchange rate
12
+ # you expect is current, you can pass in `exchange_rate` to charges endpoints.
13
+ # If the value is no longer up to date, the charge won't go through. Please
14
+ # refer to our [Exchange Rates API](https://stripe.com/docs/exchange-rates) guide for more
15
+ # details.
5
16
  class ExchangeRate < APIResource
6
17
  extend Stripe::APIOperations::List
7
18
 
@@ -2,6 +2,13 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Stripe
5
+ # This is an object representing a file hosted on Stripe's servers. The
6
+ # file may have been uploaded by yourself using the [create file](https://stripe.com/docs/api#create_file)
7
+ # request (for example, when uploading dispute evidence) or it may have
8
+ # been created by Stripe (for example, the results of a [Sigma scheduled
9
+ # query](https://stripe.com/docs/api#scheduled_queries)).
10
+ #
11
+ # Related guide: [File Upload Guide](https://stripe.com/docs/file-upload).
5
12
  class File < APIResource
6
13
  extend Stripe::APIOperations::Create
7
14
  extend Stripe::APIOperations::List
@@ -2,6 +2,9 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Stripe
5
+ # To share the contents of a `File` object with non-Stripe users, you can
6
+ # create a `FileLink`. `FileLink`s contain a URL that can be used to
7
+ # retrieve the contents of the file without authentication.
5
8
  class FileLink < 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 FinancialConnections
6
+ # A Financial Connections Account represents an account that exists outside of Stripe, to which you have been granted some degree of access.
6
7
  class Account < APIResource
7
8
  extend Stripe::APIOperations::List
8
9
 
@@ -3,6 +3,7 @@
3
3
 
4
4
  module Stripe
5
5
  module FinancialConnections
6
+ # Describes a snapshot of the owners of an account at a particular point in time.
6
7
  class AccountOwnership < StripeObject
7
8
  OBJECT_NAME = "financial_connections.account_ownership"
8
9
  end
@@ -3,6 +3,7 @@
3
3
 
4
4
  module Stripe
5
5
  module FinancialConnections
6
+ # A Financial Connections Session is the secure way to programmatically launch the client-side Stripe.js modal that lets your users link their accounts.
6
7
  class Session < APIResource
7
8
  extend Stripe::APIOperations::Create
8
9
 
@@ -2,6 +2,11 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Stripe
5
+ # Each customer has a [`balance`](https://stripe.com/docs/api/customers/object#customer_object-balance) that is
6
+ # automatically applied to future invoices and payments using the `customer_balance` payment method.
7
+ # Customers can fund this balance by initiating a bank transfer to any account in the
8
+ # `financial_addresses` field.
9
+ # Related guide: [Customer Balance - Funding Instructions](https://stripe.com/docs/payments/customer-balance/funding-instructions) to learn more
5
10
  class FundingInstructions < APIResource
6
11
  OBJECT_NAME = "funding_instructions"
7
12
 
@@ -3,6 +3,17 @@
3
3
 
4
4
  module Stripe
5
5
  module Identity
6
+ # A VerificationReport is the result of an attempt to collect and verify data from a user.
7
+ # The collection of verification checks performed is determined from the `type` and `options`
8
+ # parameters used. You can find the result of each verification check performed in the
9
+ # appropriate sub-resource: `document`, `id_number`, `selfie`.
10
+ #
11
+ # Each VerificationReport contains a copy of any data collected by the user as well as
12
+ # reference IDs which can be used to access collected images through the [FileUpload](https://stripe.com/docs/api/files)
13
+ # API. To configure and create VerificationReports, use the
14
+ # [VerificationSession](https://stripe.com/docs/api/identity/verification_sessions) API.
15
+ #
16
+ # Related guides: [Accessing verification results](https://stripe.com/docs/identity/verification-sessions#results).
6
17
  class VerificationReport < APIResource
7
18
  extend Stripe::APIOperations::List
8
19
 
@@ -3,6 +3,17 @@
3
3
 
4
4
  module Stripe
5
5
  module Identity
6
+ # A VerificationSession guides you through the process of collecting and verifying the identities
7
+ # of your users. It contains details about the type of verification, such as what [verification
8
+ # check](https://stripe.com/docs/identity/verification-checks) to perform. Only create one VerificationSession for
9
+ # each verification in your system.
10
+ #
11
+ # A VerificationSession transitions through [multiple
12
+ # statuses](https://stripe.com/docs/identity/how-sessions-work) throughout its lifetime as it progresses through
13
+ # the verification flow. The VerificationSession contains the user's verified data after
14
+ # verification checks are complete.
15
+ #
16
+ # Related guide: [The Verification Sessions API](https://stripe.com/docs/identity/verification-sessions)
6
17
  class VerificationSession < APIResource
7
18
  extend Stripe::APIOperations::Create
8
19
  extend Stripe::APIOperations::List