stripe 8.7.0.pre.beta.1 → 8.7.0.pre.beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4d6ac8a47052e7d62cc1c90a820a80e48ba2b41afc762adaa4484d66285c7be6
4
- data.tar.gz: 5402314f589374d47902af46944ba32e52f677b08c58dbda6f8f712d73e9ac2d
3
+ metadata.gz: '025923624fe893ec10b1799776ba83c8cee3a59072dcdbc8d2522ea3895a12d1'
4
+ data.tar.gz: 62519a92a1901f2ff498f4183becdbde164dea0c96ca29d6725047eb2502d8ea
5
5
  SHA512:
6
- metadata.gz: c689945d61327093b962ce9ee5c25e804fcd6010b6f6da08580af905db6fb9b6fe37be15d1868fbcfd5e67d5bc02da6478d45ebf039edb829fac9db95057e17c
7
- data.tar.gz: c7b986c14cbc246109e61041362ee3e303ce073eda4fa51c0b740f0483bb484926963939abe9bd4020eb1e089c306b4fa542466d9d3c61ff69c65c66e301b948
6
+ metadata.gz: 20c986e3581b57dc5a10d4d617184be0a9d47d1e81b0d4f2a0bc1ed66f4f21a5e0fe8c042c38f87fc9a7015f5333d13489a4884f0c4c15755b9fe51c9636a40b
7
+ data.tar.gz: 0f29d293c8d9077ceaf3902879f30ef7d8fba7b157cd9174db8dff4771bc4d47cc23264f47d168cba29702e7af03c43f0abf7edf0fdce05a5d69c827abee73ad
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 8.7.0-beta.2 - 2023-07-28
4
+ * [#1251](https://github.com/stripe/stripe-ruby/pull/1251) Update generated code for beta
5
+ * Add support for new resource `Tax.Form`
6
+ * Add support for `list`, `pdf`, and `retrieve` methods on resource `Form`
7
+ * [#1249](https://github.com/stripe/stripe-ruby/pull/1249) Update generated code for beta
8
+ * [#1246](https://github.com/stripe/stripe-ruby/pull/1246) Update generated code for beta
9
+
10
+
3
11
  ## 8.7.0-beta.1 - 2023-07-13
4
12
  * [#1245](https://github.com/stripe/stripe-ruby/pull/1245) Update generated code for beta
5
13
  Release specs are identical.
@@ -29,7 +37,7 @@
29
37
 
30
38
  * [#1225](https://github.com/stripe/stripe-ruby/pull/1225) Downgrade jaro_winkler
31
39
  * [#1219](https://github.com/stripe/stripe-ruby/pull/1219) Update generated code
32
-
40
+
33
41
  Documentation updates.
34
42
  * [#1215](https://github.com/stripe/stripe-ruby/pull/1215) Update generated code
35
43
 
data/OPENAPI_VERSION CHANGED
@@ -1 +1 @@
1
- v417
1
+ v431
data/VERSION CHANGED
@@ -1 +1 @@
1
- 8.7.0-beta.1
1
+ 8.7.0-beta.2
@@ -4,6 +4,6 @@
4
4
  module Stripe
5
5
  module ApiVersion
6
6
  CURRENT = "2022-11-15"
7
- PREVIEW = "20230712T200515"
7
+ PREVIEW = "2023-07-13.preview-v2"
8
8
  end
9
9
  end
@@ -104,6 +104,7 @@ module Stripe
104
104
  SubscriptionItem::OBJECT_NAME => SubscriptionItem,
105
105
  SubscriptionSchedule::OBJECT_NAME => SubscriptionSchedule,
106
106
  Tax::Calculation::OBJECT_NAME => Tax::Calculation,
107
+ Tax::Form::OBJECT_NAME => Tax::Form,
107
108
  Tax::Registration::OBJECT_NAME => Tax::Registration,
108
109
  Tax::Settings::OBJECT_NAME => Tax::Settings,
109
110
  Tax::Transaction::OBJECT_NAME => Tax::Transaction,
@@ -5,7 +5,7 @@ module Stripe
5
5
  # This is an object representing a person associated with a Stripe account.
6
6
  #
7
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.
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 prefilling and account onboarding steps.
9
9
  #
10
10
  # Related guide: [Handling identity verification with the API](https://stripe.com/docs/connect/identity-verification-api#person-information)
11
11
  class Person < APIResource
@@ -83,6 +83,18 @@ module Stripe
83
83
  )
84
84
  end
85
85
 
86
+ def pdf(params = {}, opts = {}, &read_body_chunk_block)
87
+ config = opts[:client]&.config || Stripe.config
88
+ opts = { api_base: config.uploads_base }.merge(opts)
89
+ request_stream(
90
+ method: :get,
91
+ path: format("/v1/quotes/%<quote>s/pdf", { quote: CGI.escape(self["id"]) }),
92
+ params: params,
93
+ opts: opts,
94
+ &read_body_chunk_block
95
+ )
96
+ end
97
+
86
98
  def preview_invoice_lines(preview_invoice, params = {}, opts = {})
87
99
  request_stripe_object(
88
100
  method: :get,
@@ -191,6 +203,18 @@ module Stripe
191
203
  )
192
204
  end
193
205
 
206
+ def self.pdf(quote, params = {}, opts = {}, &read_body_chunk_block)
207
+ config = opts[:client]&.config || Stripe.config
208
+ opts = { api_base: config.uploads_base }.merge(opts)
209
+ execute_resource_request_stream(
210
+ :get,
211
+ format("/v1/quotes/%<quote>s/pdf", { quote: CGI.escape(quote) }),
212
+ params,
213
+ opts,
214
+ &read_body_chunk_block
215
+ )
216
+ end
217
+
194
218
  def self.preview_invoice_lines(
195
219
  quote,
196
220
  preview_invoice,
@@ -231,47 +255,5 @@ module Stripe
231
255
  opts: opts
232
256
  )
233
257
  end
234
-
235
- def pdf(params = {}, opts = {}, &read_body_chunk_block)
236
- unless block_given?
237
- raise ArgumentError, "A read_body_chunk_block block parameter is required when calling the pdf method."
238
- end
239
-
240
- config = opts[:client]&.config || Stripe.config
241
-
242
- request_stream(
243
- method: :get,
244
- path: resource_url + "/pdf",
245
- params: params,
246
- opts: {
247
- api_base: config.uploads_base,
248
- }.merge(opts),
249
- &read_body_chunk_block
250
- )
251
- end
252
-
253
- def self.pdf(id, params = {}, opts = {}, &read_body_chunk_block)
254
- unless id.is_a?(String)
255
- raise ArgumentError,
256
- "id should be a string representing the ID of an API resource"
257
- end
258
-
259
- unless block_given?
260
- raise ArgumentError, "A read_body_chunk_block block parameter is required when calling the pdf method."
261
- end
262
-
263
- config = opts[:client]&.config || Stripe.config
264
-
265
- resp = execute_resource_request_stream(
266
- :get,
267
- "#{resource_url}/#{CGI.escape(id)}/pdf",
268
- params,
269
- {
270
- api_base: config.uploads_base,
271
- }.merge(opts),
272
- &read_body_chunk_block
273
- )
274
- resp
275
- end
276
258
  end
277
259
  end
@@ -2,9 +2,8 @@
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
+ # Shipping rates describe the price of shipping presented to your customers and
6
+ # applied to a purchase. For more information, see [Charge for shipping](https://stripe.com/docs/payments/during-payment/charge-shipping).
8
7
  class ShippingRate < APIResource
9
8
  extend Stripe::APIOperations::Create
10
9
  extend Stripe::APIOperations::List
@@ -0,0 +1,39 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ module Tax
6
+ # Tax forms are legal documents which are delivered to one or more tax authorities for information reporting purposes.
7
+ #
8
+ # Related guide: [US tax reporting for Connect platforms](https://stripe.com/docs/connect/tax-reporting)
9
+ class Form < APIResource
10
+ extend Stripe::APIOperations::List
11
+
12
+ OBJECT_NAME = "tax.form"
13
+
14
+ def pdf(params = {}, opts = {}, &read_body_chunk_block)
15
+ config = opts[:client]&.config || Stripe.config
16
+ opts = { api_base: config.uploads_base }.merge(opts)
17
+ request_stream(
18
+ method: :get,
19
+ path: format("/v1/tax/forms/%<id>s/pdf", { id: CGI.escape(self["id"]) }),
20
+ params: params,
21
+ opts: opts,
22
+ &read_body_chunk_block
23
+ )
24
+ end
25
+
26
+ def self.pdf(id, params = {}, opts = {}, &read_body_chunk_block)
27
+ config = opts[:client]&.config || Stripe.config
28
+ opts = { api_base: config.uploads_base }.merge(opts)
29
+ execute_resource_request_stream(
30
+ :get,
31
+ format("/v1/tax/forms/%<id>s/pdf", { id: CGI.escape(id) }),
32
+ params,
33
+ opts,
34
+ &read_body_chunk_block
35
+ )
36
+ end
37
+ end
38
+ end
39
+ end
@@ -91,6 +91,7 @@ require "stripe/resources/subscription"
91
91
  require "stripe/resources/subscription_item"
92
92
  require "stripe/resources/subscription_schedule"
93
93
  require "stripe/resources/tax/calculation"
94
+ require "stripe/resources/tax/form"
94
95
  require "stripe/resources/tax/registration"
95
96
  require "stripe/resources/tax/settings"
96
97
  require "stripe/resources/tax/transaction"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Stripe
4
- VERSION = "8.7.0-beta.1"
4
+ VERSION = "8.7.0-beta.2"
5
5
  end
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: 8.7.0.pre.beta.1
4
+ version: 8.7.0.pre.beta.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stripe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-07-13 00:00:00.000000000 Z
11
+ date: 2023-07-28 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.
@@ -144,6 +144,7 @@ files:
144
144
  - lib/stripe/resources/subscription_item.rb
145
145
  - lib/stripe/resources/subscription_schedule.rb
146
146
  - lib/stripe/resources/tax/calculation.rb
147
+ - lib/stripe/resources/tax/form.rb
147
148
  - lib/stripe/resources/tax/registration.rb
148
149
  - lib/stripe/resources/tax/settings.rb
149
150
  - lib/stripe/resources/tax/transaction.rb