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
@@ -3,6 +3,9 @@
3
3
 
4
4
  module Stripe
5
5
  module Terminal
6
+ # A Connection Token is used by the Stripe Terminal SDK to connect to a reader.
7
+ #
8
+ # Related guide: [Fleet Management](https://stripe.com/docs/terminal/fleet/locations).
6
9
  class ConnectionToken < APIResource
7
10
  extend Stripe::APIOperations::Create
8
11
 
@@ -3,6 +3,9 @@
3
3
 
4
4
  module Stripe
5
5
  module Terminal
6
+ # A Location represents a grouping of readers.
7
+ #
8
+ # Related guide: [Fleet Management](https://stripe.com/docs/terminal/fleet/locations).
6
9
  class Location < 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 Terminal
6
+ # A Reader represents a physical device for accepting payment details.
7
+ #
8
+ # Related guide: [Connecting to a Reader](https://stripe.com/docs/terminal/payments/connect-reader).
6
9
  class Reader < APIResource
7
10
  extend Stripe::APIOperations::Create
8
11
  include Stripe::APIOperations::Delete
@@ -38,6 +41,15 @@ module Stripe
38
41
  )
39
42
  end
40
43
 
44
+ def refund_payment(params = {}, opts = {})
45
+ request_stripe_object(
46
+ method: :post,
47
+ path: format("/v1/terminal/readers/%<reader>s/refund_payment", { reader: CGI.escape(self["id"]) }),
48
+ params: params,
49
+ opts: opts
50
+ )
51
+ end
52
+
41
53
  def set_reader_display(params = {}, opts = {})
42
54
  request_stripe_object(
43
55
  method: :post,
@@ -74,6 +86,15 @@ module Stripe
74
86
  )
75
87
  end
76
88
 
89
+ def self.refund_payment(reader, params = {}, opts = {})
90
+ request_stripe_object(
91
+ method: :post,
92
+ path: format("/v1/terminal/readers/%<reader>s/refund_payment", { reader: CGI.escape(reader) }),
93
+ params: params,
94
+ opts: opts
95
+ )
96
+ end
97
+
77
98
  def self.set_reader_display(reader, params = {}, opts = {})
78
99
  request_stripe_object(
79
100
  method: :post,
@@ -3,6 +3,9 @@
3
3
 
4
4
  module Stripe
5
5
  module TestHelpers
6
+ # A test clock enables deterministic control over objects in testmode. With a test clock, you can create
7
+ # 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,
8
+ # 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.
6
9
  class TestClock < APIResource
7
10
  extend Stripe::APIOperations::Create
8
11
  include Stripe::APIOperations::Delete
@@ -2,6 +2,28 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Stripe
5
+ # Tokenization is the process Stripe uses to collect sensitive card or bank
6
+ # account details, or personally identifiable information (PII), directly from
7
+ # your customers in a secure manner. A token representing this information is
8
+ # returned to your server to use. You should use our
9
+ # [recommended payments integrations](https://stripe.com/docs/payments) to perform this process
10
+ # client-side. This ensures that no sensitive card data touches your server,
11
+ # and allows your integration to operate in a PCI-compliant way.
12
+ #
13
+ # If you cannot use client-side tokenization, you can also create tokens using
14
+ # the API with either your publishable or secret API key. Keep in mind that if
15
+ # your integration uses this method, you are responsible for any PCI compliance
16
+ # that may be required, and you must keep your secret API key safe. Unlike with
17
+ # client-side tokenization, your customer's information is not sent directly to
18
+ # Stripe, so we cannot determine how it is handled or stored.
19
+ #
20
+ # Tokens cannot be stored or used more than once. To store card or bank account
21
+ # information for later use, you can create [Customer](https://stripe.com/docs/api#customers)
22
+ # objects or [Custom accounts](https://stripe.com/docs/api#external_accounts). Note that
23
+ # [Radar](https://stripe.com/docs/radar), our integrated solution for automatic fraud protection,
24
+ # performs best with integrations that use client-side tokenization.
25
+ #
26
+ # Related guide: [Accept a payment](https://stripe.com/docs/payments/accept-a-payment-charges#web-create-token)
5
27
  class Token < APIResource
6
28
  extend Stripe::APIOperations::Create
7
29
 
@@ -2,6 +2,11 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Stripe
5
+ # To top up your Stripe balance, you create a top-up object. You can retrieve
6
+ # individual top-ups, as well as list all top-ups. Top-ups are identified by a
7
+ # unique, random ID.
8
+ #
9
+ # Related guide: [Topping Up your Platform Account](https://stripe.com/docs/connect/top-ups).
5
10
  class Topup < APIResource
6
11
  extend Stripe::APIOperations::Create
7
12
  extend Stripe::APIOperations::List
@@ -2,6 +2,16 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Stripe
5
+ # A `Transfer` object is created when you move funds between Stripe accounts as
6
+ # part of Connect.
7
+ #
8
+ # Before April 6, 2017, transfers also represented movement of funds from a
9
+ # Stripe account to a card or bank account. This behavior has since been split
10
+ # out into a [Payout](https://stripe.com/docs/api#payout_object) object, with corresponding payout endpoints. For more
11
+ # information, read about the
12
+ # [transfer/payout split](https://stripe.com/docs/transfer-payout-split).
13
+ #
14
+ # Related guide: [Creating Separate Charges and Transfers](https://stripe.com/docs/connect/charges-transfers).
5
15
  class Transfer < APIResource
6
16
  extend Stripe::APIOperations::Create
7
17
  extend Stripe::APIOperations::List
@@ -3,6 +3,7 @@
3
3
 
4
4
  module Stripe
5
5
  module Treasury
6
+ # 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.
6
7
  class CreditReversal < APIResource
7
8
  extend Stripe::APIOperations::Create
8
9
  extend Stripe::APIOperations::List
@@ -3,6 +3,7 @@
3
3
 
4
4
  module Stripe
5
5
  module Treasury
6
+ # 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.
6
7
  class DebitReversal < APIResource
7
8
  extend Stripe::APIOperations::Create
8
9
  extend Stripe::APIOperations::List
@@ -3,6 +3,8 @@
3
3
 
4
4
  module Stripe
5
5
  module Treasury
6
+ # Stripe Treasury provides users with a container for money called a FinancialAccount that is separate from their Payments balance.
7
+ # FinancialAccounts serve as the source and destination of Treasury's money movement APIs.
6
8
  class FinancialAccount < APIResource
7
9
  extend Stripe::APIOperations::Create
8
10
  extend Stripe::APIOperations::List
@@ -3,6 +3,7 @@
3
3
 
4
4
  module Stripe
5
5
  module Treasury
6
+ # 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.
6
7
  class InboundTransfer < 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 Treasury
6
+ # 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).
7
+ #
8
+ # Simulate OutboundPayment state changes with the `/v1/test_helpers/treasury/outbound_payments` endpoints. These methods can only be called on test mode objects.
6
9
  class OutboundPayment < 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 Treasury
6
+ # 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.
7
+ #
8
+ # Simulate OutboundTransfer state changes with the `/v1/test_helpers/treasury/outbound_transfers` endpoints. These methods can only be called on test mode objects.
6
9
  class OutboundTransfer < APIResource
7
10
  extend Stripe::APIOperations::Create
8
11
  extend Stripe::APIOperations::List
@@ -3,6 +3,7 @@
3
3
 
4
4
  module Stripe
5
5
  module Treasury
6
+ # 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.
6
7
  class ReceivedCredit < APIResource
7
8
  extend Stripe::APIOperations::List
8
9
 
@@ -3,6 +3,7 @@
3
3
 
4
4
  module Stripe
5
5
  module Treasury
6
+ # ReceivedDebits represent funds pulled from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts). These are not initiated from the FinancialAccount.
6
7
  class ReceivedDebit < APIResource
7
8
  extend Stripe::APIOperations::List
8
9
 
@@ -3,6 +3,7 @@
3
3
 
4
4
  module Stripe
5
5
  module Treasury
6
+ # Transactions represent changes to a [FinancialAccount's](https://stripe.com/docs/api#financial_accounts) balance.
6
7
  class Transaction < APIResource
7
8
  extend Stripe::APIOperations::List
8
9
 
@@ -3,6 +3,7 @@
3
3
 
4
4
  module Stripe
5
5
  module Treasury
6
+ # TransactionEntries represent individual units of money movements within a single [Transaction](https://stripe.com/docs/api#transactions).
6
7
  class TransactionEntry < APIResource
7
8
  extend Stripe::APIOperations::List
8
9
 
@@ -2,6 +2,10 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Stripe
5
+ # Usage records allow you to report customer usage and metrics to Stripe for
6
+ # metered billing of subscription prices.
7
+ #
8
+ # Related guide: [Metered Billing](https://stripe.com/docs/billing/subscriptions/metered-billing).
5
9
  class UsageRecord < APIResource
6
10
  OBJECT_NAME = "usage_record"
7
11
  end
@@ -2,6 +2,13 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Stripe
5
+ # You can configure [webhook endpoints](https://stripe.com/docs/webhooks/) via the API to be
6
+ # notified about events that happen in your Stripe account or connected
7
+ # accounts.
8
+ #
9
+ # Most users configure webhooks from [the dashboard](https://dashboard.stripe.com/webhooks), which provides a user interface for registering and testing your webhook endpoints.
10
+ #
11
+ # Related guide: [Setting up Webhooks](https://stripe.com/docs/webhooks/configure).
5
12
  class WebhookEndpoint < APIResource
6
13
  extend Stripe::APIOperations::Create
7
14
  include Stripe::APIOperations::Delete
@@ -3,6 +3,7 @@
3
3
 
4
4
  require "stripe/resources/account"
5
5
  require "stripe/resources/account_link"
6
+ require "stripe/resources/account_session"
6
7
  require "stripe/resources/apple_pay_domain"
7
8
  require "stripe/resources/application_fee"
8
9
  require "stripe/resources/application_fee_refund"
@@ -60,6 +61,7 @@ require "stripe/resources/price"
60
61
  require "stripe/resources/product"
61
62
  require "stripe/resources/promotion_code"
62
63
  require "stripe/resources/quote"
64
+ require "stripe/resources/quote_phase"
63
65
  require "stripe/resources/radar/early_fraud_warning"
64
66
  require "stripe/resources/radar/value_list"
65
67
  require "stripe/resources/radar/value_list_item"
@@ -63,6 +63,8 @@ module Stripe
63
63
  end
64
64
 
65
65
  def initialize
66
+ @api_version = ApiVersion::CURRENT
67
+
66
68
  @ca_bundle_path = Stripe::DEFAULT_CA_BUNDLE_PATH
67
69
  @enable_telemetry = true
68
70
  @verify_ssl_certs = true
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Stripe
4
- VERSION = "7.1.0"
4
+ VERSION = "7.2.0-beta.1"
5
5
  end
data/lib/stripe.rb CHANGED
@@ -15,6 +15,7 @@ require "uri"
15
15
  require "forwardable"
16
16
 
17
17
  # Version
18
+ require "stripe/api_version"
18
19
  require "stripe/version"
19
20
 
20
21
  # API operations
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stripe
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.1.0
4
+ version: 7.2.0.pre.beta.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stripe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-08-19 00:00:00.000000000 Z
11
+ date: 2022-08-23 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Stripe is the easiest way to accept payments online. See https://stripe.com
14
14
  for details.
@@ -53,6 +53,7 @@ files:
53
53
  - lib/stripe/resources.rb
54
54
  - lib/stripe/resources/account.rb
55
55
  - lib/stripe/resources/account_link.rb
56
+ - lib/stripe/resources/account_session.rb
56
57
  - lib/stripe/resources/alipay_account.rb
57
58
  - lib/stripe/resources/apple_pay_domain.rb
58
59
  - lib/stripe/resources/application_fee.rb
@@ -111,6 +112,7 @@ files:
111
112
  - lib/stripe/resources/product.rb
112
113
  - lib/stripe/resources/promotion_code.rb
113
114
  - lib/stripe/resources/quote.rb
115
+ - lib/stripe/resources/quote_phase.rb
114
116
  - lib/stripe/resources/radar/early_fraud_warning.rb
115
117
  - lib/stripe/resources/radar/value_list.rb
116
118
  - lib/stripe/resources/radar/value_list_item.rb
@@ -185,9 +187,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
185
187
  version: 2.3.0
186
188
  required_rubygems_version: !ruby/object:Gem::Requirement
187
189
  requirements:
188
- - - ">="
190
+ - - ">"
189
191
  - !ruby/object:Gem::Version
190
- version: '0'
192
+ version: 1.3.1
191
193
  requirements: []
192
194
  rubygems_version: 3.3.7
193
195
  signing_key: