stripe 5.37.0 → 5.41.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 +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 +3 -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/reversal.rb +3 -2
- data/lib/stripe/resources/shipping_rate.rb +12 -0
- 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 +2 -0
- data/lib/stripe/stripe_client.rb +1 -0
- 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: 1fd45fe315151a7731bb10cc98d81b8db23a24d4defefc1faca38591d5f5484b
|
4
|
+
data.tar.gz: 5d4db093fa51a3e11cd63bc52deca194c50efa421ccb6845b74f76b3992e3c79
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
1
|
+
5.41.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,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
|
@@ -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
|
@@ -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
|
@@ -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
@@ -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"
|
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.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-
|
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
|