stripe 8.6.0.pre.beta.4 → 8.6.0.pre.beta.5

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: 8e7519c6f28a8327b6653a879c443e420d3939b228d3ce7e26d78fb5059d2508
4
- data.tar.gz: ec5c5dab4ae100c4266cb7f482edb7428498896412ef03a5879e2f53ce86010d
3
+ metadata.gz: 9bbe5f8429142f8ca731c92b88cdb7ce4c13ac0dc47f736b479c4e12ea73ce53
4
+ data.tar.gz: 3fecbead2127d4a54204e04107edf6b9131cce54c94bbc7c550318127354cc03
5
5
  SHA512:
6
- metadata.gz: f96ccd66620b95fc1727bce8d8bab15b5749049e21aa5276f6733c596aea93ab66074d03df67c118ef07cb598f625655fbb513d2288b6a517b300f2fb215aaef
7
- data.tar.gz: 8163d80485ac0adc4797a52f22c832121cb690e0f7a07f35706be90bd2818be4ad3eb15bb464397defa9cca30b701f7c62d52ca8f48c6055eff3778bf29b4406
6
+ metadata.gz: f386d2f8fbce74b1ea1e898ae28a983689af6ddd87a9ac98b4f60b98866780192d35a89abf80cfbb01630b0dd6ba378486c59b97ab6cb3b9065c347702917260
7
+ data.tar.gz: 0cf9d291677ec2fd7186c47c408de3436cca0c3dcd9396d4b388cbdb5cc0b4f9ec6fb992fd99b35cf159f70a5f79de94f1a01cc1f065bca79de9212edf7abf3a
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 8.6.0-beta.5 - 2023-06-01
4
+ * [#1227](https://github.com/stripe/stripe-ruby/pull/1227) Update generated code for beta
5
+ * [#1228](https://github.com/stripe/stripe-ruby/pull/1228) Document raw_request
6
+ * [#1222](https://github.com/stripe/stripe-ruby/pull/1222) Update generated code for beta
7
+ * [#1224](https://github.com/stripe/stripe-ruby/pull/1224) Handle developer message in preview error responses
8
+
3
9
  ## 8.6.0-beta.4 - 2023-05-19
4
10
  * [#1220](https://github.com/stripe/stripe-ruby/pull/1220) Update generated code for beta
5
11
  * Add support for `subscribe` and `unsubscribe` methods on resource `FinancialConnections.Account`
data/Gemfile CHANGED
@@ -25,6 +25,9 @@ group :development do
25
25
  # up-to-date, but it's not the end of the world if it's not.
26
26
  gem "rubocop", "0.80"
27
27
 
28
+ # jaro_winkler 1.5.5 installation fails for jruby
29
+ gem "jaro_winkler", "1.5.4"
30
+
28
31
  platforms :mri do
29
32
  gem "byebug"
30
33
  gem "pry"
data/OPENAPI_VERSION CHANGED
@@ -1 +1 @@
1
- v351
1
+ v361
data/README.md CHANGED
@@ -323,6 +323,17 @@ If your beta feature requires a `Stripe-Version` header to be sent, use the `Str
323
323
  Stripe.api_version += "; feature_beta=v3"
324
324
  ```
325
325
 
326
+ ### Custom requests
327
+
328
+ If you would like to send a request to an undocumented API (for example you are in a private beta), or if you prefer to bypass the method definitions in the library and specify your request details directly, you can use the `raw_request` method on `Stripe`.
329
+
330
+ ```ruby
331
+ resp = Stripe.raw_request(:post, "/v1/beta_endpoint", {param: 123}, {stripe_version: "2022-11-15; feature_beta=v3"})
332
+
333
+ # (Optional) resp is a StripeResponse. You can use `Stripe.deserialize` to get a StripeObject.
334
+ deserialized_resp = Stripe.deserialize(resp.http_body)
335
+ ```
336
+
326
337
  ## Support
327
338
 
328
339
  New features and bug fixes are released on the latest major version of the Stripe Ruby library. If you are on an older major version, we recommend that you upgrade to the latest in order to use the new features and bug fixes including those for security vulnerabilities. Older major versions of the package will continue to be available for use, but will not be receiving any updates.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 8.6.0-beta.4
1
+ 8.6.0-beta.5
@@ -4,6 +4,6 @@
4
4
  module Stripe
5
5
  module ApiVersion
6
6
  CURRENT = "2022-11-15"
7
- PREVIEW = "2023-05-16.preview-v2"
7
+ PREVIEW = "2023-05-26.preview-v2"
8
8
  end
9
9
  end
@@ -2,11 +2,10 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Stripe
5
- # To charge a credit or a debit card, you create a `Charge` object. You can
6
- # retrieve and refund individual charges as well as list all charges. Charges
7
- # are identified by a unique, random ID.
8
- #
9
- # Related guide: [Accept a payment with the Charges API](https://stripe.com/docs/payments/accept-a-payment-charges)
5
+ # The `Charge` object represents a single attempt to move money into your Stripe account.
6
+ # PaymentIntent confirmation is the most common way to create Charges, but transferring
7
+ # money to a different Stripe account through Connect also creates Charges.
8
+ # Some legacy payment flows create Charges directly, which is not recommended for new integrations.
10
9
  class Charge < APIResource
11
10
  extend Stripe::APIOperations::Create
12
11
  extend Stripe::APIOperations::List
@@ -22,8 +22,6 @@ module Stripe
22
22
  # objects or [Custom accounts](https://stripe.com/docs/api#external_accounts). Note that
23
23
  # [Radar](https://stripe.com/docs/radar), our integrated solution for automatic fraud protection,
24
24
  # performs best with integrations that use client-side tokenization.
25
- #
26
- # Related guide: [Accept a payment with Charges and Tokens](https://stripe.com/docs/payments/accept-a-payment-charges#web-create-token)
27
25
  class Token < APIResource
28
26
  extend Stripe::APIOperations::Create
29
27
 
@@ -768,10 +768,11 @@ module Stripe
768
768
  end
769
769
 
770
770
  private def specific_api_error(resp, error_data, context)
771
+ message = error_data[:message] || error_data[:developer_message]
771
772
  Util.log_error("Stripe API error",
772
773
  status: resp.http_status,
773
774
  error_code: error_data[:code],
774
- error_message: error_data[:message],
775
+ error_message: message,
775
776
  error_param: error_data[:param],
776
777
  error_type: error_data[:type],
777
778
  idempotency_key: context.idempotency_key,
@@ -792,26 +793,26 @@ module Stripe
792
793
  when 400, 404
793
794
  case error_data[:type]
794
795
  when "idempotency_error"
795
- IdempotencyError.new(error_data[:message], **opts)
796
+ IdempotencyError.new(message, **opts)
796
797
  else
797
798
  InvalidRequestError.new(
798
- error_data[:message], error_data[:param],
799
+ message, error_data[:param],
799
800
  **opts
800
801
  )
801
802
  end
802
803
  when 401
803
- AuthenticationError.new(error_data[:message], **opts)
804
+ AuthenticationError.new(message, **opts)
804
805
  when 402
805
806
  CardError.new(
806
- error_data[:message], error_data[:param],
807
+ message, error_data[:param],
807
808
  **opts
808
809
  )
809
810
  when 403
810
- PermissionError.new(error_data[:message], **opts)
811
+ PermissionError.new(message, **opts)
811
812
  when 429
812
- RateLimitError.new(error_data[:message], **opts)
813
+ RateLimitError.new(message, **opts)
813
814
  else
814
- APIError.new(error_data[:message], **opts)
815
+ APIError.new(message, **opts)
815
816
  end
816
817
  end
817
818
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Stripe
4
- VERSION = "8.6.0-beta.4"
4
+ VERSION = "8.6.0-beta.5"
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.6.0.pre.beta.4
4
+ version: 8.6.0.pre.beta.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stripe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-05-19 00:00:00.000000000 Z
11
+ date: 2023-06-01 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.