stripe 5.36.0 → 5.40.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +20 -0
- data/README.md +1 -0
- data/VERSION +1 -1
- data/lib/stripe/error_object.rb +2 -3
- data/lib/stripe/instrumentation.rb +3 -1
- data/lib/stripe/object_types.rb +2 -1
- data/lib/stripe/resources/application_fee_refund.rb +2 -1
- data/lib/stripe/resources/bitcoin_transaction.rb +3 -2
- data/lib/stripe/resources/capability.rb +2 -1
- data/lib/stripe/resources/checkout/session.rb +11 -0
- data/lib/stripe/resources/credit_note_line_item.rb +1 -0
- data/lib/stripe/resources/customer.rb +11 -0
- data/lib/stripe/resources/customer_balance_transaction.rb +3 -2
- data/lib/stripe/resources/discount.rb +1 -0
- data/lib/stripe/resources/invoice_line_item.rb +1 -0
- data/lib/stripe/resources/issuing/card_details.rb +2 -1
- data/lib/stripe/resources/line_item.rb +1 -0
- data/lib/stripe/resources/login_link.rb +1 -0
- data/lib/stripe/resources/person.rb +1 -0
- data/lib/stripe/resources/quote.rb +10 -0
- data/lib/stripe/resources/reversal.rb +3 -2
- data/lib/stripe/resources/source_transaction.rb +1 -0
- data/lib/stripe/resources/tax_id.rb +1 -0
- data/lib/stripe/resources/usage_record.rb +1 -0
- data/lib/stripe/resources/usage_record_summary.rb +1 -0
- data/lib/stripe/resources.rb +1 -0
- data/lib/stripe/stripe_client.rb +1 -0
- data/lib/stripe/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 434184b41136a52f8565f257cd9cb24dc681f74bf4b5f55cfd6694b50c14f500
|
4
|
+
data.tar.gz: 569a1015090c49eb4d66b07c6812a358ff75caefc27b162dce33e6d1fb07db71
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 034b8b4c413a525cf3d000b2e53899368d471860ccc3e5d688760618ac0584f9ce3a698718403578077dcb875ba51299a2eca26b1240270685ac9589fc2a43b2
|
7
|
+
data.tar.gz: 1d361ed96f410d46badcdb68f369ac2b8df6acdf8669779436b5d6071d0ba079a89e1170250f6b531847bdf044b40aaa4ccc318f01cfcae3ecf94db79d3bfb46
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,25 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 5.40.0 - 2021-11-11
|
4
|
+
* [#1015](https://github.com/stripe/stripe-ruby/pull/1015) API Updates
|
5
|
+
* Add support for `expire` method on resource `Checkout.Session`
|
6
|
+
* [#1013](https://github.com/stripe/stripe-ruby/pull/1013) Add tests for child resources.
|
7
|
+
* [#1012](https://github.com/stripe/stripe-ruby/pull/1012) Add tests for namespaced resources.
|
8
|
+
* [#1011](https://github.com/stripe/stripe-ruby/pull/1011) codegen: 3 more files
|
9
|
+
|
10
|
+
## 5.39.0 - 2021-10-11
|
11
|
+
* [#1010](https://github.com/stripe/stripe-ruby/pull/1010) API Updates
|
12
|
+
* Add support for `list_payment_methods` method on resource `Customer`
|
13
|
+
|
14
|
+
## 5.38.0 - 2021-08-10
|
15
|
+
* [#993](https://github.com/stripe/stripe-ruby/pull/993) Add `request_id` to RequestEndEvent
|
16
|
+
* [#991](https://github.com/stripe/stripe-ruby/pull/991) Codegen more files
|
17
|
+
* [#989](https://github.com/stripe/stripe-ruby/pull/989) Remove unused API error types from docs.
|
18
|
+
|
19
|
+
## 5.37.0 - 2021-07-14
|
20
|
+
* [#988](https://github.com/stripe/stripe-ruby/pull/988) API Updates
|
21
|
+
* Add support for `list_computed_upfront_line_items` method on resource `Quote`
|
22
|
+
|
3
23
|
## 5.36.0 - 2021-07-09
|
4
24
|
* [#987](https://github.com/stripe/stripe-ruby/pull/987) Add support for `Quote` API
|
5
25
|
|
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.
|
1
|
+
5.40.0
|
data/lib/stripe/error_object.rb
CHANGED
@@ -69,9 +69,8 @@ module Stripe
|
|
69
69
|
@values[:source]
|
70
70
|
end
|
71
71
|
|
72
|
-
# The type of error returned. One of `
|
73
|
-
# `
|
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
|
data/lib/stripe/object_types.rb
CHANGED
@@ -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,10 @@ 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
82
|
Sigma::ScheduledQueryRun::OBJECT_NAME => Sigma::ScheduledQueryRun,
|
83
|
+
SKU::OBJECT_NAME => SKU,
|
83
84
|
Source::OBJECT_NAME => Source,
|
84
85
|
SourceTransaction::OBJECT_NAME => SourceTransaction,
|
85
86
|
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
|
@@ -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
|
@@ -12,6 +12,7 @@ module Stripe
|
|
12
12
|
custom_method :accept, http_verb: :post
|
13
13
|
custom_method :cancel, http_verb: :post
|
14
14
|
custom_method :finalize_quote, http_verb: :post, http_path: "finalize"
|
15
|
+
custom_method :list_computed_upfront_line_items, http_verb: :get, http_path: "computed_upfront_line_items"
|
15
16
|
custom_method :list_line_items, http_verb: :get, http_path: "line_items"
|
16
17
|
|
17
18
|
def accept(params = {}, opts = {})
|
@@ -41,6 +42,15 @@ module Stripe
|
|
41
42
|
)
|
42
43
|
end
|
43
44
|
|
45
|
+
def list_computed_upfront_line_items(params = {}, opts = {})
|
46
|
+
request_stripe_object(
|
47
|
+
method: :get,
|
48
|
+
path: resource_url + "/computed_upfront_line_items",
|
49
|
+
params: params,
|
50
|
+
opts: opts
|
51
|
+
)
|
52
|
+
end
|
53
|
+
|
44
54
|
def list_line_items(params = {}, opts = {})
|
45
55
|
request_stripe_object(
|
46
56
|
method: :get,
|
@@ -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
|
-
|
26
|
-
|
26
|
+
"a reversal using `Transfer.retrieve_reversal('transfer_id', " \
|
27
|
+
"'reversal_id'`"
|
27
28
|
end
|
28
29
|
end
|
29
30
|
end
|
data/lib/stripe/resources.rb
CHANGED
data/lib/stripe/stripe_client.rb
CHANGED
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.40.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-11-11 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.
|