stripe 10.4.0.pre.beta.1 → 10.5.0.pre.beta.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f7b70ab060653606fcb0aed81e4323829c6fd49c574ab49c67f2381acbe4d656
4
- data.tar.gz: 903c2861ff74cf39b2615a41d490b1cbe854973064ffeb92344d4e48380f66f6
3
+ metadata.gz: 53a312be8b3ec863d48ced7662fdff781b4d44eb86d8dbf4f6d977252106aff2
4
+ data.tar.gz: 1c0482941ccbf53abb17d584449a2ddddba22d2f4766893d10c02c5fac887aec
5
5
  SHA512:
6
- metadata.gz: 9b374960111dda05764ef8df8b03a11168c69691657258785db4615f99123f2ff7dd449e2b2b7192a32046e1560ce83f2e6d5040638041900c0f0360e80d9074
7
- data.tar.gz: dd1b8cd4032de2f537131ee94d6959d36a8043ad723d1924d42ff5051f6f5517c2d0e1ef769aad17cc0774e19432d28b5000058c8782c69a6343d48d0cbb5dba
6
+ metadata.gz: 916287bb73f70d3dad8701d4383421baf47731ab8eeac53f41afd9144e6dada784f4de89b3f12c6cafaeffd28c8874a93632ceeb08dbcb858d4af7f35140e2e7
7
+ data.tar.gz: de3cfc90d53b5f4224995b67693197cceb0addd3138913eac8a7ca56b104a608760c40b87341149f13274fbbbc0871fce8244d14cf5b14313a0a07683ec8c87f
data/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # Changelog
2
2
 
3
+ ## 10.5.0-beta.1 - 2023-12-22
4
+ * [#1302](https://github.com/stripe/stripe-ruby/pull/1302) Update generated code for beta
5
+
6
+ ## 10.4.0 - 2023-12-22
7
+ * [#1303](https://github.com/stripe/stripe-ruby/pull/1303) Update generated code
8
+ * Add support for new resource `FinancialConnections.Transaction`
9
+ * Add support for `list` and `retrieve` methods on resource `Transaction`
10
+ * Add support for `subscribe` and `unsubscribe` methods on resource `FinancialConnections.Account`
11
+ * [#1304](https://github.com/stripe/stripe-ruby/pull/1304) Add support for updatable singleton resources
12
+
3
13
  ## 10.4.0-beta.1 - 2023-12-14
4
14
  Updated stable APIs to the latest version
5
15
 
data/OPENAPI_VERSION CHANGED
@@ -1 +1 @@
1
- v715
1
+ v737
data/VERSION CHANGED
@@ -1 +1 @@
1
- 10.4.0-beta.1
1
+ 10.5.0-beta.1
@@ -0,0 +1,86 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Stripe
4
+ module APIOperations
5
+ module SingletonSave
6
+ module ClassMethods
7
+ # Updates a singleton API resource
8
+ #
9
+ # Updates the identified resource with the passed in parameters.
10
+ #
11
+ # ==== Attributes
12
+ #
13
+ # * +params+ - A hash of parameters to pass to the API
14
+ # * +opts+ - A Hash of additional options (separate from the params /
15
+ # object values) to be added to the request. E.g. to allow for an
16
+ # idempotency_key to be passed in the request headers, or for the
17
+ # api_key to be overwritten. See
18
+ # {APIOperations::Request.execute_resource_request}.
19
+ def update(params = {}, opts = {})
20
+ params.each_key do |k|
21
+ raise ArgumentError, "Cannot update protected field: #{k}" if protected_fields.include?(k)
22
+ end
23
+
24
+ request_stripe_object(
25
+ method: :post,
26
+ path: resource_url,
27
+ params: params,
28
+ opts: opts
29
+ )
30
+ end
31
+ end
32
+
33
+ # The `save` method is DEPRECATED and will be removed in a future major
34
+ # version of the library. Use the `update` method on the resource instead.
35
+ #
36
+ # Updates a singleton API resource.
37
+ #
38
+ # If the resource doesn't yet have an assigned ID and the resource is one
39
+ # that can be created, then the method attempts to create the resource.
40
+ # The resource is updated otherwise.
41
+ #
42
+ # ==== Attributes
43
+ #
44
+ # * +params+ - Overrides any parameters in the resource's serialized data
45
+ # and includes them in the create or update. If +:req_url:+ is included
46
+ # in the list, it overrides the update URL used for the create or
47
+ # update.
48
+ # * +opts+ - A Hash of additional options (separate from the params /
49
+ # object values) to be added to the request. E.g. to allow for an
50
+ # idempotency_key to be passed in the request headers, or for the
51
+ # api_key to be overwritten. See
52
+ # {APIOperations::Request.execute_resource_request}.
53
+ def save(params = {}, opts = {})
54
+ # We started unintentionally (sort of) allowing attributes sent to
55
+ # +save+ to override values used during the update. So as not to break
56
+ # the API, this makes that official here.
57
+ update_attributes(params)
58
+
59
+ # Now remove any parameters that look like object attributes.
60
+ params = params.reject { |k, _| respond_to?(k) }
61
+
62
+ values = serialize_params(self).merge(params)
63
+
64
+ resp, opts = execute_resource_request(:post, resource_url, values, opts, ["save"])
65
+ initialize_from(resp.data, opts)
66
+ end
67
+ extend Gem::Deprecate
68
+ deprecate :save, "the `update` class method (for examples " \
69
+ "see https://github.com/stripe/stripe-ruby" \
70
+ "/wiki/Migration-guide-for-v8)", 2022, 11
71
+
72
+ def self.included(base)
73
+ # Set `metadata` as additive so that when it's set directly we remember
74
+ # to clear keys that may have been previously set by sending empty
75
+ # values for them.
76
+ #
77
+ # It's possible that not every object with `Save` has `metadata`, but
78
+ # it's a close enough heuristic, and having this option set when there
79
+ # is no `metadata` field is not harmful.
80
+ base.additive_object_param(:metadata)
81
+
82
+ base.extend(ClassMethods)
83
+ end
84
+ end
85
+ end
86
+ end
@@ -5,6 +5,8 @@ module Stripe
5
5
  # ConfirmationTokens help transport client side data collected by Stripe JS over
6
6
  # to your server for confirming a PaymentIntent or SetupIntent. If the confirmation
7
7
  # is successful, values present on the ConfirmationToken are written onto the Intent.
8
+ #
9
+ # To learn more or request access, visit the related guided: [Finalize payments on the server using Confirmation Tokens](https://stripe.com/docs/payments/finalize-payments-on-the-server-confirmation-tokens).
8
10
  class ConfirmationToken < APIResource
9
11
  OBJECT_NAME = "confirmation_token"
10
12
  end
@@ -5,7 +5,7 @@ module Stripe
5
5
  # This object represents files hosted on Stripe's servers. You can upload
6
6
  # files with the [create file](https://stripe.com/docs/api#create_file) request
7
7
  # (for example, when uploading dispute evidence). Stripe also
8
- # creates files independetly (for example, the results of a [Sigma scheduled
8
+ # creates files independently (for example, the results of a [Sigma scheduled
9
9
  # query](https://stripe.com/docs/api#scheduled_queries)).
10
10
  #
11
11
  # Related guide: [File upload guide](https://stripe.com/docs/file-upload)
@@ -7,7 +7,7 @@ module Stripe
7
7
  #
8
8
  # Related guide: [Using the Settings API](https://stripe.com/docs/tax/settings-api)
9
9
  class Settings < SingletonAPIResource
10
- include Stripe::APIOperations::Save
10
+ include Stripe::APIOperations::SingletonSave
11
11
 
12
12
  OBJECT_NAME = "tax.settings"
13
13
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Stripe
4
- VERSION = "10.4.0-beta.1"
4
+ VERSION = "10.5.0-beta.1"
5
5
  end
data/lib/stripe.rb CHANGED
@@ -26,6 +26,7 @@ require "stripe/api_operations/list"
26
26
  require "stripe/api_operations/nested_resource"
27
27
  require "stripe/api_operations/request"
28
28
  require "stripe/api_operations/save"
29
+ require "stripe/api_operations/singleton_save"
29
30
  require "stripe/api_operations/search"
30
31
 
31
32
  # API resource support classes
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: 10.4.0.pre.beta.1
4
+ version: 10.5.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: 2023-12-15 00:00:00.000000000 Z
11
+ date: 2023-12-22 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.
@@ -39,6 +39,7 @@ files:
39
39
  - lib/stripe/api_operations/request.rb
40
40
  - lib/stripe/api_operations/save.rb
41
41
  - lib/stripe/api_operations/search.rb
42
+ - lib/stripe/api_operations/singleton_save.rb
42
43
  - lib/stripe/api_resource.rb
43
44
  - lib/stripe/api_resource_test_helpers.rb
44
45
  - lib/stripe/api_version.rb