stripe 5.41.0 → 9.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (139) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +256 -0
  3. data/Gemfile +5 -2
  4. data/Makefile +13 -0
  5. data/OPENAPI_VERSION +1 -0
  6. data/README.md +40 -6
  7. data/VERSION +1 -1
  8. data/lib/data/ca-certificates.crt +1241 -1937
  9. data/lib/stripe/api_operations/create.rb +6 -2
  10. data/lib/stripe/api_operations/delete.rb +12 -7
  11. data/lib/stripe/api_operations/list.rb +6 -9
  12. data/lib/stripe/api_operations/nested_resource.rb +62 -34
  13. data/lib/stripe/api_operations/request.rb +10 -0
  14. data/lib/stripe/api_operations/save.rb +13 -3
  15. data/lib/stripe/api_operations/search.rb +16 -0
  16. data/lib/stripe/api_resource.rb +3 -18
  17. data/lib/stripe/api_resource_test_helpers.rb +49 -0
  18. data/lib/stripe/api_version.rb +8 -0
  19. data/lib/stripe/connection_manager.rb +22 -1
  20. data/lib/stripe/instrumentation.rb +45 -7
  21. data/lib/stripe/object_types.rb +29 -10
  22. data/lib/stripe/resources/account.rb +36 -9
  23. data/lib/stripe/resources/account_link.rb +4 -0
  24. data/lib/stripe/resources/application_fee_refund.rb +5 -0
  25. data/lib/stripe/resources/apps/secret.rb +40 -0
  26. data/lib/stripe/resources/balance.rb +11 -0
  27. data/lib/stripe/resources/balance_transaction.rb +4 -0
  28. data/lib/stripe/resources/bank_account.rb +7 -0
  29. data/lib/stripe/resources/billing_portal/configuration.rb +1 -0
  30. data/lib/stripe/resources/billing_portal/session.rb +14 -0
  31. data/lib/stripe/resources/capability.rb +3 -0
  32. data/lib/stripe/resources/card.rb +6 -3
  33. data/lib/stripe/resources/cash_balance.rb +23 -0
  34. data/lib/stripe/resources/charge.rb +23 -3
  35. data/lib/stripe/resources/checkout/session.rb +41 -5
  36. data/lib/stripe/resources/country_spec.rb +6 -0
  37. data/lib/stripe/resources/coupon.rb +3 -0
  38. data/lib/stripe/resources/credit_note.rb +27 -9
  39. data/lib/stripe/resources/credit_note_line_item.rb +1 -0
  40. data/lib/stripe/resources/customer.rb +124 -12
  41. data/lib/stripe/resources/customer_balance_transaction.rb +6 -0
  42. data/lib/stripe/resources/customer_cash_balance_transaction.rb +14 -0
  43. data/lib/stripe/resources/discount.rb +4 -0
  44. data/lib/stripe/resources/dispute.rb +17 -3
  45. data/lib/stripe/resources/event.rb +29 -0
  46. data/lib/stripe/resources/exchange_rate.rb +11 -0
  47. data/lib/stripe/resources/file.rb +7 -0
  48. data/lib/stripe/resources/file_link.rb +3 -0
  49. data/lib/stripe/resources/financial_connections/account.rb +67 -0
  50. data/lib/stripe/resources/financial_connections/account_owner.rb +11 -0
  51. data/lib/stripe/resources/financial_connections/account_ownership.rb +11 -0
  52. data/lib/stripe/resources/financial_connections/session.rb +13 -0
  53. data/lib/stripe/resources/funding_instructions.rb +21 -0
  54. data/lib/stripe/resources/identity/verification_report.rb +11 -0
  55. data/lib/stripe/resources/identity/verification_session.rb +31 -5
  56. data/lib/stripe/resources/invoice.rb +105 -17
  57. data/lib/stripe/resources/invoice_item.rb +11 -0
  58. data/lib/stripe/resources/issuing/authorization.rb +25 -5
  59. data/lib/stripe/resources/issuing/card.rb +78 -8
  60. data/lib/stripe/resources/issuing/cardholder.rb +3 -0
  61. data/lib/stripe/resources/issuing/dispute.rb +13 -3
  62. data/lib/stripe/resources/issuing/transaction.rb +5 -0
  63. data/lib/stripe/resources/line_item.rb +1 -0
  64. data/lib/stripe/resources/login_link.rb +1 -0
  65. data/lib/stripe/resources/mandate.rb +1 -0
  66. data/lib/stripe/resources/payment_intent.rb +103 -6
  67. data/lib/stripe/resources/payment_link.rb +35 -0
  68. data/lib/stripe/resources/payment_method.rb +25 -5
  69. data/lib/stripe/resources/payout.rb +28 -5
  70. data/lib/stripe/resources/person.rb +6 -0
  71. data/lib/stripe/resources/plan.rb +8 -0
  72. data/lib/stripe/resources/price.rb +15 -0
  73. data/lib/stripe/resources/product.rb +17 -0
  74. data/lib/stripe/resources/promotion_code.rb +2 -0
  75. data/lib/stripe/resources/quote.rb +58 -35
  76. data/lib/stripe/resources/radar/early_fraud_warning.rb +4 -0
  77. data/lib/stripe/resources/radar/value_list.rb +3 -0
  78. data/lib/stripe/resources/radar/value_list_item.rb +3 -0
  79. data/lib/stripe/resources/refund.rb +49 -0
  80. data/lib/stripe/resources/reporting/report_run.rb +8 -0
  81. data/lib/stripe/resources/reporting/report_type.rb +8 -1
  82. data/lib/stripe/resources/reversal.rb +13 -0
  83. data/lib/stripe/resources/review.rb +14 -3
  84. data/lib/stripe/resources/setup_attempt.rb +4 -0
  85. data/lib/stripe/resources/setup_intent.rb +60 -5
  86. data/lib/stripe/resources/shipping_rate.rb +2 -0
  87. data/lib/stripe/resources/sigma/scheduled_query_run.rb +4 -0
  88. data/lib/stripe/resources/source.rb +26 -6
  89. data/lib/stripe/resources/source_transaction.rb +4 -0
  90. data/lib/stripe/resources/subscription.rb +57 -3
  91. data/lib/stripe/resources/subscription_item.rb +2 -7
  92. data/lib/stripe/resources/subscription_schedule.rb +23 -5
  93. data/lib/stripe/resources/tax/calculation.rb +33 -0
  94. data/lib/stripe/resources/tax/calculation_line_item.rb +10 -0
  95. data/lib/stripe/resources/tax/settings.rb +15 -0
  96. data/lib/stripe/resources/tax/transaction.rb +49 -0
  97. data/lib/stripe/resources/tax/transaction_line_item.rb +10 -0
  98. data/lib/stripe/resources/tax_code.rb +1 -0
  99. data/lib/stripe/resources/tax_id.rb +4 -0
  100. data/lib/stripe/resources/tax_rate.rb +3 -0
  101. data/lib/stripe/resources/terminal/configuration.rb +16 -0
  102. data/lib/stripe/resources/terminal/connection_token.rb +3 -0
  103. data/lib/stripe/resources/terminal/location.rb +3 -0
  104. data/lib/stripe/resources/terminal/reader.rb +119 -0
  105. data/lib/stripe/resources/test_helpers/test_clock.rb +35 -0
  106. data/lib/stripe/resources/token.rb +20 -0
  107. data/lib/stripe/resources/topup.rb +15 -3
  108. data/lib/stripe/resources/transfer.rb +10 -11
  109. data/lib/stripe/resources/treasury/credit_reversal.rb +14 -0
  110. data/lib/stripe/resources/treasury/debit_reversal.rb +14 -0
  111. data/lib/stripe/resources/treasury/financial_account.rb +52 -0
  112. data/lib/stripe/resources/treasury/financial_account_features.rb +12 -0
  113. data/lib/stripe/resources/treasury/inbound_transfer.rb +94 -0
  114. data/lib/stripe/resources/treasury/outbound_payment.rb +96 -0
  115. data/lib/stripe/resources/treasury/outbound_transfer.rb +100 -0
  116. data/lib/stripe/resources/treasury/received_credit.rb +30 -0
  117. data/lib/stripe/resources/treasury/received_debit.rb +30 -0
  118. data/lib/stripe/resources/treasury/transaction.rb +13 -0
  119. data/lib/stripe/resources/treasury/transaction_entry.rb +17 -0
  120. data/lib/stripe/resources/usage_record.rb +4 -0
  121. data/lib/stripe/resources/webhook_endpoint.rb +7 -0
  122. data/lib/stripe/resources.rb +27 -10
  123. data/lib/stripe/search_result_object.rb +86 -0
  124. data/lib/stripe/stripe_client.rb +37 -22
  125. data/lib/stripe/stripe_configuration.rb +5 -1
  126. data/lib/stripe/stripe_object.rb +2 -2
  127. data/lib/stripe/util.rb +85 -2
  128. data/lib/stripe/version.rb +1 -1
  129. data/lib/stripe.rb +5 -1
  130. data/stripe.gemspec +3 -3
  131. metadata +39 -14
  132. data/lib/stripe/resources/bitcoin_receiver.rb +0 -24
  133. data/lib/stripe/resources/bitcoin_transaction.rb +0 -16
  134. data/lib/stripe/resources/issuing/card_details.rb +0 -10
  135. data/lib/stripe/resources/order.rb +0 -33
  136. data/lib/stripe/resources/order_return.rb +0 -10
  137. data/lib/stripe/resources/recipient.rb +0 -14
  138. data/lib/stripe/resources/sku.rb +0 -13
  139. data/lib/stripe/resources/three_d_secure.rb +0 -14
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: 5.41.0
4
+ version: 9.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stripe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-11-16 00:00:00.000000000 Z
11
+ date: 2023-08-16 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.
@@ -24,6 +24,8 @@ files:
24
24
  - Gemfile
25
25
  - History.txt
26
26
  - LICENSE
27
+ - Makefile
28
+ - OPENAPI_VERSION
27
29
  - README.md
28
30
  - Rakefile
29
31
  - VERSION
@@ -36,7 +38,10 @@ files:
36
38
  - lib/stripe/api_operations/nested_resource.rb
37
39
  - lib/stripe/api_operations/request.rb
38
40
  - lib/stripe/api_operations/save.rb
41
+ - lib/stripe/api_operations/search.rb
39
42
  - lib/stripe/api_resource.rb
43
+ - lib/stripe/api_resource_test_helpers.rb
44
+ - lib/stripe/api_version.rb
40
45
  - lib/stripe/connection_manager.rb
41
46
  - lib/stripe/error_object.rb
42
47
  - lib/stripe/errors.rb
@@ -52,15 +57,15 @@ files:
52
57
  - lib/stripe/resources/apple_pay_domain.rb
53
58
  - lib/stripe/resources/application_fee.rb
54
59
  - lib/stripe/resources/application_fee_refund.rb
60
+ - lib/stripe/resources/apps/secret.rb
55
61
  - lib/stripe/resources/balance.rb
56
62
  - lib/stripe/resources/balance_transaction.rb
57
63
  - lib/stripe/resources/bank_account.rb
58
64
  - lib/stripe/resources/billing_portal/configuration.rb
59
65
  - lib/stripe/resources/billing_portal/session.rb
60
- - lib/stripe/resources/bitcoin_receiver.rb
61
- - lib/stripe/resources/bitcoin_transaction.rb
62
66
  - lib/stripe/resources/capability.rb
63
67
  - lib/stripe/resources/card.rb
68
+ - lib/stripe/resources/cash_balance.rb
64
69
  - lib/stripe/resources/charge.rb
65
70
  - lib/stripe/resources/checkout/session.rb
66
71
  - lib/stripe/resources/country_spec.rb
@@ -69,6 +74,7 @@ files:
69
74
  - lib/stripe/resources/credit_note_line_item.rb
70
75
  - lib/stripe/resources/customer.rb
71
76
  - lib/stripe/resources/customer_balance_transaction.rb
77
+ - lib/stripe/resources/customer_cash_balance_transaction.rb
72
78
  - lib/stripe/resources/discount.rb
73
79
  - lib/stripe/resources/dispute.rb
74
80
  - lib/stripe/resources/ephemeral_key.rb
@@ -76,6 +82,11 @@ files:
76
82
  - lib/stripe/resources/exchange_rate.rb
77
83
  - lib/stripe/resources/file.rb
78
84
  - lib/stripe/resources/file_link.rb
85
+ - lib/stripe/resources/financial_connections/account.rb
86
+ - lib/stripe/resources/financial_connections/account_owner.rb
87
+ - lib/stripe/resources/financial_connections/account_ownership.rb
88
+ - lib/stripe/resources/financial_connections/session.rb
89
+ - lib/stripe/resources/funding_instructions.rb
79
90
  - lib/stripe/resources/identity/verification_report.rb
80
91
  - lib/stripe/resources/identity/verification_session.rb
81
92
  - lib/stripe/resources/invoice.rb
@@ -83,16 +94,14 @@ files:
83
94
  - lib/stripe/resources/invoice_line_item.rb
84
95
  - lib/stripe/resources/issuing/authorization.rb
85
96
  - lib/stripe/resources/issuing/card.rb
86
- - lib/stripe/resources/issuing/card_details.rb
87
97
  - lib/stripe/resources/issuing/cardholder.rb
88
98
  - lib/stripe/resources/issuing/dispute.rb
89
99
  - lib/stripe/resources/issuing/transaction.rb
90
100
  - lib/stripe/resources/line_item.rb
91
101
  - lib/stripe/resources/login_link.rb
92
102
  - lib/stripe/resources/mandate.rb
93
- - lib/stripe/resources/order.rb
94
- - lib/stripe/resources/order_return.rb
95
103
  - lib/stripe/resources/payment_intent.rb
104
+ - lib/stripe/resources/payment_link.rb
96
105
  - lib/stripe/resources/payment_method.rb
97
106
  - lib/stripe/resources/payout.rb
98
107
  - lib/stripe/resources/person.rb
@@ -104,7 +113,6 @@ files:
104
113
  - lib/stripe/resources/radar/early_fraud_warning.rb
105
114
  - lib/stripe/resources/radar/value_list.rb
106
115
  - lib/stripe/resources/radar/value_list_item.rb
107
- - lib/stripe/resources/recipient.rb
108
116
  - lib/stripe/resources/recipient_transfer.rb
109
117
  - lib/stripe/resources/refund.rb
110
118
  - lib/stripe/resources/reporting/report_run.rb
@@ -115,25 +123,42 @@ files:
115
123
  - lib/stripe/resources/setup_intent.rb
116
124
  - lib/stripe/resources/shipping_rate.rb
117
125
  - lib/stripe/resources/sigma/scheduled_query_run.rb
118
- - lib/stripe/resources/sku.rb
119
126
  - lib/stripe/resources/source.rb
120
127
  - lib/stripe/resources/source_transaction.rb
121
128
  - lib/stripe/resources/subscription.rb
122
129
  - lib/stripe/resources/subscription_item.rb
123
130
  - lib/stripe/resources/subscription_schedule.rb
131
+ - lib/stripe/resources/tax/calculation.rb
132
+ - lib/stripe/resources/tax/calculation_line_item.rb
133
+ - lib/stripe/resources/tax/settings.rb
134
+ - lib/stripe/resources/tax/transaction.rb
135
+ - lib/stripe/resources/tax/transaction_line_item.rb
124
136
  - lib/stripe/resources/tax_code.rb
125
137
  - lib/stripe/resources/tax_id.rb
126
138
  - lib/stripe/resources/tax_rate.rb
139
+ - lib/stripe/resources/terminal/configuration.rb
127
140
  - lib/stripe/resources/terminal/connection_token.rb
128
141
  - lib/stripe/resources/terminal/location.rb
129
142
  - lib/stripe/resources/terminal/reader.rb
130
- - lib/stripe/resources/three_d_secure.rb
143
+ - lib/stripe/resources/test_helpers/test_clock.rb
131
144
  - lib/stripe/resources/token.rb
132
145
  - lib/stripe/resources/topup.rb
133
146
  - lib/stripe/resources/transfer.rb
147
+ - lib/stripe/resources/treasury/credit_reversal.rb
148
+ - lib/stripe/resources/treasury/debit_reversal.rb
149
+ - lib/stripe/resources/treasury/financial_account.rb
150
+ - lib/stripe/resources/treasury/financial_account_features.rb
151
+ - lib/stripe/resources/treasury/inbound_transfer.rb
152
+ - lib/stripe/resources/treasury/outbound_payment.rb
153
+ - lib/stripe/resources/treasury/outbound_transfer.rb
154
+ - lib/stripe/resources/treasury/received_credit.rb
155
+ - lib/stripe/resources/treasury/received_debit.rb
156
+ - lib/stripe/resources/treasury/transaction.rb
157
+ - lib/stripe/resources/treasury/transaction_entry.rb
134
158
  - lib/stripe/resources/usage_record.rb
135
159
  - lib/stripe/resources/usage_record_summary.rb
136
160
  - lib/stripe/resources/webhook_endpoint.rb
161
+ - lib/stripe/search_result_object.rb
137
162
  - lib/stripe/singleton_api_resource.rb
138
163
  - lib/stripe/stripe_client.rb
139
164
  - lib/stripe/stripe_configuration.rb
@@ -143,15 +168,15 @@ files:
143
168
  - lib/stripe/version.rb
144
169
  - lib/stripe/webhook.rb
145
170
  - stripe.gemspec
146
- homepage: https://stripe.com/docs/api/ruby
171
+ homepage: https://stripe.com/docs/api?lang=ruby
147
172
  licenses:
148
173
  - MIT
149
174
  metadata:
150
175
  bug_tracker_uri: https://github.com/stripe/stripe-ruby/issues
151
176
  changelog_uri: https://github.com/stripe/stripe-ruby/blob/master/CHANGELOG.md
152
- documentation_uri: https://stripe.com/docs/api/ruby
177
+ documentation_uri: https://stripe.com/docs/api?lang=ruby
153
178
  github_repo: ssh://github.com/stripe/stripe-ruby
154
- homepage_uri: https://stripe.com/docs/api/ruby
179
+ homepage_uri: https://stripe.com/docs/api?lang=ruby
155
180
  source_code_uri: https://github.com/stripe/stripe-ruby
156
181
  post_install_message:
157
182
  rdoc_options: []
@@ -168,7 +193,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
168
193
  - !ruby/object:Gem::Version
169
194
  version: '0'
170
195
  requirements: []
171
- rubygems_version: 3.1.2
196
+ rubygems_version: 3.3.26
172
197
  signing_key:
173
198
  specification_version: 4
174
199
  summary: Ruby bindings for the Stripe API
@@ -1,24 +0,0 @@
1
- # File generated from our OpenAPI spec
2
- # frozen_string_literal: true
3
-
4
- module Stripe
5
- # Directly creating or retrieving BitcoinReceivers is deprecated. Please use
6
- # the Sources API instead: https://stripe.com/docs/sources/bitcoin
7
- class BitcoinReceiver < APIResource
8
- extend Stripe::APIOperations::List
9
-
10
- OBJECT_NAME = "bitcoin_receiver"
11
-
12
- def self.resource_url
13
- "/v1/bitcoin/receivers"
14
- end
15
-
16
- def resource_url
17
- if respond_to?(:customer) && !customer.nil? && customer != ""
18
- "#{Customer.resource_url}/#{CGI.escape(customer)}/sources/#{CGI.escape(id)}"
19
- else
20
- "#{self.class.resource_url}/#{CGI.escape(id)}"
21
- end
22
- end
23
- end
24
- end
@@ -1,16 +0,0 @@
1
- # File generated from our OpenAPI spec
2
- # frozen_string_literal: true
3
-
4
- module Stripe
5
- # Directly retrieving BitcoinTransactions is deprecated. Please use
6
- # the Sources API instead: https://stripe.com/docs/sources/bitcoin
7
- class BitcoinTransaction < APIResource
8
- extend Stripe::APIOperations::List
9
-
10
- OBJECT_NAME = "bitcoin_transaction"
11
-
12
- def self.resource_url
13
- "/v1/bitcoin/transactions"
14
- end
15
- end
16
- end
@@ -1,10 +0,0 @@
1
- # File generated from our OpenAPI spec
2
- # frozen_string_literal: true
3
-
4
- module Stripe
5
- module Issuing
6
- class CardDetails < StripeObject
7
- OBJECT_NAME = "issuing.card_details"
8
- end
9
- end
10
- end
@@ -1,33 +0,0 @@
1
- # File generated from our OpenAPI spec
2
- # frozen_string_literal: true
3
-
4
- module Stripe
5
- class Order < APIResource
6
- extend Stripe::APIOperations::Create
7
- extend Stripe::APIOperations::List
8
- include Stripe::APIOperations::Save
9
-
10
- OBJECT_NAME = "order"
11
-
12
- custom_method :pay, http_verb: :post
13
- custom_method :return_order, http_verb: :post, http_path: "returns"
14
-
15
- def pay(params = {}, opts = {})
16
- request_stripe_object(
17
- method: :post,
18
- path: resource_url + "/pay",
19
- params: params,
20
- opts: opts
21
- )
22
- end
23
-
24
- def return_order(params = {}, opts = {})
25
- request_stripe_object(
26
- method: :post,
27
- path: resource_url + "/returns",
28
- params: params,
29
- opts: opts
30
- )
31
- end
32
- end
33
- end
@@ -1,10 +0,0 @@
1
- # File generated from our OpenAPI spec
2
- # frozen_string_literal: true
3
-
4
- module Stripe
5
- class OrderReturn < APIResource
6
- extend Stripe::APIOperations::List
7
-
8
- OBJECT_NAME = "order_return"
9
- end
10
- end
@@ -1,14 +0,0 @@
1
- # File generated from our OpenAPI spec
2
- # frozen_string_literal: true
3
-
4
- module Stripe
5
- # Recipients objects are deprecated. Please use Stripe Connect instead.
6
- class Recipient < APIResource
7
- extend Stripe::APIOperations::Create
8
- include Stripe::APIOperations::Delete
9
- extend Stripe::APIOperations::List
10
- include Stripe::APIOperations::Save
11
-
12
- OBJECT_NAME = "recipient"
13
- end
14
- end
@@ -1,13 +0,0 @@
1
- # File generated from our OpenAPI spec
2
- # frozen_string_literal: true
3
-
4
- module Stripe
5
- class SKU < APIResource
6
- extend Stripe::APIOperations::Create
7
- include Stripe::APIOperations::Delete
8
- extend Stripe::APIOperations::List
9
- include Stripe::APIOperations::Save
10
-
11
- OBJECT_NAME = "sku"
12
- end
13
- end
@@ -1,14 +0,0 @@
1
- # File generated from our OpenAPI spec
2
- # frozen_string_literal: true
3
-
4
- module Stripe
5
- class ThreeDSecure < APIResource
6
- extend Stripe::APIOperations::Create
7
-
8
- OBJECT_NAME = "three_d_secure"
9
-
10
- def self.resource_url
11
- "/v1/3d_secure"
12
- end
13
- end
14
- end