stripe 5.40.0 → 5.44.0

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: 434184b41136a52f8565f257cd9cb24dc681f74bf4b5f55cfd6694b50c14f500
4
- data.tar.gz: 569a1015090c49eb4d66b07c6812a358ff75caefc27b162dce33e6d1fb07db71
3
+ metadata.gz: 00ec1a11bdbe04229b1d1649fb6734fb7708ac33cc67794f04b77a3fc5944952
4
+ data.tar.gz: ea006443a2f57c24b67b3effbcc693a3ae1ed6a688ebe0dc18cf9f014fda0847
5
5
  SHA512:
6
- metadata.gz: 034b8b4c413a525cf3d000b2e53899368d471860ccc3e5d688760618ac0584f9ce3a698718403578077dcb875ba51299a2eca26b1240270685ac9589fc2a43b2
7
- data.tar.gz: 1d361ed96f410d46badcdb68f369ac2b8df6acdf8669779436b5d6071d0ba079a89e1170250f6b531847bdf044b40aaa4ccc318f01cfcae3ecf94db79d3bfb46
6
+ metadata.gz: 8cddde45a7100e9e2c7803b752218af71d16208b90d808df79aac161c0a115bc952127c971d492f72496b9d13df8e25351748e78b65cfef1ce5ec4cb0b0d4296
7
+ data.tar.gz: 7c6a3a82748389de1a1b4088219d56d7564145718d1e4beaac53be90e56899669dc50a72613023c0409b0f70d49f6f75c7ad712d10e8a65de39b25e22ceba961
data/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## 5.44.0 - 2022-02-16
4
+ * [#1032](https://github.com/stripe/stripe-ruby/pull/1032) API Updates
5
+ * Add support for `verify_microdeposits` method on resources `PaymentIntent` and `SetupIntent`
6
+
7
+
8
+ ## 5.43.0 - 2022-01-20
9
+ * [#1031](https://github.com/stripe/stripe-ruby/pull/1031) API Updates
10
+ * Add support for new resource `PaymentLink`
11
+
12
+ ## 5.42.0 - 2021-12-13
13
+ * [#1022](https://github.com/stripe/stripe-ruby/pull/1022) Add connection manager logging and include object IDs in logging.
14
+
15
+ ## 5.41.0 - 2021-11-16
16
+ * [#1017](https://github.com/stripe/stripe-ruby/pull/1017) API Updates
17
+ * Add support for new resource `ShippingRate`
18
+
3
19
  ## 5.40.0 - 2021-11-11
4
20
  * [#1015](https://github.com/stripe/stripe-ruby/pull/1015) API Updates
5
21
  * Add support for `expire` method on resource `Checkout.Session`
data/README.md CHANGED
@@ -18,7 +18,7 @@ The library also provides other features. For example:
18
18
 
19
19
  ## Documentation
20
20
 
21
- See the [Ruby API docs](https://stripe.com/docs/api/ruby#intro).
21
+ See the [Ruby API docs](https://stripe.com/docs/api?lang=ruby).
22
22
 
23
23
  See [video demonstrations][youtube-playlist] covering how to use the library.
24
24
 
@@ -340,9 +340,9 @@ Update the bundled [stripe-mock] by editing the version number found in
340
340
  [api-keys]: https://dashboard.stripe.com/account/apikeys
341
341
  [connect]: https://stripe.com/connect
342
342
  [curl]: http://curl.haxx.se/docs/caextract.html
343
- [idempotency-keys]: https://stripe.com/docs/api/ruby#idempotent_requests
343
+ [idempotency-keys]: https://stripe.com/docs/api/idempotent_requests?lang=ruby
344
344
  [stripe-mock]: https://github.com/stripe/stripe-mock
345
- [versioning]: https://stripe.com/docs/api/ruby#versioning
345
+ [versioning]: https://stripe.com/docs/api/versioning?lang=ruby
346
346
  [youtube-playlist]: https://www.youtube.com/playlist?list=PLy1nL-pvL2M50RmP6ie-gdcSnfOuQCRYk
347
347
 
348
348
  <!--
data/VERSION CHANGED
@@ -1 +1 @@
1
- 5.40.0
1
+ 5.44.0
@@ -103,13 +103,34 @@ module Stripe
103
103
  headers
104
104
  )
105
105
 
106
- @mutex.synchronize do
106
+ Util.log_debug("ConnectionManager starting request",
107
+ method_name: method_name,
108
+ path: path,
109
+ process_id: Process.pid,
110
+ thread_object_id: Thread.current.object_id,
111
+ connection_manager_object_id: object_id,
112
+ connection_object_id: connection.object_id,
113
+ log_timestamp: Util.monotonic_time)
114
+
115
+ resp = @mutex.synchronize do
107
116
  # The block parameter is special here. If a block is provided, the block
108
117
  # is invoked with the Net::HTTPResponse. However, the body will not have
109
118
  # been read yet in the block, and can be streamed by calling
110
119
  # HTTPResponse#read_body.
111
120
  connection.request(request, body, &block)
112
121
  end
122
+
123
+ Util.log_debug("ConnectionManager request complete",
124
+ method_name: method_name,
125
+ path: path,
126
+ process_id: Process.pid,
127
+ thread_object_id: Thread.current.object_id,
128
+ connection_manager_object_id: object_id,
129
+ connection_object_id: connection.object_id,
130
+ response_object_id: resp.object_id,
131
+ log_timestamp: Util.monotonic_time)
132
+
133
+ resp
113
134
  end
114
135
 
115
136
  #
@@ -59,6 +59,7 @@ module Stripe
59
59
  Order::OBJECT_NAME => Order,
60
60
  OrderReturn::OBJECT_NAME => OrderReturn,
61
61
  PaymentIntent::OBJECT_NAME => PaymentIntent,
62
+ PaymentLink::OBJECT_NAME => PaymentLink,
62
63
  PaymentMethod::OBJECT_NAME => PaymentMethod,
63
64
  Payout::OBJECT_NAME => Payout,
64
65
  Person::OBJECT_NAME => Person,
@@ -79,6 +80,7 @@ module Stripe
79
80
  Review::OBJECT_NAME => Review,
80
81
  SetupAttempt::OBJECT_NAME => SetupAttempt,
81
82
  SetupIntent::OBJECT_NAME => SetupIntent,
83
+ ShippingRate::OBJECT_NAME => ShippingRate,
82
84
  Sigma::ScheduledQueryRun::OBJECT_NAME => Sigma::ScheduledQueryRun,
83
85
  SKU::OBJECT_NAME => SKU,
84
86
  Source::OBJECT_NAME => Source,
@@ -12,6 +12,7 @@ module Stripe
12
12
  custom_method :cancel, http_verb: :post
13
13
  custom_method :capture, http_verb: :post
14
14
  custom_method :confirm, http_verb: :post
15
+ custom_method :verify_microdeposits, http_verb: :post
15
16
 
16
17
  def cancel(params = {}, opts = {})
17
18
  request_stripe_object(
@@ -39,5 +40,14 @@ module Stripe
39
40
  opts: opts
40
41
  )
41
42
  end
43
+
44
+ def verify_microdeposits(params = {}, opts = {})
45
+ request_stripe_object(
46
+ method: :post,
47
+ path: resource_url + "/verify_microdeposits",
48
+ params: params,
49
+ opts: opts
50
+ )
51
+ end
42
52
  end
43
53
  end
@@ -0,0 +1,23 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ class PaymentLink < APIResource
6
+ extend Stripe::APIOperations::Create
7
+ extend Stripe::APIOperations::List
8
+ include Stripe::APIOperations::Save
9
+
10
+ OBJECT_NAME = "payment_link"
11
+
12
+ custom_method :list_line_items, http_verb: :get, http_path: "line_items"
13
+
14
+ def list_line_items(params = {}, opts = {})
15
+ request_stripe_object(
16
+ method: :get,
17
+ path: resource_url + "/line_items",
18
+ params: params,
19
+ opts: opts
20
+ )
21
+ end
22
+ end
23
+ end
@@ -11,6 +11,7 @@ module Stripe
11
11
 
12
12
  custom_method :cancel, http_verb: :post
13
13
  custom_method :confirm, http_verb: :post
14
+ custom_method :verify_microdeposits, http_verb: :post
14
15
 
15
16
  def cancel(params = {}, opts = {})
16
17
  request_stripe_object(
@@ -29,5 +30,14 @@ module Stripe
29
30
  opts: opts
30
31
  )
31
32
  end
33
+
34
+ def verify_microdeposits(params = {}, opts = {})
35
+ request_stripe_object(
36
+ method: :post,
37
+ path: resource_url + "/verify_microdeposits",
38
+ params: params,
39
+ opts: opts
40
+ )
41
+ end
32
42
  end
33
43
  end
@@ -0,0 +1,12 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ class ShippingRate < APIResource
6
+ extend Stripe::APIOperations::Create
7
+ extend Stripe::APIOperations::List
8
+ include Stripe::APIOperations::Save
9
+
10
+ OBJECT_NAME = "shipping_rate"
11
+ end
12
+ end
@@ -48,6 +48,7 @@ require "stripe/resources/mandate"
48
48
  require "stripe/resources/order"
49
49
  require "stripe/resources/order_return"
50
50
  require "stripe/resources/payment_intent"
51
+ require "stripe/resources/payment_link"
51
52
  require "stripe/resources/payment_method"
52
53
  require "stripe/resources/payout"
53
54
  require "stripe/resources/person"
@@ -68,6 +69,7 @@ require "stripe/resources/reversal"
68
69
  require "stripe/resources/review"
69
70
  require "stripe/resources/setup_attempt"
70
71
  require "stripe/resources/setup_intent"
72
+ require "stripe/resources/shipping_rate"
71
73
  require "stripe/resources/sigma/scheduled_query_run"
72
74
  require "stripe/resources/sku"
73
75
  require "stripe/resources/source"
@@ -585,7 +585,7 @@ module Stripe
585
585
  handle_error_response(resp, context)
586
586
  end
587
587
 
588
- log_response(context, request_start, http_status, resp.body)
588
+ log_response(context, request_start, http_status, resp.body, resp)
589
589
  notify_request_end(context, request_duration, http_status,
590
590
  num_retries, user_data)
591
591
 
@@ -609,7 +609,7 @@ module Stripe
609
609
  error_context = context.dup_from_response_headers(e.http_headers)
610
610
  http_status = resp.code.to_i
611
611
  log_response(error_context, request_start,
612
- e.http_status, e.http_body)
612
+ e.http_status, e.http_body, resp)
613
613
  else
614
614
  log_response_error(error_context, request_start, e)
615
615
  end
@@ -903,10 +903,13 @@ module Stripe
903
903
  body: context.body,
904
904
  idempotency_key: context.idempotency_key,
905
905
  query: context.query,
906
- config: config)
906
+ config: config,
907
+ process_id: Process.pid,
908
+ thread_object_id: Thread.current.object_id,
909
+ log_timestamp: Util.monotonic_time)
907
910
  end
908
911
 
909
- private def log_response(context, request_start, status, body)
912
+ private def log_response(context, request_start, status, body, resp)
910
913
  Util.log_info("Response from Stripe API",
911
914
  account: context.account,
912
915
  api_version: context.api_version,
@@ -921,7 +924,11 @@ module Stripe
921
924
  body: body,
922
925
  idempotency_key: context.idempotency_key,
923
926
  request_id: context.request_id,
924
- config: config)
927
+ config: config,
928
+ process_id: Process.pid,
929
+ thread_object_id: Thread.current.object_id,
930
+ response_object_id: resp.object_id,
931
+ log_timestamp: Util.monotonic_time)
925
932
 
926
933
  return unless context.request_id
927
934
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Stripe
4
- VERSION = "5.40.0"
4
+ VERSION = "5.44.0"
5
5
  end
data/stripe.gemspec CHANGED
@@ -13,16 +13,16 @@ Gem::Specification.new do |s|
13
13
  "See https://stripe.com for details."
14
14
  s.author = "Stripe"
15
15
  s.email = "support@stripe.com"
16
- s.homepage = "https://stripe.com/docs/api/ruby"
16
+ s.homepage = "https://stripe.com/docs/api?lang=ruby"
17
17
  s.license = "MIT"
18
18
 
19
19
  s.metadata = {
20
20
  "bug_tracker_uri" => "https://github.com/stripe/stripe-ruby/issues",
21
21
  "changelog_uri" =>
22
22
  "https://github.com/stripe/stripe-ruby/blob/master/CHANGELOG.md",
23
- "documentation_uri" => "https://stripe.com/docs/api/ruby",
23
+ "documentation_uri" => "https://stripe.com/docs/api?lang=ruby",
24
24
  "github_repo" => "ssh://github.com/stripe/stripe-ruby",
25
- "homepage_uri" => "https://stripe.com/docs/api/ruby",
25
+ "homepage_uri" => "https://stripe.com/docs/api?lang=ruby",
26
26
  "source_code_uri" => "https://github.com/stripe/stripe-ruby",
27
27
  }
28
28
 
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.40.0
4
+ version: 5.44.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-11 00:00:00.000000000 Z
11
+ date: 2022-02-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.
@@ -93,6 +93,7 @@ files:
93
93
  - lib/stripe/resources/order.rb
94
94
  - lib/stripe/resources/order_return.rb
95
95
  - lib/stripe/resources/payment_intent.rb
96
+ - lib/stripe/resources/payment_link.rb
96
97
  - lib/stripe/resources/payment_method.rb
97
98
  - lib/stripe/resources/payout.rb
98
99
  - lib/stripe/resources/person.rb
@@ -113,6 +114,7 @@ files:
113
114
  - lib/stripe/resources/review.rb
114
115
  - lib/stripe/resources/setup_attempt.rb
115
116
  - lib/stripe/resources/setup_intent.rb
117
+ - lib/stripe/resources/shipping_rate.rb
116
118
  - lib/stripe/resources/sigma/scheduled_query_run.rb
117
119
  - lib/stripe/resources/sku.rb
118
120
  - lib/stripe/resources/source.rb
@@ -142,15 +144,15 @@ files:
142
144
  - lib/stripe/version.rb
143
145
  - lib/stripe/webhook.rb
144
146
  - stripe.gemspec
145
- homepage: https://stripe.com/docs/api/ruby
147
+ homepage: https://stripe.com/docs/api?lang=ruby
146
148
  licenses:
147
149
  - MIT
148
150
  metadata:
149
151
  bug_tracker_uri: https://github.com/stripe/stripe-ruby/issues
150
152
  changelog_uri: https://github.com/stripe/stripe-ruby/blob/master/CHANGELOG.md
151
- documentation_uri: https://stripe.com/docs/api/ruby
153
+ documentation_uri: https://stripe.com/docs/api?lang=ruby
152
154
  github_repo: ssh://github.com/stripe/stripe-ruby
153
- homepage_uri: https://stripe.com/docs/api/ruby
155
+ homepage_uri: https://stripe.com/docs/api?lang=ruby
154
156
  source_code_uri: https://github.com/stripe/stripe-ruby
155
157
  post_install_message:
156
158
  rdoc_options: []