stripe 5.38.0 → 5.42.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 +4 -4
- data/CHANGELOG.md +18 -0
- data/VERSION +1 -1
- data/lib/stripe/connection_manager.rb +22 -1
- data/lib/stripe/object_types.rb +1 -0
- data/lib/stripe/resources/checkout/session.rb +11 -0
- data/lib/stripe/resources/customer.rb +11 -0
- data/lib/stripe/resources/discount.rb +1 -0
- data/lib/stripe/resources/issuing/card_details.rb +2 -1
- data/lib/stripe/resources/shipping_rate.rb +12 -0
- data/lib/stripe/resources/source_transaction.rb +1 -0
- data/lib/stripe/resources.rb +1 -0
- data/lib/stripe/stripe_client.rb +12 -5
- data/lib/stripe/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 59ec737c599289ebecd1ba030eadd9a2ae4ab262f1495d1de5a5ed4757cc542a
|
|
4
|
+
data.tar.gz: dbc4cbf84351eec5c7fb641db3b00cf8b92b2605aedb8efc266733238cad4f6a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: '08f077d4f908041fea497c83eb105713e3d324d39ff037067de53a4bc3f0d8bb9ba84f0c13d873c4b0a86d1d04345974ef67bb1a3051c53616368bd74f86c385'
|
|
7
|
+
data.tar.gz: 8cd83d8c0568b831e3aa17d74aa7ae81396215c98e0978f0c4ec930cd437f7d3784a9be4cce33f82454f6801607a38be9792aef0ec0242770094f059e368343f
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 5.42.0 - 2021-12-13
|
|
4
|
+
* [#1022](https://github.com/stripe/stripe-ruby/pull/1022) Add connection manager logging and include object IDs in logging.
|
|
5
|
+
|
|
6
|
+
## 5.41.0 - 2021-11-16
|
|
7
|
+
* [#1017](https://github.com/stripe/stripe-ruby/pull/1017) API Updates
|
|
8
|
+
* Add support for new resource `ShippingRate`
|
|
9
|
+
|
|
10
|
+
## 5.40.0 - 2021-11-11
|
|
11
|
+
* [#1015](https://github.com/stripe/stripe-ruby/pull/1015) API Updates
|
|
12
|
+
* Add support for `expire` method on resource `Checkout.Session`
|
|
13
|
+
* [#1013](https://github.com/stripe/stripe-ruby/pull/1013) Add tests for child resources.
|
|
14
|
+
* [#1012](https://github.com/stripe/stripe-ruby/pull/1012) Add tests for namespaced resources.
|
|
15
|
+
* [#1011](https://github.com/stripe/stripe-ruby/pull/1011) codegen: 3 more files
|
|
16
|
+
|
|
17
|
+
## 5.39.0 - 2021-10-11
|
|
18
|
+
* [#1010](https://github.com/stripe/stripe-ruby/pull/1010) API Updates
|
|
19
|
+
* Add support for `list_payment_methods` method on resource `Customer`
|
|
20
|
+
|
|
3
21
|
## 5.38.0 - 2021-08-10
|
|
4
22
|
* [#993](https://github.com/stripe/stripe-ruby/pull/993) Add `request_id` to RequestEndEvent
|
|
5
23
|
* [#991](https://github.com/stripe/stripe-ruby/pull/991) Codegen more files
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
5.
|
|
1
|
+
5.42.0
|
|
@@ -103,13 +103,34 @@ module Stripe
|
|
|
103
103
|
headers
|
|
104
104
|
)
|
|
105
105
|
|
|
106
|
-
|
|
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
|
#
|
data/lib/stripe/object_types.rb
CHANGED
|
@@ -79,6 +79,7 @@ module Stripe
|
|
|
79
79
|
Review::OBJECT_NAME => Review,
|
|
80
80
|
SetupAttempt::OBJECT_NAME => SetupAttempt,
|
|
81
81
|
SetupIntent::OBJECT_NAME => SetupIntent,
|
|
82
|
+
ShippingRate::OBJECT_NAME => ShippingRate,
|
|
82
83
|
Sigma::ScheduledQueryRun::OBJECT_NAME => Sigma::ScheduledQueryRun,
|
|
83
84
|
SKU::OBJECT_NAME => SKU,
|
|
84
85
|
Source::OBJECT_NAME => Source,
|
|
@@ -10,7 +10,18 @@ module Stripe
|
|
|
10
10
|
|
|
11
11
|
OBJECT_NAME = "checkout.session"
|
|
12
12
|
|
|
13
|
+
custom_method :expire, http_verb: :post
|
|
14
|
+
|
|
13
15
|
nested_resource_class_methods :line_item, operations: %i[list]
|
|
16
|
+
|
|
17
|
+
def expire(params = {}, opts = {})
|
|
18
|
+
request_stripe_object(
|
|
19
|
+
method: :post,
|
|
20
|
+
path: resource_url + "/expire",
|
|
21
|
+
params: params,
|
|
22
|
+
opts: opts
|
|
23
|
+
)
|
|
24
|
+
end
|
|
14
25
|
end
|
|
15
26
|
end
|
|
16
27
|
end
|
|
@@ -11,11 +11,22 @@ module Stripe
|
|
|
11
11
|
|
|
12
12
|
OBJECT_NAME = "customer"
|
|
13
13
|
|
|
14
|
+
custom_method :list_payment_methods, http_verb: :get, http_path: "payment_methods"
|
|
15
|
+
|
|
14
16
|
nested_resource_class_methods :balance_transaction,
|
|
15
17
|
operations: %i[create retrieve update list]
|
|
16
18
|
nested_resource_class_methods :tax_id,
|
|
17
19
|
operations: %i[create retrieve delete list]
|
|
18
20
|
|
|
21
|
+
def list_payment_methods(params = {}, opts = {})
|
|
22
|
+
request_stripe_object(
|
|
23
|
+
method: :get,
|
|
24
|
+
path: resource_url + "/payment_methods",
|
|
25
|
+
params: params,
|
|
26
|
+
opts: opts
|
|
27
|
+
)
|
|
28
|
+
end
|
|
29
|
+
|
|
19
30
|
custom_method :delete_discount, http_verb: :delete, http_path: "discount"
|
|
20
31
|
|
|
21
32
|
save_nested_resource :source
|
|
@@ -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
|
data/lib/stripe/resources.rb
CHANGED
|
@@ -68,6 +68,7 @@ require "stripe/resources/reversal"
|
|
|
68
68
|
require "stripe/resources/review"
|
|
69
69
|
require "stripe/resources/setup_attempt"
|
|
70
70
|
require "stripe/resources/setup_intent"
|
|
71
|
+
require "stripe/resources/shipping_rate"
|
|
71
72
|
require "stripe/resources/sigma/scheduled_query_run"
|
|
72
73
|
require "stripe/resources/sku"
|
|
73
74
|
require "stripe/resources/source"
|
data/lib/stripe/stripe_client.rb
CHANGED
|
@@ -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
|
|
data/lib/stripe/version.rb
CHANGED
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.
|
|
4
|
+
version: 5.42.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
|
+
date: 2021-12-13 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.
|
|
@@ -113,6 +113,7 @@ files:
|
|
|
113
113
|
- lib/stripe/resources/review.rb
|
|
114
114
|
- lib/stripe/resources/setup_attempt.rb
|
|
115
115
|
- lib/stripe/resources/setup_intent.rb
|
|
116
|
+
- lib/stripe/resources/shipping_rate.rb
|
|
116
117
|
- lib/stripe/resources/sigma/scheduled_query_run.rb
|
|
117
118
|
- lib/stripe/resources/sku.rb
|
|
118
119
|
- lib/stripe/resources/source.rb
|