stripe 5.39.0 → 5.43.0

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: f1e54cc2d57c31541003984f4cea2ac0e6523a88974bbe060c1332ecc3b2dd13
4
- data.tar.gz: 7834d48a4ec62a379ffba64730d81304f66185ba85d07c53c645a2239f44ac89
3
+ metadata.gz: b9a53a5c91bca32fad7bf4d30c6d3ad682025e9dbfa49194f9287699b4ddc985
4
+ data.tar.gz: c45fea791b7f752d632934c53f2733ac66979d8ad169b42557daf23e00c23154
5
5
  SHA512:
6
- metadata.gz: 30661886d59dff20441b18404bf2bfc7a9e2371c68ac20bd48700d54c36ca46f29dceb87a22764ead9fb1a128949200edefa37da12fcc81b74d337d799e1cca7
7
- data.tar.gz: fac41913db0bcffa10c386c8ecd5cbeb6a1a542b8c73066a8b75b91f2860524adf202ffdbef92a2fd096566f35595e7633970af261858d10199a839096a0f7ba
6
+ metadata.gz: 1cde2b2558c66f2fb4ce6f9eedc0d29219510a4b4a546f080e2f91945ec17b74975533db641c2cbfde697c71cd1ab865da46d1dedfaeb19142630f08f8e17c88
7
+ data.tar.gz: 9d5eb1160fb1ef369ff3913a73a722490832d5ee265a08cbf14762a7f1c9aabdc3b3129728115b1b78cd6949fb38777ffa0c9a7ef63f48a9f98a05100492d384
data/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # Changelog
2
2
 
3
+ ## 5.43.0 - 2022-01-20
4
+ * [#1031](https://github.com/stripe/stripe-ruby/pull/1031) API Updates
5
+ * Add support for new resource `PaymentLink`
6
+
7
+ ## 5.42.0 - 2021-12-13
8
+ * [#1022](https://github.com/stripe/stripe-ruby/pull/1022) Add connection manager logging and include object IDs in logging.
9
+
10
+ ## 5.41.0 - 2021-11-16
11
+ * [#1017](https://github.com/stripe/stripe-ruby/pull/1017) API Updates
12
+ * Add support for new resource `ShippingRate`
13
+
14
+ ## 5.40.0 - 2021-11-11
15
+ * [#1015](https://github.com/stripe/stripe-ruby/pull/1015) API Updates
16
+ * Add support for `expire` method on resource `Checkout.Session`
17
+ * [#1013](https://github.com/stripe/stripe-ruby/pull/1013) Add tests for child resources.
18
+ * [#1012](https://github.com/stripe/stripe-ruby/pull/1012) Add tests for namespaced resources.
19
+ * [#1011](https://github.com/stripe/stripe-ruby/pull/1011) codegen: 3 more files
20
+
3
21
  ## 5.39.0 - 2021-10-11
4
22
  * [#1010](https://github.com/stripe/stripe-ruby/pull/1010) API Updates
5
23
  * Add support for `list_payment_methods` method on resource `Customer`
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.39.0
1
+ 5.43.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,
@@ -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
@@ -1,3 +1,4 @@
1
+ # File generated from our OpenAPI spec
1
2
  # frozen_string_literal: true
2
3
 
3
4
  module Stripe
@@ -1,8 +1,9 @@
1
+ # File generated from our OpenAPI spec
1
2
  # frozen_string_literal: true
2
3
 
3
4
  module Stripe
4
5
  module Issuing
5
- class CardDetails < Stripe::StripeObject
6
+ class CardDetails < StripeObject
6
7
  OBJECT_NAME = "issuing.card_details"
7
8
  end
8
9
  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
@@ -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
@@ -1,3 +1,4 @@
1
+ # File generated from our OpenAPI spec
1
2
  # frozen_string_literal: true
2
3
 
3
4
  module Stripe
@@ -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.39.0"
4
+ VERSION = "5.43.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.39.0
4
+ version: 5.43.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-10-11 00:00:00.000000000 Z
11
+ date: 2022-01-20 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: []