stripe 5.37.0 → 5.41.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: 928fd2b57c804ad12eb84f5ba67805f90e83b8fa27bd38e08297fa7b27579807
4
- data.tar.gz: 4daf5cd408e88a6eca255217b79b3f4859bb1ed611afb0cf18ffd08d0c006f1a
3
+ metadata.gz: 1fd45fe315151a7731bb10cc98d81b8db23a24d4defefc1faca38591d5f5484b
4
+ data.tar.gz: 5d4db093fa51a3e11cd63bc52deca194c50efa421ccb6845b74f76b3992e3c79
5
5
  SHA512:
6
- metadata.gz: 64c1879e61bd7df09a413be14ade50635fe415f8a6f1a398f06bda24bfecf83ee7911fcec436f2f7db77d64b1b3c8374d566ce3d63c78333f8ca0a634b0bff43
7
- data.tar.gz: d47773322925f9e69d2e8e464c31f14df290cce83df961c2ef8e954dac06ba8e9cb53997fe6715f594afeec769ede09a395229d58ca1928b5166396f4e7c0efe
6
+ metadata.gz: 0ba186c7d33ec0c10f9dcc2967e87a930f896760aa11b79b43d6712d3b4761b21b10ef48498d52315ec1da4cfca45e0439905b2871f7b0e1eae458476ac36b8c
7
+ data.tar.gz: d84e048270bf915017efb4f92cf456f37709e55ac97d3d6c68c470ede10fed86a9d5b6e775c0c150144d1b7ab618e634ac826f0e63b780029984022ef22ee165
data/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # Changelog
2
2
 
3
+ ## 5.41.0 - 2021-11-16
4
+ * [#1017](https://github.com/stripe/stripe-ruby/pull/1017) API Updates
5
+ * Add support for new resource `ShippingRate`
6
+
7
+ ## 5.40.0 - 2021-11-11
8
+ * [#1015](https://github.com/stripe/stripe-ruby/pull/1015) API Updates
9
+ * Add support for `expire` method on resource `Checkout.Session`
10
+ * [#1013](https://github.com/stripe/stripe-ruby/pull/1013) Add tests for child resources.
11
+ * [#1012](https://github.com/stripe/stripe-ruby/pull/1012) Add tests for namespaced resources.
12
+ * [#1011](https://github.com/stripe/stripe-ruby/pull/1011) codegen: 3 more files
13
+
14
+ ## 5.39.0 - 2021-10-11
15
+ * [#1010](https://github.com/stripe/stripe-ruby/pull/1010) API Updates
16
+ * Add support for `list_payment_methods` method on resource `Customer`
17
+
18
+ ## 5.38.0 - 2021-08-10
19
+ * [#993](https://github.com/stripe/stripe-ruby/pull/993) Add `request_id` to RequestEndEvent
20
+ * [#991](https://github.com/stripe/stripe-ruby/pull/991) Codegen more files
21
+ * [#989](https://github.com/stripe/stripe-ruby/pull/989) Remove unused API error types from docs.
22
+
3
23
  ## 5.37.0 - 2021-07-14
4
24
  * [#988](https://github.com/stripe/stripe-ruby/pull/988) API Updates
5
25
  * Add support for `list_computed_upfront_line_items` method on resource `Quote`
data/README.md CHANGED
@@ -252,6 +252,7 @@ a success or error. Receives `RequestEndEvent` with the following properties:
252
252
  - `path`: Request path. (`String`)
253
253
  - `user_data`: A hash on which users may have set arbitrary data in
254
254
  `request_begin`. See above for more information. (`Hash`)
255
+ - `request_id`. HTTP request identifier.
255
256
 
256
257
  #### Example
257
258
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 5.37.0
1
+ 5.41.0
@@ -69,9 +69,8 @@ module Stripe
69
69
  @values[:source]
70
70
  end
71
71
 
72
- # The type of error returned. One of `api_connection_error`, `api_error`,
73
- # `authentication_error`, `card_error`, `idempotency_error`,
74
- # `invalid_request_error`, or `rate_limit_error`.
72
+ # The type of error returned. One of `api_error`, `card_error`,
73
+ # `idempotency_error`, or `invalid_request_error`.
75
74
  def type
76
75
  @values[:type]
77
76
  end
@@ -32,6 +32,7 @@ module Stripe
32
32
  attr_reader :method
33
33
  attr_reader :num_retries
34
34
  attr_reader :path
35
+ attr_reader :request_id
35
36
 
36
37
  # Arbitrary user-provided data in the form of a Ruby hash that's passed
37
38
  # from subscribers on `request_begin` to subscribers on `request_end`.
@@ -40,12 +41,13 @@ module Stripe
40
41
  attr_reader :user_data
41
42
 
42
43
  def initialize(duration:, http_status:, method:, num_retries:, path:,
43
- user_data: nil)
44
+ request_id:, user_data: nil)
44
45
  @duration = duration
45
46
  @http_status = http_status
46
47
  @method = method
47
48
  @num_retries = num_retries
48
49
  @path = path
50
+ @request_id = request_id
49
51
  @user_data = user_data
50
52
  freeze
51
53
  end
@@ -1,3 +1,4 @@
1
+ # File generated from our OpenAPI spec
1
2
  # frozen_string_literal: true
2
3
 
3
4
  # rubocop:disable Metrics/MethodLength
@@ -76,10 +77,11 @@ module Stripe
76
77
  Reporting::ReportType::OBJECT_NAME => Reporting::ReportType,
77
78
  Reversal::OBJECT_NAME => Reversal,
78
79
  Review::OBJECT_NAME => Review,
79
- SKU::OBJECT_NAME => SKU,
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,
84
+ SKU::OBJECT_NAME => SKU,
83
85
  Source::OBJECT_NAME => Source,
84
86
  SourceTransaction::OBJECT_NAME => SourceTransaction,
85
87
  Subscription::OBJECT_NAME => Subscription,
@@ -1,9 +1,10 @@
1
+ # File generated from our OpenAPI spec
1
2
  # frozen_string_literal: true
2
3
 
3
4
  module Stripe
4
5
  class ApplicationFeeRefund < APIResource
5
- include Stripe::APIOperations::Save
6
6
  extend Stripe::APIOperations::List
7
+ include Stripe::APIOperations::Save
7
8
 
8
9
  OBJECT_NAME = "fee_refund"
9
10
 
@@ -1,9 +1,10 @@
1
+ # File generated from our OpenAPI spec
1
2
  # frozen_string_literal: true
2
3
 
3
4
  module Stripe
5
+ # Directly retrieving BitcoinTransactions is deprecated. Please use
6
+ # the Sources API instead: https://stripe.com/docs/sources/bitcoin
4
7
  class BitcoinTransaction < APIResource
5
- # Directly retrieving BitcoinTransactions is deprecated. Please use the
6
- # Sources API instead: https://stripe.com/docs/sources/bitcoin
7
8
  extend Stripe::APIOperations::List
8
9
 
9
10
  OBJECT_NAME = "bitcoin_transaction"
@@ -1,3 +1,4 @@
1
+ # File generated from our OpenAPI spec
1
2
  # frozen_string_literal: true
2
3
 
3
4
  module Stripe
@@ -26,7 +27,7 @@ module Stripe
26
27
  def self.update(_id, _params = nil, _opts = nil)
27
28
  raise NotImplementedError,
28
29
  "Capabilities cannot be updated without an account ID. Update a " \
29
- "capability using Account.update_capability('account_id', " \
30
+ "capability using `Account.update_capability('account_id', " \
30
31
  "'capability_id', update_params)`"
31
32
  end
32
33
  end
@@ -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
@@ -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
@@ -1,3 +1,4 @@
1
+ # File generated from our OpenAPI spec
1
2
  # frozen_string_literal: true
2
3
 
3
4
  module Stripe
@@ -18,13 +19,13 @@ module Stripe
18
19
  def self.retrieve(_id, _opts = {})
19
20
  raise NotImplementedError,
20
21
  "Customer Balance Transactions cannot be retrieved without a customer ID. " \
21
- "Retrieve a Customer Balance Transaction using Customer.retrieve_balance_transaction('cus_123', 'cbtxn_123')"
22
+ "Retrieve a Customer Balance Transaction using `Customer.retrieve_balance_transaction('cus_123', 'cbtxn_123')`"
22
23
  end
23
24
 
24
25
  def self.update(_id, _params = nil, _opts = nil)
25
26
  raise NotImplementedError,
26
27
  "Customer Balance Transactions cannot be retrieved without a customer ID. " \
27
- "Update a Customer Balance Transaction using Customer.update_balance_transaction('cus_123', 'cbtxn_123', params)"
28
+ "Update a Customer Balance Transaction using `Customer.update_balance_transaction('cus_123', 'cbtxn_123', params)`"
28
29
  end
29
30
  end
30
31
  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,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
@@ -1,3 +1,4 @@
1
+ # File generated from our OpenAPI spec
1
2
  # frozen_string_literal: true
2
3
 
3
4
  module Stripe
@@ -1,3 +1,4 @@
1
+ # File generated from our OpenAPI spec
1
2
  # frozen_string_literal: true
2
3
 
3
4
  module Stripe
@@ -1,3 +1,4 @@
1
+ # File generated from our OpenAPI spec
1
2
  # frozen_string_literal: true
2
3
 
3
4
  module Stripe
@@ -1,3 +1,4 @@
1
+ # File generated from our OpenAPI spec
1
2
  # frozen_string_literal: true
2
3
 
3
4
  module Stripe
@@ -22,8 +23,8 @@ module Stripe
22
23
  def self.retrieve(_id, _opts = {})
23
24
  raise NotImplementedError,
24
25
  "Reversals cannot be retrieved without a transfer ID. Retrieve " \
25
- "a reversal using `Transfer.retrieve_reversal('transfer_id', " \
26
- "'reversal_id')`"
26
+ "a reversal using `Transfer.retrieve_reversal('transfer_id', " \
27
+ "'reversal_id'`"
27
28
  end
28
29
  end
29
30
  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
@@ -1,3 +1,4 @@
1
+ # File generated from our OpenAPI spec
1
2
  # frozen_string_literal: true
2
3
 
3
4
  module Stripe
@@ -1,3 +1,4 @@
1
+ # File generated from our OpenAPI spec
1
2
  # frozen_string_literal: true
2
3
 
3
4
  module Stripe
@@ -1,3 +1,4 @@
1
+ # File generated from our OpenAPI spec
1
2
  # frozen_string_literal: true
2
3
 
3
4
  module Stripe
@@ -1,3 +1,4 @@
1
+ # File generated from our OpenAPI spec
1
2
  # frozen_string_literal: true
2
3
 
3
4
  require "stripe/resources/account"
@@ -67,6 +68,7 @@ require "stripe/resources/reversal"
67
68
  require "stripe/resources/review"
68
69
  require "stripe/resources/setup_attempt"
69
70
  require "stripe/resources/setup_intent"
71
+ require "stripe/resources/shipping_rate"
70
72
  require "stripe/resources/sigma/scheduled_query_run"
71
73
  require "stripe/resources/sku"
72
74
  require "stripe/resources/source"
@@ -667,6 +667,7 @@ module Stripe
667
667
  method: context.method,
668
668
  num_retries: num_retries,
669
669
  path: context.path,
670
+ request_id: context.request_id,
670
671
  user_data: user_data || {}
671
672
  )
672
673
  Stripe::Instrumentation.notify(:request_end, event)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Stripe
4
- VERSION = "5.37.0"
4
+ VERSION = "5.41.0"
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: 5.37.0
4
+ version: 5.41.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-07-14 00:00:00.000000000 Z
11
+ date: 2021-11-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.
@@ -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